You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The payable modifier can also help to reduce deployment costs. You can cut out 10 opcodes in the creation-time EVM bytecode if you declare a constructor payable. The following opcodes are cut out:
CALLVALUE
DUP1
ISZERO
PUSH2
JUMPI
PUSH1
DUP1
REVERT
JUMPDEST
POP
In Solidity, this chunk of assembly would mean the following:
if(msg.value!=0) revert();
I've compiled further gas optimisation tricks here.
The text was updated successfully, but these errors were encountered:
The
payable
modifier can also help to reduce deployment costs. You can cut out 10 opcodes in the creation-time EVM bytecode if you declare a constructorpayable
. The following opcodes are cut out:CALLVALUE
DUP1
ISZERO
PUSH2
JUMPI
PUSH1
DUP1
REVERT
JUMPDEST
POP
In Solidity, this chunk of assembly would mean the following:
I've compiled further gas optimisation tricks here.
The text was updated successfully, but these errors were encountered: