1
0
stack-orchestrator/app/data/config/fixturenet-optimism/run-op-proposer.sh
prathamesh0 7f3a33564a Upgrade Optimism and add op-proposer (#364)
* Use the latest stable optimism release

* Remove unnecessary repos from repo-list

* Add op-proposer service to fixturenet-optimism stack

* Add jq and bash to op-proposer image

* Update instructions

* Update op-batcher and op-geth commands

Former-commit-id: 988be0ef9ab6c4f3b74431ca0bd31c41fa0584b0
2023-04-25 10:41:47 +05:30

37 lines
824 B
Bash
Executable File

#!/bin/sh
set -e
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
CERC_L1_RPC="${CERC_L1_RPC:-${DEFAULT_CERC_L1_RPC}}"
# Read the L2OutputOracle contract address from the deployment
L2OO_DEPLOYMENT=$(cat /contracts-bedrock/deployments/getting-started/L2OutputOracle.json)
L2OO_ADDR=$(echo "$L2OO_DEPLOYMENT" | jq -r '.address')
# Get Proposer key from keys.json
PROPOSER_KEY=$(jq -r '.Proposer.privateKey' /l2-accounts/keys.json | tr -d '"')
cleanup() {
echo "Signal received, cleaning up..."
kill ${proposer_pid}
wait
echo "Done"
}
trap 'cleanup' INT TERM
# Run op-proposer
op-proposer \
--poll-interval 12s \
--rpc.port 8560 \
--rollup-rpc http://op-node:8547 \
--l2oo-address $L2OO_ADDR \
--private-key $PROPOSER_KEY \
--l1-eth-rpc $CERC_L1_RPC \
&
proposer_pid=$!
wait $proposer_pid