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
Currently, copy instructions, i.e., CALLDATACOPY, CODECOPY, EXTCODECOPY and RETURNDATACOPY, do not emit State.stmts. These instructions, and in particular CODECOPY, need to be emitted to support Yul decompilation:
For the EVM, the datacopy function is equivalent to codecopy.[1]
See for instance the ERC-20 Yul example[2]
code {
// Store the creator in slot zero.sstore(0, caller())
// Deploy the contractdatacopy(0, dataoffset("runtime"), datasize("runtime"))
return(0, datasize("runtime"))
}
Currently, copy instructions, i.e.,
CALLDATACOPY
,CODECOPY
,EXTCODECOPY
andRETURNDATACOPY
, do not emitState.stmts
. These instructions, and in particularCODECOPY
, need to be emitted to support Yul decompilation:See for instance the ERC-20 Yul example[2]
[1] https://docs.soliditylang.org/en/latest/yul.html#datasize-dataoffset-datacopy
[2] https://docs.soliditylang.org/en/latest/yul.html#complete-erc20-example
The text was updated successfully, but these errors were encountered: