New answers tagged


If you are using Remix and MetaMask (ass your tags imply), then it should be calculated for you automatically (they use the eth_estimateGas RPC call under the hood). If that is the case, you should not manually enter a gasLimit of 500,000 and instead use their estimated gas. As a note, any gas that is unused in the transaction is returned to you. For example,...

Top 50 recent answers are included