Skip to content

Commit

Permalink
feat: add op_batcher + op_deployer
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Jun 6, 2024
1 parent 1638844 commit 55c42e4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 24 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ RUN git clone https://github.com/ethereum-optimism/optimism.git && \
git checkout develop && \
git pull origin develop && \
pnpm install && \
pnpm build
pnpm build && \
cd op-node && \
make



# Use multi-stage build to keep the final image lean
Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@ optimism_package:
participants:
- el_type: op-geth
cl_type: op-node
network_params:
network: kurtosis
network_id: "2151908"
seconds_per_slot: 2
ethereum_package:
participants:
- el_type: geth
#- el_type: reth
- el_type: reth
network_params:
preset: minimal
additional_services:
- dora
#- blockscout

- blockscout
```
8 changes: 2 additions & 6 deletions network_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@ optimism_package:
participants:
- el_type: op-geth
cl_type: op-node
network_params:
network: kurtosis
network_id: "2151908"
seconds_per_slot: 2
ethereum_package:
participants:
- el_type: geth
#- el_type: reth
- el_type: reth
network_params:
preset: minimal
additional_services:
- dora
#- blockscout
- blockscout

21 changes: 11 additions & 10 deletions src/contracts/contract_deployer.star
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,22 @@ def launch_contract_deployer(
"forge script scripts/Deploy.s.sol:Deploy --private-key $GS_ADMIN_PRIVATE_KEY --broadcast --rpc-url $L1_RPC_URL",
"sleep 3",
"CONTRACT_ADDRESSES_PATH=$DEPLOYMENT_OUTFILE forge script scripts/L2Genesis.s.sol:L2Genesis --sig 'runWithStateDump()' --chain-id $L2_CHAIN_ID",
"cd /workspace/optimism/op-node",
"go run cmd/main.go genesis l2 \
--l1-rpc $L1_RPC_URL \
--deploy-config $DEPLOY_CONFIG_PATH \
--l2-allocs $STATE_DUMP_PATH \
--l1-deployments $DEPLOYMENT_OUTFILE \
--outfile.l2 /network-configs/genesis.json \
--outfile.rollup /network-configs/rollup.json",
"cd /workspace/optimism/op-node/bin",
"./op-node genesis l2 \
--l1-rpc $L1_RPC_URL \
--deploy-config $DEPLOY_CONFIG_PATH \
--l2-allocs $STATE_DUMP_PATH \
--l1-deployments $DEPLOYMENT_OUTFILE \
--outfile.l2 /network-configs/genesis.json \
--outfile.rollup /network-configs/rollup.json",
"mv $DEPLOY_CONFIG_PATH /network-configs/getting-started.json",
"mv $DEPLOYMENT_OUTFILE /network-configs/kurtosis.json",
"mv $STATE_DUMP_PATH /network-configs/state-dump.json",
"echo -n $GS_SEQUENCER_PRIVATE_KEY > /network-configs/GS_SEQUENCER_PRIVATE_KEY",
"echo -n $GS_BATCHER_PRIVATE_KEY > /network-configs/GS_BATCHER_PRIVATE_KEY",
"echo -n $GS_PROPOSER_PRIVATE_KEY > /network-configs/GS_PROPOSER_PRIVATE_KEY",
"cat $DEPLOYMENT_OUTFILE | jq -r .L2OutputOracleProxy > /network-configs/L2OutputOracleProxy.json",
"cat /network-configs/kurtosis.json | jq -r .L2OutputOracleProxy > /network-configs/L2OutputOracleProxy.json",
"cat /network-configs/kurtosis.json | jq -r .L1StandardBridgeProxy > /network-configs/L1StandardBridgeProxy.json",
]
),
wait="2000s",
Expand All @@ -98,7 +99,7 @@ def launch_contract_deployer(

l2oo_address = plan.run_sh(
description="Getting the L2OutputOracleProxy address",
run="cat /network-configs/L2OutputOracleProxy.json",
run="cat /network-configs/L2OutputOracleProxy.json | tr -d '\n'",
files={"/network-configs": op_genesis.files_artifacts[0]},
)

Expand Down

0 comments on commit 55c42e4

Please sign in to comment.