Alexander Praetorius
You see things; and you say, 'Why?' But I dream things that never were; and I say, "Why not?" (George Bernard Shaw - irischer Dramatiker und Satiriker, 1856-1950) no rest for the wicked - catch me on the flipside ;)
`GAS` A proxy measurement which does not change with the current price of ether
Gas is an abstract unit of measurement for estimating the work
to make a transaction and including it into the next block.
Paying for gas is paying for miners’ doing the work.
If you are willing to pay more for gas, miners will mine your transaction with higher priority.
This payment is what miners earn for their work in
addition to the fixed pay for every created block.
If insufficient funds, transaction fails with `out of gas` exception
some example operations:
A list of all EVM instructions + gas costs can be found in the yellow paper
Appendix G. Fee Schedule to be read with Appendix H.
Executing a contract might depend on:
=> in practice gas estimation happens via simulation
web3.eth.estimateGas({
to: "0xc4abd0339eb8d57087278718986382264244252f",
data: "0xc6888fa10000000000000000000000000000000000000000000000000000000000000003"
}, (err, result) => console.log(result))
When making a transaction you can set:
gasCostTotal = gasUsed * gasPrice
=> DEMO TIME: Debugger Demo
function p1 ( uint x ){
if ( x > 5)
if ( x*x < 20)
XXX
}
=> DEMO TIME: ProxyFactory Demo
more information: https://ethereum.stackexchange.com/a/28848
web3.js/.py/...
remix-IDE can be used to listen to transactions and debug them
(~ backend/admin/...)
(via: MetaMask/Mist/....)
By Alexander Praetorius
You see things; and you say, 'Why?' But I dream things that never were; and I say, "Why not?" (George Bernard Shaw - irischer Dramatiker und Satiriker, 1856-1950) no rest for the wicked - catch me on the flipside ;)