Skip to content

Commit

Permalink
Merge pull request #14 from EspressoSystems/jh/deploy
Browse files Browse the repository at this point in the history
Pass the hotshot addr to l2 contracts
  • Loading branch information
ImJeremyHe authored Jan 25, 2024
2 parents df5e967 + 022ed2c commit 4ad7a78
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test-node.bash
Original file line number Diff line number Diff line change
Expand Up @@ -311,19 +311,20 @@ if $force_init; then
echo == Writing l2 chain config
docker-compose run scripts write-l2-chain-config --espresso $espresso

echo == Deploying L2
sequenceraddress=`docker-compose run scripts print-address --account sequencer | tail -n 1 | tr -d '\r\n'`

docker-compose run --entrypoint /usr/local/bin/deploy poster --l1conn ws://geth:8546 --l1keystore /home/user/l1keystore --sequencerAddress $sequenceraddress --ownerAddress $sequenceraddress --l1DeployAccount $sequenceraddress --l1deployment /config/deployment.json --authorizevalidators 10 --wasmrootpath /home/user/target/machines --l1chainid=$l1chainid --l2chainconfig /config/l2_chain_config.json --l2chainname arb-dev-test --l2chaininfo /config/deployed_chain_info.json
docker-compose run --entrypoint sh poster -c "jq [.[]] /config/deployed_chain_info.json > /config/l2_chain_info.json"

if $espresso; then
echo == Deploying Espresso Contract
echo "" > espresso.env
docker-compose up -d commitment-task espresso-sequencer0 espresso-sequencer1 --wait
hotShotAddr=`curl http://localhost:60000/api/hotshot_contract`
echo "ESPRESSO_SEQUENCER_HOTSHOT_ADDRESS=$hotShotAddr" > espresso.env
fi

echo == Deploying L2
sequenceraddress=`docker-compose run scripts print-address --account sequencer | tail -n 1 | tr -d '\r\n'`

docker-compose run --entrypoint /usr/local/bin/deploy poster --l1conn ws://geth:8546 --l1keystore /home/user/l1keystore --sequencerAddress $sequenceraddress --ownerAddress $sequenceraddress --l1DeployAccount $sequenceraddress --l1deployment /config/deployment.json --authorizevalidators 10 --wasmrootpath /home/user/target/machines --l1chainid=$l1chainid --l2chainconfig /config/l2_chain_config.json --l2chainname arb-dev-test --l2chaininfo /config/deployed_chain_info.json --hotshot $hotshotAddr
docker-compose run --entrypoint sh poster -c "jq [.[]] /config/deployed_chain_info.json > /config/l2_chain_info.json"

echo == Writing configs
docker-compose run scripts write-config --espresso $espresso --hotshot-address $hotShotAddr

Expand Down

0 comments on commit 4ad7a78

Please sign in to comment.