-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
62 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cdk-erigon-rpc-local-l1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Download the cdk-erigon node configuration files. | ||
rm -r /tmp/zkevm | ||
mkdir -p data/cdk-erigon-rpc-local-l1 | ||
kurtosis files download cdk-v1 cdk-erigon-node-chain-config /tmp/zkevm | ||
kurtosis files download cdk-v1 cdk-erigon-node-chain-allocs /tmp/zkevm | ||
cp /tmp/zkevm/dynamic-kurtosis-conf.json data/cdk-erigon-rpc-local-l1 | ||
cp /tmp/zkevm/dynamic-kurtosis-allocs.json data/cdk-erigon-rpc-local-l1 | ||
|
||
# Extract the zkevm contract addresses. | ||
contract_addresses="$(kurtosis service exec cdk-v1 contracts-001 "cat /opt/zkevm/combined.json" | tail -n +2 | jq)" | ||
|
||
# Set the zkevm contract addresses in params.yml | ||
zkevm_rollup_address="$(echo "$contract_addresses" | jq --raw-output .rollupAddress)" | ||
yq -Y --in-place --arg a "$zkevm_rollup_address" '.args.zkevm_rollup_address = $a' params.yml | ||
|
||
zkevm_rollup_manager_address="$(echo "$contract_addresses" | jq --raw-output .polygonRollupManagerAddress)" | ||
yq -Y --in-place --arg a "$zkevm_rollup_manager_address" '.args.zkevm_rollup_manager_address = $a' params.yml | ||
|
||
zkevm_global_exit_root_address="$(echo "$contract_addresses" | jq --raw-output .polygonZkEVMGlobalExitRootAddress)" | ||
yq -Y --in-place --arg a "$zkevm_global_exit_root_address" '.args.zkevm_global_exit_root_address = $a' params.yml | ||
|
||
pol_token_address="$(echo "$contract_addresses" | jq --raw-output .polTokenAddress)" | ||
yq -Y --in-place --arg a "$pol_token_address" '.args.pol_token_address = $a' params.yml | ||
|
||
zkevm_rollup_manager_block_number="$(echo "$contract_addresses" | jq --raw-output .deploymentRollupManagerBlockNumber)" | ||
yq -Y --in-place --arg a "$zkevm_rollup_manager_block_number" '.args.zkevm_rollup_manager_block_number = $a' params.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters