Skip to content

Conversation

@cburgdorf
Copy link
Collaborator

@cburgdorf cburgdorf commented Oct 31, 2023

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.bin because I find the term runtime bytecode less ambigious than deployed bytecode
  • Producing runtime bytecode is another variant of the --emit options. Note that the default did NOT change from abi, bytecode because there are certain contracts where we currently can not produce runtime bytecode for. These seem to be contracts that use create/create2 in __init__.
  • Related to the former point, getting the runtime bytecode is on demand e.g. --emit abi,bytecode,runtime-bytecode

@cburgdorf cburgdorf force-pushed the christoph/feat/runtime_bytecode branch 4 times, most recently from 11330a3 to e745618 Compare November 1, 2023 08:58
Copy link
Collaborator

@sbillig sbillig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sbillig sbillig merged commit 83cfbb4 into argotorg:master Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants