From 9b5d007d8f1b740599b37b5c674666bede7830df Mon Sep 17 00:00:00 2001 From: gzeon Date: Sun, 18 Feb 2024 03:02:10 +0800 Subject: [PATCH 1/7] fix: owner in chain info file --- scripts/config.ts | 2 +- scripts/index.ts | 3 ++- test-node.bash | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/config.ts b/scripts/config.ts index 76a51aa..4743561 100644 --- a/scripts/config.ts +++ b/scripts/config.ts @@ -377,7 +377,7 @@ function writeL3ChainConfig(argv: any) { "AllowDebugPrecompiles": true, "DataAvailabilityCommittee": false, "InitialArbOSVersion": 11, - "InitialChainOwner": "0x0000000000000000000000000000000000000000", + "InitialChainOwner": argv.l3owner, "GenesisBlockNum": 0 } } diff --git a/scripts/index.ts b/scripts/index.ts index 9f25c6e..4db3853 100644 --- a/scripts/index.ts +++ b/scripts/index.ts @@ -28,7 +28,8 @@ async function main() { l2url: { string: true, default: "ws://sequencer:8548" }, l3url: { string: true, default: "ws://l3node:3348" }, validationNodeUrl: { string: true, default: "ws://validation_node:8549" }, - l2owner: { string: true, default: "0x3f1Eae7D46d88F08fc2F8ed27FCb2AB183EB2d0E" }, + l2owner: { string: true, default: "0x0000000000000000000000000000000000000000" }, + l3owner: { string: true, default: "0x0000000000000000000000000000000000000000" }, }) .options(stressOptions) .command(bridgeFundsCommand) diff --git a/test-node.bash b/test-node.bash index 4a778d2..a1f0494 100755 --- a/test-node.bash +++ b/test-node.bash @@ -333,12 +333,12 @@ if $force_init; then docker compose run scripts send-l1 --ethamount 1000 --to user_l1user --wait docker compose run scripts send-l1 --ethamount 0.0001 --from user_l1user --to user_l1user_b --wait --delay 500 --times 1000000 > /dev/null & - echo == Writing l2 chain config - docker compose run scripts write-l2-chain-config - sequenceraddress=`docker compose run scripts print-address --account sequencer | tail -n 1 | tr -d '\r\n'` l2ownerAddress=`docker compose run scripts print-address --account l2owner | tail -n 1 | tr -d '\r\n'` + echo == Writing l2 chain config + docker compose run scripts write-l2-chain-config --l2owner $l2ownerAddress + docker compose run --entrypoint /usr/local/bin/deploy sequencer --l1conn ws://geth:8546 --l1keystore /home/user/l1keystore --sequencerAddress $sequenceraddress --ownerAddress $l2ownerAddress --l1DeployAccount $l2ownerAddress --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 sequencer -c "jq [.[]] /config/deployed_chain_info.json > /config/l2_chain_info.json" @@ -386,8 +386,9 @@ if $force_init; then docker compose run scripts send-l2 --ethamount 100 --to user_traffic_generator --wait docker compose run scripts send-l2 --ethamount 0.0001 --from user_traffic_generator --to user_fee_token_deployer --wait --delay 500 --times 1000000 > /dev/null & + l3owneraddress=`docker compose run scripts print-address --account l3owner | tail -n 1 | tr -d '\r\n'` echo == Writing l3 chain config - docker compose run scripts write-l3-chain-config + docker compose run scripts write-l3-chain-config --l3owner $l3owneraddress if $l3_custom_fee_token; then echo == Deploying custom fee token @@ -396,7 +397,6 @@ if $force_init; then fi echo == Deploying L3 - l3owneraddress=`docker compose run scripts print-address --account l3owner | tail -n 1 | tr -d '\r\n'` l3ownerkey=`docker compose run scripts print-private-key --account l3owner | tail -n 1 | tr -d '\r\n'` l3sequenceraddress=`docker compose run scripts print-address --account l3sequencer | tail -n 1 | tr -d '\r\n'` docker compose run --entrypoint /usr/local/bin/deploy sequencer --l1conn ws://sequencer:8548 --l1keystore /home/user/l1keystore --sequencerAddress $l3sequenceraddress --ownerAddress $l3owneraddress --l1DeployAccount $l3owneraddress --l1deployment /config/l3deployment.json --authorizevalidators 10 --wasmrootpath /home/user/target/machines --l1chainid=412346 --l2chainconfig /config/l3_chain_config.json --l2chainname orbit-dev-test --l2chaininfo /config/deployed_l3_chain_info.json --maxDataSize 104857 $EXTRA_L3_DEPLOY_FLAG From 34b43a35bdb116b40fa7ba8bfc32a6e94fc6eebd Mon Sep 17 00:00:00 2001 From: gzeon Date: Sun, 18 Feb 2024 03:10:23 +0800 Subject: [PATCH 2/7] fix: use token bridge deployer --- test-node.bash | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test-node.bash b/test-node.bash index a1f0494..3091efc 100755 --- a/test-node.bash +++ b/test-node.bash @@ -324,10 +324,11 @@ if $force_init; then docker compose up --wait geth fi - echo == Funding validator, sequencer and l2owner + echo == Funding validator, sequencer, l2owner and token bridge deployer docker compose run scripts send-l1 --ethamount 1000 --to validator --wait docker compose run scripts send-l1 --ethamount 1000 --to sequencer --wait docker compose run scripts send-l1 --ethamount 1000 --to l2owner --wait + docker compose run scripts send-l1 --ethamount 1000 --to user_token_bridge_deployer --wait echo == create l1 traffic docker compose run scripts send-l1 --ethamount 1000 --to user_l1user --wait @@ -364,7 +365,8 @@ if $force_init; then sleep 10 # no idea why this sleep is needed but without it the deploy fails randomly rollupAddress=`docker compose run --entrypoint sh poster -c "jq -r '.[0].rollup.rollup' /config/deployed_chain_info.json | tail -n 1 | tr -d '\r\n'"` l2ownerKey=`docker compose run scripts print-private-key --account l2owner | tail -n 1 | tr -d '\r\n'` - docker compose run -e ROLLUP_OWNER_KEY=$l2ownerKey -e ROLLUP_ADDRESS=$rollupAddress -e PARENT_KEY=$devprivkey -e PARENT_RPC=http://geth:8545 -e CHILD_KEY=$devprivkey -e CHILD_RPC=http://sequencer:8547 tokenbridge deploy:local:token-bridge + l2_token_bridge_deployer_key=`docker compose run scripts print-private-key --account user_token_bridge_deployer | tail -n 1 | tr -d '\r\n'` + docker compose run -e ROLLUP_OWNER_KEY=$l2ownerKey -e ROLLUP_ADDRESS=$rollupAddress -e PARENT_KEY=$l2_token_bridge_deployer_key -e PARENT_RPC=http://geth:8545 -e CHILD_KEY=$l2_token_bridge_deployer_key -e CHILD_RPC=http://sequencer:8547 tokenbridge deploy:local:token-bridge docker compose run --entrypoint sh tokenbridge -c "cat network.json && cp network.json l1l2_network.json && cp network.json localNetwork.json" echo fi @@ -375,7 +377,6 @@ if $force_init; then docker compose run scripts send-l2 --ethamount 1000 --to l3sequencer --wait echo == Funding l2 deployers - docker compose run scripts send-l1 --ethamount 100 --to user_token_bridge_deployer --wait docker compose run scripts send-l2 --ethamount 100 --to user_token_bridge_deployer --wait echo == Funding token deployer @@ -407,7 +408,7 @@ if $force_init; then if $l3_token_bridge; then echo == Deploying L2-L3 token bridge - deployer_key=`printf "%s" "user_token_bridge_deployer" | openssl dgst -sha256 | sed 's/^.*= //'` + l3_token_bridge_deployer_key=`docker compose run scripts print-private-key --account user_token_bridge_deployer | tail -n 1 | tr -d '\r\n'` rollupAddress=`docker compose run --entrypoint sh poster -c "jq -r '.[0].rollup.rollup' /config/deployed_l3_chain_info.json | tail -n 1 | tr -d '\r\n'"` l2Weth="" if $tokenbridge; then @@ -415,7 +416,7 @@ if $force_init; then # we need to pull out the L2 WETH address and pass it as an override to the L2 L3 token bridge deployment l2Weth=`docker compose run --entrypoint sh tokenbridge -c "cat l1l2_network.json" | jq -r '.l2Network.tokenBridge.l2Weth'` fi - docker compose run -e PARENT_WETH_OVERRIDE=$l2Weth -e ROLLUP_OWNER_KEY=$l3ownerkey -e ROLLUP_ADDRESS=$rollupAddress -e PARENT_RPC=http://sequencer:8547 -e PARENT_KEY=$deployer_key -e CHILD_RPC=http://l3node:3347 -e CHILD_KEY=$deployer_key tokenbridge deploy:local:token-bridge + docker compose run -e PARENT_WETH_OVERRIDE=$l2Weth -e ROLLUP_OWNER_KEY=$l3ownerkey -e ROLLUP_ADDRESS=$rollupAddress -e PARENT_RPC=http://sequencer:8547 -e PARENT_KEY=$l3_token_bridge_deployer_key -e CHILD_RPC=http://l3node:3347 -e CHILD_KEY=$l3_token_bridge_deployer_key tokenbridge deploy:local:token-bridge docker compose run --entrypoint sh tokenbridge -c "cat network.json && cp network.json l2l3_network.json" echo fi From 4b1232a22a31121d8aca692aefd8f0ee36fa8029 Mon Sep 17 00:00:00 2001 From: gzeon Date: Sun, 18 Feb 2024 03:34:01 +0800 Subject: [PATCH 3/7] feat: user accounts --- README.md | 20 +++++++++++++++++--- test-node.bash | 18 +++++++++++++----- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 45665ca..be3fcfa 100644 --- a/README.md +++ b/README.md @@ -102,21 +102,35 @@ For help and further scripts, see: ## Named accounts +Here is a list of address that are used in the testnode setup, avoid using them before the deployment finishes or you might end up with some nonce race. + ```bash -./test-node.bash script print-address --account sequencer +./test-node.bash scripts print-address --account +./test-node.bash scripts print-private-key --account ``` + ``` sequencer: 0xe2148eE53c0755215Df69b2616E552154EdC584f validator: 0x6A568afe0f82d34759347bb36F14A6bB171d2CBe l2owner: 0x5E1497dD1f08C87b2d8FE23e9AAB6c1De833D927 l3owner: 0x863c904166E801527125D8672442D736194A3362 l3sequencer: 0x3E6134aAD4C4d422FF2A4391Dc315c4DDf98D1a5 -user_l1user: 0x058E6C774025ade66153C65672219191c72c7095 +user_l1traffic: 0xa2db25762CFdF7bAF602F3Bcf2ec534937725f00 +user_l1traffic_b: 0xacC305CaCB4605Aa1975001e24D25F7A5d11dC61 +user_l2traffic: 0x7641C76365faC5090d315410358073D4ba199c57 +user_l2traffic_b: 0x0d25ca3B2c4b8e8c9fe4104Fbd6D37B9563FdaE4 user_token_bridge_deployer: 0x3EaCb30f025630857aDffac9B2366F953eFE4F98 user_fee_token_deployer: 0x2AC5278D230f88B481bBE4A94751d7188ef48Ca2 ``` -While not a named account, 0x3f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e is funded on all test chains. +While not a named account, 0x3f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e is funded on all test chains and is used to fund other accounts. + +The following accounts are funded on L1, L2, and L3 respectively and can be used for testing without risk of nonce race from testnode setup: +``` +user_l1user: 0x058E6C774025ade66153C65672219191c72c7095 +user_l2user: 0xEEA8EC07A3642769168D40e3Abd05Af5F1c56c44 +user_l3user: 0xE87cF1C248e62c1EdaD39a1e134570D368BdF39A +``` ## Contact diff --git a/test-node.bash b/test-node.bash index 3091efc..ef99959 100755 --- a/test-node.bash +++ b/test-node.bash @@ -324,6 +324,9 @@ if $force_init; then docker compose up --wait geth fi + echo == Funding l1 user + docker compose run scripts send-l1 --ethamount 100 --to user_l1user --wait + echo == Funding validator, sequencer, l2owner and token bridge deployer docker compose run scripts send-l1 --ethamount 1000 --to validator --wait docker compose run scripts send-l1 --ethamount 1000 --to sequencer --wait @@ -331,8 +334,8 @@ if $force_init; then docker compose run scripts send-l1 --ethamount 1000 --to user_token_bridge_deployer --wait echo == create l1 traffic - docker compose run scripts send-l1 --ethamount 1000 --to user_l1user --wait - docker compose run scripts send-l1 --ethamount 0.0001 --from user_l1user --to user_l1user_b --wait --delay 500 --times 1000000 > /dev/null & + docker compose run scripts send-l1 --ethamount 1000 --to user_l1traffic --wait + docker compose run scripts send-l1 --ethamount 0.0001 --from user_l1traffic --to user_l1traffic_b --wait --delay 500 --times 1000000 > /dev/null & sequenceraddress=`docker compose run scripts print-address --account sequencer | tail -n 1 | tr -d '\r\n'` l2ownerAddress=`docker compose run scripts print-address --account l2owner | tail -n 1 | tr -d '\r\n'` @@ -360,6 +363,9 @@ if $force_init; then docker compose run scripts bridge-funds --ethamount 100000 --wait docker compose run scripts bridge-funds --ethamount 1000 --wait --from "key_0x$devprivkey" + echo == Funding l2 user + docker compose run scripts send-l2 --ethamount 100 --to user_l2user --wait + if $tokenbridge; then echo == Deploying L1-L2 token bridge sleep 10 # no idea why this sleep is needed but without it the deploy fails randomly @@ -372,7 +378,7 @@ if $force_init; then fi if $l3node; then - echo == Funding l3 users + echo == Funding l3 owner and sequencer docker compose run scripts send-l2 --ethamount 1000 --to l3owner --wait docker compose run scripts send-l2 --ethamount 1000 --to l3sequencer --wait @@ -384,8 +390,8 @@ if $force_init; then docker compose run scripts send-l2 --ethamount 100 --to user_fee_token_deployer --wait echo == create l2 traffic - docker compose run scripts send-l2 --ethamount 100 --to user_traffic_generator --wait - docker compose run scripts send-l2 --ethamount 0.0001 --from user_traffic_generator --to user_fee_token_deployer --wait --delay 500 --times 1000000 > /dev/null & + docker compose run scripts send-l2 --ethamount 100 --to user_l2traffic --wait + docker compose run scripts send-l2 --ethamount 0.0001 --from user_l2traffic --to user_l2traffic_b --wait --delay 500 --times 1000000 > /dev/null & l3owneraddress=`docker compose run scripts print-address --account l3owner | tail -n 1 | tr -d '\r\n'` echo == Writing l3 chain config @@ -431,6 +437,8 @@ if $force_init; then docker compose run scripts bridge-to-l3 --ethamount 500 --wait --from "key_0x$devprivkey" fi + echo == Funding l3 user + docker compose run scripts send-l3 --ethamount 100 --to user_l3user --wait fi fi From 9b892729f66b5a35b782427ee93da9fd4087b813 Mon Sep 17 00:00:00 2001 From: gzeon Date: Sun, 18 Feb 2024 03:44:20 +0800 Subject: [PATCH 4/7] docs: deployment status --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index be3fcfa..40b62b4 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,12 @@ user_l2user: 0xEEA8EC07A3642769168D40e3Abd05Af5F1c56c44 user_l3user: 0xE87cF1C248e62c1EdaD39a1e134570D368BdF39A ``` +## Deployment status + +L2 and L3 are deployed when their respective RPC are avaliable (port 8545 and 3347) +L2 token bridge is deployed if `docker-compose run --entrypoint sh tokenbridge -c "cat l1l2_network.json"` returns a valid json. +L3 token bridge is deployed if `docker-compose run --entrypoint sh tokenbridge -c "cat l2l3_network.json"` returns a valid json. + ## Contact Discord - [Arbitrum](https://discord.com/invite/5KE54JwyTs) From 3e6964a398c1cda989712bd9a5b71d4af4152491 Mon Sep 17 00:00:00 2001 From: gzeon Date: Sun, 18 Feb 2024 03:44:51 +0800 Subject: [PATCH 5/7] docs: format --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 40b62b4..d9641bd 100644 --- a/README.md +++ b/README.md @@ -134,9 +134,9 @@ user_l3user: 0xE87cF1C248e62c1EdaD39a1e134570D368BdF39A ## Deployment status -L2 and L3 are deployed when their respective RPC are avaliable (port 8545 and 3347) -L2 token bridge is deployed if `docker-compose run --entrypoint sh tokenbridge -c "cat l1l2_network.json"` returns a valid json. -L3 token bridge is deployed if `docker-compose run --entrypoint sh tokenbridge -c "cat l2l3_network.json"` returns a valid json. +- L2 and L3 are deployed when their respective RPC are avaliable (port 8545 and 3347) +- L2 token bridge is deployed if `docker-compose run --entrypoint sh tokenbridge -c "cat l1l2_network.json"` returns a valid json. +- L3 token bridge is deployed if `docker-compose run --entrypoint sh tokenbridge -c "cat l2l3_network.json"` returns a valid json. ## Contact From 1647de2c5f75ee0fbe5986e3f20d35bc75191ea6 Mon Sep 17 00:00:00 2001 From: Goran Vladika Date: Mon, 19 Feb 2024 14:30:24 +0100 Subject: [PATCH 6/7] Transfer chain ownership --- scripts/consts.ts | 2 ++ scripts/ethcommands.ts | 53 +++++++++++++++++++++++++++++++++++++++++- scripts/index.ts | 2 ++ test-node.bash | 4 ++++ 4 files changed, 60 insertions(+), 1 deletion(-) diff --git a/scripts/consts.ts b/scripts/consts.ts index ff32226..06f40f9 100644 --- a/scripts/consts.ts +++ b/scripts/consts.ts @@ -5,3 +5,5 @@ export const tokenbridgedatapath = "/tokenbridge-data"; // Not secure. Do not use for production purposes export const l1mnemonic = "indoor dish desk flag debris potato excuse depart ticket judge file exit"; + +export const ARB_OWNER = "0x0000000000000000000000000000000000000070"; diff --git a/scripts/ethcommands.ts b/scripts/ethcommands.ts index 00fdbb1..a4f5e13 100644 --- a/scripts/ethcommands.ts +++ b/scripts/ethcommands.ts @@ -3,9 +3,11 @@ import { ContractFactory, ethers, Wallet } from "ethers"; import * as consts from "./consts"; import { namedAccount, namedAddress } from "./accounts"; import * as L1GatewayRouter from "@arbitrum/token-bridge-contracts/build/contracts/contracts/tokenbridge/ethereum/gateway/L1GatewayRouter.sol/L1GatewayRouter.json"; +import * as L1AtomicTokenBridgeCreator from "@arbitrum/token-bridge-contracts/build/contracts/contracts/tokenbridge/ethereum/L1AtomicTokenBridgeCreator.sol/L1AtomicTokenBridgeCreator.json"; import * as ERC20PresetFixedSupplyArtifact from "@openzeppelin/contracts/build/contracts/ERC20PresetFixedSupply.json"; import * as ERC20 from "@openzeppelin/contracts/build/contracts/ERC20.json"; import * as fs from "fs"; +import { ARB_OWNER } from "./consts"; const path = require("path"); async function sendTransaction(argv: any, threadId: number) { @@ -184,6 +186,56 @@ export const bridgeNativeTokenToL3Command = { }, }; +export const transferL3ChainOwnershipCommand = { + command: "transfer-l3-chain-ownership", + describe: "transfer L3 chain ownership to upgrade executor", + builder: { + creator: { + string: true, + describe: "address of the token bridge creator", + }, + wait: { + boolean: true, + describe: "wait till ownership is transferred", + default: false, + }, + }, + handler: async (argv: any) => { + // get inbox address from config file + const deploydata = JSON.parse( + fs + .readFileSync(path.join(consts.configpath, "l3deployment.json")) + .toString() + ); + const inboxAddr = ethers.utils.hexlify(deploydata.inbox); + + // get L3 upgrade executor address from token bridge creator + const l2provider = new ethers.providers.WebSocketProvider(argv.l2url); + const tokenBridgeCreator = new ethers.Contract(argv.creator, L1AtomicTokenBridgeCreator.abi, l2provider); + const [,,,,,,,l3UpgradeExecutorAddress,] = await tokenBridgeCreator.inboxToL2Deployment(inboxAddr); + + // set TX params + argv.provider = new ethers.providers.WebSocketProvider(argv.l3url); + argv.to = "address_" + ARB_OWNER; + argv.from = "l3owner"; + argv.ethamount = "0"; + + // add L3 UpgradeExecutor to chain owners + const arbOwnerIface = new ethers.utils.Interface([ + "function addChainOwner(address newOwner) external", + "function removeChainOwner(address ownerToRemove) external" + ]) + argv.data = arbOwnerIface.encodeFunctionData("addChainOwner", [l3UpgradeExecutorAddress]); + await runStress(argv, sendTransaction); + + // remove L3 owner from chain owners + argv.data = arbOwnerIface.encodeFunctionData("removeChainOwner", [namedAccount("l3owner").address]); + await runStress(argv, sendTransaction); + + argv.provider.destroy(); + } +}; + export const createERC20Command = { command: "create-erc20", describe: "creates simple ERC20 on L2", @@ -279,7 +331,6 @@ export const createERC20Command = { }, }; - export const sendL1Command = { command: "send-l1", describe: "sends funds between l1 accounts", diff --git a/scripts/index.ts b/scripts/index.ts index 4db3853..a1b4722 100644 --- a/scripts/index.ts +++ b/scripts/index.ts @@ -18,6 +18,7 @@ import { sendL2Command, sendL3Command, sendRPCCommand, + transferL3ChainOwnershipCommand } from "./ethcommands"; async function main() { @@ -40,6 +41,7 @@ async function main() { .command(sendL2Command) .command(sendL3Command) .command(sendRPCCommand) + .command(transferL3ChainOwnershipCommand) .command(writeConfigCommand) .command(writeGethGenesisCommand) .command(writeL2ChainConfigCommand) diff --git a/test-node.bash b/test-node.bash index ef99959..27e3c04 100755 --- a/test-node.bash +++ b/test-node.bash @@ -424,6 +424,10 @@ if $force_init; then fi docker compose run -e PARENT_WETH_OVERRIDE=$l2Weth -e ROLLUP_OWNER_KEY=$l3ownerkey -e ROLLUP_ADDRESS=$rollupAddress -e PARENT_RPC=http://sequencer:8547 -e PARENT_KEY=$l3_token_bridge_deployer_key -e CHILD_RPC=http://l3node:3347 -e CHILD_KEY=$l3_token_bridge_deployer_key tokenbridge deploy:local:token-bridge docker compose run --entrypoint sh tokenbridge -c "cat network.json && cp network.json l2l3_network.json" + + # set L3 UpgradeExecutor, deployed by token bridge creator in previous step, to be the L3 chain owner. L3owner (EOA) and alias of L2 UpgradeExectuor have the executor role on the L3 UpgradeExecutor + tokenBridgeCreator=`docker compose run --entrypoint sh tokenbridge -c "cat l2l3_network.json" | jq -r '.l1TokenBridgeCreator'` + docker compose run scripts transfer-l3-chain-ownership --creator $tokenBridgeCreator echo fi From 35a488edda62eab080809a694c627ea4d5ab856d Mon Sep 17 00:00:00 2001 From: gzeon Date: Tue, 20 Feb 2024 22:34:10 +0800 Subject: [PATCH 7/7] feat: single funded user on all chains --- README.md | 10 ++++------ test-node.bash | 12 ++++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d9641bd..e833655 100644 --- a/README.md +++ b/README.md @@ -105,8 +105,8 @@ For help and further scripts, see: Here is a list of address that are used in the testnode setup, avoid using them before the deployment finishes or you might end up with some nonce race. ```bash -./test-node.bash scripts print-address --account -./test-node.bash scripts print-private-key --account +./test-node.bash script print-address --account +./test-node.bash script print-private-key --account ``` ``` @@ -125,11 +125,9 @@ user_fee_token_deployer: 0x2AC5278D230f88B481bBE4A94751d7188ef48Ca2 While not a named account, 0x3f1eae7d46d88f08fc2f8ed27fcb2ab183eb2d0e is funded on all test chains and is used to fund other accounts. -The following accounts are funded on L1, L2, and L3 respectively and can be used for testing without risk of nonce race from testnode setup: +The following account is funded on all L1, L2, and L3 and can be used for testing without risk of nonce race from testnode setup: ``` -user_l1user: 0x058E6C774025ade66153C65672219191c72c7095 -user_l2user: 0xEEA8EC07A3642769168D40e3Abd05Af5F1c56c44 -user_l3user: 0xE87cF1C248e62c1EdaD39a1e134570D368BdF39A +user_user: 0xC3Aa24dA923c30BD0738111c458ec68A8FdC2dfD ``` ## Deployment status diff --git a/test-node.bash b/test-node.bash index ef99959..2f74a0c 100755 --- a/test-node.bash +++ b/test-node.bash @@ -324,8 +324,8 @@ if $force_init; then docker compose up --wait geth fi - echo == Funding l1 user - docker compose run scripts send-l1 --ethamount 100 --to user_l1user --wait + echo == Funding user on L1 + docker compose run scripts send-l1 --ethamount 100 --to user_user --wait echo == Funding validator, sequencer, l2owner and token bridge deployer docker compose run scripts send-l1 --ethamount 1000 --to validator --wait @@ -363,8 +363,8 @@ if $force_init; then docker compose run scripts bridge-funds --ethamount 100000 --wait docker compose run scripts bridge-funds --ethamount 1000 --wait --from "key_0x$devprivkey" - echo == Funding l2 user - docker compose run scripts send-l2 --ethamount 100 --to user_l2user --wait + echo == Funding user on L2 + docker compose run scripts send-l2 --ethamount 100 --to user_user --wait if $tokenbridge; then echo == Deploying L1-L2 token bridge @@ -437,8 +437,8 @@ if $force_init; then docker compose run scripts bridge-to-l3 --ethamount 500 --wait --from "key_0x$devprivkey" fi - echo == Funding l3 user - docker compose run scripts send-l3 --ethamount 100 --to user_l3user --wait + echo == Funding user on L3 + docker compose run scripts send-l3 --ethamount 100 --to user_user --wait fi fi