-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
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
datacopyfunction is equivalent tocodecopy.[1]
See for instance the ERC-20 Yul example[2]
code {
// Store the creator in slot zero.
sstore(0, caller())
// Deploy the contract
datacopy(0, dataoffset("runtime"), datasize("runtime"))
return(0, datasize("runtime"))
}[1] https://docs.soliditylang.org/en/latest/yul.html#datasize-dataoffset-datacopy
[2] https://docs.soliditylang.org/en/latest/yul.html#complete-erc20-example
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Projects
Status
Todo