Linked Questions

21
votes
2answers
15k 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?
0
votes
1answer
29 views

Execution gas cost

I use web3 and truffle to get info about my testnet transactions. There are few fields about gas used per transaction, such as: gasPrice, gas, gasUsed. But how to get field 'execution cost'?
0
votes
1answer
62 views

What is the unit of measurement used in GasPrice and GasLimit?

I did a check, in ethgasstation the current safeLow = 15GWei, which is equal = 15,000,000,000 wei However, when I issue eth.getBlock("latest") what I get was: > eth.getBlock("latest") { ...
4
votes
3answers
65 views

Can a “forward” smart contract forward the received ether to another “forward” smart contract which forwards it to an address?

I am pretty new to solidity. I am trying to create a smart contract which deploys another smart contract and transfers ether to the newly created contract when a payment greater than 0.01 ether is ...
0
votes
2answers
19 views

If Ethereum gas charges based on the individual CPU instructions

I'm trying to understand exactly how gas works. Wondering if it charges based on actual individual CPU instructions (like Assembly-level x86 instruction set architecture level of detail), or if it ...
2
votes
1answer
30 views

Should I pre-buy gas to effect ethereum transaction?

I am new to ethereum. I have a few questions. Should I pre-buy gas to effect ethereum transactions? Or can I just set what is the gas price I am willing to pay so that at the time of transaction the ...
1
vote
0answers
36 views

What's the point in the 'gas' parameter passed to function 'signTransaction'? [duplicate]

I am using web3.js v1 in order to sign and send transactions: async function signAndSend(transaction) { let options = { to : transaction._parent._address, data: transaction....
-1
votes
0answers
27 views

difference between Gas and ether [duplicate]

How the Gas and ether is different in Ethereum a) Is there any built in calculation in converting Gas to ether. b) Is there any chance to change the conversion logic time to time
0
votes
1answer
32 views

How do i know how much eth the receiver will get?

I bought some ethereum a long time ago and I'm trying to buy something with it now. I want to make sure the address I'm sending it to gets a specific amount (say 2.00 ETH). When I enter the "amount to ...
2
votes
1answer
520 views

what is difference between “gas” “gas price” and “fee”?

Can we say that gas is the unit of transaction fee ? And gas price is the same transaction fee ? If so, why we do not use ether and wei instead of gas ?
137
votes
2answers
25k 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 ...
1
vote
1answer
69 views

How to do performance evaluation?

How to do the performance evaluation in terms of secs or minutes? what is the command to use in solidity?
1
vote
1answer
46 views

Transaction fees in ethereum [duplicate]

I have created an ERC20 token, but whenever I want to trnasfer it, transaction fees is deducted in ethers. But I donot want to but ethers. Cant the fee be deducted in terms of my custom token? Thanks
2
votes
2answers
422 views

ERC20 Transaction Fee - setFeeCurrency

Hi i now read everywhere that a transaction fee has to be paid in ETH. But I also found via the ethereum page the following page: https://github.com/ethereum/wiki/wiki/Standardized_Contract_APIs#...
2
votes
2answers
559 views

why are Transactions paid in Gas and not just Ether directly [duplicate]

All the explanations I heard for the Gas usage, could imho also be dealt with in Ether directly. What is it that Gas does that couldn't be done with Ether directly?

15 30 50 per page