Linked Questions

2
votes
2answers
772 views

How to optimize the gasPrice and gas options in a contract send() function? [duplicate]

There are many questions and answers about estimating the amount of gas consumed. This question is about what to do with this estimate. What values should we actually provide to gas and gasPrice in ...
1
vote
0answers
129 views

Gas estimation using web3 [duplicate]

How Accurate is the gas estimation with web3js and web3py? Can these values be trusted? if not, what circumstances will make the gas estimation deviate from the value observed after the transaction is ...
0
votes
0answers
16 views

Gas estimate not cotrect [duplicate]

I use ethers.js to estimate the erc20 token transfer gas limit. I found the gas estimate is always a little different from the actual use such as 36999 vs 41000 etc. Why this happened? They should be ...
150
votes
2answers
31k views

What is the difference between a transaction and a call?

What is the difference between a transaction and a call? In some interfaces, I can interact with contracts via calls or via transactions. What is the difference between the two, and can contracts also ...
22
votes
2answers
16k views

How do I know how much gas to use when calling a contract?

When I am calling (sending a transaction to) a contract how do I determine how much gas to use? Is there a way to calculate this upfront & what happens if I send too much / too few gas?
16
votes
1answer
6k views

How much does it cost to use a contract?

Still new to ethereum and would like to know the price for a contract.
14
votes
3answers
815 views

How come I need to specify a higher gasLimit than estimateGas?

If a contract call predictably requires 41043 of gas to be processed as estimated by estimateGas, how come I need to specify gasLimit of ~70000 to be processed?
8
votes
2answers
4k views

How to estimate the cost to call a Smart Contract method?

After succesfully deployed this Smart Contract on Ethereum testnet https://testnet.etherscan.io/address/0x27c042342C9ba937214117e11A4970A6145034cB is it possible to calculate how much gas is going ...
11
votes
2answers
542 views

Can I send gas to another user?

Gas is purchased using Ether, does that mean I can send gas as a separate coin?
5
votes
2answers
1k views

Including transactions fees when sending out ETH from a smart contract

Let's say I have a simple Solidity wallet contract as shown below. When I want to withdraw from the contract using send the transaction fees (gas cost) are reduced from the amount the receiving party ...
5
votes
1answer
1k views

Is it possible to calculate the gas costs of a transaction exactly upfront?

In the Ethereum wallet there are the estimated gas costs. Why is it only an estimate? Is is possible to calculate the gas costs precisely upfront?
2
votes
1answer
2k views

How to estimate gas for my function using web3 js only?

Hi this is my solidity function function closeBid(string _product) public{ } I want to estimate gas for this function so in web3 js I called this like var gas = MyContract.closeBid()....
5
votes
1answer
500 views

Is it possible to deplete all funds in an Ethereum account?

I have an Ethereum account loaded with Ethers and I need to spend all of them, leaving account final balance at exactly zero Weis. Is that possible? I know using method eth_estimateGas() and ...
1
vote
1answer
865 views

Can a transaction's gas cost change?

I encountered a strange issue on Ropsten Testnet. I deployed a payable contract successfully and tried to send ethers to it. I didn't know how much gas it required, so I gradually increased gasLimit. ...
0
votes
2answers
561 views

Maximum gas consumption of calling a contract method

I want to evaluate the maximum gas consumption (minimum safe gas limit that will not fail) that calling a specific contract method would consume given that I have the contract source code / byte code. ...

15 30 50 per page