Skip to content

Simplify env/*.json creation #790

@lemunozm

Description

@lemunozm

Right now the steps are:

  1. Run deployment script
    1. Creates custom env/latest/<chainid>-latest.json file (through JsonRegistry)
      1. This step stores the contract addresses and version per contract
    2. Creates the default broadcast/<script>.s.sol/<chainid>/latest.json
  2. Run update_network_config.py
    1. Reads env/latest/<chainid>-latest.json
    2. Reads broadcast/<script>.s.sol/<chainid>/latest.json
    3. Populates env/<netwok>.json file

We don't need env/latest/<chainid>-latest.json and JsonRegistry. We can get the contract addresses from the broadcast file, and we can just write the versioning in the own broadcast/<script>.s.sol/<chainid>/latest.json after stopBroadcast(). With this, we have just one file with all the deployment information. update_network_config.py can later read one file.

Benefits:

  • Easier to infer from where the values come.
  • Only one single file that we can share by just copying the file after a new deployment.
  • Simplify deployment scripts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions