Commit 082d075d authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

contracts-bedrock: delete unused `sync()` method (#9100)

* contracts-bedrock: delete unused `sync()` method

We no longer maintain the hardhat deploy artifacts found
in the `deployments` directory of `contracts-bedrock`. Keeping
them up to date requires a bunch of brittle solidity code that
isn't nice to maintain. This PR simply removes the `sync()` method
as it is no longer used in the devnet. We migrated towards using
the `superchain-registry` style JSON files to generate the genesis
files. A follow up PR will remove the `deployments` artifacts
and the source of truth for the contract addresses will be
`superchain-registry`.

By removing this code, we can incrementally refactor the deploy
scripts to be much more simple to read and maintain. It removes
code that is already dead and unused in hot paths which will speed
up the compilation time for the smart contracts.

* devnet: remove call to `sync()`

The `sync()` command is now deprecated

* devnet: replace legacy flag usage

Use `addresses.json` over hh deploy artifacts
parent 65e01316
...@@ -149,12 +149,6 @@ def deploy_contracts(paths): ...@@ -149,12 +149,6 @@ def deploy_contracts(paths):
shutil.copy(paths.l1_deployments_path, paths.addresses_json_path) shutil.copy(paths.l1_deployments_path, paths.addresses_json_path)
log.info('Syncing contracts.')
run_command([
'forge', 'script', fqn, '--sig', 'sync()',
'--rpc-url', 'http://127.0.0.1:8545'
], env={}, cwd=paths.contracts_bedrock_dir)
def init_devnet_l1_deploy_config(paths, update_timestamp=False): def init_devnet_l1_deploy_config(paths, update_timestamp=False):
deploy_config = read_json(paths.devnet_config_template_path) deploy_config = read_json(paths.devnet_config_template_path)
if update_timestamp: if update_timestamp:
...@@ -223,7 +217,7 @@ def devnet_deploy(paths): ...@@ -223,7 +217,7 @@ def devnet_deploy(paths):
'go', 'run', 'cmd/main.go', 'genesis', 'l2', 'go', 'run', 'cmd/main.go', 'genesis', 'l2',
'--l1-rpc', 'http://localhost:8545', '--l1-rpc', 'http://localhost:8545',
'--deploy-config', paths.devnet_config_path, '--deploy-config', paths.devnet_config_path,
'--deployment-dir', paths.deployment_dir, '--l1-deployments', paths.addresses_json_path,
'--outfile.l2', paths.genesis_l2_path, '--outfile.l2', paths.genesis_l2_path,
'--outfile.rollup', paths.rollup_config_path '--outfile.rollup', paths.rollup_config_path
], cwd=paths.op_node_dir) ], cwd=paths.op_node_dir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment