Skip to content

Commit

Permalink
ops-bedrock: change devnet l1 init holder
Browse files Browse the repository at this point in the history
  • Loading branch information
Welkin committed Oct 25, 2023
1 parent 4e98121 commit 0ab8aed
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 21 deletions.
38 changes: 19 additions & 19 deletions bedrock-devnet/devnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,25 @@ def devnet_deploy(paths):
devnet_cfg_orig = pjoin(paths.contracts_bedrock_dir, 'deploy-config', 'devnetL1.json')
devnet_cfg_backup = pjoin(paths.devnet_dir, 'devnetL1.json.bak')
shutil.copy(devnet_cfg_orig, devnet_cfg_backup)
deploy_config = read_json(devnet_cfg_orig)
l1BlockTag = l1BlockTagGet()["result"]
log.info(l1BlockTag)
l1BlockTimestamp = l1BlockTimestampGet(l1BlockTag)["result"]["timestamp"]
log.info(l1BlockTimestamp)
deploy_config['l1GenesisBlockTimestamp'] = l1BlockTimestamp
deploy_config['l1StartingBlockTag'] = l1BlockTag
deploy_config['l1ChainID'] = int(bscChainId,10)
deploy_config['batchSenderAddress'] = l1_init_holder
deploy_config['l2OutputOracleProposer'] = l1_init_holder
deploy_config['baseFeeVaultRecipient'] = l1_init_holder
deploy_config['l1FeeVaultRecipient'] = l1_init_holder
deploy_config['sequencerFeeVaultRecipient'] = l1_init_holder
deploy_config['proxyAdminOwner'] = l1_init_holder
deploy_config['finalSystemOwner'] = l1_init_holder
deploy_config['portalGuardian'] = l1_init_holder
deploy_config['controller'] = l1_init_holder
deploy_config['governanceTokenOwner'] = l1_init_holder
write_json(devnet_cfg_orig, deploy_config)

if os.path.exists(paths.addresses_json_path):
log.info('Contracts already deployed.')
Expand Down Expand Up @@ -163,25 +182,6 @@ def devnet_deploy(paths):
log.info('L2 genesis and rollup configs already generated.')
else:
log.info('Generating network config.')
deploy_config = read_json(devnet_cfg_orig)
l1BlockTag = l1BlockTagGet()["result"]
log.info(l1BlockTag)
l1BlockTimestamp = l1BlockTimestampGet(l1BlockTag)["result"]["timestamp"]
log.info(l1BlockTimestamp)
deploy_config['l1GenesisBlockTimestamp'] = l1BlockTimestamp
deploy_config['l1StartingBlockTag'] = l1BlockTag
deploy_config['l1ChainID'] = int(bscChainId,10)
deploy_config['batchSenderAddress'] = l1_init_holder
deploy_config['l2OutputOracleProposer'] = l1_init_holder
deploy_config['baseFeeVaultRecipient'] = l1_init_holder
deploy_config['l1FeeVaultRecipient'] = l1_init_holder
deploy_config['sequencerFeeVaultRecipient'] = l1_init_holder
deploy_config['proxyAdminOwner'] = l1_init_holder
deploy_config['finalSystemOwner'] = l1_init_holder
deploy_config['portalGuardian'] = l1_init_holder
deploy_config['controller'] = l1_init_holder
deploy_config['governanceTokenOwner'] = l1_init_holder
write_json(devnet_cfg_orig, deploy_config)
log.info('Generating L2 genesis and rollup configs.')
run_command([
'go', 'run', 'cmd/main.go', 'genesis', 'l2',
Expand Down
3 changes: 3 additions & 0 deletions ops-bedrock/l1-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ cd genesis
npm install
cd ..

sed -i -e "s/INIT_HOLDER=\"0x04d63aBCd2b9b1baa327f2Dda0f873F197ccd186\"/INIT_HOLDER=\"$INIT_HOLDER\"/g" .env
sed -i -e "s/INIT_HOLDER_PRV=\"59ba8068eb256d520179e903f43dacf6d8d57d72bd306e1bd603fdb8c8da10e8\"/INIT_HOLDER_PRV=\"$INIT_HOLDER_PRV\"/g" .env

if [ ! -f init_file_bc ]; then
bash +x ./setup_bc_node.sh native_init
echo "finish" > init_file_bc
Expand Down
4 changes: 2 additions & 2 deletions ops-bedrock/l1.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
INIT_HOLDER="0x04d63aBCd2b9b1baa327f2Dda0f873F197ccd186"
INIT_HOLDER_PRV="59ba8068eb256d520179e903f43dacf6d8d57d72bd306e1bd603fdb8c8da10e8"
INIT_HOLDER="0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
INIT_HOLDER_PRV="ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
BSC_CHAIN_ID=714

0 comments on commit 0ab8aed

Please sign in to comment.