Skip to content

Commit

Permalink
feat: fix local execution
Browse files Browse the repository at this point in the history
  • Loading branch information
joanestebanr committed Sep 20, 2024
1 parent ba7ce81 commit eaab570
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/local_config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
#Include common varaibles
source $(dirname $0)/../test/scripts/env.sh

function export_values_of_genesis(){
local _GENESIS_FILE=$1
if [ ! -f $_GENESIS_FILE ]; then
echo "Error: genesis file not found: $_GENESIS_FILE"
exit 1
fi
export l1_chain_id=$(jq -r '.L1Config.chainId' $_GENESIS_FILE | tr -d '"')
export pol_token_address=$(jq -r '.L1Config.polTokenAddress' $_GENESIS_FILE)
export zkevm_rollup_address=$(jq -r '.L1Config.polygonZkEVMAddress' $_GENESIS_FILE)
export zkevm_rollup_manager_address=$(jq -r '.L1Config.polygonRollupManagerAddress' $_GENESIS_FILE)
export zkevm_global_exit_root_address=$(jq -r '.L1Config.polygonZkEVMGlobalExitRootAddress' $_GENESIS_FILE)
}



Expand Down Expand Up @@ -43,6 +55,7 @@ rm $DEST/*
kurtosis files download $ENCLAVE genesis $DEST
[ $? -ne 0 ] && echo "Error downloading genesis" && exit 1
export genesis_file=$DEST/genesis.json
export_values_of_genesis $genesis_file
kurtosis files download $ENCLAVE sequencer-keystore $DEST
[ $? -ne 0 ] && echo "Error downloading sequencer-keystore" && exit 1
export sequencer_keystore_file=$DEST/sequencer.keystore
Expand Down
9 changes: 9 additions & 0 deletions test/config/test.kurtosis_template.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
ForkUpgradeBatchNumber = 0
ForkUpgradeNewForkId = 0

[Etherman]
URL = "http://127.0.0.1:${l1_rpc_port}"

[Common]
IsValidiumMode = ${zkevm_is_validium}
ContractVersions = "elderberry"
Expand Down Expand Up @@ -124,3 +127,9 @@ SequencerPrivateKey = {}
[Aggregator.Synchronizer.Etherman]
[Aggregator.Synchronizer.Etherman.Validium]
Enabled = ${zkevm_is_validium}
[NetworkConfig.L1]
L1ChainID = ${l1_chain_id}
PolAddr = "${pol_token_address}"
ZkEVMAddr = "${zkevm_rollup_address}"
RollupManagerAddr = "${zkevm_rollup_manager_address}"
GlobalExitRootManagerAddr = "${zkevm_global_exit_root_address}"

0 comments on commit eaab570

Please sign in to comment.