• Mark Tyneway's avatar
    contracts-bedrock: modularize config (#9475) · 3b8933d3
    Mark Tyneway authored
    * contracts-bedrock: modularize config
    
    All env var based config for the deploy scripts is centralized
    into a single library called `Config`. Any `vm.env` or `vm.envOr`
    calls should be added here so that it is easy to track the full
    set of configuration options. Having this library makes configuration
    much more self documenting for the deploy scripts.
    
    This modularization is meant to make the migration away the old
    hardhat deploy style architecture much easier. Now that we have
    a canonical set of config values, we can be sure that anything
    behind the abstraction is applied properly across the codebase
    when it is changed.
    
    There is a bunch of deprecated config, that will be able to
    be deleted after https://github.com/ethereum-optimism/optimism/pull/9315
    is merged along with some changes around where the default output
    location for deploy artifacts is. Right now it is in the deployment
    context directory, which the entire concept of deployment context
    comes from hardhat deploy, which doesn't necessarily make sense
    anymore. Right now it ends up in `deployments/<deploy-context>/.deploy`.
    In the future, it will likely end up in the root of the contracts
    directory by default and then an override can be provided where
    the override is expected to be the absolute path to the desired
    output location. This will greatly improve the devex and maintainability
    of the deploy script.
    
    * lint: fix
    3b8933d3
Deploy.s.sol 56.9 KB