Skip to content

Commit

Permalink
squashme
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaytonNorthey92 committed Nov 20, 2024
1 parent 3b0b10f commit 1d87dcc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/localnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
- name: "run localnet"
run: docker compose -f ./e2e/docker-compose.yml up -d

- name: "kill an op-node after a minute"
run: sleep 60 && docker compose -f ./e2e/docker-compose.yml down op-node
- name: "kill an op-node after 15 seconds, then wait 3 minutes (the healthcheck interval + time for another sequencer to take over)"
run: sleep 15 && docker compose -f ./e2e/docker-compose.yml down op-node && sleep 180

- name: "get localnet stats"
working-directory: ./e2e/monitor
Expand Down
2 changes: 1 addition & 1 deletion e2e/deploy-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"l2OutputOracleProposer": "0x78697c88847dfbbb40523e42c1f2e28a13a170be",
"l2OutputOracleChallenger": "0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65",
"l2GenesisBlockGasLimit": "0x1c9c380",
"l1BlockTime": 6,
"l1BlockTime": 3,
"baseFeeVaultRecipient": "0x14dC79964da2C08b23698B3D3cc7Ca32193d9955",
"l1FeeVaultRecipient": "0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f",
"sequencerFeeVaultRecipient": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720",
Expand Down
6 changes: 3 additions & 3 deletions e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:
- "-rpcport=18443"
- "-rpcconnect=bitcoind"
- "generatetoaddress"
- "1000" # need to generate a lot for greater chance to not spend coinbase
- "3000" # need to generate a lot for greater chance to not spend coinbase
- "$BTC_ADDRESS"
restart: on-failure
networks:
Expand Down Expand Up @@ -174,7 +174,7 @@ services:
command:
- "--dev"
- "--dev.period"
- "6"
- "3"
- "--keystore"
- "/tmp/keystore"
- "--password"
Expand Down Expand Up @@ -340,7 +340,7 @@ services:
- "--l1.trustrpc"
- "--log.level=info"
- "--l1.trustrpc=true"
- "--l1.http-poll-interval=6s"
- "--l1.http-poll-interval=1s"
- "--p2p.no-discovery"
- "--p2p.priv.path=/tmp/op-node-priv-key.txt"
- "--p2p.sequencer.key=${ADMIN_PRIVATE_KEY}"
Expand Down
14 changes: 7 additions & 7 deletions e2e/genesisl2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ JSON_RPC=$OP_GETH_L1_RPC

# start geth in a local container
# wait for geth to become responsive
until curl --silent --fail $JSON_RPC -X 'POST' -H 'Content-Type: application/json' --data "{\"jsonrpc\":\"2.0\", \"id\":1, \"method\": \"net_version\", \"params\": []}"; do sleep 6; done
until curl --silent --fail $JSON_RPC -X 'POST' -H 'Content-Type: application/json' --data "{\"jsonrpc\":\"2.0\", \"id\":1, \"method\": \"net_version\", \"params\": []}"; do sleep 3; done

sleep 6
sleep 3

# extract the variables we need from json output
MY_ADDRESS="0x78697c88847dfbbb40523e42c1f2e28a13a170be"
Expand All @@ -21,28 +21,28 @@ TRANSACTION="0x$(cat output/deployment.json | jq --raw-output '.transaction')"
DEPLOYER_ADDRESS="0x$(cat output/deployment.json | jq --raw-output '.address')"


sleep 6
sleep 3

# send gas money to signer
curl $JSON_RPC -X 'POST' -H 'Content-Type: application/json' --data "{\"jsonrpc\":\"2.0\", \"id\":1, \"method\": \"eth_sendTransaction\", \"params\": [{\"from\":\"$MY_ADDRESS\",\"to\":\"$ONE_TIME_SIGNER_ADDRESS\",\"value\":\"$GAS_COST\"}]}"

sleep 6
sleep 3

# deploy the deployer contract
curl $JSON_RPC -X 'POST' -H 'Content-Type: application/json' --data "{\"jsonrpc\":\"2.0\", \"id\":1, \"method\": \"eth_sendRawTransaction\", \"params\": [\"$TRANSACTION\"]}"

sleep 6
sleep 3

# deploy our contract
# contract: pragma solidity 0.5.8; contract Apple {function banana() external pure returns (uint8) {return 42;}}
BYTECODE="6080604052348015600f57600080fd5b5060848061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c8063c3cafc6f14602d575b600080fd5b6033604f565b604051808260ff1660ff16815260200191505060405180910390f35b6000602a90509056fea165627a7a72305820ab7651cb86b8c1487590004c2444f26ae30077a6b96c6bc62dda37f1328539250029"
MY_CONTRACT_ADDRESS=$(curl $JSON_RPC -X 'POST' -H 'Content-Type: application/json' --silent --data "{\"jsonrpc\":\"2.0\", \"id\":1, \"method\": \"eth_call\", \"params\": [{\"from\":\"$MY_ADDRESS\",\"to\":\"$DEPLOYER_ADDRESS\", \"data\":\"0x0000000000000000000000000000000000000000000000000000000000000000$BYTECODE\"}, \"latest\"]}" | jq --raw-output '.result')

sleep 6
sleep 3

curl $JSON_RPC -X 'POST' -H 'Content-Type: application/json' --data "{\"jsonrpc\":\"2.0\", \"id\":1, \"method\": \"eth_sendTransaction\", \"params\": [{\"from\":\"$MY_ADDRESS\",\"to\":\"$DEPLOYER_ADDRESS\", \"gas\":\"0xf4240\", \"data\":\"0x0000000000000000000000000000000000000000000000000000000000000000$BYTECODE\"}]}"

sleep 6
sleep 3

# call our contract (NOTE: MY_CONTRACT_ADDRESS is the same no matter what chain we deploy to!)
MY_CONTRACT_METHOD_SIGNATURE="c3cafc6f"
Expand Down

0 comments on commit 1d87dcc

Please sign in to comment.