diff --git a/.clabot b/.clabot new file mode 100644 index 00000000..55cb5e61 --- /dev/null +++ b/.clabot @@ -0,0 +1,5 @@ +{ + "contributors": "https://api.github.com/repos/OffchainLabs/clabot-config/contents/nitro-contributors.json", + "message": "We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please sign the linked documents below to get yourself added. https://na3.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=b15c81cc-b5ea-42a6-9107-3992526f2898&env=na3&acct=6e152afc-6284-44af-a4c1-d8ef291db402&v=2", + "label": "s" +} diff --git a/.env b/.env index ab26c64a..e15c03bd 100644 --- a/.env +++ b/.env @@ -4,3 +4,4 @@ ESPRESSO_DEPLOYER_ACCOUNT_INDEX=6 ESPRESSO_SEQUENCER_API_PORT=41000 ESPRESSO_BUILDER_PORT=41003 ESPRESSO_DEV_NODE_PORT=20000 +ESPRESSO_DEV_NODE_EPOCH_HEIGHT=1000000 \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd2eb2a4..a77da3c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ on: jobs: build_and_run: - runs-on: ubuntu-8 + runs-on: ubuntu-latest strategy: matrix: pos: [pos, no-pos] diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index 5031cae6..7b6c0961 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -18,15 +18,12 @@ jobs: smoke_test: strategy: matrix: - test-script: - [ + test-script: [ ./smoke-test.bash, ./smoke-test-l3.bash, ./smoke-test-nitro-simple.bash, ./smoke-test-full-node.bash, - ./smoke-test-espresso-finality-node.bash, - ./smoke-test-altlayer.bash, - ./smoke-test-caldera.bash, + ./smoke-test-caff-node.bash, ] runs-on: ubuntu-24.04 diff --git a/.gitignore b/.gitignore index bf57234a..011ddc9e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ # Generated by nix-direnv .direnv/ +logs/* +celestia-node +nitro-das-celestia +/node_modules diff --git a/docker-compose.yaml b/docker-compose.yaml index d2d828e0..1e141ea1 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -15,8 +15,6 @@ services: bin/blockscout eval "Elixir.Explorer.ReleaseTasks.create_and_migrate()" node init/install.js postgres 5432 bin/blockscout start - extra_hosts: - - "host.docker.internal:host-gateway" env_file: - ./blockscout/nitro.env environment: @@ -46,8 +44,76 @@ services: ports: - "127.0.0.1:6379:6379" + localestia: + image: ghcr.io/celestiaorg/localestia:v0.1.2 + container_name: 'local-celestia' + environment: + - REDIS_URL=redis://redis:6379 + - LISTEN_ADDR=0.0.0.0:26658 + - CLEAR_REDIS=true + ports: + - "127.0.0.1:26658:26658" + depends_on: + - redis + + celestia: + image: ghcr.io/celestiaorg/celestia-node:v0.21.9 + container_name: 'celestia' + environment: + - NODE_TYPE=light + - P2P_NETWORK=mocha + - RPC_URL=rpc-mocha.pops.one + - RPC_PORT=9090 + - NETWORK=mocha + command: + - "celestia" + - "light" # node type: light, bridge, or full + - "start" + - "--core.ip" + - "consensus-full-mocha-4.celestia-mocha.com" + - "--core.port" + - "9090" + - "--p2p.network" + - "mocha" + - "--rpc.skip-auth" + - "--rpc.addr" + - "0.0.0.0" + ports: + - "2121:2121" + - "26658:26658" + volumes: + - ${HOME}/.celestia-light-mocha-4:/home/celestia + + celestia-server: + image: ghcr.io/celestiaorg/nitro-das-celestia:v0.4.3 + container_name: celestia-server + entrypoint: ["/bin/celestia-server", "--rpc-addr", "0.0.0.0", "--rpc-port", "26657", "--celestia.auth-token", "", "--celestia.namespace-id", "000008e5f679bf7116cb", "--celestia.rpc", "http://localestia:26658"] + ports: + - "1317:1317" + - "9090:9090" + - "26657:26657" + - "1095:1095" + - "8080:8080" + depends_on: + - localestia + + celestia-server-mocha: + image: ghcr.io/celestiaorg/nitro-das-celestia:v0.4.3 + container_name: celestia-server + environment: + - CELESTIA_AUTH_TOKEN=${CELESTIA_AUTH_TOKEN:-} + entrypoint: ["/bin/celestia-server", "--rpc-addr", "0.0.0.0", "--rpc-port", "26657", "--celestia.auth-token", \"$CELESTIA_AUTH_TOKEN\", "--celestia.namespace-id", "000008e5f679bf7116cb", "--celestia.rpc", "http://celestia:26658"] + ports: + - "1317:1317" + - "9090:9090" + - "26657:26657" + - "1095:1095" + - "8080:8080" + depends_on: + - celestia + geth: - image: ethereum/client-go:latest + image: ethereum/client-go:stable ports: - "127.0.0.1:8545:8545" - "127.0.0.1:8551:8551" @@ -98,7 +164,6 @@ services: - --output-ssz=/consensus/genesis.ssz - --chain-config-file=/config/prysm.yaml - --geth-genesis-json-in=/config/geth_genesis.json - - --geth-genesis-json-out=/config/geth_genesis.json volumes: - "consensus:/consensus" - "config:/config" @@ -168,8 +233,16 @@ services: - "config:/config" - "tokenbridge-data:/tokenbridge-data" command: --conf.file /config/sequencer_config.json --node.feed.output.enable --node.feed.output.port 9642 --http.api net,web3,eth,txpool,debug --node.seq-coordinator.my-url ws://sequencer:8548 --graphql.enable --graphql.vhosts * --graphql.corsdomain * + extra_hosts: + - "host.docker.internal:host-gateway" depends_on: - geth + healthcheck: + test: ["CMD-SHELL", "curl -fL http://localhost:8547 || exit 1"] + interval: 10s + timeout: 10s + retries: 5 + start_period: 40s sequencer-on-espresso: pid: host # allow debugging @@ -188,22 +261,23 @@ services: depends_on: - geth - sequencer-espresso-finality: + caff-node: pid: host # allow debugging image: nitro-node-dev-testnode entrypoint: /usr/local/bin/nitro ports: - - "127.0.0.1:8549:8547" - - "127.0.0.1:8550:8548" + - "127.0.0.1:8550:8547" + - "127.0.0.1:8552:8548" - "127.0.0.1:9645:9642" volumes: - "seqdata_espresso_finality:/home/user/.arbitrum/local/nitro" - "l1keystore:/home/user/l1keystore" - "config:/config" - "tokenbridge-data:/tokenbridge-data" - command: --conf.file /config/espresso_finality_sequencer_config.json --node.feed.output.enable --node.feed.output.port 9642 --http.api net,web3,eth,txpool,debug --node.seq-coordinator.my-url ws://sequencer:8548 --graphql.enable --graphql.vhosts * --graphql.corsdomain * + command: --conf.file /config/caff_sequencer_config.json --node.feed.output.enable --node.feed.output.port 9642 --http.api net,web3,eth,txpool,debug --node.seq-coordinator.my-url ws://sequencer:8548 --graphql.enable --graphql.vhosts * --graphql.corsdomain * depends_on: - geth + - espresso-dev-node sequencer_b: pid: host # allow debugging @@ -279,6 +353,8 @@ services: - "l1keystore:/home/user/l1keystore" - "config:/config" command: --conf.file /config/poster_config.json + extra_hosts: + - "host.docker.internal:host-gateway" depends_on: - geth - redis @@ -326,7 +402,9 @@ services: - "validator-data:/home/user/.arbitrum/local/nitro" - "l1keystore:/home/user/l1keystore" - "config:/config" - command: --conf.file /config/validator_config.json --http.port 8547 --http.api net,web3,arb,debug,net,eth --ws.port 8548 + command: --conf.file /config/validator_config.json --http.port 8547 --http.api net,web3,arb,debug --ws.port 8548 + extra_hosts: + - "host.docker.internal:host-gateway" depends_on: - sequencer - validation_node @@ -347,6 +425,12 @@ services: - sequencer - validation_node - espresso-dev-node + healthcheck: + test: ["CMD-SHELL", "curl -fL http://localhost:3347 || exit 1"] + interval: 10s + timeout: 10s + retries: 2 + start_period: 20s validation_node: pid: host # allow debugging @@ -357,6 +441,8 @@ services: volumes: - "config:/config" command: --conf.file /config/validation_node_config.json + extra_hosts: + - "host.docker.internal:host-gateway" scripts: build: scripts/ @@ -400,7 +486,6 @@ services: rollupcreator: depends_on: - geth - - sequencer pid: host build: context: rollupcreator/ @@ -413,39 +498,37 @@ services: - /var/run/docker.sock:/var/run/docker.sock espresso-dev-node: - # TODO: revert to `:main` tag once we are compatible with the marketplace builder - image: ghcr.io/espressosystems/espresso-sequencer/espresso-dev-node:20240919-dev-node-legacy-builder + image: ghcr.io/espressosystems/espresso-sequencer/espresso-dev-node:20250428-dev-node-decaf-pos ports: - "$ESPRESSO_SEQUENCER_API_PORT:$ESPRESSO_SEQUENCER_API_PORT" - "$ESPRESSO_BUILDER_PORT:$ESPRESSO_BUILDER_PORT" - "$ESPRESSO_DEV_NODE_PORT:$ESPRESSO_DEV_NODE_PORT" environment: - - ESPRESSO_SEQUENCER_L1_PROVIDER - - ESPRESSO_SEQUENCER_ETH_MNEMONIC - - ESPRESSO_DEPLOYER_ACCOUNT_INDEX - - ESPRESSO_SEQUENCER_API_PORT - ESPRESSO_BUILDER_PORT + - ESPRESSO_DEPLOYER_ACCOUNT_INDEX - ESPRESSO_DEV_NODE_PORT + - ESPRESSO_SEQUENCER_API_PORT + - ESPRESSO_SEQUENCER_ETH_MNEMONIC + - ESPRESSO_SEQUENCER_L1_PROVIDER + - ESPRESSO_SEQUENCER_DATABASE_MAX_CONNECTIONS=25 + - ESPRESSO_DEV_NODE_EPOCH_HEIGHT + - ESPRESSO_SEQUENCER_STORAGE_PATH=/data/espresso - RUST_LOG=info - RUST_LOG_FORMAT - - ESPRESSO_DEPLOYER_ALT_CHAIN_PROVIDERS - - ESPRESSO_DEPLOYER_ALT_MNEMONICS - - ESPRESSO_SEQUENCER_DEPLOYER_ALT_INDICES - depends_on: - - geth - - sequencer + volumes: + - espresso_storage:/data/espresso + extra_hosts: + - "host.docker.internal:host-gateway" healthcheck: test: [ "CMD-SHELL", - "curl -fL http://localhost:$ESPRESSO_DEV_NODE_PORT || exit 1", + "curl -fL http://localhost:41000/v0/status/block-height || exit 1", ] interval: 30s timeout: 10s retries: 5 start_period: 40s - extra_hosts: - - "host.docker.internal:host-gateway" # Reads from sequencer feed, forwards transactions to sequencer full-node: @@ -538,3 +621,4 @@ volumes: das-committee-a-data: das-committee-b-data: das-mirror-data: + espresso_storage: diff --git a/espresso-tests/.env b/espresso-tests/.env index 9cb0f2bc..713de903 100644 --- a/espresso-tests/.env +++ b/espresso-tests/.env @@ -1,23 +1,30 @@ # Environment variables for chain name and rpc_url # These are essential for the upgrade -PARENT_CHAIN_CHAIN_ID="1337" -CHILD_CHAIN_CHAIN_NAME="412346" -PARENT_CHAIN_RPC_URL="http://localhost:8545" -CHILD_CHAIN_RPC_URL="http://localhost:8547" +export PARENT_CHAIN_CHAIN_ID="1337" +export CHAIN_ID="1337" +export CHILD_CHAIN_CHAIN_NAME="412346" +export PARENT_CHAIN_RPC_URL="http://localhost:8545" +export CHILD_CHAIN_RPC_URL="http://localhost:8547" # Environment variables for new OSP deployment # These are essential for the upgrade -HOTSHOT_ADDRESS="0xb6eb235fa509e3206f959761d11e3777e16d0e98" -PARENT_CHAIN_UPGRADE_EXECUTOR="0x513D9F96d4D0563DEbae8a0DC307ea0E46b10ed7" -CHILD_CHAIN_UPGRADE_EXUCTOR_ADDRESS="0xD59870177729b1Fa7CCdA1d2E245C57C6ad5F9F6" +export PARENT_CHAIN_UPGRADE_EXECUTOR="0x513D9F96d4D0563DEbae8a0DC307ea0E46b10ed7" +export PARENT_UPGRADE_EXECUTOR_ADDRESS="0x513D9F96d4D0563DEbae8a0DC307ea0E46b10ed7" +export CHILD_CHAIN_UPGRADE_EXUCTOR_ADDRESS="0xD59870177729b1Fa7CCdA1d2E245C57C6ad5F9F6" # Environment variables for osp migration action contract -CURRENT_OSP_ENTRY="0x9C2eD9F57D053FDfAEcBF1B6Dfd7C97e2e340B84" -ROLLUP_ADDRESS="0x0DFDF1473B14D2330A40F6a42bb6d601DD121E6b" -PROXY_ADMIN="0x2A1f38c9097e7883570e0b02BFBE6869Cc25d8a3" +export ROLLUP_ADDRESS="0x1b836843Ef0B1731fea7C69d7d3847327DD137c2" +export PROXY_ADMIN_ADDRESS="0x2A1f38c9097e7883570e0b02BFBE6869Cc25d8a3" # Environment variables for ArbOS upgrade action. -UPGRADE_TIMESTAMP="1723664126" +export UPGRADE_TIMESTAMP="1723664126" -NEW_WASM_MODULE_ROOT="0x2422802a7cda99737209430b103689205bc8e56eab8b08c6ad409e65e45c3145" -CURRENT_WASM_MODULE_ROOT="0xbc1026ff45c20ea97e9e6057224a5668ea78d8f885c9b14fc849238e8ef5c5dc" +# The reader addr is only important if the parent chain is not an arbitrum chain, this is important for the batch poster. +export READER_ADDRESS="0x7DD3F2a3fAeF3B9F2364c335163244D3388Feb83" +export IS_USING_FEE_TOKEN="false" -#Environment variables used in test assertions -CHALLENGE_MANAGER_ADDRESS="0x784FC11476F3d06801A76b944795E6367391b12e" +export MAX_DATA_SIZE="117964" +export OLD_BATCH_POSTER_ADDRESS="0xe2148eE53c0755215Df69b2616E552154EdC584f" +export NEW_BATCH_POSTER_ADDRESS="0xe2148eE53c0755215Df69b2616E552154EdC584f" +export BATCH_POSTER_MANAGER_ADDRESS="0xe2148eE53c0755215Df69b2616E552154EdC584f" +export PARENT_CHAIN_IS_ARBITRUM="false" +export ESPRESSO_TEE_VERIFIER_ADDRESS="0x165155D6aBB370Cb10ad1bF835e723F662d51C86" +export INBOX_ADDRESS="0x9f8c1c641336A371031499e3c362e40d58d0f254" +export TARGET_WASM_MODULE_ROOT="0xe81f986823a85105c5fd91bb53b4493d38c0c26652d23f76a7405ac889908287" diff --git a/espresso-tests/.env-celestia b/espresso-tests/.env-celestia new file mode 100644 index 00000000..713de903 --- /dev/null +++ b/espresso-tests/.env-celestia @@ -0,0 +1,30 @@ +# Environment variables for chain name and rpc_url +# These are essential for the upgrade +export PARENT_CHAIN_CHAIN_ID="1337" +export CHAIN_ID="1337" +export CHILD_CHAIN_CHAIN_NAME="412346" +export PARENT_CHAIN_RPC_URL="http://localhost:8545" +export CHILD_CHAIN_RPC_URL="http://localhost:8547" +# Environment variables for new OSP deployment +# These are essential for the upgrade +export PARENT_CHAIN_UPGRADE_EXECUTOR="0x513D9F96d4D0563DEbae8a0DC307ea0E46b10ed7" +export PARENT_UPGRADE_EXECUTOR_ADDRESS="0x513D9F96d4D0563DEbae8a0DC307ea0E46b10ed7" +export CHILD_CHAIN_UPGRADE_EXUCTOR_ADDRESS="0xD59870177729b1Fa7CCdA1d2E245C57C6ad5F9F6" +# Environment variables for osp migration action contract +export ROLLUP_ADDRESS="0x1b836843Ef0B1731fea7C69d7d3847327DD137c2" +export PROXY_ADMIN_ADDRESS="0x2A1f38c9097e7883570e0b02BFBE6869Cc25d8a3" +# Environment variables for ArbOS upgrade action. +export UPGRADE_TIMESTAMP="1723664126" + +# The reader addr is only important if the parent chain is not an arbitrum chain, this is important for the batch poster. +export READER_ADDRESS="0x7DD3F2a3fAeF3B9F2364c335163244D3388Feb83" +export IS_USING_FEE_TOKEN="false" + +export MAX_DATA_SIZE="117964" +export OLD_BATCH_POSTER_ADDRESS="0xe2148eE53c0755215Df69b2616E552154EdC584f" +export NEW_BATCH_POSTER_ADDRESS="0xe2148eE53c0755215Df69b2616E552154EdC584f" +export BATCH_POSTER_MANAGER_ADDRESS="0xe2148eE53c0755215Df69b2616E552154EdC584f" +export PARENT_CHAIN_IS_ARBITRUM="false" +export ESPRESSO_TEE_VERIFIER_ADDRESS="0x165155D6aBB370Cb10ad1bF835e723F662d51C86" +export INBOX_ADDRESS="0x9f8c1c641336A371031499e3c362e40d58d0f254" +export TARGET_WASM_MODULE_ROOT="0xe81f986823a85105c5fd91bb53b4493d38c0c26652d23f76a7405ac889908287" diff --git a/espresso-tests/DeployMockVerifier.s.sol b/espresso-tests/DeployMockVerifier.s.sol new file mode 100644 index 00000000..cdc60a11 --- /dev/null +++ b/espresso-tests/DeployMockVerifier.s.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.9; + +import "forge-std/Script.sol"; +import "nitro-contracts/mocks/EspressoTEEVerifier.sol"; + +contract DeployMockVerifier is Script { + function run() external { + uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); + vm.startBroadcast(deployerPrivateKey); + EspressoTEEVerifierMock mockVerifier = new EspressoTEEVerifierMock(); + vm.stopBroadcast(); + } +} diff --git a/espresso-tests/celestia-2.1.3-migration-test.bash b/espresso-tests/celestia-2.1.3-migration-test.bash new file mode 100755 index 00000000..8dfcfc5b --- /dev/null +++ b/espresso-tests/celestia-2.1.3-migration-test.bash @@ -0,0 +1,144 @@ +#!/usr/bin/env bash +# This is a utility function for creating assertions at the end of this test. +fail(){ + echo "$*" 1>&2; exit 1; +} + +set -euo pipefail +set -a # automatically export all variables +set -x # print each command before executing it, for debugging + + + +# Find directory of this script, the project, and the orbit-actions submodule +TEST_DIR="$(dirname $(readlink -f $0))" +TESTNODE_DIR="$(dirname "$TEST_DIR")" +ORBIT_ACTIONS_DIR="$TESTNODE_DIR/orbit-actions" + +# Change to orbit actions directory, update the submodule, and install any dependencies for the purposes of the test. +cd "$ORBIT_ACTIONS_DIR" + +git submodule update --init +forge update +yarn + +# Change to the top level directory for the purposes of the test. +cd "$TESTNODE_DIR" + +# Initialize a standard network not compatible with espresso to simulate a pre-upgrade orbit network e.g. not needed for the real migration +./test-node.bash --init-force --espresso --latest-espresso-image --detach --no-build-utils + +# Start espresso sequencer node for the purposes of the test e.g. not needed for the real migration. +docker compose up espresso-dev-node --detach + +# Export environment variables in .env file +# A similar env file should be supplied for whatever +. "$TEST_DIR/.env-celestia" + +# Overwrite the ROLLUP_ADDRESS for this test, it might not be the same as the one in the .env file +#* Essential migration sub step * This address (the rollup proxy address) is likely a known address to operators. +export ROLLUP_ADDRESS=$(docker compose run --entrypoint cat scripts /config/deployed_chain_info.json | jq -r '.[0].rollup.rollup' | tail -n 1 | tr -d '\r\n') + +# A convoluted way to get the address of the child chain upgrade executor, maybe there's a better way? +# These steps below are just for the purposes of the test. In a real deployment operators will likely already know their child-chain's upgrade executor address, and it should be included in a .env file for the migration run. +export INBOX_ADDRESS=$(docker compose run --entrypoint cat scripts /config/deployed_chain_info.json | jq -r '.[0].rollup.inbox' | tail -n 1 | tr -d '\r\n') +# L1_TOKEN_BRIDGE_CREATOR_ADDRESS=$(docker compose run --entrypoint cat scripts /tokenbridge-data/network.json | jq -r '.l1TokenBridgeCreator' | tail -n 1 | tr -d '\r\n') +# CHILD_CHAIN_UPGRADE_EXECUTOR_ADDRESS=$(cast call $L1_TOKEN_BRIDGE_CREATOR_ADDRESS 'inboxToL2Deployment(address)(address,address,address,address,address,address,address,address,address)' $INBOX_ADDRESS | tail -n 2 | head -n 1 | tr -d '\r\n') + +# Export l2 owner private key and address +# These commands are exclusive to the test. +# * Essential migration sub step * These addresses are likely known addresses to operators in the event of a real migration +export PRIVATE_KEY="$(docker compose run scripts print-private-key --account l2owner | tail -n 1 | tr -d '\r\n')" +export OWNER_ADDRESS="$(docker compose run scripts print-address --account l2owner | tail -n 1 | tr -d '\r\n')" + +cd $ORBIT_ACTIONS_DIR +forge update +echo "Deploying mock espresso tee verifier" +forge script --chain $PARENT_CHAIN_CHAIN_ID ../espresso-tests/DeployMockVerifier.s.sol:DeployMockVerifier --rpc-url $PARENT_CHAIN_RPC_URL --broadcast -vvvv + +export ESPRESSO_TEE_VERIFIER_ADDRESS=$(cat broadcast/DeployMockVerifier.s.sol/1337/run-latest.json | jq -r '.transactions[0].contractAddress' | cast to-checksum) +echo "Mock TEE Address:" +echo $ESPRESSO_TEE_VERIFIER_ADDRESS + +cast send 0x0000000000000000000000000000000000000070 'addChainOwner(address)' $PARENT_UPGRADE_EXECUTOR_ADDRESS --rpc-url $CHILD_CHAIN_RPC_URL --private-key $PRIVATE_KEY +# Echo for debug +echo "Deploying and initializing Espresso SequencerInbox" +# ** Essential migration step ** Forge script to deploy the new SequencerInbox. We do this to later point the rollups challenge manager to the espresso integrated OSP. +forge script --chain $PARENT_CHAIN_CHAIN_ID scripts/foundry/contract-upgrades/celestia-2.1.3/DeployCelestiaNitroContracts2Point1Point3UpgradeAction.s.sol:DeployCelestiaNitroContracts2Point1Point3UpgradeActionScript --rpc-url $PARENT_CHAIN_RPC_URL --broadcast -vvvv --sender $OWNER_ADDRESS --private-key $PRIVATE_KEY + +# Extract new_osp_entry address from run-latest.json +# * Essential migration sub step * These addresses are likely known addresses to operators in the event of a real migration after they have deployed the new OSP contracts, however, if operators create a script for the migration, this command is useful. +export UPGRADE_ACTION_ADDRESS=$(cat broadcast/DeployCelestiaNitroContracts2Point1Point3UpgradeAction.s.sol/1337/run-latest.json | jq -r '.transactions[-1].contractAddress'| cast to-checksum) +# Echo for debugging. +echo "Deployed Celestia migration action at $UPGRADE_ACTION_ADDRESS" + +# Change directories to start nitro node in new docker container with espresso image +cd $TESTNODE_DIR + +# Use cast to call the upgradeExecutor and execute the L1 upgrade actions.This will point the challenge manager at the new OSP entry, as well as update the wasmModuleRoot for the rollup. ** Essential migration step ** +cd $ORBIT_ACTIONS_DIR + +echo $PRIVATE_KEY +echo $OWNER_ADDRESS +echo $PARENT_CHAIN_CHAIN_ID +echo $PARENT_CHAIN_RPC_URL +echo $INBOX_ADDRESS +echo $PROXY_ADMIN_ADDRESS +echo $UPGRADE_ACTION_ADDRESS +echo $PARENT_UPGRADE_EXECUTOR_ADDRESS +echo $ESPRESSO_TEE_VERIFIER_ADDRESS + +forge script --chain $PARENT_CHAIN_CHAIN_ID scripts/foundry/contract-upgrades/celestia-2.1.3/ExecuteCelestiaNitroContracts2Point1Point3Upgrade.s.sol:ExecuteNitroContracts2Point1Point3UpgradeScript --rpc-url $PARENT_CHAIN_RPC_URL --broadcast -vvvv --sender $OWNER_ADDRESS --private-key $PRIVATE_KEY + +# cast send $PARENT_CHAIN_UPGRADE_EXECUTOR "execute(address, bytes)" $CELESTIA_MIGRATION_ACTION $(cast calldata "perform(address, address, address)" $ROLLUP_ADDRESS $INBOX $PROXY_ADMIN_ADDRESS ) --rpc-url $PARENT_CHAIN_RPC_URL --private-key $PRIVATE_KEY + +echo "Executed SequencerMigrationAction via UpgradeExecutor" + +# Get the number of confirmed nodes before the upgrade to ensure the staker is still working. +NUM_CONFIRMED_NODES_BEFORE_UPGRADE=$(cast call --rpc-url $PARENT_CHAIN_RPC_URL $ROLLUP_ADDRESS 'latestConfirmed()(uint256)') + + +# Wait for CHILD_CHAIN_RPC_URL to be available +# * Essential migration sub step * This is technically essential to the migration, but doesn't usually take long and shouldn't need to be programatically determined during a live migration. +while ! curl -s $CHILD_CHAIN_RPC_URL > /dev/null; do + echo "Waiting for $CHILD_CHAIN_RPC_URL to be available..." + sleep 5 +done + +# Echo for debugging +echo "Adding child chain upgrade executor as an L2 chain owner" +# This step is done for the purposes of the test, as there should already be an upgrade executor on the child chain that is a chain owner +# cast send 0x0000000000000000000000000000000000000070 'addChainOwner(address)' $CHILD_CHAIN_UPGRADE_EXECUTOR_ADDRESS --rpc-url $CHILD_CHAIN_RPC_URL --private-key $PRIVATE_KEY + +cd $ORBIT_ACTIONS_DIR +# Check for balance before transfer. +# The following sequence is to check that transactions are still successfully being sequenced on the L2 +ORIGINAL_OWNER_BALANCE=$(cast balance $OWNER_ADDRESS -e --rpc-url $CHILD_CHAIN_RPC_URL) + +# Send 1 eth as the owner +RECIPIENT_ADDRESS=0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +BALANCE_ORIG=$(cast balance $RECIPIENT_ADDRESS -e --rpc-url $CHILD_CHAIN_RPC_URL) +cast send $RECIPIENT_ADDRESS --value 1ether --rpc-url $CHILD_CHAIN_RPC_URL --private-key $PRIVATE_KEY + +# Get the new balance after the transfer. +BALANCE_NEW=$(cast balance $RECIPIENT_ADDRESS -e --rpc-url $CHILD_CHAIN_RPC_URL) + +# Assertion that balance should have changed. +if [ $BALANCE_NEW == $BALANCE_ORIG ]; then + fail "Balance of $RECIPIENT_ADDRESS should have changed but remained: $BALANCE_ORIG" +fi +# Echo successful balance update +echo "Balance of $RECIPIENT_ADDRESS changed from $BALANCE_ORIG to $BALANCE_NEW" + +# Check that the staker is making progress after the upgrade +while [ "$NUM_CONFIRMED_NODES_BEFORE_UPGRADE" == "$(cast call --rpc-url $PARENT_CHAIN_RPC_URL $ROLLUP_ADDRESS 'latestConfirmed()(uint256)')" ]; do + echo "Waiting for confirmed nodes ..." + sleep 5 +done +# Echo to confirm that stakers are behaving normally. +echo "Confirmed nodes have progressed" + +# Echo to signal that test has been successful +echo "Migration successfully completed!" + +docker compose down diff --git a/espresso-tests/create-espresso-integrated-nitro-node.bash b/espresso-tests/create-espresso-integrated-nitro-node.bash index 3670c7c1..c8a73bc9 100755 --- a/espresso-tests/create-espresso-integrated-nitro-node.bash +++ b/espresso-tests/create-espresso-integrated-nitro-node.bash @@ -2,7 +2,7 @@ set -euo pipefail set -x # print each command before executing it, for debugging -ESPRESSO_VERSION=ghcr.io/espressosystems/nitro-espresso-integration/nitro-node-dev:integration +ESPRESSO_VERSION=ghcr.io/espressosystems/nitro-espresso-integration/nitro-node-dev:celestia-integration lightClientAddr=0xb6eb235fa509e3206f959761d11e3777e16d0e98 espresso=true simpleWithValidator=false diff --git a/espresso-tests/migration-test.bash b/espresso-tests/migration-test.bash index b2da49f7..a390e47a 100755 --- a/espresso-tests/migration-test.bash +++ b/espresso-tests/migration-test.bash @@ -19,23 +19,24 @@ ORBIT_ACTIONS_DIR="$TESTNODE_DIR/orbit-actions" cd "$ORBIT_ACTIONS_DIR" git submodule update --init +forge update yarn # Change to the top level directory for the purposes of the test. cd "$TESTNODE_DIR" # Initialize a standard network not compatible with espresso to simulate a pre-upgrade orbit network e.g. not needed for the real migration -./test-node.bash --simple --init-force --tokenbridge --detach +./test-node.bash --simple --init-force --tokenbridge --detach --no-build-utils # Start espresso sequencer node for the purposes of the test e.g. not needed for the real migration. docker compose up espresso-dev-node --detach # Export environment variables in .env file -# A similar env file should be supplied for whatever +# A similar env file should be supplied for whatever . "$TEST_DIR/.env" # Overwrite the ROLLUP_ADDRESS for this test, it might not be the same as the one in the .env file -#* Essential migration sub step * This address (the rollup proxy address) is likely a known address to operators. +#* Essential migration sub step * This address (the rollup proxy address) is likely a known address to operators. ROLLUP_ADDRESS=$(docker compose run --entrypoint cat scripts /config/deployed_chain_info.json | jq -r '.[0].rollup.rollup' | tail -n 1 | tr -d '\r\n') # A convoluted way to get the address of the child chain upgrade executor, maybe there's a better way? @@ -50,51 +51,64 @@ CHILD_CHAIN_UPGRADE_EXECUTOR_ADDRESS=$(cast call $L1_TOKEN_BRIDGE_CREATOR_ADDRES PRIVATE_KEY="$(docker compose run scripts print-private-key --account l2owner | tail -n 1 | tr -d '\r\n')" OWNER_ADDRESS="$(docker compose run scripts print-address --account l2owner | tail -n 1 | tr -d '\r\n')" -# Echo for debug -echo "Deploying Espresso Osp" -# Change directory to orbit actions dir for the following commands. cd $ORBIT_ACTIONS_DIR -# ** Essential migration step ** Forge script to deploy new OSP entry. We do this to later point the rollups challenge manager to the espresso integrated OSP. -forge script --chain $PARENT_CHAIN_CHAIN_ID contracts/parent-chain/espresso-migration/DeployEspressoOsp.s.sol:DeployEspressoOsp --rpc-url $PARENT_CHAIN_RPC_URL --broadcast -vvvv +forge update +echo "Deploying mock espresso tee verifier" +forge script --chain $PARENT_CHAIN_CHAIN_ID ../espresso-tests/DeployMockVerifier.s.sol:DeployMockVerifier --rpc-url $PARENT_CHAIN_RPC_URL --broadcast -vvvv + +ESPRESSO_TEE_VERIFIER_ADDRESS=$(cat broadcast/DeployMockVerifier.s.sol/1337/run-latest.json | jq -r '.transactions[0].contractAddress' | cast to-checksum) +echo "Mock TEE Address:" +echo $ESPRESSO_TEE_VERIFIER_ADDRESS + +# Echo for debug +echo "Deploying and initializing Espresso SequencerInbox" +# ** Essential migration step ** Forge script to deploy the new SequencerInbox. We do this to later point the rollups challenge manager to the espresso integrated OSP. +forge script --chain $PARENT_CHAIN_CHAIN_ID contracts/parent-chain/espresso-migration/DeployAndInitEspressoSequencerInbox.s.sol:DeployAndInitEspressoSequencerInbox --rpc-url $PARENT_CHAIN_RPC_URL --broadcast -vvvv # Extract new_osp_entry address from run-latest.json # * Essential migration sub step * These addresses are likely known addresses to operators in the event of a real migration after they have deployed the new OSP contracts, however, if operators create a script for the migration, this command is useful. -NEW_OSP_ENTRY=$(cat broadcast/DeployEspressoOsp.s.sol/1337/run-latest.json | jq -r '.transactions[4].contractAddress'| cast to-checksum) - +NEW_SEQUENCER_INBOX_IMPL_ADDRESS=$(cat broadcast/DeployAndInitEspressoSequencerInbox.s.sol/1337/run-latest.json | jq -r '.transactions[0].contractAddress'| cast to-checksum) # Echo for debugging. -echo "Deployed new OspEntry at $NEW_OSP_ENTRY" +echo "Deployed new SequencerInbox at $NEW_SEQUENCER_INBOX_IMPL_ADDRESS" # Echo for debug -echo "Deploying Espresso Osp migration action" +echo "Deploying Espresso SequencerInbox migration action" # ** Essential migration step ** Forge script to deploy Espresso OSP migration action -forge script --chain $PARENT_CHAIN_CHAIN_ID contracts/parent-chain/espresso-migration/DeployEspressoOspMigrationAction.s.sol --rpc-url $PARENT_CHAIN_RPC_URL --broadcast -vvvv +forge script --chain $PARENT_CHAIN_CHAIN_ID contracts/parent-chain/espresso-migration/DeployEspressoSequencerMigrationAction.s.sol:DeployEspressoSequencerMigrationAction --rpc-url $PARENT_CHAIN_RPC_URL --broadcast -vvvv # Capture new OSP address # * Essential migration sub step ** Essential migration sub step * operators will be able to manually determine this address while running the upgrade, but this can be useful if they wish to make a script. -OSP_MIGRATION_ACTION=$(cat broadcast/DeployEspressoOspMigrationAction.s.sol/1337/run-latest.json | jq -r '.transactions[0].contractAddress') +SEQUENCER_MIGRATION_ACTION=$(cat broadcast/DeployEspressoSequencerMigrationAction.s.sol/1337/run-latest.json | jq -r '.transactions[0].contractAddress' | cast to-checksum) -echo "Deployed new OspMigrationAction at $OSP_MIGRATION_ACTION" +echo "Deployed new EspressoSequencerMigrationAction at $SEQUENCER_MIGRATION_ACTION" -# Use cast to call the upgradeExecutor and execute the L1 upgrade actions.This will point the challenge manager at the new OSP entry, as well as update the wasmModuleRoot for the rollup. -# ** Essential migration step ** - -cast send $PARENT_CHAIN_UPGRADE_EXECUTOR "execute(address, bytes)" $OSP_MIGRATION_ACTION $(cast calldata "perform()") --rpc-url $PARENT_CHAIN_RPC_URL --private-key $PRIVATE_KEY - -echo "Executed OspMigrationAction via UpgradeExecutor" +echo "Deploying ArbOS Upgrade action" +# Forge script to deploy the Espresso ArbOS upgrade action. +# ** Essential migration step ** the ArbOS upgrade signifies that the chain is now espresso compatible. +forge script --chain $CHILD_CHAIN_CHAIN_NAME contracts/child-chain/espresso-migration/DeployArbOSUpgradeAction.s.sol:DeployArbOSUpgradeAction --rpc-url $CHILD_CHAIN_RPC_URL --broadcast -vvvv -# Get the number of confirmed nodes before the upgrade to ensure the staker is still working. -NUM_CONFIRMED_NODES_BEFORE_UPGRADE=$(cast call --rpc-url $PARENT_CHAIN_RPC_URL $ROLLUP_ADDRESS 'latestConfirmed()(uint256)') -# Shutdown nitro node +# Get the address of the newly deployed upgrade action. +ARBOS_UPGRADE_ACTION=$(cat broadcast/DeployArbOSUpgradeAction.s.sol/412346/run-latest.json | jq -r '.transactions[0].contractAddress') -# This is part of the migration but the mechanics of this can be left up to operators. -# ** Essential migration step ** The previous sequencer that is not compatible with espresso must be shut down so that we can start a new sequencer node that can have it's ArbOS version updated to signify the upgrade has occurred. -docker stop nitro-testnode-sequencer-1 +# Echo information for debugging. +echo "Deployed ArbOSUpgradeAction at $ARBOS_UPGRADE_ACTION" # Change directories to start nitro node in new docker container with espresso image cd $TESTNODE_DIR + +docker stop nitro-testnode-sequencer-1 +docker wait nitro-testnode-sequencer-1 # Start nitro node in new docker container with espresso image ./espresso-tests/create-espresso-integrated-nitro-node.bash +# Use cast to call the upgradeExecutor and execute the L1 upgrade actions.This will point the challenge manager at the new OSP entry, as well as update the wasmModuleRoot for the rollup. ** Essential migration step ** +cast send $PARENT_CHAIN_UPGRADE_EXECUTOR "execute(address, bytes)" $SEQUENCER_MIGRATION_ACTION $(cast calldata "perform()") --rpc-url $PARENT_CHAIN_RPC_URL --private-key $PRIVATE_KEY + +echo "Executed SequencerMigrationAction via UpgradeExecutor" + +# Get the number of confirmed nodes before the upgrade to ensure the staker is still working. +NUM_CONFIRMED_NODES_BEFORE_UPGRADE=$(cast call --rpc-url $PARENT_CHAIN_RPC_URL $ROLLUP_ADDRESS 'latestConfirmed()(uint256)') + # Wait for CHILD_CHAIN_RPC_URL to be available # * Essential migration sub step * This is technically essential to the migration, but doesn't usually take long and shouldn't need to be programatically determined during a live migration. @@ -108,25 +122,20 @@ echo "Adding child chain upgrade executor as an L2 chain owner" # This step is done for the purposes of the test, as there should already be an upgrade executor on the child chain that is a chain owner cast send 0x0000000000000000000000000000000000000070 'addChainOwner(address)' $CHILD_CHAIN_UPGRADE_EXECUTOR_ADDRESS --rpc-url $CHILD_CHAIN_RPC_URL --private-key $PRIVATE_KEY -echo "Deploying ArbOS Upgrade action" - cd $ORBIT_ACTIONS_DIR -# Forge script to deploy the Espresso ArbOS upgrade action. -# ** Essential migration step ** the ArbOS upgrade signifies that the chain is now espresso compatible. -forge script --chain $CHILD_CHAIN_CHAIN_NAME contracts/child-chain/arbos-upgrade/DeployArbOSUpgradeAction.s.sol:DeployArbOSUpgradeAction --rpc-url $CHILD_CHAIN_RPC_URL --broadcast -vvvv - -# Get the address of the newly deployed upgrade action. -ARBOS_UPGRADE_ACTION=$(cat broadcast/DeployArbOSUpgradeAction.s.sol/412346/run-latest.json | jq -r '.transactions[0].contractAddress') - -# Echo information for debugging. -echo "Deployed ArbOSUpgradeAction at $ARBOS_UPGRADE_ACTION" - # Grab the pre-upgrade ArbOS version for testing. ARBOS_VERSION_BEFORE_UPGRADE=$(cast call "0x0000000000000000000000000000000000000064" "arbOSVersion()(uint64)" --rpc-url $CHILD_CHAIN_RPC_URL) # Use the Upgrde executor on the child chain to execute the ArbOS upgrade to signify that the node is now operating in espresso mode. This is essential for the migration. # ** Essential migration step ** This step can technically be done before all of the others as it is just scheduling the ArbOS upgrade. The unix timestamp at which the upgrade occurrs can be determined by operators, but for the purposes of the test we use 0 to upgrade immediately. cast send $CHILD_CHAIN_UPGRADE_EXECUTOR_ADDRESS "execute(address, bytes)" $ARBOS_UPGRADE_ACTION $(cast calldata "perform()") --rpc-url $CHILD_CHAIN_RPC_URL --private-key $PRIVATE_KEY +cd $TEST_DIR +# write tee verifier address into chain config +jq -r '.arbitrum.EspressoTEEVerifierAddress |= $ESPRESSO_TEE_VERIFIER_ADDRESS' test-chain-config.json > sent-chain-config.json --arg ESPRESSO_TEE_VERIFIER_ADDRESS $ESPRESSO_TEE_VERIFIER_ADDRESS +CHAIN_CONFIG=$(cat sent-chain-config.json) + +cast send $CHILD_CHAIN_UPGRADE_EXECUTOR_ADDRESS $(cast calldata "executeCall(address, bytes)" "0x0000000000000000000000000000000000000070" $(cast calldata "setChainConfig(string)" "$CHAIN_CONFIG")) --rpc-url $CHILD_CHAIN_RPC_URL --private-key $PRIVATE_KEY +# Set the chain config # Check the upgrade happened @@ -144,11 +153,6 @@ if [ $ARBOS_VERSION_AFTER_UPGRADE != "90" ]; then fail "ArbOS version not updated: Expected 90, Actual $ARBOS_VERSION_AFTER_UPGRADE" fi -# Test for new OSP address -CHALLENGE_MANAGER_OSP_ADDRESS=$(cast call $CHALLENGE_MANAGER_ADDRESS "osp()(address)" --rpc-url $PARENT_CHAIN_RPC_URL) -if [ $NEW_OSP_ENTRY != $CHALLENGE_MANAGER_OSP_ADDRESS ]; then - fail "OSP has not been set to newly deployed OSP: \n Newly deployed: $NEW_OSP_ENTRY \n Currently set OSP: $CHALLENGE_MANAGER_OSP_ADDRESS" -fi # Check for balance before transfer. # The following sequence is to check that transactions are still successfully being sequenced on the L2 ORIGINAL_OWNER_BALANCE=$(cast balance $OWNER_ADDRESS -e --rpc-url $CHILD_CHAIN_RPC_URL) diff --git a/espresso-tests/test-chain-config.json b/espresso-tests/test-chain-config.json new file mode 100644 index 00000000..44cfdb4d --- /dev/null +++ b/espresso-tests/test-chain-config.json @@ -0,0 +1,29 @@ +{ + "chainId":412346, + "homesteadBlock":0, + "daoForkSupport":true, + "eip150Block":0, + "eip150Hash":"0x0000000000000000000000000000000000000000000000000000000000000000", + "eip155Block":0, + "eip158Block":0, + "byzantiumBlock":0, + "constantinopleBlock":0, + "petersburgBlock":0, + "istanbulBlock":0, + "muirGlacierBlock":0, + "berlinBlock":0, + "londonBlock":0, + "clique":{ + "period":0, + "epoch":0 + }, + "arbitrum":{ + "EnableArbOS":true, + "AllowDebugPrecompiles":true, + "DataAvailabilityCommittee":false, + "InitialArbOSVersion":30, + "InitialChainOwner":"0x5E1497dD1f08C87b2d8FE23e9AAB6c1De833D927", + "GenesisBlockNum":0, + "EspressoTEEVerifierAddress": "0x0" + } +} diff --git a/flood.js b/flood.js new file mode 100644 index 00000000..f7fb4832 --- /dev/null +++ b/flood.js @@ -0,0 +1,76 @@ +// network-flood.js +const { ethers } = require('ethers'); +const crypto = require('crypto'); + +const RPC_URL = 'http://localhost:8547'; // Your local network RPC +const PRIVATE_KEY = ''; // Your private key (without 0x prefix) +const TARGET_ADDRESS = ''; // Target address +const PAYLOAD_SIZE_KB = 50; // Size of payload in KB +const TX_DELAY_MS = 1; // Delay between transactions in milliseconds +const GAS_LIMIT = 4000000; // Gas limit for large payload +const GAS_PRICE = 50; // Gas price in gwei + +// Convert KB to bytes +const PAYLOAD_SIZE_BYTES = PAYLOAD_SIZE_KB * 1024; + +// Setup provider and wallet +const provider = new ethers.providers.JsonRpcProvider(RPC_URL); +const wallet = new ethers.Wallet(PRIVATE_KEY, provider); + +// Generate random data of specified size +function generateRandomData(sizeInBytes) { + return '0x' + crypto.randomBytes(sizeInBytes).toString('hex'); +} + +// Send a single transaction +async function sendTransaction() { + try { + // Get current nonce + const nonce = await wallet.getTransactionCount(); + + // Generate random data + console.log(`Generating ${PAYLOAD_SIZE_KB}KB payload...`); + const data = generateRandomData(PAYLOAD_SIZE_BYTES); + + // Create transaction + const tx = { + to: TARGET_ADDRESS, + value: ethers.utils.parseEther('0.0001'), + data: data, + nonce: nonce, + }; + + console.log(`Sending transaction with nonce ${nonce}...`); + + // Send transaction + const txResponse = await wallet.sendTransaction(tx); + console.log(`Transaction sent successfully: ${txResponse.hash}`); + return true; + } catch (error) { + console.error(`Failed to send transaction: ${error.message}`); + return false; + } +} + +// Main function to continuously send transactions +async function main() { + console.log('Starting continuous network flood...'); + console.log(`Using wallet: ${wallet.address}`); + console.log('Press Ctrl+C to stop'); + + let txCount = 0; + + while (true) { + const success = await sendTransaction(); + if (success) { + txCount++; + console.log(`Total transactions sent: ${txCount}`); + } + + // Delay before next transaction + await new Promise(resolve => setTimeout(resolve, TX_DELAY_MS)); + } +} + +// Start the flood +main().catch(console.error); \ No newline at end of file diff --git a/ngrok.yml b/ngrok.yml new file mode 100644 index 00000000..5b118d91 --- /dev/null +++ b/ngrok.yml @@ -0,0 +1,19 @@ +version: 3 +agent: + authtoken: 4WbBxrSPTeyFPqqttL3oJ_26L6T88VKRJxfukSamH8D +tunnels: + tunnel1: + addr: 127.0.0.1:8546 + proto: http + schemes: + - http + tunnel2: + addr: 127.0.0.1:41000 + proto: http + schemes: + - http + tunnel3: + addr: 127.0.0.1:9642 + proto: http + schemes: + - http diff --git a/orbit-actions b/orbit-actions index 751be3fd..e7535cde 160000 --- a/orbit-actions +++ b/orbit-actions @@ -1 +1 @@ -Subproject commit 751be3fd8c19647b8ded06b136a8170458542d9f +Subproject commit e7535cde6891a911dd28adcbb16e4f4bd3a57927 diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..00fb66ec --- /dev/null +++ b/package-lock.json @@ -0,0 +1,833 @@ +{ + "name": "nitro-testnode", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "ethers": "^5.7.2" + } + }, + "node_modules/@ethersproject/abi": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", + "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/abstract-provider": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz", + "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0" + } + }, + "node_modules/@ethersproject/abstract-signer": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz", + "integrity": "sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "node_modules/@ethersproject/address": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz", + "integrity": "sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/rlp": "^5.7.0" + } + }, + "node_modules/@ethersproject/base64": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz", + "integrity": "sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0" + } + }, + "node_modules/@ethersproject/basex": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", + "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz", + "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "bn.js": "^5.2.1" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", + "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz", + "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0" + } + }, + "node_modules/@ethersproject/contracts": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz", + "integrity": "sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0" + } + }, + "node_modules/@ethersproject/hash": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", + "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/hdnode": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz", + "integrity": "sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "node_modules/@ethersproject/json-wallets": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz", + "integrity": "sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" + } + }, + "node_modules/@ethersproject/keccak256": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", + "integrity": "sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "js-sha3": "0.8.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", + "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ] + }, + "node_modules/@ethersproject/networks": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz", + "integrity": "sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/pbkdf2": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz", + "integrity": "sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/sha2": "^5.7.0" + } + }, + "node_modules/@ethersproject/properties": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz", + "integrity": "sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/providers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.2.tgz", + "integrity": "sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0", + "bech32": "1.1.4", + "ws": "7.4.6" + } + }, + "node_modules/@ethersproject/random": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", + "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/rlp": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz", + "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/sha2": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", + "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/signing-key": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz", + "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "bn.js": "^5.2.1", + "elliptic": "6.5.4", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/solidity": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz", + "integrity": "sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/strings": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz", + "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/transactions": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz", + "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0" + } + }, + "node_modules/@ethersproject/units": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.7.0.tgz", + "integrity": "sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/wallet": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz", + "integrity": "sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/json-wallets": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "node_modules/@ethersproject/web": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz", + "integrity": "sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/wordlists": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz", + "integrity": "sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==" + }, + "node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", + "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" + }, + "node_modules/ethers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.2", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" + }, + "node_modules/ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..f22981f4 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "dependencies": { + "ethers": "^5.7.2" + }, + "devDependencies": { + "@types/node": "^22.15.17" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 00000000..ea7d3116 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,511 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + ethers: + specifier: ^5.7.2 + version: 5.8.0 + devDependencies: + '@types/node': + specifier: ^22.15.17 + version: 22.15.17 + +packages: + + '@ethersproject/abi@5.8.0': + resolution: {integrity: sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q==} + + '@ethersproject/abstract-provider@5.8.0': + resolution: {integrity: sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg==} + + '@ethersproject/abstract-signer@5.8.0': + resolution: {integrity: sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA==} + + '@ethersproject/address@5.8.0': + resolution: {integrity: sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA==} + + '@ethersproject/base64@5.8.0': + resolution: {integrity: sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ==} + + '@ethersproject/basex@5.8.0': + resolution: {integrity: sha512-PIgTszMlDRmNwW9nhS6iqtVfdTAKosA7llYXNmGPw4YAI1PUyMv28988wAb41/gHF/WqGdoLv0erHaRcHRKW2Q==} + + '@ethersproject/bignumber@5.8.0': + resolution: {integrity: sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA==} + + '@ethersproject/bytes@5.8.0': + resolution: {integrity: sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A==} + + '@ethersproject/constants@5.8.0': + resolution: {integrity: sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg==} + + '@ethersproject/contracts@5.8.0': + resolution: {integrity: sha512-0eFjGz9GtuAi6MZwhb4uvUM216F38xiuR0yYCjKJpNfSEy4HUM8hvqqBj9Jmm0IUz8l0xKEhWwLIhPgxNY0yvQ==} + + '@ethersproject/hash@5.8.0': + resolution: {integrity: sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA==} + + '@ethersproject/hdnode@5.8.0': + resolution: {integrity: sha512-4bK1VF6E83/3/Im0ERnnUeWOY3P1BZml4ZD3wcH8Ys0/d1h1xaFt6Zc+Dh9zXf9TapGro0T4wvO71UTCp3/uoA==} + + '@ethersproject/json-wallets@5.8.0': + resolution: {integrity: sha512-HxblNck8FVUtNxS3VTEYJAcwiKYsBIF77W15HufqlBF9gGfhmYOJtYZp8fSDZtn9y5EaXTE87zDwzxRoTFk11w==} + + '@ethersproject/keccak256@5.8.0': + resolution: {integrity: sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng==} + + '@ethersproject/logger@5.8.0': + resolution: {integrity: sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA==} + + '@ethersproject/networks@5.8.0': + resolution: {integrity: sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg==} + + '@ethersproject/pbkdf2@5.8.0': + resolution: {integrity: sha512-wuHiv97BrzCmfEaPbUFpMjlVg/IDkZThp9Ri88BpjRleg4iePJaj2SW8AIyE8cXn5V1tuAaMj6lzvsGJkGWskg==} + + '@ethersproject/properties@5.8.0': + resolution: {integrity: sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw==} + + '@ethersproject/providers@5.8.0': + resolution: {integrity: sha512-3Il3oTzEx3o6kzcg9ZzbE+oCZYyY+3Zh83sKkn4s1DZfTUjIegHnN2Cm0kbn9YFy45FDVcuCLLONhU7ny0SsCw==} + + '@ethersproject/random@5.8.0': + resolution: {integrity: sha512-E4I5TDl7SVqyg4/kkA/qTfuLWAQGXmSOgYyO01So8hLfwgKvYK5snIlzxJMk72IFdG/7oh8yuSqY2KX7MMwg+A==} + + '@ethersproject/rlp@5.8.0': + resolution: {integrity: sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q==} + + '@ethersproject/sha2@5.8.0': + resolution: {integrity: sha512-dDOUrXr9wF/YFltgTBYS0tKslPEKr6AekjqDW2dbn1L1xmjGR+9GiKu4ajxovnrDbwxAKdHjW8jNcwfz8PAz4A==} + + '@ethersproject/signing-key@5.8.0': + resolution: {integrity: sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w==} + + '@ethersproject/solidity@5.8.0': + resolution: {integrity: sha512-4CxFeCgmIWamOHwYN9d+QWGxye9qQLilpgTU0XhYs1OahkclF+ewO+3V1U0mvpiuQxm5EHHmv8f7ClVII8EHsA==} + + '@ethersproject/strings@5.8.0': + resolution: {integrity: sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg==} + + '@ethersproject/transactions@5.8.0': + resolution: {integrity: sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg==} + + '@ethersproject/units@5.8.0': + resolution: {integrity: sha512-lxq0CAnc5kMGIiWW4Mr041VT8IhNM+Pn5T3haO74XZWFulk7wH1Gv64HqE96hT4a7iiNMdOCFEBgaxWuk8ETKQ==} + + '@ethersproject/wallet@5.8.0': + resolution: {integrity: sha512-G+jnzmgg6UxurVKRKvw27h0kvG75YKXZKdlLYmAHeF32TGUzHkOFd7Zn6QHOTYRFWnfjtSSFjBowKo7vfrXzPA==} + + '@ethersproject/web@5.8.0': + resolution: {integrity: sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw==} + + '@ethersproject/wordlists@5.8.0': + resolution: {integrity: sha512-2df9bbXicZws2Sb5S6ET493uJ0Z84Fjr3pC4tu/qlnZERibZCeUVuqdtt+7Tv9xxhUxHoIekIA7avrKUWHrezg==} + + '@types/node@22.15.17': + resolution: {integrity: sha512-wIX2aSZL5FE+MR0JlvF87BNVrtFWf6AE6rxSE9X7OwnVvoyCQjpzSRJ+M87se/4QCkCiebQAqrJ0y6fwIyi7nw==} + + aes-js@3.0.0: + resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} + + bech32@1.1.4: + resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} + + bn.js@4.12.2: + resolution: {integrity: sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==} + + bn.js@5.2.2: + resolution: {integrity: sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==} + + brorand@1.1.0: + resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + + elliptic@6.6.1: + resolution: {integrity: sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==} + + ethers@5.8.0: + resolution: {integrity: sha512-DUq+7fHrCg1aPDFCHx6UIPb3nmt2XMpM7Y/g2gLhsl3lIBqeAfOJIl1qEvRf2uq3BiKxmh6Fh5pfp2ieyek7Kg==} + + hash.js@1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + + hmac-drbg@1.0.1: + resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + js-sha3@0.8.0: + resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} + + minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + + minimalistic-crypto-utils@1.0.1: + resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + + scrypt-js@3.0.1: + resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} + + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + +snapshots: + + '@ethersproject/abi@5.8.0': + dependencies: + '@ethersproject/address': 5.8.0 + '@ethersproject/bignumber': 5.8.0 + '@ethersproject/bytes': 5.8.0 + '@ethersproject/constants': 5.8.0 + '@ethersproject/hash': 5.8.0 + '@ethersproject/keccak256': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/properties': 5.8.0 + '@ethersproject/strings': 5.8.0 + + '@ethersproject/abstract-provider@5.8.0': + dependencies: + '@ethersproject/bignumber': 5.8.0 + '@ethersproject/bytes': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/networks': 5.8.0 + '@ethersproject/properties': 5.8.0 + '@ethersproject/transactions': 5.8.0 + '@ethersproject/web': 5.8.0 + + '@ethersproject/abstract-signer@5.8.0': + dependencies: + '@ethersproject/abstract-provider': 5.8.0 + '@ethersproject/bignumber': 5.8.0 + '@ethersproject/bytes': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/properties': 5.8.0 + + '@ethersproject/address@5.8.0': + dependencies: + '@ethersproject/bignumber': 5.8.0 + '@ethersproject/bytes': 5.8.0 + '@ethersproject/keccak256': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/rlp': 5.8.0 + + '@ethersproject/base64@5.8.0': + dependencies: + '@ethersproject/bytes': 5.8.0 + + '@ethersproject/basex@5.8.0': + dependencies: + '@ethersproject/bytes': 5.8.0 + '@ethersproject/properties': 5.8.0 + + '@ethersproject/bignumber@5.8.0': + dependencies: + '@ethersproject/bytes': 5.8.0 + '@ethersproject/logger': 5.8.0 + bn.js: 5.2.2 + + '@ethersproject/bytes@5.8.0': + dependencies: + '@ethersproject/logger': 5.8.0 + + '@ethersproject/constants@5.8.0': + dependencies: + '@ethersproject/bignumber': 5.8.0 + + '@ethersproject/contracts@5.8.0': + dependencies: + '@ethersproject/abi': 5.8.0 + '@ethersproject/abstract-provider': 5.8.0 + '@ethersproject/abstract-signer': 5.8.0 + '@ethersproject/address': 5.8.0 + '@ethersproject/bignumber': 5.8.0 + '@ethersproject/bytes': 5.8.0 + '@ethersproject/constants': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/properties': 5.8.0 + '@ethersproject/transactions': 5.8.0 + + '@ethersproject/hash@5.8.0': + dependencies: + '@ethersproject/abstract-signer': 5.8.0 + '@ethersproject/address': 5.8.0 + '@ethersproject/base64': 5.8.0 + '@ethersproject/bignumber': 5.8.0 + '@ethersproject/bytes': 5.8.0 + '@ethersproject/keccak256': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/properties': 5.8.0 + '@ethersproject/strings': 5.8.0 + + '@ethersproject/hdnode@5.8.0': + dependencies: + '@ethersproject/abstract-signer': 5.8.0 + '@ethersproject/basex': 5.8.0 + '@ethersproject/bignumber': 5.8.0 + '@ethersproject/bytes': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/pbkdf2': 5.8.0 + '@ethersproject/properties': 5.8.0 + '@ethersproject/sha2': 5.8.0 + '@ethersproject/signing-key': 5.8.0 + '@ethersproject/strings': 5.8.0 + '@ethersproject/transactions': 5.8.0 + '@ethersproject/wordlists': 5.8.0 + + '@ethersproject/json-wallets@5.8.0': + dependencies: + '@ethersproject/abstract-signer': 5.8.0 + '@ethersproject/address': 5.8.0 + '@ethersproject/bytes': 5.8.0 + '@ethersproject/hdnode': 5.8.0 + '@ethersproject/keccak256': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/pbkdf2': 5.8.0 + '@ethersproject/properties': 5.8.0 + '@ethersproject/random': 5.8.0 + '@ethersproject/strings': 5.8.0 + '@ethersproject/transactions': 5.8.0 + aes-js: 3.0.0 + scrypt-js: 3.0.1 + + '@ethersproject/keccak256@5.8.0': + dependencies: + '@ethersproject/bytes': 5.8.0 + js-sha3: 0.8.0 + + '@ethersproject/logger@5.8.0': {} + + '@ethersproject/networks@5.8.0': + dependencies: + '@ethersproject/logger': 5.8.0 + + '@ethersproject/pbkdf2@5.8.0': + dependencies: + '@ethersproject/bytes': 5.8.0 + '@ethersproject/sha2': 5.8.0 + + '@ethersproject/properties@5.8.0': + dependencies: + '@ethersproject/logger': 5.8.0 + + '@ethersproject/providers@5.8.0': + dependencies: + '@ethersproject/abstract-provider': 5.8.0 + '@ethersproject/abstract-signer': 5.8.0 + '@ethersproject/address': 5.8.0 + '@ethersproject/base64': 5.8.0 + '@ethersproject/basex': 5.8.0 + '@ethersproject/bignumber': 5.8.0 + '@ethersproject/bytes': 5.8.0 + '@ethersproject/constants': 5.8.0 + '@ethersproject/hash': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/networks': 5.8.0 + '@ethersproject/properties': 5.8.0 + '@ethersproject/random': 5.8.0 + '@ethersproject/rlp': 5.8.0 + '@ethersproject/sha2': 5.8.0 + '@ethersproject/strings': 5.8.0 + '@ethersproject/transactions': 5.8.0 + '@ethersproject/web': 5.8.0 + bech32: 1.1.4 + ws: 8.18.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@ethersproject/random@5.8.0': + dependencies: + '@ethersproject/bytes': 5.8.0 + '@ethersproject/logger': 5.8.0 + + '@ethersproject/rlp@5.8.0': + dependencies: + '@ethersproject/bytes': 5.8.0 + '@ethersproject/logger': 5.8.0 + + '@ethersproject/sha2@5.8.0': + dependencies: + '@ethersproject/bytes': 5.8.0 + '@ethersproject/logger': 5.8.0 + hash.js: 1.1.7 + + '@ethersproject/signing-key@5.8.0': + dependencies: + '@ethersproject/bytes': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/properties': 5.8.0 + bn.js: 5.2.2 + elliptic: 6.6.1 + hash.js: 1.1.7 + + '@ethersproject/solidity@5.8.0': + dependencies: + '@ethersproject/bignumber': 5.8.0 + '@ethersproject/bytes': 5.8.0 + '@ethersproject/keccak256': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/sha2': 5.8.0 + '@ethersproject/strings': 5.8.0 + + '@ethersproject/strings@5.8.0': + dependencies: + '@ethersproject/bytes': 5.8.0 + '@ethersproject/constants': 5.8.0 + '@ethersproject/logger': 5.8.0 + + '@ethersproject/transactions@5.8.0': + dependencies: + '@ethersproject/address': 5.8.0 + '@ethersproject/bignumber': 5.8.0 + '@ethersproject/bytes': 5.8.0 + '@ethersproject/constants': 5.8.0 + '@ethersproject/keccak256': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/properties': 5.8.0 + '@ethersproject/rlp': 5.8.0 + '@ethersproject/signing-key': 5.8.0 + + '@ethersproject/units@5.8.0': + dependencies: + '@ethersproject/bignumber': 5.8.0 + '@ethersproject/constants': 5.8.0 + '@ethersproject/logger': 5.8.0 + + '@ethersproject/wallet@5.8.0': + dependencies: + '@ethersproject/abstract-provider': 5.8.0 + '@ethersproject/abstract-signer': 5.8.0 + '@ethersproject/address': 5.8.0 + '@ethersproject/bignumber': 5.8.0 + '@ethersproject/bytes': 5.8.0 + '@ethersproject/hash': 5.8.0 + '@ethersproject/hdnode': 5.8.0 + '@ethersproject/json-wallets': 5.8.0 + '@ethersproject/keccak256': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/properties': 5.8.0 + '@ethersproject/random': 5.8.0 + '@ethersproject/signing-key': 5.8.0 + '@ethersproject/transactions': 5.8.0 + '@ethersproject/wordlists': 5.8.0 + + '@ethersproject/web@5.8.0': + dependencies: + '@ethersproject/base64': 5.8.0 + '@ethersproject/bytes': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/properties': 5.8.0 + '@ethersproject/strings': 5.8.0 + + '@ethersproject/wordlists@5.8.0': + dependencies: + '@ethersproject/bytes': 5.8.0 + '@ethersproject/hash': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/properties': 5.8.0 + '@ethersproject/strings': 5.8.0 + + '@types/node@22.15.17': + dependencies: + undici-types: 6.21.0 + + aes-js@3.0.0: {} + + bech32@1.1.4: {} + + bn.js@4.12.2: {} + + bn.js@5.2.2: {} + + brorand@1.1.0: {} + + elliptic@6.6.1: + dependencies: + bn.js: 4.12.2 + brorand: 1.1.0 + hash.js: 1.1.7 + hmac-drbg: 1.0.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + + ethers@5.8.0: + dependencies: + '@ethersproject/abi': 5.8.0 + '@ethersproject/abstract-provider': 5.8.0 + '@ethersproject/abstract-signer': 5.8.0 + '@ethersproject/address': 5.8.0 + '@ethersproject/base64': 5.8.0 + '@ethersproject/basex': 5.8.0 + '@ethersproject/bignumber': 5.8.0 + '@ethersproject/bytes': 5.8.0 + '@ethersproject/constants': 5.8.0 + '@ethersproject/contracts': 5.8.0 + '@ethersproject/hash': 5.8.0 + '@ethersproject/hdnode': 5.8.0 + '@ethersproject/json-wallets': 5.8.0 + '@ethersproject/keccak256': 5.8.0 + '@ethersproject/logger': 5.8.0 + '@ethersproject/networks': 5.8.0 + '@ethersproject/pbkdf2': 5.8.0 + '@ethersproject/properties': 5.8.0 + '@ethersproject/providers': 5.8.0 + '@ethersproject/random': 5.8.0 + '@ethersproject/rlp': 5.8.0 + '@ethersproject/sha2': 5.8.0 + '@ethersproject/signing-key': 5.8.0 + '@ethersproject/solidity': 5.8.0 + '@ethersproject/strings': 5.8.0 + '@ethersproject/transactions': 5.8.0 + '@ethersproject/units': 5.8.0 + '@ethersproject/wallet': 5.8.0 + '@ethersproject/web': 5.8.0 + '@ethersproject/wordlists': 5.8.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + hash.js@1.1.7: + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + + hmac-drbg@1.0.1: + dependencies: + hash.js: 1.1.7 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + + inherits@2.0.4: {} + + js-sha3@0.8.0: {} + + minimalistic-assert@1.0.1: {} + + minimalistic-crypto-utils@1.0.1: {} + + scrypt-js@3.0.1: {} + + undici-types@6.21.0: {} + + ws@8.18.0: {} diff --git a/rollupcreator/Dockerfile b/rollupcreator/Dockerfile index 3ae9349e..f98daf71 100644 --- a/rollupcreator/Dockerfile +++ b/rollupcreator/Dockerfile @@ -1,15 +1,17 @@ -FROM node:18-bullseye-slim -ARG NITRO_CONTRACTS_BRANCH=main -ARG NITRO_CONTRACTS_REPO=https://github.com/OffchainLabs/nitro-contracts.git +FROM node:18-bookworm-slim +ARG NITRO_CONTRACTS_BRANCH=celestia-integration +ARG NITRO_CONTRACTS_REPO=https://github.com/EspressoSystems/nitro-contracts.git RUN apt-get update && \ apt-get install -y git docker.io python3 build-essential curl jq WORKDIR /workspace -RUN git clone --no-checkout ${NITRO_CONTRACTS_REPO} ./ +RUN git clone --recurse-submodules --no-checkout ${NITRO_CONTRACTS_REPO} ./ RUN git checkout ${NITRO_CONTRACTS_BRANCH} +RUN yarn install && yarn cache clean RUN curl -L https://foundry.paradigm.xyz | bash ENV PATH="${PATH}:/root/.foundry/bin" RUN foundryup +RUN forge update lib/forge-std +RUN git submodule update --init --recursive RUN touch scripts/config.ts -RUN yarn install RUN yarn build:all ENTRYPOINT ["yarn"] diff --git a/scripts/config.ts b/scripts/config.ts index 81b06507..68eb523b 100644 --- a/scripts/config.ts +++ b/scripts/config.ts @@ -69,7 +69,14 @@ function writeGethGenesisConfig(argv: any) { "shanghaiTime": 0, "cancunTime": 1706778826, "terminalTotalDifficulty": 0, - "terminalTotalDifficultyPassed": true + "terminalTotalDifficultyPassed": true, + "blobSchedule": { + "cancun": { + "target": 3, + "max": 6, + "baseFeeUpdateFraction": 3338477 + } + } }, "difficulty": "0", "extradata": "0x00000000000000000000000000000000000000000000000000000000000000003f1Eae7D46d88F08fc2F8ed27FCb2AB183EB2d0E0B0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", @@ -165,15 +172,15 @@ function writeGethGenesisConfig(argv: any) { } type ChainInfo = { - [key: string]: any; + [key: string]: any; }; // Define a function to return ChainInfo function getChainInfo(): ChainInfo { - const filePath = path.join(consts.configpath, "l2_chain_info.json"); - const fileContents = fs.readFileSync(filePath).toString(); - const chainInfo: ChainInfo = JSON.parse(fileContents); - return chainInfo; + const filePath = path.join(consts.configpath, "l2_chain_info.json"); + const fileContents = fs.readFileSync(filePath).toString(); + const chainInfo: ChainInfo = JSON.parse(fileContents); + return chainInfo; } function writeConfigs(argv: any) { @@ -205,6 +212,9 @@ function writeConfigs(argv: any) { "make-assertion-interval": "10s", strategy: "MakeNodes", }, + "parent-chain-reader": { + enable: true, + }, sequencer: false, dangerous: { "no-sequencer-coordinator": false, @@ -246,7 +256,7 @@ function writeConfigs(argv: any) { url: argv.validationNodeUrl, jwtsecret: valJwtSecret, }, - "dangerous": {"reset-block-validation": false}, + dangerous: { "reset-block-validation": false }, }, feed: { input: { @@ -278,7 +288,7 @@ function writeConfigs(argv: any) { }, persistent: { chain: "local", - "db-engine": "leveldb", + "db-engine": "pebble", }, ws: { addr: "0.0.0.0", @@ -292,15 +302,8 @@ function writeConfigs(argv: any) { if (argv.espresso) { let config = baseConfig as any; - config.node["block-validator"]["espresso"] = false; - config.node["block-validator"]["light-client-address"] = ""; config.node["batch-poster"]["hotshot-url"] = ""; config.node["batch-poster"]["light-client-address"] = ""; - config.node["transaction-streamer"] = { - "sovereign-sequencer-enabled": false, - "hotshot-url": "", - "espresso-namespace": 412346, - }; } baseConfig.node["data-availability"]["sequencer-inbox-address"] = @@ -318,12 +321,6 @@ function writeConfigs(argv: any) { simpleConfig.node["delayed-sequencer"].enable = true; simpleConfig.node["batch-poster"].enable = true; simpleConfig.node["batch-poster"]["redis-url"] = ""; - if (argv.espresso) { - simpleConfig.node["transaction-streamer"]["hotshot-url"] = - argv.espressoUrl; - simpleConfig.node["transaction-streamer"]["sovereign-sequencer-enabled"] = - true; - } simpleConfig.execution["sequencer"].enable = true; if (argv.anytrust) { @@ -334,9 +331,6 @@ function writeConfigs(argv: any) { simpleConfig.node["batch-poster"]["hotshot-url"] = argv.espressoUrl; simpleConfig.node["batch-poster"]["light-client-address"] = argv.lightClientAddress; - simpleConfig.node["block-validator"]["espresso"] = true; - simpleConfig.node["block-validator"]["light-client-address"] = - argv.lightClientAddress; simpleConfig.node["block-validator"]["dangerous"][ "reset-block-validation" ] = true; @@ -386,9 +380,6 @@ function writeConfigs(argv: any) { validatorConfig.node.staker.enable = true; validatorConfig.node.staker["use-smart-contract-wallet"] = true; if (argv.espresso) { - validatorConfig.node["block-validator"]["espresso"] = true; - validatorConfig.node["block-validator"]["light-client-address"] = - argv.lightClientAddress; validatorConfig.node["block-validator"]["dangerous"][ "reset-block-validation" ] = true; @@ -412,24 +403,31 @@ function writeConfigs(argv: any) { sequencerConfig.node["delayed-sequencer"].enable = true; if (argv.espresso) { - sequencerConfig.execution.sequencer["enable-espresso-sovereign"] = true; sequencerConfig.node.feed.output.enable = true; sequencerConfig.node.dangerous["no-sequencer-coordinator"] = true; } else { sequencerConfig.node["seq-coordinator"].enable = true; } - if (argv.espresso && argv.enableEspressoFinalityNode) { - sequencerConfig.execution.sequencer["enable-espresso-finality-node"] = - true; - sequencerConfig.execution.sequencer["enable-espresso-sovereign"] = false; - sequencerConfig.execution.sequencer["espresso-finality-node-config"] = { - "hotshot-url": argv.espressoUrl, - "start-block": 0, + if (argv.espresso && argv.enableCaffNode) { + sequencerConfig.node.sequencer = false; + sequencerConfig.execution["sequencer"].enable = false; + sequencerConfig.node["delayed-sequencer"].enable = false; + sequencerConfig.node["parent-chain-reader"].enable = false; + sequencerConfig.node["espresso-caff-node"] = { + enable: true, + "hotshot-urls": [argv.espressoUrl], + "fallback-urls": [argv.espressoUrl], + "next-hotshot-block": 1, namespace: 412346, + "hotshot-polling-interval": "250ms", + "retry-time": "2s", + "espresso-tee-verifier-addr": "0xb562622f2D76F355D673560CB88c1dF6088702f1", }; + + sequencerConfig.execution["forwarding-target"] = "ws://sequencer:8548"; fs.writeFileSync( - path.join(consts.configpath, "espresso_finality_sequencer_config.json"), + path.join(consts.configpath, "caff_sequencer_config.json"), JSON.stringify(sequencerConfig) ); } else { @@ -445,10 +443,6 @@ function writeConfigs(argv: any) { posterConfig.node["batch-poster"]["hotshot-url"] = argv.espressoUrl; posterConfig.node["batch-poster"]["light-client-address"] = argv.lightClientAddress; - posterConfig.node["transaction-streamer"]["hotshot-url"] = - argv.espressoUrl; - posterConfig.node["transaction-streamer"]["sovereign-sequencer-enabled"] = - true; } else { posterConfig.node["seq-coordinator"].enable = true; } @@ -481,9 +475,12 @@ function writeConfigs(argv: any) { l3Config.node["batch-poster"].enable = true; l3Config.node["batch-poster"]["redis-url"] = ""; if (argv.espresso) { - l3Config.execution.sequencer["enable-espresso-sovereign"] = true; l3Config.node.feed.output.enable = true; l3Config.node.dangerous["no-sequencer-coordinator"] = true; + l3Config.node.feed.input.url.push("ws://sequencer:9642"); + l3Config.node["batch-poster"]["hotshot-url"] = argv.espressoUrl; + l3Config.node["batch-poster"]["light-client-address"] = + argv.lightClientAddress; } fs.writeFileSync( path.join(consts.configpath, "l3node_config.json"), @@ -549,8 +546,8 @@ function writeL2ChainConfig(argv: any) { }; if (argv.espresso) { let chainConfig = l2ChainConfig as any; - chainConfig.arbitrum["EnableEspresso"] = true; - chainConfig["espresso"] = true; + chainConfig.arbitrum["EspressoTEEVerifierAddress"] = + "0xb562622f2D76F355D673560CB88c1dF6088702f1"; } const l2ChainConfigJSON = JSON.stringify(l2ChainConfig); fs.writeFileSync( diff --git a/scripts/index.ts b/scripts/index.ts index 59e03d96..f4279c1e 100644 --- a/scripts/index.ts +++ b/scripts/index.ts @@ -40,7 +40,8 @@ async function main() { espresso: { boolean: true, decription: 'use Espresso Sequencer for sequencing and DA', default: false }, espressoUrl: { string: true, description: 'Espresso Sequencer url', default: 'http://espresso-dev-node:41000' }, lightClientAddress: { string: true, description: 'address of the light client contract', default: ''}, - enableEspressoFinalityNode: {boolean: true, description: 'enable finality node', default: false}, + enableCaffNode: {boolean: true, description: 'enable caff node', default: false}, + simpleWithValidator: {boolean: true, description: 'start a simple node that validates', default: false}, }) .command(bridgeFundsCommand) .command(bridgeToL3Command) diff --git a/smoke-test-caff-node.bash b/smoke-test-caff-node.bash new file mode 100755 index 00000000..aac54216 --- /dev/null +++ b/smoke-test-caff-node.bash @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +set -euo pipefail + +check_nonce_increase() { + local address=$1 + local initial_nonce=$2 + while true; do + currentNonce=$(cast nonce "$address" --rpc-url ws://127.0.0.1:8552) + if [ "$currentNonce" -eq "$((initial_nonce + 1))" ]; then + break + fi + sleep 1 + done +} + +user=user_l2user +funnel=funnel +caff_url="ws://caff-node:8548" + +./test-node.bash --espresso --latest-espresso-image --validate --tokenbridge --init-force --detach --caff-node + +# Start the caff node +docker compose up -d caff-node --wait --detach + +echo "Sending L2 transaction through sequencer 1" +./test-node.bash script send-l2 --ethamount 10 --to $user --wait + +# Check the balance from caff node's api +userAddress=$(docker compose run scripts print-address --account $user | tail -n 1 | tr -d '\r\n') +funnelAddress=$(docker compose run scripts print-address --account $funnel | tail -n 1 | tr -d '\r\n') + +while true; do + # Check if the balance on Caff node is greater than 0 + balance=$(cast balance $userAddress --rpc-url ws://127.0.0.1:8552) + # Using bc here because it supports bigint + if [ "$(echo "$balance > 0" | bc)" -eq 1 ]; then + break + fi + sleep 1 +done + +nonce=$(cast nonce $funnelAddress --rpc-url ws://127.0.0.1:8552) + +echo "Sending L2 transaction through caff node 1" +./test-node.bash script send-l2 --ethamount 10 --to $user --l2url $caff_url --wait + +check_nonce_increase "$funnelAddress" "$nonce" +nonce=$((nonce + 1)) + +echo "Sending L2 transaction through sequencer 2" +./test-node.bash script send-l2 --ethamount 10 --to $user --wait + +check_nonce_increase "$funnelAddress" "$nonce" +nonce=$((nonce + 1)) + +echo "Sending L2 transaction through caff node 2" +./test-node.bash script send-l2 --ethamount 10 --to $user --l2url $caff_url --wait + +check_nonce_increase "$funnelAddress" "$nonce" + +echo "Smoke test succeeded." +docker compose down diff --git a/smoke-test-espresso-finality-node.bash b/smoke-test-espresso-finality-node.bash deleted file mode 100755 index 3597c20e..00000000 --- a/smoke-test-espresso-finality-node.bash +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -listen_to_sequencer_feed() { - # Listen to the sequencer feed and check if the sender address is detected - while read -r message; do - # Check if the message contains the specific sender address - if [[ "$message" == *"\"sender\":\"0xdd6bd74674c356345db88c354491c7d3173c6806\""* ]]; then - echo "Sender address detected" - break - fi - done < <(wscat -c ws://127.0.0.1:9642) -} - - -./test-node.bash --espresso --latest-espresso-image --validate --tokenbridge --init-force --detach --espresso-finality-node - -# Start the espresso finality node -docker compose up -d sequencer-espresso-finality --wait --detach - -# Sending L2 transaction -./test-node.bash script send-l2 --ethamount 100 --to user_l2user --wait - -listen_to_sequencer_feed - -docker compose down diff --git a/test-node.bash b/test-node.bash index 897e0ab1..7af8dcb0 100755 --- a/test-node.bash +++ b/test-node.bash @@ -10,7 +10,7 @@ BLOCKSCOUT_VERSION=offchainlabs/blockscout:v1.1.0-0e716c8 DEFAULT_NITRO_CONTRACTS_VERSION="99c07a7db2fcce75b751c5a2bd4936e898cda065" DEFAULT_TOKEN_BRIDGE_VERSION="v1.2.2" -ESPRESSO_VERSION=ghcr.io/espressosystems/nitro-espresso-integration/nitro-node-dev:latest +ESPRESSO_VERSION=ghcr.io/espressosystems/nitro-espresso-integration/nitro-node-dev:celestia-integration # Set default versions if not overriden by provided env vars : ${NITRO_CONTRACTS_REPO:=$DEFAULT_NITRO_CONTRACTS_REPO} @@ -48,9 +48,9 @@ tokenbridge=false l3node=false consensusclient=false redundantsequencers=0 -lightClientAddr=0xb6eb235fa509e3206f959761d11e3777e16d0e98 +lightClientAddr=0xb7fc0e52ec06f125f3afeba199248c79f71c2e3a lightClientAddrForL3=0x5e36aa9caaf5f708fca5c04d2d4c776a62b2b258 -enableEspressoFinalityNode=false +enableCaffNode=false espresso=false l2_espresso=false latest_espresso_image=false @@ -63,6 +63,7 @@ l1chainid=1337 simple=true simple_with_validator=false l2anytrust=false +local_celestia=true # Use the dev versions of nitro/blockscout dev_nitro=false @@ -125,8 +126,8 @@ while [[ $# -gt 0 ]]; do l2_espresso=true shift ;; - --espresso-finality-node) - enableEspressoFinalityNode=true + --caff-node) + enableCaffNode=true shift ;; --latest-espresso-image) @@ -275,6 +276,10 @@ while [[ $# -gt 0 ]]; do simple=false shift ;; + --celestia-testnet) + local_celestia=false + shift + ;; *) echo Usage: $0 \[OPTIONS..] echo $0 script [SCRIPT-ARGS] @@ -301,7 +306,7 @@ while [[ $# -gt 0 ]]; do echo --no-tokenbridge don\'t build or launch tokenbridge echo --no-run does not launch nodes \(useful with build or init\) echo --no-simple run a full configuration with separate sequencer/batch-poster/validator/relayer - echo --enable-finality-node enable espresso finality node + echo --enable-caff-node enable espresso caff node echo --build-dev-nitro rebuild dev nitro docker image echo --no-build-dev-nitro don\'t rebuild dev nitro docker image echo --build-dev-blockscout rebuild dev blockscout docker image @@ -317,7 +322,7 @@ done if $espresso; then NITRO_CONTRACTS_REPO=https://github.com/EspressoSystems/nitro-contracts.git - NITRO_CONTRACTS_BRANCH=develop + NITRO_CONTRACTS_BRANCH=v2.1.3-celestia-1b04973 export NITRO_CONTRACTS_REPO export NITRO_CONTRACTS_BRANCH echo "Running espresso mode" @@ -379,12 +384,7 @@ if $espresso; then # l2 node will run without `espresso` mode. l2_espresso=false fi - if $build_node_images && $l2_espresso; then - INITIAL_SEQ_NODES="$INITIAL_SEQ_NODES espresso-dev-node" - else - NODES="$NODES espresso-dev-node" - fi - + NODES="$NODES espresso-dev-node" fi if $dev_nitro && $build_dev_nitro; then @@ -456,6 +456,28 @@ if $force_init; then docker volume rm $leftoverVolumes fi + if $local_celestia; then + echo == Starting Celestia Client == + docker compose up --wait localestia + + echo == Starting Celestia DA Server == + docker compose up --wait celestia-server + else + echo == Starting Celestia Client == + docker compose up --wait celestia + + # sleep 10s to allow the node to initialize + sleep 10s + + AUTH_TOKEN=$(docker exec celestia celestia light auth admin --p2p.network mocha) + echo "Got auth token from celestia node: $AUTH_TOKEN" + + echo == Starting Celestia DA Server == + CELESTIA_AUTH_TOKEN="$AUTH_TOKEN" docker compose up --wait celestia-server-mocha + fi + + + echo == Generating l1 keys docker compose run scripts write-accounts docker compose run --entrypoint sh geth -c "echo passphrase > /datadir/passphrase" @@ -558,9 +580,9 @@ if $force_init; then else echo == Writing configs docker compose run scripts write-config $anytrustNodeConfigLine --espresso $l2_espresso --lightClientAddress $lightClientAddr - if $enableEspressoFinalityNode; then + if $enableCaffNode; then echo == Writing configs for finality node - docker compose run scripts write-config $anytrustNodeConfigLine --espresso $l2_espresso --enableEspressoFinalityNode --lightClientAddress $lightClientAddr + docker compose run scripts write-config $anytrustNodeConfigLine --espresso $l2_espresso --enableCaffNode --lightClientAddress $lightClientAddr fi echo == Initializing redis docker compose up --wait redis @@ -568,7 +590,10 @@ if $force_init; then fi echo == Funding l2 funnel and dev key - docker compose up --wait $INITIAL_SEQ_NODES + docker compose up --wait $INITIAL_SEQ_NODES || { + echo "Failed to start $INITIAL_SEQ_NODES. Attempting to restart..." + docker compose restart $INITIAL_SEQ_NODES + } docker compose run scripts bridge-funds --ethamount 100000 --wait docker compose run scripts send-l2 --ethamount 10000 --to espresso-sequencer --wait docker compose run scripts send-l2 --ethamount 100 --to l2owner --wait @@ -626,7 +651,10 @@ if $force_init; then docker compose run --entrypoint sh rollupcreator -c "jq [.[]] /config/deployed_l3_chain_info.json > /config/l3_chain_info.json" echo == Funding l3 funnel and dev key - docker compose up --wait l3node sequencer + docker compose up --wait l3node sequencer || { + echo "Failed to start l3node or sequencer. Attempting to restart..." + docker compose restart l3node sequencer + } if $l3_token_bridge; then echo == Deploying L2-L3 token bridge @@ -640,6 +668,12 @@ 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=$deployer_key -e CHILD_RPC=http://l3node:3347 -e CHILD_KEY=$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 + echo == Set L3 UpgradeExecutor to be chain owner + 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 echo == Fund L3 accounts @@ -654,13 +688,6 @@ if $force_init; then echo == Deploy CacheManager on L3 docker compose run -e CHILD_CHAIN_RPC="http://l3node:3347" -e CHAIN_OWNER_PRIVKEY=$l3ownerkey rollupcreator deploy-cachemanager-testnode - if $l3_token_bridge; then - # 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 - echo == Set L3 UpgradeExecutor to be chain owner - 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 - fi - fi fi diff --git a/tokenbridge/Dockerfile b/tokenbridge/Dockerfile index dac06fbb..8f3ae386 100644 --- a/tokenbridge/Dockerfile +++ b/tokenbridge/Dockerfile @@ -2,7 +2,7 @@ FROM node:18-bullseye-slim ARG TOKEN_BRIDGE_BRANCH=main RUN apt-get update && \ apt-get install -y git docker.io python3 build-essential -WORKDIR /workspace +WORKDIR /workspace RUN git clone --no-checkout https://github.com/OffchainLabs/token-bridge-contracts.git ./ RUN git checkout ${TOKEN_BRIDGE_BRANCH} RUN yarn install