Include runtime_bytecode in artifacts by cburgdorf · Pull Request #947 · argotorg/fe
What was wrong?
Currently, the compiler would only outputs the bytecode that is used for contract deployment but not the runtime bytecode that is later saved to storage and can be read out from the blockchain.
Being able to obtain the runtime bytecode is useful for contract verification.
How was it fixed?
Basically just expose the deployedBytecode that solc already gives us.
Note:
- I named the file
mycontract.runtime.binbecause I find the term runtime bytecode less ambigious than deployed bytecode - Producing runtime bytecode is another variant of the
--emitoptions. Note that the default did NOT change fromabi, bytecodebecause there are certain contracts where we currently can not produce runtime bytecode for. These seem to be contracts that usecreate/create2in__init__. - Related to the former point, getting the runtime bytecode is on demand e.g.
--emit abi,bytecode,runtime-bytecode