Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for the deployed bytecode (.bin-runtime) #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vasemkin
Copy link

Description

This pull request adds an option to export the deployedBytecode artifact (.bin-runtime).

An includeDeployed option is added, which spawns a deployed/ folder inside the output directory.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist:

  • I have tested my code in a separate Hardhat environment
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have commented my code, particularly in hard-to-understand areas

@ItsNickBarry
Copy link
Member

If we're going to support both initcode and runtime code, I think we should treat them as separate outputs of equal significance. That is, we should not nest the runtime code folder inside of the existing output folder.

Two ways to do this:

  1. output to separate folders (./init_bytecode/ and ./deployed_bytecode/)
  2. output to the same folder, and add a suffix to each file (./bytecode/Contract__init.bin and ./bytecode/Contract__deployed.bin)

The first option would require duplicating the path option.

Then, I'd like to replace the includeDeployed option with its inverse, for each output type: skipInitBytecode and skipDeployedBytecode. These would default to false.

We could go further, and duplicate most of the existing configuration options so that they can be set separately for each output type, but I think that might be excessive.

What do you think?

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