From 662e9e5c172acc6fa52dbef368d55c93c763385a Mon Sep 17 00:00:00 2001 From: bros Date: Fri, 7 Jul 2023 10:55:41 +0000 Subject: [PATCH] WIP --- .github/CODEOWNERS | 12 - .github/ISSUE_TEMPLATE/bug.md | 31 - .github/ISSUE_TEMPLATE/feature.md | 17 - .github/ISSUE_TEMPLATE/question.md | 9 - .github/pull_request_template.md | 22 - .github/workflows/push-docker-develop.yml | 2 +- .github/workflows/push-docker-tagged.yml | 2 +- .github/workflows/release.yml | 64 - .github/workflows/test-e2e.yml | 2 +- .github/workflows/test-from-prover.yml | 52 - Dockerfile | 6 +- Makefile | 22 +- README.md | 124 +- aggregator/aggregator.go | 18 +- aggregator/aggregator_test.go | 14 +- aggregator/config.go | 4 +- aggregator/interfaces.go | 8 +- aggregator/metrics/metrics.go | 2 +- aggregator/mocks/mock_etherman.go | 2 +- aggregator/mocks/mock_ethtxmanager.go | 2 +- aggregator/mocks/mock_prover.go | 2 +- aggregator/mocks/mock_state.go | 2 +- aggregator/prover/prover.go | 8 +- .../datacommittee_test.go | 1 + ci/e2e-group10/forced_batches_test.go | 34 +- .../forced_batches_vector_group2_test.go | 18 +- .../forced_batches_vector_group3_test.go | 18 +- .../forced_batches_vector_group1_test.go | 18 +- cmd/approve.go | 12 +- cmd/dumpstate.go | 6 +- cmd/main.go | 14 +- cmd/run.go | 72 +- cmd/version.go | 4 +- config/config.go | 32 +- config/config_test.go | 28 +- config/default.go | 10 +- .../local/local.genesis.config.json | 5 +- .../environments/local/local.node.config.toml | 12 +- config/environments/mainnet/example.env | 9 - config/environments/mainnet/postgresql.conf | 815 --- .../mainnet/public.node.config.toml | 65 - .../mainnet/public.prover.config.json | 113 - config/environments/public/example.env | 9 - config/environments/public/postgresql.conf | 815 --- .../public/public.node.config.toml | 65 - .../public/public.prover.config.json | 113 - config/mainnetgenesis.go | 4 +- config/network.go | 8 +- config/network_test.go | 14 +- config/testnetgenesis.go | 4 +- db/db.go | 6 +- db/logger.go | 2 +- db/migrations/state/utils_test.go | 6 +- docker-compose.yml | 514 +- docs/ci/actions.md | 4 +- docs/components/account_keystore.md | 2 +- docs/components/aggregator.md | 2 +- docs/components/databases.md | 2 +- docs/components/rpc.md | 2 +- docs/components/sequencer.md | 2 +- docs/components/synchronizer.md | 2 +- docs/json-rpc-endpoints.md | 4 +- docs/modes.md | 6 +- docs/production-setup.md | 4 +- encoding/encoding.go | 2 +- etherman/config.go | 2 +- etherman/datacommittee.go | 64 + etherman/datacommittee_test.go | 49 + etherman/etherman.go | 165 +- etherman/etherman_test.go | 85 +- etherman/etherscan/etherscan.go | 2 +- etherman/etherscan/etherscan_test.go | 2 +- etherman/ethgasstation/ethgasstation.go | 2 +- etherman/ethgasstation/ethgasstation_test.go | 2 +- etherman/simulated.go | 79 +- etherman/smartcontracts/abi/polygonzkevm.abi | 1709 ------ .../smartcontracts/abi/polygonzkevmbridge.abi | 774 --- .../abi/polygonzkevmglobalexitroot.abi | 139 - etherman/smartcontracts/abi/supernets2.abi | 1732 ++++++ .../smartcontracts/abi/supernets2bridge.abi | 774 +++ .../abi/supernets2datacommittee.abi | 226 + .../abi/supernets2globalexitroot.abi | 139 + etherman/smartcontracts/bin/polygonzkevm.bin | 1 - .../smartcontracts/bin/polygonzkevmbridge.bin | 1 - etherman/smartcontracts/bin/supernets2.bin | 1 + .../smartcontracts/bin/supernets2bridge.bin | 1 + .../bin/supernets2datacommittee.bin | 1 + ...troot.bin => supernets2globalexitroot.bin} | 2 +- .../polygonzkevm/polygonzkevm.go | 5308 ---------------- .../polygonzkevmbridge/polygonzkevmbridge.go | 1666 ----- .../polygonzkevmglobalexitroot.go | 563 -- etherman/smartcontracts/script.sh | 9 +- .../smartcontracts/supernets2/supernets2.go | 5339 +++++++++++++++++ .../supernets2bridge/supernets2bridge.go | 1666 +++++ .../supernets2datacommittee.go | 906 +++ .../supernets2globalexitroot.go | 563 ++ etherman/types.go | 6 +- etherman/types/finalproofinputs.go | 2 +- ethtxmanager/config.go | 2 +- ethtxmanager/ethtxmanager.go | 4 +- ethtxmanager/ethtxmanager_test.go | 6 +- ethtxmanager/interfaces.go | 2 +- ethtxmanager/mock_state_test.go | 2 +- ethtxmanager/pgstorage.go | 2 +- ethtxmanager/pgstorage_test.go | 2 +- event/config.go | 2 +- event/eventlog.go | 4 +- event/eventlog_test.go | 6 +- event/nileventstorage/nileventstorage.go | 4 +- event/pgeventstorage/pgeventstorage.go | 6 +- gasprice/config.go | 2 +- gasprice/default_test.go | 2 +- gasprice/follower.go | 4 +- gasprice/follower_test.go | 4 +- gasprice/gaspricesuggester.go | 6 +- gasprice/lastnbatches.go | 2 +- go.mod | 5 +- go.sum | 6 + jsonrpc/client/client.go | 2 +- jsonrpc/client/zkevm.go | 4 +- jsonrpc/config.go | 2 +- jsonrpc/dbtxmanager.go | 2 +- jsonrpc/dbtxmanager_test.go | 4 +- jsonrpc/endpoints_debug.go | 8 +- jsonrpc/endpoints_eth.go | 14 +- jsonrpc/endpoints_eth_test.go | 12 +- jsonrpc/endpoints_net.go | 4 +- jsonrpc/endpoints_txpool.go | 2 +- jsonrpc/endpoints_web3.go | 4 +- jsonrpc/endpoints_zkevm.go | 14 +- jsonrpc/endpoints_zkevm_test.go | 265 +- jsonrpc/handler.go | 4 +- jsonrpc/metrics/metrics.go | 2 +- jsonrpc/mocks/mock_pool.go | 2 +- jsonrpc/mocks/mock_state.go | 4 +- jsonrpc/query.go | 4 +- jsonrpc/server.go | 6 +- jsonrpc/server_test.go | 8 +- jsonrpc/storage.go | 2 +- jsonrpc/types/codec.go | 4 +- jsonrpc/types/codec_test.go | 2 +- jsonrpc/types/interfaces.go | 6 +- jsonrpc/types/types.go | 16 +- jsonrpc/types/types_test.go | 4 +- log/log.go | 2 +- merkletree/client.go | 4 +- merkletree/split.go | 2 +- merkletree/split_test.go | 4 +- merkletree/tree.go | 4 +- metrics/prometheus.go | 2 +- pool/config.go | 4 +- pool/interfaces.go | 2 +- pool/pgpoolstorage/pgpoolstorage.go | 8 +- pool/pool.go | 10 +- pool/pool_test.go | 32 +- pool/transaction.go | 2 +- pricegetter/config.go | 4 +- pricegetter/pricegetter.go | 6 +- pricegetter/priceprovider/uniswap/client.go | 2 +- .../src/proto/aggregator/v1/aggregator.proto | 2 +- proto/src/proto/executor/v1/executor.proto | 2 +- proto/src/proto/statedb/v1/statedb.proto | 2 +- sequencer/addrqueue.go | 6 +- sequencer/closingsignalsmanager.go | 2 +- sequencer/closingsignalsmanager_test.go | 22 +- sequencer/config.go | 2 +- sequencer/dbmanager.go | 6 +- sequencer/dbmanager_test.go | 22 +- sequencer/efficiencylist.go | 2 +- sequencer/finalizer.go | 14 +- sequencer/finalizer_test.go | 14 +- sequencer/interfaces.go | 13 +- sequencer/metrics/metrics.go | 2 +- sequencer/mock_db_manager.go | 4 +- sequencer/mock_etherman.go | 65 - sequencer/mock_pool.go | 4 +- sequencer/mock_state.go | 6 +- sequencer/mock_worker.go | 2 +- sequencer/sequencer.go | 12 +- sequencer/txtracker.go | 4 +- sequencer/txtracker_test.go | 2 +- sequencer/worker.go | 4 +- sequencer/worker_test.go | 2 +- sequencesender/config.go | 12 +- sequencesender/datacommittee.go | 151 + sequencesender/interfaces.go | 12 +- sequencesender/sequencesender.go | 124 +- state/batch.go | 10 +- state/converters.go | 16 +- state/fakedb.go | 2 +- state/forkid.go | 2 +- state/genesis.go | 8 +- state/genesis_test.go | 6 +- state/helper.go | 4 +- state/helper_test.go | 4 +- state/l2block.go | 2 +- state/metrics/metrics.go | 2 +- state/pgstatestorage.go | 19 +- state/pgstatestorage_test.go | 31 +- state/runtime/executor/client.go | 4 +- state/runtime/executor/errors.go | 4 +- .../instrumentation/intrumentation_test.go | 12 +- state/runtime/instrumentation/js/goja.go | 6 +- .../instrumentation/tracers/native/4byte.go | 4 +- .../instrumentation/tracers/native/call.go | 4 +- .../tracers/native/call_flat.go | 4 +- .../tracers/native/gen_callframe_json.go | 2 +- .../instrumentation/tracers/native/noop.go | 4 +- .../tracers/native/prestate.go | 4 +- .../instrumentation/tracers/tracers.go | 2 +- state/runtime/runtime.go | 2 +- state/state.go | 8 +- state/state_test.go | 36 +- state/transaction.go | 22 +- state/types.go | 4 +- synchronizer/config.go | 2 +- synchronizer/datacommittee.go | 127 + synchronizer/datacommittee_test.go | 609 ++ synchronizer/interfaces.go | 12 +- synchronizer/mock_datacommitteeclient.go | 85 + .../mock_datacommitteeclientfactory.go | 44 + synchronizer/mock_etherman.go | 30 +- synchronizer/mock_state.go | 32 +- synchronizer/mock_zkevmclient.go | 2 +- synchronizer/synchronizer.go | 75 +- synchronizer/synchronizer_test.go | 56 +- test/Makefile | 4 +- .../sequencer/common/metrics/metrics.go | 12 +- .../sequencer/common/params/variables.go | 4 +- .../sequencer/common/setup/setup.go | 16 +- .../common/transactions/transactions.go | 10 +- .../pool_processing_erc20_test.go | 16 +- .../sequencer/erc20-transfers/tx_sender.go | 6 +- .../eth-transfers/pool_processing_eth_test.go | 12 +- .../sequencer/eth-transfers/tx_sender.go | 8 +- .../scripts/common/environment/constants.go | 4 +- .../scripts/common/environment/init.go | 10 +- .../sequencer/scripts/common/results/print.go | 4 +- .../sequencer/scripts/erc20-transfers/main.go | 14 +- .../sequencer/scripts/eth-transfers/main.go | 12 +- test/config/test.node.config.toml | 12 +- .../test.permissionless.prover.config.json | 4 +- test/config/test.prover.config.json | 4 +- test/dbutils/dbutils.go | 6 +- test/e2e/datacommittee_test.go | 19 +- test/e2e/debug_calltracer_test.go | 10 +- test/e2e/debug_shared.go | 30 +- test/e2e/debug_test.go | 10 +- test/e2e/ethtransfer_test.go | 4 +- test/e2e/forced_batches_test.go | 12 +- test/e2e/forced_batches_vector_test.go | 16 +- test/e2e/jsonrpc1_test.go | 16 +- test/e2e/jsonrpc2_test.go | 16 +- test/e2e/permissionlessrpc_test.go | 8 +- test/e2e/pool_test.go | 4 +- test/e2e/preEIP155_test.go | 6 +- test/e2e/sc_test.go | 12 +- test/e2e/shared.go | 6 +- test/e2e/state_test.go | 8 +- test/e2e/uniswap_test.go | 8 +- test/operations/manager.go | 20 +- test/operations/wait.go | 8 +- test/scripts/batchsender/main.go | 10 +- test/scripts/cmd/compilesc.go | 2 +- test/scripts/cmd/compilesc/manager.go | 2 +- test/scripts/cmd/dependencies.go | 2 +- test/scripts/cmd/dependencies/files.go | 2 +- test/scripts/cmd/dependencies/files_test.go | 2 +- test/scripts/cmd/dependencies/github.go | 2 +- test/scripts/cmd/dependencies/images.go | 2 +- test/scripts/cmd/dependencies/images_test.go | 4 +- test/scripts/cmd/dependencies/protobuffers.go | 2 +- test/scripts/cmd/dependencies/testvectors.go | 2 +- test/scripts/cmd/main.go | 2 +- test/scripts/deploy_sc/main.go | 16 +- test/scripts/init_network/main.go | 2 +- test/scripts/sendForcedBatch/main.go | 8 +- test/scripts/send_transfers/main.go | 6 +- test/scripts/sequenceForcedBatch/main.go | 12 +- test/scripts/txsender/main.go | 4 +- test/scripts/uniswap/main.go | 18 +- test/testutils/utils.go | 2 +- test/vectors/types.go | 4 +- test/vectors/vectors_v2.go | 6 +- tools/executor/main.go | 12 +- tools/genesis/genesisparser/genesisparser.go | 4 +- tools/network/network.go | 16 +- tools/rlp/main.go | 12 +- version.go | 2 +- 289 files changed, 14309 insertions(+), 13884 deletions(-) delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/ISSUE_TEMPLATE/bug.md delete mode 100644 .github/ISSUE_TEMPLATE/feature.md delete mode 100644 .github/ISSUE_TEMPLATE/question.md delete mode 100644 .github/pull_request_template.md delete mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/test-from-prover.yml create mode 120000 ci/e2e-group-supernets2-1/datacommittee_test.go delete mode 100644 config/environments/mainnet/example.env delete mode 100644 config/environments/mainnet/postgresql.conf delete mode 100644 config/environments/mainnet/public.node.config.toml delete mode 100644 config/environments/mainnet/public.prover.config.json delete mode 100644 config/environments/public/example.env delete mode 100644 config/environments/public/postgresql.conf delete mode 100644 config/environments/public/public.node.config.toml delete mode 100644 config/environments/public/public.prover.config.json create mode 100644 etherman/datacommittee.go create mode 100644 etherman/datacommittee_test.go delete mode 100644 etherman/smartcontracts/abi/polygonzkevm.abi delete mode 100644 etherman/smartcontracts/abi/polygonzkevmbridge.abi delete mode 100644 etherman/smartcontracts/abi/polygonzkevmglobalexitroot.abi create mode 100644 etherman/smartcontracts/abi/supernets2.abi create mode 100644 etherman/smartcontracts/abi/supernets2bridge.abi create mode 100644 etherman/smartcontracts/abi/supernets2datacommittee.abi create mode 100644 etherman/smartcontracts/abi/supernets2globalexitroot.abi delete mode 100644 etherman/smartcontracts/bin/polygonzkevm.bin delete mode 100644 etherman/smartcontracts/bin/polygonzkevmbridge.bin create mode 100644 etherman/smartcontracts/bin/supernets2.bin create mode 100644 etherman/smartcontracts/bin/supernets2bridge.bin create mode 100644 etherman/smartcontracts/bin/supernets2datacommittee.bin rename etherman/smartcontracts/bin/{polygonzkevmglobalexitroot.bin => supernets2globalexitroot.bin} (94%) delete mode 100644 etherman/smartcontracts/polygonzkevm/polygonzkevm.go delete mode 100644 etherman/smartcontracts/polygonzkevmbridge/polygonzkevmbridge.go delete mode 100644 etherman/smartcontracts/polygonzkevmglobalexitroot/polygonzkevmglobalexitroot.go create mode 100644 etherman/smartcontracts/supernets2/supernets2.go create mode 100644 etherman/smartcontracts/supernets2bridge/supernets2bridge.go create mode 100644 etherman/smartcontracts/supernets2datacommittee/supernets2datacommittee.go create mode 100644 etherman/smartcontracts/supernets2globalexitroot/supernets2globalexitroot.go create mode 100644 sequencesender/datacommittee.go create mode 100644 synchronizer/datacommittee.go create mode 100644 synchronizer/datacommittee_test.go create mode 100644 synchronizer/mock_datacommitteeclient.go create mode 100644 synchronizer/mock_datacommitteeclientfactory.go diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 659c0b6b..00000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,12 +0,0 @@ -*.md @arnaubennassar -aggregator/ @Mikelle @KonradIT -cmd/ @tclemos -db/ @Mikelle @tclemos -docs/ @arnaubennassar -etherman/ @ARR552 @cool-develope -jsonrpc/ @tclemos @KonradIT -pool/ @Mikelle @tclemos @KonradIT -sequencer/ @Mikelle @ToniRamirezM @KonradIT -state/ @ToniRamirezM @tclemos -synchronizer/ @ARR552 @cool-develope -test/ @tclemos diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md deleted file mode 100644 index c7c84843..00000000 --- a/.github/ISSUE_TEMPLATE/bug.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Report a bug -about: Something with Polygon zkEVM is not working as expected -title: '' -labels: 'type:bug' -assignees: '' ---- - -#### System information - -zkEVM Node version: `v0.0.X-RCXX` -OS & Version: `Windows/Linux/OSX` -Commit hash : (if `develop`) -Network: `Mainnet/Testnet` - -#### Expected behaviour - - -#### Actual behaviour - - -#### Steps to reproduce the behaviour - - -#### Backtrace - -```` -[backtrace] -```` - -When submitting logs: please submit them as text and not screenshots. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md deleted file mode 100644 index aacd885f..00000000 --- a/.github/ISSUE_TEMPLATE/feature.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Request a feature -about: Report a missing feature - e.g. as a step before submitting a PR -title: '' -labels: 'type:feature' -assignees: '' ---- - -# Rationale - -Why should this feature exist? -What are the use-cases? - -# Implementation - -Do you have ideas regarding the implementation of this feature? -Are you willing to implement this feature? \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 2d06858d..00000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: Ask a question -about: Something is unclear -title: '' -labels: 'type:question' -assignees: '' ---- - -This should only be used in very rare cases e.g. if you are not 100% sure if something is a bug or asking a question that leads to improving the documentation. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index c9588d5d..00000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,22 +0,0 @@ -Closes #. - -### What does this PR do? - - - -### Reviewers - -Main reviewers: - - - -- @John -- @Doe - -Codeowner reviewers: - - - -- @Alice -- @Bob \ No newline at end of file diff --git a/.github/workflows/push-docker-develop.yml b/.github/workflows/push-docker-develop.yml index c3a9a695..198259e6 100644 --- a/.github/workflows/push-docker-develop.yml +++ b/.github/workflows/push-docker-develop.yml @@ -29,4 +29,4 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: | - hermeznetwork/zkevm-node:develop + hermeznetwork/supernets2-node:develop diff --git a/.github/workflows/push-docker-tagged.yml b/.github/workflows/push-docker-tagged.yml index 402e71e4..f22940a9 100644 --- a/.github/workflows/push-docker-tagged.yml +++ b/.github/workflows/push-docker-tagged.yml @@ -30,4 +30,4 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: | - hermeznetwork/zkevm-node:${{ github.ref_name }} + hermeznetwork/supernets2-node:${{ github.ref_name }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 22ce39f0..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: release - -on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]' # this action will only run on tags that follow semver - -jobs: - releaser: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: 1.19 - - - name: Get packr - run: go install github.com/gobuffalo/packr/v2/packr2@v2.8.3 - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v4 - with: - version: latest - args: release --clean - env: - GITHUB_TOKEN: ${{ secrets.TOKEN_RELEASE }} - - - name: Get tag - uses: olegtarasov/get-tag@v2.1.2 - id: tagName - - - name: Put testnet and mainnet artifacts into a single zip - run: | - # TESTNET - mkdir -p testnet/config/environments/public - mkdir -p testnet/db/scripts - cp config/environments/public/* testnet/config/environments/public - cp docker-compose.yml testnet - cp db/scripts/init_prover_db.sql testnet/db/scripts - mv testnet/config/environments/public/example.env testnet - sed -i -e "s/image: zkevm-node/image: hermeznetwork\/zkevm-node:$GIT_TAG_NAME/g" testnet/docker-compose.yml - zip -r testnet.zip testnet - # MAINNET - mkdir -p mainnet/config/environments/public - mkdir -p mainnet/db/scripts - cp config/environments/mainnet/* mainnet/config/environments/public - cp docker-compose.yml mainnet - cp db/scripts/init_prover_db.sql mainnet/db/scripts - mv mainnet/config/environments/public/example.env mainnet - sed -i -e "s/image: zkevm-node/image: hermeznetwork\/zkevm-node:$GIT_TAG_NAME/g" mainnet/docker-compose.yml - zip -r mainnet.zip mainnet - - - name: Publish testnet and mainnet zip into release - uses: AButler/upload-release-assets@v2.0 - with: - files: 'testnet.zip;mainnet.zip' - repo-token: ${{ secrets.TOKEN_RELEASE }} - release-tag: ${{ steps.tagName.outputs.tag }} - \ No newline at end of file diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 94159cc0..bcbdc505 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -17,7 +17,7 @@ jobs: matrix: go-version: [ 1.19.x ] goarch: [ "amd64" ] - e2e-group: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ] + e2e-group: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -supernets2-1 ] runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/.github/workflows/test-from-prover.yml b/.github/workflows/test-from-prover.yml deleted file mode 100644 index ca917668..00000000 --- a/.github/workflows/test-from-prover.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Test from zkevm-prover call -on: - workflow_call: - inputs: - prover_image: - required: true - type: string - secrets: - DOCKERHUB_USERNAME: - required: true - DOCKERHUB_TOKEN: - required: true - -jobs: - test-from-prover: - runs-on: [self-hosted, linux, X64, hc] - - strategy: - matrix: - go-version: [ 1.19.x ] - goarch: [ "amd64" ] - e2e-group: [ 2 ] - - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - repository: 0xPolygonHermez/zkevm-node - - - name: Install Go - uses: actions/setup-go@v3 - with: - go-version: ${{ matrix.go-version }} - env: - GOARCH: ${{ matrix.goarch }} - - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build Docker - run: make build-docker - - - name: Compile SCs - run: make compile-scs - working-directory: test - - - name: Test - run: make test-full-non-e2e - working-directory: test diff --git a/Dockerfile b/Dockerfile index 70785db4..fee466ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN cd /src && make build # CONTAINER FOR RUNNING BINARY FROM alpine:3.16.0 -COPY --from=build /src/dist/zkevm-node /app/zkevm-node -COPY --from=build /src/config/environments/public/public.node.config.toml /app/example.config.toml +COPY --from=build /src/dist/supernets2-node /app/supernets2-node +COPY --from=build /src/config/environments/local/local.node.config.toml /app/example.config.toml EXPOSE 8123 -CMD ["/bin/sh", "-c", "/app/zkevm-node run"] +CMD ["/bin/sh", "-c", "/app/supernets2-node run"] diff --git a/Makefile b/Makefile index 285baf22..1a518c62 100644 --- a/Makefile +++ b/Makefile @@ -12,13 +12,13 @@ endif GOBASE := $(shell pwd) GOBIN := $(GOBASE)/dist GOENVVARS := GOBIN=$(GOBIN) CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) -GOBINARY := zkevm-node +GOBINARY := supernets2-node GOCMD := $(GOBASE)/cmd -LDFLAGS += -X 'github.com/0xPolygonHermez/zkevm-node.Version=$(VERSION)' -LDFLAGS += -X 'github.com/0xPolygonHermez/zkevm-node.GitRev=$(GITREV)' -LDFLAGS += -X 'github.com/0xPolygonHermez/zkevm-node.GitBranch=$(GITBRANCH)' -LDFLAGS += -X 'github.com/0xPolygonHermez/zkevm-node.BuildDate=$(DATE)' +LDFLAGS += -X 'github.com/0xPolygon/supernets2-node.Version=$(VERSION)' +LDFLAGS += -X 'github.com/0xPolygon/supernets2-node.GitRev=$(GITREV)' +LDFLAGS += -X 'github.com/0xPolygon/supernets2-node.GitBranch=$(GITBRANCH)' +LDFLAGS += -X 'github.com/0xPolygon/supernets2-node.BuildDate=$(DATE)' .PHONY: build build: ## Builds the binary locally into ./dist @@ -26,21 +26,21 @@ build: ## Builds the binary locally into ./dist .PHONY: build-docker build-docker: ## Builds a docker image with the node binary - docker build -t zkevm-node -f ./Dockerfile . + docker build -t supernets2-node -f ./Dockerfile . .PHONY: build-docker-nc build-docker-nc: ## Builds a docker image with the node binary - but without build cache - docker build --no-cache=true -t zkevm-node -f ./Dockerfile . + docker build --no-cache=true -t supernets2-node -f ./Dockerfile . .PHONY: run-rpc run-rpc: ## Runs all the services need to run a local zkEMV RPC node - docker-compose up -d zkevm-state-db zkevm-pool-db + docker-compose up -d supernets2-state-db supernets2-pool-db sleep 2 - docker-compose up -d zkevm-prover + docker-compose up -d supernets2-prover sleep 5 - docker-compose up -d zkevm-sync + docker-compose up -d supernets2-sync sleep 2 - docker-compose up -d zkevm-rpc + docker-compose up -d supernets2-rpc .PHONY: stop stop: ## Stops all services diff --git a/README.md b/README.md index 37cdcb79..8a25995d 100644 --- a/README.md +++ b/README.md @@ -1,123 +1,3 @@ -# zkEVM Node - -zkEVM Node is a Go implementation of a node that operates the Polygon zkEVM Network. - -## About the Polygon zkEVM network - -Since this is an implementation of a protocol it's fundamental to understand it, [here](https://zkevm.polygon.technology/docs/zknode/zknode-overview) you can find the specification of the protocol. - -Glossary: - -- L1: Base blockchain where the rollup smart contracts are deployed. It's Ethereum or a testnet of Ethereum, but it could be any EVM compatible blockchain. -- L2: the rollup network aka the Polygon zkEVM network. -- Batch: a group of transactions that are executed/proved, using the [zkEVM prover](https://github.com/0xPolygonHermez/zkevm-prover) and sent to / synchronized from L1 -- Sequencer: the actor that is responsible for selecting transactions, putting them in a specific order, and sending them in batches to L1 -- Trusted sequencer: sequencer that has special privileges, there can only be one trusted sequencer. The privileges granted to the trusted sequencer allow it to forecast the batches that will be applied to L1. This way it can commit to a specific sequence before interacting with L1. This is done to achieve fast finality and reduce costs associated with using the network (lower gas fees) -- Permissionless sequencer: sequencer role that can be performed by anyone. It has competitive disadvantages compared to the trusted sequencer (slow finality, MEV attacks). Its main purpose is to provide censorship resistance and unstoppability features to the network. -- Sequence: Group of batches and other metadata that the trusted sequencer sends to L1 to update the state -- Forced batch: batch that is sent by permissionless sequencers to L1 to update the state -- L2 Block: Same as an L1 block, but for L2. This is mostly used by the JSON RPC interface. Currently, all the L2 Blocks are set to only include one transaction, this is done to achieve instant finality: it's not necessary to close a batch to allow the JSON RPC to expose results of already processed transactions -- Trusted state: state reached through processing transactions that have been shared by the trusted sequencer. This state is considered trusted as the trusted sequencer could commit to a certain sequence, and then send a different one to L1 -- Virtual state: state reached through processing transactions that have already been submitted to L1. These transactions are sent in batches by either trusted or permissionless sequencers. Those batches are also called virtual batches. Note that this state is trustless as it relies on L1 security assumptions -- Consolidated state: state that is proven on-chain by submitting a ZKP (Zero Knowledge Proof) that proves the execution of a sequence of the last virtual batch. -- Invalid transaction: a transaction that can't be processed and doesn't affect the state. Note that such a transaction could be included in a virtual batch. The reason for a transaction to be invalid could be related to the Ethereum protocol (invalid nonce, not enough balance, ...) or due to limitations introduced by the zkEVM (each batch can make use of a limited amount of resources such as the total amount of keccak hashes that can be computed) -- Reverted transaction: a transaction that is executed, but is reverted (because of smart contract logic). The main difference with *invalid transaction* is that this transaction modifies the state, at least to increment nonce of the sender. -- Proof of Efficiency (PoE): name of the protocol used by the network, it's enforced by the [smart contracts](https://github.com/0xPolygonHermez/zkevm-contracts) - -## Architecture - -

- -

- -The diagram represents the main components of the software and how they interact between them. Note that this reflects a single entity running a node, in particular a node that acts as the trusted sequencer. But there are many entities running nodes in the network, and each of these entities can perform different roles. More on this later. - -- (JSON) RPC: an interface that allows users (metamask, etherscan, ...) to interact with the node. Fully compatible with Ethereum RPC + some extra endpoints specifics of the network. It interacts with the `state` to get data and process transactions and with the `pool` to store transactions -- Pool: DB that stores transactions by the `RPC` to be selected/discarded by the `sequencer` later on -- Trusted Sequencer: get transactions from the `pool`, check if they are valid by processing them using the `state`, and create sequences. Once transactions are added into the state, they are immediately available through the `rpc`. Sequences are sent to L1 using the `etherman` -- Permissionless Sequencer: *coming soon* -- Etherman: abstraction that implements the needed methods to interact with the Ethereum network and the relevant smart contracts. -- Synchronizer: Updates the `state` by fetching data from Ethereum through the `etherman`. If the node is not a `trusted sequencer` it also updates the state with the data fetched from the `rpc` of the `trusted sequencer`. It also detects and handles reorgs that can happen if the `trusted sequencer` sends different data in the rpc vs the sequences sent to L1 (trusted vs virtual state) -- State: Responsible for managing the state data (batches, blocks, transactions, ...) that is stored on the `state SB`. It also handles the integration with the `executor` and the `Merkletree` service -- State DB: persistence layer for the state data (except the Merkletree that is handled by the `Merkletree` service) -- Aggregator: consolidates batches by generating ZKPs (Zero Knowledge proofs). To do so it gathers the necessary data that the `prover` needs as input through the `state` and sends a request to it. Once the proof is generated it's sent to Ethereum through the `etherman` -- Prover/Executor: service that generates ZK proofs. Note that this component is not implemented in this repository, and it's treated as a "black box" from the perspective of the node. The prover/executor has two implementations: [JS reference implementation](https://github.com/0xPolygonHermez/zkevm-proverjs) and [C production-ready implementation](https://github.com/0xPolygonHermez/zkevm-prover). Although it's the same software/service, it has two very different purposes: - - Provide an EVM implementation that allows processing transactions and getting all needed results metadata (state root, receipts, logs, ...) - - Generate ZKPs -- Merkletree: service that stores the Merkletree, containing all the account information (balances, nonces, smart contract code, and smart contract storage). This component is also not implemented in this repo and is consumed as an external service by the node. The implementation can be found [here](https://github.com/0xPolygonHermez/zkevm-prover) - -## Roles of the network - -The node software is designed to support the execution of multiple roles. Each role requires different services to work. Most of the services can run in different instances, and the JSON RPC can run in many instances (all the other services must have a single instance) - -### RPC - -This role can be performed by anyone. - -Required services and components: - -- JSON RPC: can run in a separated instance, and can have multiple instances -- Synchronizer: single instance that can run on a separate instance -- Executor & Merkletree: service that can run on a separate instance -- State DB: Postgres SQL that can be run in a separate instance - -There must be only one synchronizer, and it's recommended that it has exclusive access to an executor instance, although it's not necessary. This role can perfectly be run in a single instance, however, the JSON RPC and executor services can benefit from running in multiple instances, if the performance decreases due to the number of requests received - -- [`zkEVM RPC endpoints`](./docs/json-rpc-endpoints.md) -- [`zkEVM RPC Custom endpoints documentation`](./docs/zkEVM-custom-endpoints.md) - -### Trusted sequencer - -This role can only be performed by a single entity. This is enforced in the smart contract, as the related methods of the trusted sequencer can only be performed by the owner of a particular private key. - -Required services and components: - -- JSON RPC: can run in a separated instance, and can have multiple instances -- Sequencer & Synchronizer: single instance that needs to run together -- Executor & Merkletree: service that can run on a separate instance -- Pool DB: Postgres SQL that can be run in a separate instance -- State DB: Postgres SQL that can be run in a separate instance - -Note that the JSON RPC is required to receive transactions. It's recommended that the JSON RPC runs on separated instances, and potentially more than one (depending on the load of the network). It's also recommended that the JSON RPC and the Sequencer don't share the same executor instance, to make sure that the sequencer has exclusive access to an executor - -### Permissionless sequencer - -TBD - -### Aggregator - -This role can be performed by anyone. - -Required services and components: - -- Synchronizer: single instance that can run on a separated instance -- Executor & Merkletree: service that can run on a separate instance -- State DB: Postgres SQL that can be run in a separate instance -- Aggregator: single instance that can run on a separated instance -- Prover: single instance that can run on a separated instance -- Executor: single instance that can run on a separated instance - -It's recommended that the prover is run on a separate instance, as it has important hardware requirements. On the other hand, all the other components can run on a single instance, - -## Development - -It's recommended to use `make` for building, and testing the code, ... Run `make help` to get a list of the available commands. - -## Running the node - -- [Running locally](docs/running_local.md) -- [Running on production](docs/production-setup.md) - -### Requirements - -- Go 1.19 -- Docker -- Docker Compose -- Make -- GCC - -## Contribute - -Before opening a pull request, please read this [guide](CONTRIBUTING.md) - +# Supernets2 Node +TODO \ No newline at end of file diff --git a/aggregator/aggregator.go b/aggregator/aggregator.go index 93420738..77c126a1 100644 --- a/aggregator/aggregator.go +++ b/aggregator/aggregator.go @@ -13,15 +13,15 @@ import ( "time" "unicode" - "github.com/0xPolygonHermez/zkevm-node/aggregator/metrics" - "github.com/0xPolygonHermez/zkevm-node/aggregator/pb" - "github.com/0xPolygonHermez/zkevm-node/aggregator/prover" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/encoding" - ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/aggregator/metrics" + "github.com/0xPolygon/supernets2-node/aggregator/pb" + "github.com/0xPolygon/supernets2-node/aggregator/prover" + "github.com/0xPolygon/supernets2-node/config/types" + "github.com/0xPolygon/supernets2-node/encoding" + ethmanTypes "github.com/0xPolygon/supernets2-node/etherman/types" + "github.com/0xPolygon/supernets2-node/ethtxmanager" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4" "google.golang.org/grpc" diff --git a/aggregator/aggregator_test.go b/aggregator/aggregator_test.go index f75d7237..a22b0af2 100644 --- a/aggregator/aggregator_test.go +++ b/aggregator/aggregator_test.go @@ -9,13 +9,13 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/aggregator/mocks" - "github.com/0xPolygonHermez/zkevm-node/aggregator/pb" - configTypes "github.com/0xPolygonHermez/zkevm-node/config/types" - ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/supernets2-node/aggregator/mocks" + "github.com/0xPolygon/supernets2-node/aggregator/pb" + configTypes "github.com/0xPolygon/supernets2-node/config/types" + ethmanTypes "github.com/0xPolygon/supernets2-node/etherman/types" + "github.com/0xPolygon/supernets2-node/ethtxmanager" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/testutils" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/aggregator/config.go b/aggregator/config.go index 63b1a1ff..f9b7d562 100644 --- a/aggregator/config.go +++ b/aggregator/config.go @@ -4,8 +4,8 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/encoding" + "github.com/0xPolygon/supernets2-node/config/types" + "github.com/0xPolygon/supernets2-node/encoding" ) // TokenAmountWithDecimals is a wrapper type that parses token amount with decimals to big int diff --git a/aggregator/interfaces.go b/aggregator/interfaces.go index f957e517..1f68841d 100644 --- a/aggregator/interfaces.go +++ b/aggregator/interfaces.go @@ -4,10 +4,10 @@ import ( "context" "math/big" - "github.com/0xPolygonHermez/zkevm-node/aggregator/pb" - ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/aggregator/pb" + ethmanTypes "github.com/0xPolygon/supernets2-node/etherman/types" + "github.com/0xPolygon/supernets2-node/ethtxmanager" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4" ) diff --git a/aggregator/metrics/metrics.go b/aggregator/metrics/metrics.go index ea8bed42..3c385493 100644 --- a/aggregator/metrics/metrics.go +++ b/aggregator/metrics/metrics.go @@ -1,7 +1,7 @@ package metrics import ( - "github.com/0xPolygonHermez/zkevm-node/metrics" + "github.com/0xPolygon/supernets2-node/metrics" "github.com/prometheus/client_golang/prometheus" ) diff --git a/aggregator/mocks/mock_etherman.go b/aggregator/mocks/mock_etherman.go index 50831aac..e30f9935 100644 --- a/aggregator/mocks/mock_etherman.go +++ b/aggregator/mocks/mock_etherman.go @@ -6,7 +6,7 @@ import ( common "github.com/ethereum/go-ethereum/common" mock "github.com/stretchr/testify/mock" - types "github.com/0xPolygonHermez/zkevm-node/etherman/types" + types "github.com/0xPolygon/supernets2-node/etherman/types" ) // Etherman is an autogenerated mock type for the etherman type diff --git a/aggregator/mocks/mock_ethtxmanager.go b/aggregator/mocks/mock_ethtxmanager.go index 8aeae630..97a3641e 100644 --- a/aggregator/mocks/mock_ethtxmanager.go +++ b/aggregator/mocks/mock_ethtxmanager.go @@ -8,7 +8,7 @@ import ( common "github.com/ethereum/go-ethereum/common" - ethtxmanager "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" + ethtxmanager "github.com/0xPolygon/supernets2-node/ethtxmanager" mock "github.com/stretchr/testify/mock" diff --git a/aggregator/mocks/mock_prover.go b/aggregator/mocks/mock_prover.go index 7cba231d..e2c96295 100644 --- a/aggregator/mocks/mock_prover.go +++ b/aggregator/mocks/mock_prover.go @@ -5,7 +5,7 @@ package mocks import ( context "context" - pb "github.com/0xPolygonHermez/zkevm-node/aggregator/pb" + pb "github.com/0xPolygon/supernets2-node/aggregator/pb" mock "github.com/stretchr/testify/mock" ) diff --git a/aggregator/mocks/mock_state.go b/aggregator/mocks/mock_state.go index 75d5e26c..9618d02a 100644 --- a/aggregator/mocks/mock_state.go +++ b/aggregator/mocks/mock_state.go @@ -8,7 +8,7 @@ import ( pgx "github.com/jackc/pgx/v4" mock "github.com/stretchr/testify/mock" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/supernets2-node/state" ) // StateMock is an autogenerated mock type for the stateInterface type diff --git a/aggregator/prover/prover.go b/aggregator/prover/prover.go index 2a61a167..02c4063f 100644 --- a/aggregator/prover/prover.go +++ b/aggregator/prover/prover.go @@ -7,10 +7,10 @@ import ( "net" "time" - "github.com/0xPolygonHermez/zkevm-node/aggregator/metrics" - "github.com/0xPolygonHermez/zkevm-node/aggregator/pb" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/aggregator/metrics" + "github.com/0xPolygon/supernets2-node/aggregator/pb" + "github.com/0xPolygon/supernets2-node/config/types" + "github.com/0xPolygon/supernets2-node/log" ) var ( diff --git a/ci/e2e-group-supernets2-1/datacommittee_test.go b/ci/e2e-group-supernets2-1/datacommittee_test.go new file mode 120000 index 00000000..ac030e10 --- /dev/null +++ b/ci/e2e-group-supernets2-1/datacommittee_test.go @@ -0,0 +1 @@ +../../test/e2e/datacommittee_test.go \ No newline at end of file diff --git a/ci/e2e-group10/forced_batches_test.go b/ci/e2e-group10/forced_batches_test.go index 4461c531..80513db9 100644 --- a/ci/e2e-group10/forced_batches_test.go +++ b/ci/e2e-group10/forced_batches_test.go @@ -8,12 +8,12 @@ import ( "github.com/ethereum/go-ethereum/core/types" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevmglobalexitroot" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2globalexitroot" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/constants" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -124,8 +124,8 @@ func sendForcedBatch(t *testing.T, txs []byte, opsman *operations.Manager) (*sta require.NoError(t, err) // Create smc client - zkEvmAddr := common.HexToAddress(operations.DefaultL1ZkEVMSmartContract) - zkEvm, err := polygonzkevm.NewPolygonzkevm(zkEvmAddr, ethClient) + supernets2Addr := common.HexToAddress(operations.DefaultL1Supernets2SmartContract) + supernets2, err := supernets2.NewSupernets2(supernets2Addr, ethClient) require.NoError(t, err) auth, err := operations.GetAuth(operations.DefaultSequencerPrivateKey, operations.DefaultL1ChainID) @@ -133,29 +133,29 @@ func sendForcedBatch(t *testing.T, txs []byte, opsman *operations.Manager) (*sta log.Info("Using address: ", auth.From) - num, err := zkEvm.LastForceBatch(&bind.CallOpts{Pending: false}) + num, err := supernets2.LastForceBatch(&bind.CallOpts{Pending: false}) require.NoError(t, err) log.Info("Number of forceBatches in the smc: ", num) // Get tip - tip, err := zkEvm.GetForcedBatchFee(&bind.CallOpts{Pending: false}) + tip, err := supernets2.GetForcedBatchFee(&bind.CallOpts{Pending: false}) require.NoError(t, err) - managerAddress, err := zkEvm.GlobalExitRootManager(&bind.CallOpts{Pending: false}) + managerAddress, err := supernets2.GlobalExitRootManager(&bind.CallOpts{Pending: false}) require.NoError(t, err) - manager, err := polygonzkevmglobalexitroot.NewPolygonzkevmglobalexitroot(managerAddress, ethClient) + manager, err := supernets2globalexitroot.NewSupernets2globalexitroot(managerAddress, ethClient) require.NoError(t, err) rootInContract, err := manager.GetLastGlobalExitRoot(&bind.CallOpts{Pending: false}) require.NoError(t, err) rootInContractHash := common.BytesToHash(rootInContract[:]) - disallowed, err := zkEvm.IsForcedBatchDisallowed(&bind.CallOpts{Pending: false}) + disallowed, err := supernets2.IsForcedBatchDisallowed(&bind.CallOpts{Pending: false}) require.NoError(t, err) if disallowed { - tx, err := zkEvm.ActivateForceBatches(auth) + tx, err := supernets2.ActivateForceBatches(auth) require.NoError(t, err) err = operations.WaitTxToBeMined(ctx, ethClient, tx, operations.DefaultTimeoutTxToBeMined) require.NoError(t, err) @@ -167,7 +167,7 @@ func sendForcedBatch(t *testing.T, txs []byte, opsman *operations.Manager) (*sta log.Debug("currentBlock.Time(): ", currentBlock.Time()) // Send forceBatch - tx, err := zkEvm.ForceBatch(auth, txs, tip) + tx, err := supernets2.ForceBatch(auth, txs, tip) require.NoError(t, err) log.Info("TxHash: ", tx.Hash()) @@ -178,7 +178,7 @@ func sendForcedBatch(t *testing.T, txs []byte, opsman *operations.Manager) (*sta query := ethereum.FilterQuery{ FromBlock: currentBlock.Number(), - Addresses: []common.Address{zkEvmAddr}, + Addresses: []common.Address{supernets2Addr}, } logs, err := ethClient.FilterLogs(ctx, query) require.NoError(t, err) @@ -190,7 +190,7 @@ func sendForcedBatch(t *testing.T, txs []byte, opsman *operations.Manager) (*sta require.NoError(t, err) continue } - fb, err := zkEvm.ParseForceBatch(vLog) + fb, err := supernets2.ParseForceBatch(vLog) if err != nil { log.Errorf("failed to parse force batch log event, err: ", err) } diff --git a/ci/e2e-group10/forced_batches_vector_group2_test.go b/ci/e2e-group10/forced_batches_vector_group2_test.go index 954dfdce..eed36194 100644 --- a/ci/e2e-group10/forced_batches_vector_group2_test.go +++ b/ci/e2e-group10/forced_batches_vector_group2_test.go @@ -9,13 +9,13 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/vectors" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/constants" + "github.com/0xPolygon/supernets2-node/test/operations" + "github.com/0xPolygon/supernets2-node/test/vectors" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -140,8 +140,8 @@ func sendForcedBatchForVector(t *testing.T, txs []byte, opsman *operations.Manag require.NoError(t, err) // Create smc client - zkEvmAddr := common.HexToAddress(operations.DefaultL1ZkEVMSmartContract) - zkEvm, err := polygonzkevm.NewPolygonzkevm(zkEvmAddr, ethClient) + zkEvmAddr := common.HexToAddress(operations.DefaultL1Supernets2SmartContract) + zkEvm, err := supernets2.NewSupernets2(zkEvmAddr, ethClient) require.NoError(t, err) auth, err := operations.GetAuth(operations.DefaultSequencerPrivateKey, operations.DefaultL1ChainID) diff --git a/ci/e2e-group11/forced_batches_vector_group3_test.go b/ci/e2e-group11/forced_batches_vector_group3_test.go index 1358bd5a..605e3d65 100644 --- a/ci/e2e-group11/forced_batches_vector_group3_test.go +++ b/ci/e2e-group11/forced_batches_vector_group3_test.go @@ -9,13 +9,13 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/vectors" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/constants" + "github.com/0xPolygon/supernets2-node/test/operations" + "github.com/0xPolygon/supernets2-node/test/vectors" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -140,8 +140,8 @@ func sendForcedBatchForVector(t *testing.T, txs []byte, opsman *operations.Manag require.NoError(t, err) // Create smc client - zkEvmAddr := common.HexToAddress(operations.DefaultL1ZkEVMSmartContract) - zkEvm, err := polygonzkevm.NewPolygonzkevm(zkEvmAddr, ethClient) + zkEvmAddr := common.HexToAddress(operations.DefaultL1Supernets2SmartContract) + zkEvm, err := supernets2.NewSupernets2(zkEvmAddr, ethClient) require.NoError(t, err) auth, err := operations.GetAuth(operations.DefaultSequencerPrivateKey, operations.DefaultL1ChainID) diff --git a/ci/e2e-group9/forced_batches_vector_group1_test.go b/ci/e2e-group9/forced_batches_vector_group1_test.go index 5f39247c..d35dd762 100644 --- a/ci/e2e-group9/forced_batches_vector_group1_test.go +++ b/ci/e2e-group9/forced_batches_vector_group1_test.go @@ -9,13 +9,13 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/vectors" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/constants" + "github.com/0xPolygon/supernets2-node/test/operations" + "github.com/0xPolygon/supernets2-node/test/vectors" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -140,8 +140,8 @@ func sendForcedBatchForVector(t *testing.T, txs []byte, opsman *operations.Manag require.NoError(t, err) // Create smc client - zkEvmAddr := common.HexToAddress(operations.DefaultL1ZkEVMSmartContract) - zkEvm, err := polygonzkevm.NewPolygonzkevm(zkEvmAddr, ethClient) + zkEvmAddr := common.HexToAddress(operations.DefaultL1Supernets2SmartContract) + zkEvm, err := supernets2.NewSupernets2(zkEvmAddr, ethClient) require.NoError(t, err) auth, err := operations.GetAuth(operations.DefaultSequencerPrivateKey, operations.DefaultL1ChainID) diff --git a/cmd/approve.go b/cmd/approve.go index d6d334e0..669f6105 100644 --- a/cmd/approve.go +++ b/cmd/approve.go @@ -5,9 +5,9 @@ import ( "math/big" "strings" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/config" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/log" "github.com/ethereum/go-ethereum/common" "github.com/urfave/cli/v2" ) @@ -37,7 +37,7 @@ func approveTokens(ctx *cli.Context) error { if !ctx.Bool(config.FlagYes) { fmt.Print("*WARNING* Are you sure you want to approve ", amount.String(), - " tokens (in wei) for the smc ? [y/N]: ") + " tokens (in wei) for the smc ? [y/N]: ") var input string if _, err := fmt.Scanln(&input); err != nil { return err @@ -58,13 +58,13 @@ func approveTokens(ctx *cli.Context) error { } // load auth from keystore file - auth, err := etherman.LoadAuthFromKeyStore(addrKeyStorePath, addrPassword) + auth, _, err := etherman.LoadAuthFromKeyStore(addrKeyStorePath, addrPassword) if err != nil { log.Fatal(err) return err } - tx, err := etherman.ApproveMatic(ctx.Context, auth.From, amount, c.NetworkConfig.L1Config.ZkEVMAddr) + tx, err := etherman.ApproveMatic(ctx.Context, auth.From, amount, c.NetworkConfig.L1Config.Supernets2Addr) if err != nil { return err } diff --git a/cmd/dumpstate.go b/cmd/dumpstate.go index 2ca9855f..184ebd3a 100644 --- a/cmd/dumpstate.go +++ b/cmd/dumpstate.go @@ -9,9 +9,9 @@ import ( "os" "strings" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/config" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/state" "github.com/urfave/cli/v2" ) diff --git a/cmd/main.go b/cmd/main.go index 75c5e55c..abe53850 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -4,14 +4,14 @@ import ( "fmt" "os" - "github.com/0xPolygonHermez/zkevm-node" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node" + "github.com/0xPolygon/supernets2-node/config" + "github.com/0xPolygon/supernets2-node/jsonrpc" + "github.com/0xPolygon/supernets2-node/log" "github.com/urfave/cli/v2" ) -const appName = "zkevm-node" +const appName = "supernets2-node" const ( // AGGREGATOR is the aggregator component identifier @@ -80,7 +80,7 @@ var ( func main() { app := cli.NewApp() app.Name = appName - app.Version = zkevm.Version + app.Version = supernets2.Version flags := []cli.Flag{ &configFileFlag, &yesFlag, @@ -97,7 +97,7 @@ func main() { { Name: "run", Aliases: []string{}, - Usage: "Run the zkevm-node", + Usage: "Run the supernets2-node", Action: start, Flags: append(flags, &networkFlag, &customNetworkFlag, &migrationsFlag), }, diff --git a/cmd/run.go b/cmd/run.go index fb2e5aa3..bbc9903b 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -2,6 +2,7 @@ package main import ( "context" + "crypto/ecdsa" "fmt" "net" "net/http" @@ -11,30 +12,32 @@ import ( "runtime" "time" - "github.com/0xPolygonHermez/zkevm-node" - "github.com/0xPolygonHermez/zkevm-node/aggregator" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/event/pgeventstorage" - "github.com/0xPolygonHermez/zkevm-node/gasprice" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/metrics" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/pool/pgpoolstorage" - "github.com/0xPolygonHermez/zkevm-node/sequencer" - "github.com/0xPolygonHermez/zkevm-node/sequencesender" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - executorpb "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" - "github.com/0xPolygonHermez/zkevm-node/synchronizer" + dataCommitteeClient "github.com/0xPolygon/supernets2-data-availability/client" + "github.com/0xPolygon/supernets2-node" + "github.com/0xPolygon/supernets2-node/aggregator" + "github.com/0xPolygon/supernets2-node/config" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/etherman" + "github.com/0xPolygon/supernets2-node/ethtxmanager" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/event/nileventstorage" + "github.com/0xPolygon/supernets2-node/event/pgeventstorage" + "github.com/0xPolygon/supernets2-node/gasprice" + "github.com/0xPolygon/supernets2-node/jsonrpc" + "github.com/0xPolygon/supernets2-node/jsonrpc/client" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/merkletree" + "github.com/0xPolygon/supernets2-node/metrics" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/pool/pgpoolstorage" + "github.com/0xPolygon/supernets2-node/sequencer" + "github.com/0xPolygon/supernets2-node/sequencesender" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/runtime/executor" + executorpb "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" + "github.com/0xPolygon/supernets2-node/synchronizer" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" "github.com/jackc/pgx/v4/pgxpool" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/urfave/cli/v2" @@ -48,7 +51,7 @@ func start(cliCtx *cli.Context) error { setupLog(c.Log) if c.Log.Environment == log.EnvironmentDevelopment { - zkevm.PrintVersion(os.Stdout) + supernets2.PrintVersion(os.Stdout) log.Info("Starting application") } else if c.Log.Environment == log.EnvironmentProduction { logVersion() @@ -305,6 +308,7 @@ func runSynchronizer(cfg config.Config, etherman *etherman.Client, ethTxManager sy, err := synchronizer.NewSynchronizer( cfg.IsTrustedSequencer, etherman, st, pool, ethTxManager, zkEVMClient, cfg.NetworkConfig.Genesis, cfg.Synchronizer, + &dataCommitteeClient.ClientFactory{}, ) if err != nil { log.Fatal(err) @@ -387,16 +391,24 @@ func createSequenceSender(cfg config.Config, pool *pool.Pool, etmStorage *ethtxm log.Fatal(err) } + var seqPrivKey *ecdsa.PrivateKey for _, privateKey := range cfg.SequenceSender.PrivateKeys { - _, err := etherman.LoadAuthFromKeyStore(privateKey.Path, privateKey.Password) + _, pk, err := etherman.LoadAuthFromKeyStore(privateKey.Path, privateKey.Password) if err != nil { log.Fatal(err) } + log.Infof("from pk %s, from sender %s", crypto.PubkeyToAddress(pk.PublicKey), common.HexToAddress(cfg.SequenceSender.SenderAddress)) + if crypto.PubkeyToAddress(pk.PublicKey) == common.HexToAddress(cfg.SequenceSender.SenderAddress) { + seqPrivKey = pk + } + } + if seqPrivKey == nil { + log.Fatal("Sequencer private key not found") } ethTxManager := ethtxmanager.New(cfg.EthTxManager, etherman, etmStorage, st) - seqSender, err := sequencesender.New(cfg.SequenceSender, st, etherman, ethTxManager, eventLog) + seqSender, err := sequencesender.New(cfg.SequenceSender, st, etherman, ethTxManager, eventLog, seqPrivKey) if err != nil { log.Fatal(err) } @@ -482,7 +494,7 @@ func createEthTxManager(cfg config.Config, etmStorage *ethtxmanager.PostgresStor } for _, privateKey := range cfg.EthTxManager.PrivateKeys { - _, err := etherman.LoadAuthFromKeyStore(privateKey.Path, privateKey.Password) + _, _, err := etherman.LoadAuthFromKeyStore(privateKey.Path, privateKey.Password) if err != nil { log.Fatal(err) } @@ -551,10 +563,10 @@ func startMetricsHttpServer(c metrics.Config) { func logVersion() { log.Infow("Starting application", // node version is already logged by default - "gitRevision", zkevm.GitRev, - "gitBranch", zkevm.GitBranch, + "gitRevision", supernets2.GitRev, + "gitBranch", supernets2.GitBranch, "goVersion", runtime.Version(), - "built", zkevm.BuildDate, + "built", supernets2.BuildDate, "os/arch", fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH), ) } diff --git a/cmd/version.go b/cmd/version.go index cd856292..420a1dd7 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -3,11 +3,11 @@ package main import ( "os" - "github.com/0xPolygonHermez/zkevm-node" + "github.com/0xPolygon/supernets2-node" "github.com/urfave/cli/v2" ) func versionCmd(*cli.Context) error { - zkevm.PrintVersion(os.Stdout) + supernets2.PrintVersion(os.Stdout) return nil } diff --git a/config/config.go b/config/config.go index 65094805..1b446ea3 100644 --- a/config/config.go +++ b/config/config.go @@ -5,22 +5,22 @@ import ( "path/filepath" "strings" - "github.com/0xPolygonHermez/zkevm-node/aggregator" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/gasprice" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/metrics" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/pricegetter" - "github.com/0xPolygonHermez/zkevm-node/sequencer" - "github.com/0xPolygonHermez/zkevm-node/sequencesender" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/synchronizer" + "github.com/0xPolygon/supernets2-node/aggregator" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/etherman" + "github.com/0xPolygon/supernets2-node/ethtxmanager" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/gasprice" + "github.com/0xPolygon/supernets2-node/jsonrpc" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/merkletree" + "github.com/0xPolygon/supernets2-node/metrics" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/pricegetter" + "github.com/0xPolygon/supernets2-node/sequencer" + "github.com/0xPolygon/supernets2-node/sequencesender" + "github.com/0xPolygon/supernets2-node/state/runtime/executor" + "github.com/0xPolygon/supernets2-node/synchronizer" "github.com/mitchellh/mapstructure" "github.com/spf13/viper" "github.com/urfave/cli/v2" diff --git a/config/config_test.go b/config/config_test.go index a7382e11..17c446db 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -9,11 +9,11 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/aggregator" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pricegetter" + "github.com/0xPolygon/supernets2-node/aggregator" + "github.com/0xPolygon/supernets2-node/config" + "github.com/0xPolygon/supernets2-node/config/types" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/pricegetter" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -206,8 +206,8 @@ func Test_Defaults(t *testing.T) { expectedValue: types.NewDuration(5 * time.Second), }, { - path: "SequenceSender.MaxTxSizeForL1", - expectedValue: uint64(131072), + path: "SequenceSender.MaxBatchesForL1", + expectedValue: uint64(1000), }, { path: "Etherman.URL", @@ -218,7 +218,7 @@ func Test_Defaults(t *testing.T) { expectedValue: uint64(5), }, { - path: "NetworkConfig.L1Config.ZkEVMAddr", + path: "NetworkConfig.L1Config.Supernets2Addr", expectedValue: common.HexToAddress("0xa997cfD539E703921fD1e3Cf25b4c241a27a4c7A"), }, { @@ -263,7 +263,7 @@ func Test_Defaults(t *testing.T) { }, { path: "MTClient.URI", - expectedValue: "zkevm-prover:50061", + expectedValue: "supernets2-prover:50061", }, { path: "StateDB.User", @@ -279,7 +279,7 @@ func Test_Defaults(t *testing.T) { }, { path: "StateDB.Host", - expectedValue: "zkevm-state-db", + expectedValue: "supernets2-state-db", }, { path: "StateDB.Port", @@ -328,7 +328,7 @@ func Test_Defaults(t *testing.T) { }, { path: "Pool.DB.Host", - expectedValue: "zkevm-pool-db", + expectedValue: "supernets2-pool-db", }, { path: "Pool.DB.Port", @@ -384,7 +384,7 @@ func Test_Defaults(t *testing.T) { }, { path: "Executor.URI", - expectedValue: "zkevm-prover:50071", + expectedValue: "supernets2-prover:50071", }, { path: "Metrics.Host", @@ -484,9 +484,9 @@ func TestEnvVarArrayDecoding(t *testing.T) { flagSet.String(config.FlagNetwork, "testnet", "") ctx := cli.NewContext(cli.NewApp(), flagSet, nil) - os.Setenv("ZKEVM_NODE_LOG_OUTPUTS", "a,b,c") + os.Setenv("SUPERNETS2_NODE_LOG_OUTPUTS", "a,b,c") defer func() { - os.Unsetenv("ZKEVM_NODE_LOG_OUTPUTS") + os.Unsetenv("SUPERNETS2_NODE_LOG_OUTPUTS") }() cfg, err := config.Load(ctx) diff --git a/config/default.go b/config/default.go index 18b7701b..2f4b30b8 100644 --- a/config/default.go +++ b/config/default.go @@ -13,7 +13,7 @@ Outputs = ["stderr"] User = "state_user" Password = "state_password" Name = "state_db" -Host = "zkevm-state-db" +Host = "supernets2-state-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -29,7 +29,7 @@ PollMinAllowedGasPriceInterval = "15s" User = "pool_user" Password = "pool_password" Name = "pool_db" - Host = "zkevm-pool-db" + Host = "supernets2-pool-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -108,7 +108,7 @@ MaxTxLifetime = "3h" [SequenceSender] WaitPeriodSendSequence = "5s" LastBatchVirtualizationTimeMaxWaitPeriod = "5s" -MaxTxSizeForL1 = 131072 +MaxBatchesForL1 = 1000 SenderAddress = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" PrivateKeys = [{Path = "/pk/sequencer.keystore", Password = "testonly"}] @@ -135,10 +135,10 @@ Factor = 0.15 DefaultGasPriceWei = 2000000000 [MTClient] -URI = "zkevm-prover:50061" +URI = "supernets2-prover:50061" [Executor] -URI = "zkevm-prover:50071" +URI = "supernets2-prover:50071" [Metrics] Host = "0.0.0.0" diff --git a/config/environments/local/local.genesis.config.json b/config/environments/local/local.genesis.config.json index dc4a1e8b..dbc799f9 100644 --- a/config/environments/local/local.genesis.config.json +++ b/config/environments/local/local.genesis.config.json @@ -1,9 +1,10 @@ { "l1Config" : { "chainId": 1337, - "polygonZkEVMAddress": "0x610178dA211FEF7D417bC0e6FeD39F05609AD788", + "supernets2Address": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", "maticTokenAddress": "0x5FbDB2315678afecb367f032d93F642f64180aa3", - "polygonZkEVMGlobalExitRootAddress": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" + "supernets2GlobalExitRootAddress": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e", + "supernets2DataCommitteeContract": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" }, "root": "0xd88680f1b151dd67518f9aca85161424c0cac61df2f5424a3ddc04ea25adecc7", "genesisBlockNumber": 65, diff --git a/config/environments/local/local.node.config.toml b/config/environments/local/local.node.config.toml index d6e9eb91..ee4bcc73 100644 --- a/config/environments/local/local.node.config.toml +++ b/config/environments/local/local.node.config.toml @@ -9,7 +9,7 @@ Outputs = ["stderr"] User = "state_user" Password = "state_password" Name = "state_db" -Host = "zkevm-state-db" +Host = "supernets2-state-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -25,7 +25,7 @@ PollMinAllowedGasPriceInterval = "15s" User = "pool_user" Password = "pool_password" Name = "pool_db" - Host = "zkevm-pool-db" + Host = "supernets2-pool-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -42,7 +42,7 @@ Port = 8545 ReadTimeout = "60s" WriteTimeout = "60s" MaxRequestsPerIPAndSecond = 5000 -SequencerNodeURI = "https://internal.zkevm-test.net:2083/" +SequencerNodeURI = "https://internal.supernets2-test.net:2083/" EnableL2SuggestedGasPricePolling = true [RPC.WebSockets] Enabled = true @@ -98,7 +98,7 @@ MaxTxLifetime = "3h" [SequenceSender] WaitPeriodSendSequence = "5s" LastBatchVirtualizationTimeMaxWaitPeriod = "5s" -MaxTxSizeForL1 = 131072 +MaxBatchesForL1 = 1000 SenderAddress = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266" PrivateKeys = [{Path = "/pk/sequencer.keystore", Password = "testonly"}] @@ -127,10 +127,10 @@ Type = "default" DefaultGasPriceWei = 1000000000 [MTClient] -URI = "zkevm-prover:50061" +URI = "supernets2-prover:50061" [Executor] -URI = "zkevm-prover:50071" +URI = "supernets2-prover:50071" [Metrics] Host = "0.0.0.0" diff --git a/config/environments/mainnet/example.env b/config/environments/mainnet/example.env deleted file mode 100644 index 95557a44..00000000 --- a/config/environments/mainnet/example.env +++ /dev/null @@ -1,9 +0,0 @@ -ZKEVM_NETWORK = "mainnet" -# URL of a JSON RPC for Ethereum mainnet -ZKEVM_NODE_ETHERMAN_URL = "http://your.L1node.url" -# PATH WHERE THE STATEDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA -ZKEVM_NODE_STATEDB_DATA_DIR = "/path/to/persistent/data/statedb" -# PATH WHERE THE POOLDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA -ZKEVM_NODE_POOLDB_DATA_DIR = "/path/to/persistent/data/pooldb" -# OPTIONAL, UNCOMENT IF YOU WANT TO DO ADVANCED CONFIG -# ZKEVM_ADVANCED_CONFIG_DIR = "/should/be/same/path/as/ZKEVM_CONFIG_DIR" \ No newline at end of file diff --git a/config/environments/mainnet/postgresql.conf b/config/environments/mainnet/postgresql.conf deleted file mode 100644 index 51dff686..00000000 --- a/config/environments/mainnet/postgresql.conf +++ /dev/null @@ -1,815 +0,0 @@ -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, run "pg_ctl reload", or execute -# "SELECT pg_reload_conf()". Some parameters, which are marked below, -# require a server shutdown and restart to take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: B = bytes Time units: us = microseconds -# kB = kilobytes ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# TB = terabytes h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -#data_directory = 'ConfigDir' # use data in another directory - # (change requires restart) -#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file - # (change requires restart) -#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -#external_pid_file = '' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -listen_addresses = '*' - # comma-separated list of addresses; - # defaults to 'localhost'; use '*' for all - # (change requires restart) -#port = 5432 # (change requires restart) -max_connections = 100 # (change requires restart) -#superuser_reserved_connections = 3 # (change requires restart) -#unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories - # (change requires restart) -#unix_socket_group = '' # (change requires restart) -#unix_socket_permissions = 0777 # begin with 0 to use octal notation - # (change requires restart) -#bonjour = off # advertise server via Bonjour - # (change requires restart) -#bonjour_name = '' # defaults to the computer name - # (change requires restart) - -# - TCP settings - -# see "man tcp" for details - -#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -#tcp_keepalives_count = 0 # TCP_KEEPCNT; - # 0 selects the system default -#tcp_user_timeout = 0 # TCP_USER_TIMEOUT, in milliseconds; - # 0 selects the system default - -#client_connection_check_interval = 0 # time between checks for client - # disconnection while running queries; - # 0 for never - -# - Authentication - - -#authentication_timeout = 1min # 1s-600s -#password_encryption = scram-sha-256 # scram-sha-256 or md5 -#db_user_namespace = off - -# GSSAPI using Kerberos -#krb_server_keyfile = 'FILE:${sysconfdir}/krb5.keytab' -#krb_caseins_users = off - -# - SSL - - -#ssl = off -#ssl_ca_file = '' -#ssl_cert_file = 'server.crt' -#ssl_crl_file = '' -#ssl_crl_dir = '' -#ssl_key_file = 'server.key' -#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers -#ssl_prefer_server_ciphers = on -#ssl_ecdh_curve = 'prime256v1' -#ssl_min_protocol_version = 'TLSv1.2' -#ssl_max_protocol_version = '' -#ssl_dh_params_file = '' -#ssl_passphrase_command = '' -#ssl_passphrase_command_supports_reload = off - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -# - Memory - - -shared_buffers = 8GB # min 128kB - # (change requires restart) -#huge_pages = try # on, off, or try - # (change requires restart) -#huge_page_size = 0 # zero for system default - # (change requires restart) -temp_buffers = 64MB # min 800kB -#max_prepared_transactions = 0 # zero disables the feature - # (change requires restart) -# Caution: it is not advisable to set max_prepared_transactions nonzero unless -# you actively intend to use prepared transactions. -work_mem = 104857kB # min 64kB -#hash_mem_multiplier = 2.0 # 1-1000.0 multiplier on hash table work_mem -maintenance_work_mem = 2GB # min 1MB -#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem -#logical_decoding_work_mem = 64MB # min 64kB -#max_stack_depth = 2MB # min 100kB -#shared_memory_type = mmap # the default is the first option - # supported by the operating system: - # mmap - # sysv - # windows - # (change requires restart) -dynamic_shared_memory_type = posix # the default is usually the first option - # supported by the operating system: - # posix - # sysv - # windows - # mmap - # (change requires restart) -#min_dynamic_shared_memory = 0MB # (change requires restart) - -# - Disk - - -#temp_file_limit = -1 # limits per-process temp file space - # in kilobytes, or -1 for no limit - -# - Kernel Resources - - -#max_files_per_process = 1000 # min 64 - # (change requires restart) - -# - Cost-Based Vacuum Delay - - -#vacuum_cost_delay = 0 # 0-100 milliseconds (0 disables) -#vacuum_cost_page_hit = 1 # 0-10000 credits -#vacuum_cost_page_miss = 2 # 0-10000 credits -#vacuum_cost_page_dirty = 20 # 0-10000 credits -#vacuum_cost_limit = 200 # 1-10000 credits - -# - Background Writer - - -#bgwriter_delay = 200ms # 10-10000ms between rounds -#bgwriter_lru_maxpages = 100 # max buffers written/round, 0 disables -#bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round -#bgwriter_flush_after = 512kB # measured in pages, 0 disables - -# - Asynchronous Behavior - - -#backend_flush_after = 0 # measured in pages, 0 disables -effective_io_concurrency = 300 # 1-1000; 0 disables prefetching -#maintenance_io_concurrency = 10 # 1-1000; 0 disables prefetching -max_worker_processes = 16 # (change requires restart) -max_parallel_workers_per_gather = 4 # taken from max_parallel_workers -max_parallel_maintenance_workers = 4 # taken from max_parallel_workers -max_parallel_workers = 16 # maximum number of max_worker_processes that - # can be used in parallel operations -#parallel_leader_participation = on -#old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate - # (change requires restart) - - -#------------------------------------------------------------------------------ -# WRITE-AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -#wal_level = replica # minimal, replica, or logical - # (change requires restart) -#fsync = on # flush data to disk for crash safety - # (turning this off can cause - # unrecoverable data corruption) -#synchronous_commit = on # synchronization level; - # off, local, remote_write, remote_apply, or on -#wal_sync_method = fsync # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux and FreeBSD) - # fsync - # fsync_writethrough - # open_sync -#full_page_writes = on # recover from partial page writes -#wal_log_hints = off # also do full page writes of non-critical updates - # (change requires restart) -#wal_compression = off # enables compression of full-page writes; - # off, pglz, lz4, zstd, or on -#wal_init_zero = on # zero-fill new WAL files -#wal_recycle = on # recycle WAL files -wal_buffers = 16MB # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -#wal_writer_delay = 200ms # 1-10000 milliseconds -#wal_writer_flush_after = 1MB # measured in pages, 0 disables -#wal_skip_threshold = 2MB - -#commit_delay = 0 # range 0-100000, in microseconds -#commit_siblings = 5 # range 1-1000 - -# - Checkpoints - - -#checkpoint_timeout = 5min # range 30s-1d -checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0 -#checkpoint_flush_after = 256kB # measured in pages, 0 disables -#checkpoint_warning = 30s # 0 disables -max_wal_size = 8GB -min_wal_size = 2GB - -# - Prefetching during recovery - - -#recovery_prefetch = try # prefetch pages referenced in the WAL? -#wal_decode_buffer_size = 512kB # lookahead window used for prefetching - # (change requires restart) - -# - Archiving - - -#archive_mode = off # enables archiving; off, on, or always - # (change requires restart) -#archive_library = '' # library to use to archive a logfile segment - # (empty string indicates archive_command should - # be used) -#archive_command = '' # command to use to archive a logfile segment - # placeholders: %p = path of file to archive - # %f = file name only - # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' -#archive_timeout = 0 # force a logfile segment switch after this - # number of seconds; 0 disables - -# - Archive Recovery - - -# These are only used in recovery mode. - -#restore_command = '' # command to use to restore an archived logfile segment - # placeholders: %p = path of file to restore - # %f = file name only - # e.g. 'cp /mnt/server/archivedir/%f %p' -#archive_cleanup_command = '' # command to execute at every restartpoint -#recovery_end_command = '' # command to execute at completion of recovery - -# - Recovery Target - - -# Set these only when performing a targeted recovery. - -#recovery_target = '' # 'immediate' to end recovery as soon as a - # consistent state is reached - # (change requires restart) -#recovery_target_name = '' # the named restore point to which recovery will proceed - # (change requires restart) -#recovery_target_time = '' # the time stamp up to which recovery will proceed - # (change requires restart) -#recovery_target_xid = '' # the transaction ID up to which recovery will proceed - # (change requires restart) -#recovery_target_lsn = '' # the WAL LSN up to which recovery will proceed - # (change requires restart) -#recovery_target_inclusive = on # Specifies whether to stop: - # just after the specified recovery target (on) - # just before the recovery target (off) - # (change requires restart) -#recovery_target_timeline = 'latest' # 'current', 'latest', or timeline ID - # (change requires restart) -#recovery_target_action = 'pause' # 'pause', 'promote', 'shutdown' - # (change requires restart) - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Sending Servers - - -# Set these on the primary and on any standby that will send replication data. - -#max_wal_senders = 10 # max number of walsender processes - # (change requires restart) -#max_replication_slots = 10 # max number of replication slots - # (change requires restart) -#wal_keep_size = 0 # in megabytes; 0 disables -#max_slot_wal_keep_size = -1 # in megabytes; -1 disables -#wal_sender_timeout = 60s # in milliseconds; 0 disables -#track_commit_timestamp = off # collect timestamp of transaction commit - # (change requires restart) - -# - Primary Server - - -# These settings are ignored on a standby server. - -#synchronous_standby_names = '' # standby servers that provide sync rep - # method to choose sync standbys, number of sync standbys, - # and comma-separated list of application_name - # from standby(s); '*' = all -#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed - -# - Standby Servers - - -# These settings are ignored on a primary server. - -#primary_conninfo = '' # connection string to sending server -#primary_slot_name = '' # replication slot on sending server -#promote_trigger_file = '' # file name whose presence ends recovery -#hot_standby = on # "off" disallows queries during recovery - # (change requires restart) -#max_standby_archive_delay = 30s # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -#max_standby_streaming_delay = 30s # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -#wal_receiver_create_temp_slot = off # create temp slot if primary_slot_name - # is not set -#wal_receiver_status_interval = 10s # send replies at least this often - # 0 disables -#hot_standby_feedback = off # send info from standby to prevent - # query conflicts -#wal_receiver_timeout = 60s # time that receiver waits for - # communication from primary - # in milliseconds; 0 disables -#wal_retrieve_retry_interval = 5s # time to wait before retrying to - # retrieve WAL after a failed attempt -#recovery_min_apply_delay = 0 # minimum delay for applying changes during recovery - -# - Subscribers - - -# These settings are ignored on a publisher. - -#max_logical_replication_workers = 4 # taken from max_worker_processes - # (change requires restart) -#max_sync_workers_per_subscription = 2 # taken from max_logical_replication_workers - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -#enable_async_append = on -#enable_bitmapscan = on -#enable_gathermerge = on -#enable_hashagg = on -#enable_hashjoin = on -#enable_incremental_sort = on -#enable_indexscan = on -#enable_indexonlyscan = on -#enable_material = on -#enable_memoize = on -#enable_mergejoin = on -#enable_nestloop = on -#enable_parallel_append = on -#enable_parallel_hash = on -#enable_partition_pruning = on -#enable_partitionwise_join = off -#enable_partitionwise_aggregate = off -#enable_seqscan = on -#enable_sort = on -#enable_tidscan = on - -# - Planner Cost Constants - - -#seq_page_cost = 1.0 # measured on an arbitrary scale -random_page_cost = 1.1 # same scale as above -#cpu_tuple_cost = 0.01 # same scale as above -#cpu_index_tuple_cost = 0.005 # same scale as above -#cpu_operator_cost = 0.0025 # same scale as above -#parallel_setup_cost = 1000.0 # same scale as above -#parallel_tuple_cost = 0.1 # same scale as above -#min_parallel_table_scan_size = 8MB -#min_parallel_index_scan_size = 512kB -effective_cache_size = 24GB - -#jit_above_cost = 100000 # perform JIT compilation if available - # and query more expensive than this; - # -1 disables -#jit_inline_above_cost = 500000 # inline small functions if query is - # more expensive than this; -1 disables -#jit_optimize_above_cost = 500000 # use expensive JIT optimizations if - # query is more expensive than this; - # -1 disables - -# - Genetic Query Optimizer - - -#geqo = on -#geqo_threshold = 12 -#geqo_effort = 5 # range 1-10 -#geqo_pool_size = 0 # selects default based on effort -#geqo_generations = 0 # selects default based on effort -#geqo_selection_bias = 2.0 # range 1.5-2.0 -#geqo_seed = 0.0 # range 0.0-1.0 - -# - Other Planner Options - - -default_statistics_target = 100 # range 1-10000 -#constraint_exclusion = partition # on, off, or partition -#cursor_tuple_fraction = 0.1 # range 0.0-1.0 -#from_collapse_limit = 8 -#jit = on # allow JIT compilation -#join_collapse_limit = 8 # 1 disables collapsing of explicit - # JOIN clauses -#plan_cache_mode = auto # auto, force_generic_plan or - # force_custom_plan -#recursive_worktable_factor = 10.0 # range 0.001-1000000 - - -#------------------------------------------------------------------------------ -# REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - Where to Log - - -#log_destination = 'stderr' # Valid values are combinations of - # stderr, csvlog, jsonlog, syslog, and - # eventlog, depending on platform. - # csvlog and jsonlog require - # logging_collector to be on. - -# This is used when logging to stderr: -#logging_collector = off # Enable capturing of stderr, jsonlog, - # and csvlog into log files. Required - # to be on for csvlogs and jsonlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -#log_directory = 'log' # directory where log files are written, - # can be absolute or relative to PGDATA -#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, - # can include strftime() escapes -#log_file_mode = 0600 # creation mode for log files, - # begin with 0 to use octal notation -#log_rotation_age = 1d # Automatic rotation of logfiles will - # happen after that time. 0 disables. -#log_rotation_size = 10MB # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. -#log_truncate_on_rotation = off # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. - -# These are relevant when logging to syslog: -#syslog_facility = 'LOCAL0' -#syslog_ident = 'postgres' -#syslog_sequence_numbers = on -#syslog_split_messages = on - -# This is only relevant when logging to eventlog (Windows): -# (change requires restart) -#event_source = 'PostgreSQL' - -# - When to Log - - -#log_min_messages = warning # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - -#log_min_error_statement = error # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - -#log_min_duration_sample = -1 # -1 is disabled, 0 logs a sample of statements - # and their durations, > 0 logs only a sample of - # statements running at least this number - # of milliseconds; - # sample fraction is determined by log_statement_sample_rate - -#log_statement_sample_rate = 1.0 # fraction of logged statements exceeding - # log_min_duration_sample to be logged; - # 1.0 logs all such statements, 0.0 never logs - - -#log_transaction_sample_rate = 0.0 # fraction of transactions whose statements - # are logged regardless of their duration; 1.0 logs all - # statements from all transactions, 0.0 never logs - -#log_startup_progress_interval = 10s # Time between progress updates for - # long-running startup operations. - # 0 disables the feature, > 0 indicates - # the interval in milliseconds. - -# - What to Log - - -#debug_print_parse = off -#debug_print_rewritten = off -#debug_print_plan = off -#debug_pretty_print = on -#log_autovacuum_min_duration = 10min # log autovacuum activity; - # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -#log_checkpoints = on -#log_connections = off -#log_disconnections = off -#log_duration = off -#log_error_verbosity = default # terse, default, or verbose messages -#log_hostname = off -#log_line_prefix = '%m [%p] ' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %b = backend type - # %p = process ID - # %P = process ID of parallel group leader - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %n = timestamp with milliseconds (as a Unix epoch) - # %Q = query ID (0 if none or not computed) - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -#log_lock_waits = off # log lock waits >= deadlock_timeout -#log_recovery_conflict_waits = off # log standby recovery conflict waits - # >= deadlock_timeout -#log_parameter_max_length = -1 # when logging statements, limit logged - # bind-parameter values to N bytes; - # -1 means print in full, 0 disables -#log_parameter_max_length_on_error = 0 # when logging an error, limit logged - # bind-parameter values to N bytes; - # -1 means print in full, 0 disables -#log_statement = 'none' # none, ddl, mod, all -#log_replication_commands = off -#log_temp_files = -1 # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -log_timezone = 'Etc/UTC' - - -#------------------------------------------------------------------------------ -# PROCESS TITLE -#------------------------------------------------------------------------------ - -#cluster_name = '' # added to process titles if nonempty - # (change requires restart) -#update_process_title = on - - -#------------------------------------------------------------------------------ -# STATISTICS -#------------------------------------------------------------------------------ - -# - Cumulative Query and Index Statistics - - -#track_activities = on -#track_activity_query_size = 1024 # (change requires restart) -#track_counts = on -#track_io_timing = off -#track_wal_io_timing = off -#track_functions = none # none, pl, all -#stats_fetch_consistency = cache - - -# - Monitoring - - -#compute_query_id = auto -#log_statement_stats = off -#log_parser_stats = off -#log_planner_stats = off -#log_executor_stats = off - - -#------------------------------------------------------------------------------ -# AUTOVACUUM -#------------------------------------------------------------------------------ - -#autovacuum = on # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -#autovacuum_max_workers = 3 # max number of autovacuum subprocesses - # (change requires restart) -#autovacuum_naptime = 1min # time between autovacuum runs -#autovacuum_vacuum_threshold = 50 # min number of row updates before - # vacuum -#autovacuum_vacuum_insert_threshold = 1000 # min number of row inserts - # before vacuum; -1 disables insert - # vacuums -#autovacuum_analyze_threshold = 50 # min number of row updates before - # analyze -#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum -#autovacuum_vacuum_insert_scale_factor = 0.2 # fraction of inserts over table - # size before insert vacuum -#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze -#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum - # (change requires restart) -#autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age - # before forced vacuum - # (change requires restart) -#autovacuum_vacuum_cost_delay = 2ms # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -#client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error -#search_path = '"$user", public' # schema names -#row_security = on -#default_table_access_method = 'heap' -#default_tablespace = '' # a tablespace name, '' uses the default -#default_toast_compression = 'pglz' # 'pglz' or 'lz4' -#temp_tablespaces = '' # a list of tablespace names, '' uses - # only default tablespace -#check_function_bodies = on -#default_transaction_isolation = 'read committed' -#default_transaction_read_only = off -#default_transaction_deferrable = off -#session_replication_role = 'origin' -#statement_timeout = 0 # in milliseconds, 0 is disabled -#lock_timeout = 0 # in milliseconds, 0 is disabled -#idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled -#idle_session_timeout = 0 # in milliseconds, 0 is disabled -#vacuum_freeze_table_age = 150000000 -#vacuum_freeze_min_age = 50000000 -#vacuum_failsafe_age = 1600000000 -#vacuum_multixact_freeze_table_age = 150000000 -#vacuum_multixact_freeze_min_age = 5000000 -#vacuum_multixact_failsafe_age = 1600000000 -#bytea_output = 'hex' # hex, escape -#xmlbinary = 'base64' -#xmloption = 'content' -#gin_pending_list_limit = 4MB - -# - Locale and Formatting - - -datestyle = 'iso, mdy' -#intervalstyle = 'postgres' -timezone = 'Etc/UTC' -#timezone_abbreviations = 'Default' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia (historical usage) - # India - # You can create your own file in - # share/timezonesets/. -#extra_float_digits = 1 # min -15, max 3; any value >0 actually - # selects precise output mode -#client_encoding = sql_ascii # actually, defaults to database - # encoding - -# These settings are initialized by initdb, but they can be changed. -lc_messages = 'en_US.utf8' # locale for system error message - # strings -lc_monetary = 'en_US.utf8' # locale for monetary formatting -lc_numeric = 'en_US.utf8' # locale for number formatting -lc_time = 'en_US.utf8' # locale for time formatting - -# default configuration for text search -default_text_search_config = 'pg_catalog.english' - -# - Shared Library Preloading - - -#local_preload_libraries = '' -#session_preload_libraries = '' -#shared_preload_libraries = '' # (change requires restart) -#jit_provider = 'llvmjit' # JIT library to use - -# - Other Defaults - - -#dynamic_library_path = '$libdir' -#extension_destdir = '' # prepend path when loading extensions - # and shared objects (added by Debian) -#gin_fuzzy_search_limit = 0 - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -#deadlock_timeout = 1s -#max_locks_per_transaction = 64 # min 10 - # (change requires restart) -#max_pred_locks_per_transaction = 64 # min 10 - # (change requires restart) -#max_pred_locks_per_relation = -2 # negative values mean - # (max_pred_locks_per_transaction - # / -max_pred_locks_per_relation) - 1 -#max_pred_locks_per_page = 2 # min 0 - - -#------------------------------------------------------------------------------ -# VERSION AND PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -#array_nulls = on -#backslash_quote = safe_encoding # on, off, or safe_encoding -#escape_string_warning = on -#lo_compat_privileges = off -#quote_all_identifiers = off -#standard_conforming_strings = on -#synchronize_seqscans = on - -# - Other Platforms and Clients - - -#transform_null_equals = off - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -#exit_on_error = off # terminate session on any error? -#restart_after_crash = on # reinitialize after backend crash? -#data_sync_retry = off # retry or panic on failure to fsync - # data? - # (change requires restart) -#recovery_init_sync_method = fsync # fsync, syncfs (Linux 5.8+) - - -#------------------------------------------------------------------------------ -# CONFIG FILE INCLUDES -#------------------------------------------------------------------------------ - -# These options allow settings to be loaded from files other than the -# default postgresql.conf. Note that these are directives, not variable -# assignments, so they can usefully be given more than once. - -#include_dir = '...' # include files ending in '.conf' from - # a directory, e.g., 'conf.d' -#include_if_exists = '...' # include file only if it exists -#include = '...' # include file - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -# Add settings for extensions here diff --git a/config/environments/mainnet/public.node.config.toml b/config/environments/mainnet/public.node.config.toml deleted file mode 100644 index 28bc7768..00000000 --- a/config/environments/mainnet/public.node.config.toml +++ /dev/null @@ -1,65 +0,0 @@ -[Log] -Environment = "development" # "production" or "development" -Level = "info" -Outputs = ["stderr"] - -[StateDB] -User = "state_user" -Password = "state_password" -Name = "state_db" -Host = "zkevm-state-db" -Port = "5432" -EnableLog = false -MaxConns = 200 - -[Pool] -MaxTxBytesSize=100132 -MaxTxDataBytesSize=100000 -DefaultMinGasPriceAllowed = 1000000000 -MinAllowedGasPriceInterval = "5m" -PollMinAllowedGasPriceInterval = "15s" - [Pool.DB] - User = "pool_user" - Password = "pool_password" - Name = "pool_db" - Host = "zkevm-pool-db" - Port = "5432" - EnableLog = false - MaxConns = 200 - -[Etherman] -URL = "http://your.L1node.url" -MultiGasProvider = false - [Etherman.Etherscan] - ApiKey = "" - -[RPC] -Host = "0.0.0.0" -Port = 8545 -ReadTimeout = "60s" -WriteTimeout = "60s" -MaxRequestsPerIPAndSecond = 5000 -SequencerNodeURI = "https://zkevm-rpc.com" -EnableL2SuggestedGasPricePolling = false - [RPC.WebSockets] - Enabled = true - Port = 8546 - -[Synchronizer] -SyncInterval = "2s" -SyncChunkSize = 100 -TrustedSequencerURL = "" # If it is empty or not specified, then the value is read from the smc - -[MTClient] -URI = "zkevm-prover:50061" - -[Executor] -URI = "zkevm-prover:50071" - -[Metrics] -Host = "0.0.0.0" -Port = 9091 -Enabled = false -ProfilingHost = "0.0.0.0" -ProfilingPort = 6060 -ProfilingEnabled = false diff --git a/config/environments/mainnet/public.prover.config.json b/config/environments/mainnet/public.prover.config.json deleted file mode 100644 index 8d0c93b8..00000000 --- a/config/environments/mainnet/public.prover.config.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "runProverServer": false, - "runProverServerMock": false, - "runProverClient": false, - - "runExecutorServer": true, - "runExecutorClient": false, - "runExecutorClientMultithread": false, - - "runStateDBServer": true, - "runStateDBTest": false, - - "runAggregatorServer": false, - "runAggregatorClient": false, - - "runFileGenProof": false, - "runFileGenBatchProof": false, - "runFileGenAggregatedProof": false, - "runFileGenFinalProof": false, - "runFileProcessBatch": false, - "runFileProcessBatchMultithread": false, - - "runKeccakScriptGenerator": false, - "runKeccakTest": false, - "runStorageSMTest": false, - "runBinarySMTest": false, - "runMemAlignSMTest": false, - "runSHA256Test": false, - "runBlakeTest": false, - - "executeInParallel": true, - "useMainExecGenerated": false, - "saveRequestToFile": false, - "saveInputToFile": false, - "saveDbReadsToFile": false, - "saveDbReadsToFileOnChange": false, - "saveOutputToFile": false, - "saveResponseToFile": false, - "loadDBToMemCache": true, - "opcodeTracer": false, - "logRemoteDbReads": false, - "logExecutorServerResponses": false, - - "proverServerPort": 50051, - "proverServerMockPort": 50052, - "proverServerMockTimeout": 10000000, - "proverClientPort": 50051, - "proverClientHost": "127.0.0.1", - - "executorServerPort": 50071, - "executorROMLineTraces": false, - "executorClientPort": 50071, - "executorClientHost": "127.0.0.1", - - "stateDBServerPort": 50061, - "stateDBURL": "local", - - "aggregatorServerPort": 50081, - "aggregatorClientPort": 50081, - "aggregatorClientHost": "127.0.0.1", - - "inputFile": "input_executor.json", - "outputPath": "output", - "cmPolsFile_disabled": "zkevm.commit", - "cmPolsFileC12a_disabled": "zkevm.c12a.commit", - "cmPolsFileRecursive1_disabled": "zkevm.recursive1.commit", - "constPolsFile": "zkevm.const", - "constPolsC12aFile": "zkevm.c12a.const", - "constPolsRecursive1File": "zkevm.recursive1.const", - "mapConstPolsFile": false, - "constantsTreeFile": "zkevm.consttree", - "constantsTreeC12aFile": "zkevm.c12a.consttree", - "constantsTreeRecursive1File": "zkevm.recursive1.consttree", - "mapConstantsTreeFile": false, - "starkFile": "zkevm.prove.json", - "starkZkIn": "zkevm.proof.zkin.json", - "starkZkInC12a":"zkevm.c12a.zkin.proof.json", - "starkFileRecursive1": "zkevm.recursive1.proof.json", - "verifierFile": "zkevm.verifier.dat", - "verifierFileRecursive1": "zkevm.recursive1.verifier.dat", - "witnessFile_disabled": "zkevm.witness.wtns", - "witnessFileRecursive1": "zkevm.recursive1.witness.wtns", - "execC12aFile": "zkevm.c12a.exec", - "execRecursive1File": "zkevm.recursive1.exec", - "starkVerifierFile": "zkevm.g16.0001.zkey", - "publicStarkFile": "zkevm.public.json", - "publicFile": "public.json", - "proofFile": "proof.json", - "keccakScriptFile": "keccak_script.json", - "keccakPolsFile_DISABLED": "keccak_pols.json", - "keccakConnectionsFile": "keccak_connections.json", - "starkInfoFile": "zkevm.starkinfo.json", - "starkInfoC12aFile": "zkevm.c12a.starkinfo.json", - "starkInfoRecursive1File": "zkevm.recursive1.starkinfo.json", - "databaseURL": "postgresql://prover_user:prover_pass@zkevm-state-db:5432/prover_db", - "dbNodesTableName": "state.nodes", - "dbProgramTableName": "state.program", - "dbAsyncWrite": false, - "dbMultiWrite": true, - "dbConnectionsPool": true, - "dbNumberOfPoolConnections": 30, - "dbMetrics": true, - "dbClearCache": false, - "dbGetTree": true, - "dbReadOnly": false, - "dbMTCacheSize": 8192, - "dbProgramCacheSize": 1024, - "cleanerPollingPeriod": 600, - "requestsPersistence": 3600, - "maxExecutorThreads": 20, - "maxProverThreads": 8, - "maxStateDBThreads": 8 -} \ No newline at end of file diff --git a/config/environments/public/example.env b/config/environments/public/example.env deleted file mode 100644 index bf0db2e0..00000000 --- a/config/environments/public/example.env +++ /dev/null @@ -1,9 +0,0 @@ -ZKEVM_NETWORK = "testnet" -# URL of a JSON RPC for Goerli -ZKEVM_NODE_ETHERMAN_URL = "http://your.L1node.url" -# PATH WHERE THE STATEDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA -ZKEVM_NODE_STATEDB_DATA_DIR = "/path/to/persistent/data/statedb" -# PATH WHERE THE POOLDB POSTGRES CONTAINER WILL STORE PERSISTENT DATA -ZKEVM_NODE_POOLDB_DATA_DIR = "/path/to/persistent/data/pooldb" -# OPTIONAL, UNCOMENT IF YOU WANT TO DO ADVANCED CONFIG -# ZKEVM_ADVANCED_CONFIG_DIR = "/should/be/same/path/as/ZKEVM_CONFIG_DIR" \ No newline at end of file diff --git a/config/environments/public/postgresql.conf b/config/environments/public/postgresql.conf deleted file mode 100644 index 51dff686..00000000 --- a/config/environments/public/postgresql.conf +++ /dev/null @@ -1,815 +0,0 @@ -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, run "pg_ctl reload", or execute -# "SELECT pg_reload_conf()". Some parameters, which are marked below, -# require a server shutdown and restart to take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: B = bytes Time units: us = microseconds -# kB = kilobytes ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# TB = terabytes h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -#data_directory = 'ConfigDir' # use data in another directory - # (change requires restart) -#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file - # (change requires restart) -#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -#external_pid_file = '' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -listen_addresses = '*' - # comma-separated list of addresses; - # defaults to 'localhost'; use '*' for all - # (change requires restart) -#port = 5432 # (change requires restart) -max_connections = 100 # (change requires restart) -#superuser_reserved_connections = 3 # (change requires restart) -#unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories - # (change requires restart) -#unix_socket_group = '' # (change requires restart) -#unix_socket_permissions = 0777 # begin with 0 to use octal notation - # (change requires restart) -#bonjour = off # advertise server via Bonjour - # (change requires restart) -#bonjour_name = '' # defaults to the computer name - # (change requires restart) - -# - TCP settings - -# see "man tcp" for details - -#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -#tcp_keepalives_count = 0 # TCP_KEEPCNT; - # 0 selects the system default -#tcp_user_timeout = 0 # TCP_USER_TIMEOUT, in milliseconds; - # 0 selects the system default - -#client_connection_check_interval = 0 # time between checks for client - # disconnection while running queries; - # 0 for never - -# - Authentication - - -#authentication_timeout = 1min # 1s-600s -#password_encryption = scram-sha-256 # scram-sha-256 or md5 -#db_user_namespace = off - -# GSSAPI using Kerberos -#krb_server_keyfile = 'FILE:${sysconfdir}/krb5.keytab' -#krb_caseins_users = off - -# - SSL - - -#ssl = off -#ssl_ca_file = '' -#ssl_cert_file = 'server.crt' -#ssl_crl_file = '' -#ssl_crl_dir = '' -#ssl_key_file = 'server.key' -#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers -#ssl_prefer_server_ciphers = on -#ssl_ecdh_curve = 'prime256v1' -#ssl_min_protocol_version = 'TLSv1.2' -#ssl_max_protocol_version = '' -#ssl_dh_params_file = '' -#ssl_passphrase_command = '' -#ssl_passphrase_command_supports_reload = off - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -# - Memory - - -shared_buffers = 8GB # min 128kB - # (change requires restart) -#huge_pages = try # on, off, or try - # (change requires restart) -#huge_page_size = 0 # zero for system default - # (change requires restart) -temp_buffers = 64MB # min 800kB -#max_prepared_transactions = 0 # zero disables the feature - # (change requires restart) -# Caution: it is not advisable to set max_prepared_transactions nonzero unless -# you actively intend to use prepared transactions. -work_mem = 104857kB # min 64kB -#hash_mem_multiplier = 2.0 # 1-1000.0 multiplier on hash table work_mem -maintenance_work_mem = 2GB # min 1MB -#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem -#logical_decoding_work_mem = 64MB # min 64kB -#max_stack_depth = 2MB # min 100kB -#shared_memory_type = mmap # the default is the first option - # supported by the operating system: - # mmap - # sysv - # windows - # (change requires restart) -dynamic_shared_memory_type = posix # the default is usually the first option - # supported by the operating system: - # posix - # sysv - # windows - # mmap - # (change requires restart) -#min_dynamic_shared_memory = 0MB # (change requires restart) - -# - Disk - - -#temp_file_limit = -1 # limits per-process temp file space - # in kilobytes, or -1 for no limit - -# - Kernel Resources - - -#max_files_per_process = 1000 # min 64 - # (change requires restart) - -# - Cost-Based Vacuum Delay - - -#vacuum_cost_delay = 0 # 0-100 milliseconds (0 disables) -#vacuum_cost_page_hit = 1 # 0-10000 credits -#vacuum_cost_page_miss = 2 # 0-10000 credits -#vacuum_cost_page_dirty = 20 # 0-10000 credits -#vacuum_cost_limit = 200 # 1-10000 credits - -# - Background Writer - - -#bgwriter_delay = 200ms # 10-10000ms between rounds -#bgwriter_lru_maxpages = 100 # max buffers written/round, 0 disables -#bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round -#bgwriter_flush_after = 512kB # measured in pages, 0 disables - -# - Asynchronous Behavior - - -#backend_flush_after = 0 # measured in pages, 0 disables -effective_io_concurrency = 300 # 1-1000; 0 disables prefetching -#maintenance_io_concurrency = 10 # 1-1000; 0 disables prefetching -max_worker_processes = 16 # (change requires restart) -max_parallel_workers_per_gather = 4 # taken from max_parallel_workers -max_parallel_maintenance_workers = 4 # taken from max_parallel_workers -max_parallel_workers = 16 # maximum number of max_worker_processes that - # can be used in parallel operations -#parallel_leader_participation = on -#old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate - # (change requires restart) - - -#------------------------------------------------------------------------------ -# WRITE-AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -#wal_level = replica # minimal, replica, or logical - # (change requires restart) -#fsync = on # flush data to disk for crash safety - # (turning this off can cause - # unrecoverable data corruption) -#synchronous_commit = on # synchronization level; - # off, local, remote_write, remote_apply, or on -#wal_sync_method = fsync # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux and FreeBSD) - # fsync - # fsync_writethrough - # open_sync -#full_page_writes = on # recover from partial page writes -#wal_log_hints = off # also do full page writes of non-critical updates - # (change requires restart) -#wal_compression = off # enables compression of full-page writes; - # off, pglz, lz4, zstd, or on -#wal_init_zero = on # zero-fill new WAL files -#wal_recycle = on # recycle WAL files -wal_buffers = 16MB # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -#wal_writer_delay = 200ms # 1-10000 milliseconds -#wal_writer_flush_after = 1MB # measured in pages, 0 disables -#wal_skip_threshold = 2MB - -#commit_delay = 0 # range 0-100000, in microseconds -#commit_siblings = 5 # range 1-1000 - -# - Checkpoints - - -#checkpoint_timeout = 5min # range 30s-1d -checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0 -#checkpoint_flush_after = 256kB # measured in pages, 0 disables -#checkpoint_warning = 30s # 0 disables -max_wal_size = 8GB -min_wal_size = 2GB - -# - Prefetching during recovery - - -#recovery_prefetch = try # prefetch pages referenced in the WAL? -#wal_decode_buffer_size = 512kB # lookahead window used for prefetching - # (change requires restart) - -# - Archiving - - -#archive_mode = off # enables archiving; off, on, or always - # (change requires restart) -#archive_library = '' # library to use to archive a logfile segment - # (empty string indicates archive_command should - # be used) -#archive_command = '' # command to use to archive a logfile segment - # placeholders: %p = path of file to archive - # %f = file name only - # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' -#archive_timeout = 0 # force a logfile segment switch after this - # number of seconds; 0 disables - -# - Archive Recovery - - -# These are only used in recovery mode. - -#restore_command = '' # command to use to restore an archived logfile segment - # placeholders: %p = path of file to restore - # %f = file name only - # e.g. 'cp /mnt/server/archivedir/%f %p' -#archive_cleanup_command = '' # command to execute at every restartpoint -#recovery_end_command = '' # command to execute at completion of recovery - -# - Recovery Target - - -# Set these only when performing a targeted recovery. - -#recovery_target = '' # 'immediate' to end recovery as soon as a - # consistent state is reached - # (change requires restart) -#recovery_target_name = '' # the named restore point to which recovery will proceed - # (change requires restart) -#recovery_target_time = '' # the time stamp up to which recovery will proceed - # (change requires restart) -#recovery_target_xid = '' # the transaction ID up to which recovery will proceed - # (change requires restart) -#recovery_target_lsn = '' # the WAL LSN up to which recovery will proceed - # (change requires restart) -#recovery_target_inclusive = on # Specifies whether to stop: - # just after the specified recovery target (on) - # just before the recovery target (off) - # (change requires restart) -#recovery_target_timeline = 'latest' # 'current', 'latest', or timeline ID - # (change requires restart) -#recovery_target_action = 'pause' # 'pause', 'promote', 'shutdown' - # (change requires restart) - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Sending Servers - - -# Set these on the primary and on any standby that will send replication data. - -#max_wal_senders = 10 # max number of walsender processes - # (change requires restart) -#max_replication_slots = 10 # max number of replication slots - # (change requires restart) -#wal_keep_size = 0 # in megabytes; 0 disables -#max_slot_wal_keep_size = -1 # in megabytes; -1 disables -#wal_sender_timeout = 60s # in milliseconds; 0 disables -#track_commit_timestamp = off # collect timestamp of transaction commit - # (change requires restart) - -# - Primary Server - - -# These settings are ignored on a standby server. - -#synchronous_standby_names = '' # standby servers that provide sync rep - # method to choose sync standbys, number of sync standbys, - # and comma-separated list of application_name - # from standby(s); '*' = all -#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed - -# - Standby Servers - - -# These settings are ignored on a primary server. - -#primary_conninfo = '' # connection string to sending server -#primary_slot_name = '' # replication slot on sending server -#promote_trigger_file = '' # file name whose presence ends recovery -#hot_standby = on # "off" disallows queries during recovery - # (change requires restart) -#max_standby_archive_delay = 30s # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -#max_standby_streaming_delay = 30s # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -#wal_receiver_create_temp_slot = off # create temp slot if primary_slot_name - # is not set -#wal_receiver_status_interval = 10s # send replies at least this often - # 0 disables -#hot_standby_feedback = off # send info from standby to prevent - # query conflicts -#wal_receiver_timeout = 60s # time that receiver waits for - # communication from primary - # in milliseconds; 0 disables -#wal_retrieve_retry_interval = 5s # time to wait before retrying to - # retrieve WAL after a failed attempt -#recovery_min_apply_delay = 0 # minimum delay for applying changes during recovery - -# - Subscribers - - -# These settings are ignored on a publisher. - -#max_logical_replication_workers = 4 # taken from max_worker_processes - # (change requires restart) -#max_sync_workers_per_subscription = 2 # taken from max_logical_replication_workers - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -#enable_async_append = on -#enable_bitmapscan = on -#enable_gathermerge = on -#enable_hashagg = on -#enable_hashjoin = on -#enable_incremental_sort = on -#enable_indexscan = on -#enable_indexonlyscan = on -#enable_material = on -#enable_memoize = on -#enable_mergejoin = on -#enable_nestloop = on -#enable_parallel_append = on -#enable_parallel_hash = on -#enable_partition_pruning = on -#enable_partitionwise_join = off -#enable_partitionwise_aggregate = off -#enable_seqscan = on -#enable_sort = on -#enable_tidscan = on - -# - Planner Cost Constants - - -#seq_page_cost = 1.0 # measured on an arbitrary scale -random_page_cost = 1.1 # same scale as above -#cpu_tuple_cost = 0.01 # same scale as above -#cpu_index_tuple_cost = 0.005 # same scale as above -#cpu_operator_cost = 0.0025 # same scale as above -#parallel_setup_cost = 1000.0 # same scale as above -#parallel_tuple_cost = 0.1 # same scale as above -#min_parallel_table_scan_size = 8MB -#min_parallel_index_scan_size = 512kB -effective_cache_size = 24GB - -#jit_above_cost = 100000 # perform JIT compilation if available - # and query more expensive than this; - # -1 disables -#jit_inline_above_cost = 500000 # inline small functions if query is - # more expensive than this; -1 disables -#jit_optimize_above_cost = 500000 # use expensive JIT optimizations if - # query is more expensive than this; - # -1 disables - -# - Genetic Query Optimizer - - -#geqo = on -#geqo_threshold = 12 -#geqo_effort = 5 # range 1-10 -#geqo_pool_size = 0 # selects default based on effort -#geqo_generations = 0 # selects default based on effort -#geqo_selection_bias = 2.0 # range 1.5-2.0 -#geqo_seed = 0.0 # range 0.0-1.0 - -# - Other Planner Options - - -default_statistics_target = 100 # range 1-10000 -#constraint_exclusion = partition # on, off, or partition -#cursor_tuple_fraction = 0.1 # range 0.0-1.0 -#from_collapse_limit = 8 -#jit = on # allow JIT compilation -#join_collapse_limit = 8 # 1 disables collapsing of explicit - # JOIN clauses -#plan_cache_mode = auto # auto, force_generic_plan or - # force_custom_plan -#recursive_worktable_factor = 10.0 # range 0.001-1000000 - - -#------------------------------------------------------------------------------ -# REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - Where to Log - - -#log_destination = 'stderr' # Valid values are combinations of - # stderr, csvlog, jsonlog, syslog, and - # eventlog, depending on platform. - # csvlog and jsonlog require - # logging_collector to be on. - -# This is used when logging to stderr: -#logging_collector = off # Enable capturing of stderr, jsonlog, - # and csvlog into log files. Required - # to be on for csvlogs and jsonlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -#log_directory = 'log' # directory where log files are written, - # can be absolute or relative to PGDATA -#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, - # can include strftime() escapes -#log_file_mode = 0600 # creation mode for log files, - # begin with 0 to use octal notation -#log_rotation_age = 1d # Automatic rotation of logfiles will - # happen after that time. 0 disables. -#log_rotation_size = 10MB # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. -#log_truncate_on_rotation = off # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. - -# These are relevant when logging to syslog: -#syslog_facility = 'LOCAL0' -#syslog_ident = 'postgres' -#syslog_sequence_numbers = on -#syslog_split_messages = on - -# This is only relevant when logging to eventlog (Windows): -# (change requires restart) -#event_source = 'PostgreSQL' - -# - When to Log - - -#log_min_messages = warning # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - -#log_min_error_statement = error # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - -#log_min_duration_sample = -1 # -1 is disabled, 0 logs a sample of statements - # and their durations, > 0 logs only a sample of - # statements running at least this number - # of milliseconds; - # sample fraction is determined by log_statement_sample_rate - -#log_statement_sample_rate = 1.0 # fraction of logged statements exceeding - # log_min_duration_sample to be logged; - # 1.0 logs all such statements, 0.0 never logs - - -#log_transaction_sample_rate = 0.0 # fraction of transactions whose statements - # are logged regardless of their duration; 1.0 logs all - # statements from all transactions, 0.0 never logs - -#log_startup_progress_interval = 10s # Time between progress updates for - # long-running startup operations. - # 0 disables the feature, > 0 indicates - # the interval in milliseconds. - -# - What to Log - - -#debug_print_parse = off -#debug_print_rewritten = off -#debug_print_plan = off -#debug_pretty_print = on -#log_autovacuum_min_duration = 10min # log autovacuum activity; - # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -#log_checkpoints = on -#log_connections = off -#log_disconnections = off -#log_duration = off -#log_error_verbosity = default # terse, default, or verbose messages -#log_hostname = off -#log_line_prefix = '%m [%p] ' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %b = backend type - # %p = process ID - # %P = process ID of parallel group leader - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %n = timestamp with milliseconds (as a Unix epoch) - # %Q = query ID (0 if none or not computed) - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -#log_lock_waits = off # log lock waits >= deadlock_timeout -#log_recovery_conflict_waits = off # log standby recovery conflict waits - # >= deadlock_timeout -#log_parameter_max_length = -1 # when logging statements, limit logged - # bind-parameter values to N bytes; - # -1 means print in full, 0 disables -#log_parameter_max_length_on_error = 0 # when logging an error, limit logged - # bind-parameter values to N bytes; - # -1 means print in full, 0 disables -#log_statement = 'none' # none, ddl, mod, all -#log_replication_commands = off -#log_temp_files = -1 # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -log_timezone = 'Etc/UTC' - - -#------------------------------------------------------------------------------ -# PROCESS TITLE -#------------------------------------------------------------------------------ - -#cluster_name = '' # added to process titles if nonempty - # (change requires restart) -#update_process_title = on - - -#------------------------------------------------------------------------------ -# STATISTICS -#------------------------------------------------------------------------------ - -# - Cumulative Query and Index Statistics - - -#track_activities = on -#track_activity_query_size = 1024 # (change requires restart) -#track_counts = on -#track_io_timing = off -#track_wal_io_timing = off -#track_functions = none # none, pl, all -#stats_fetch_consistency = cache - - -# - Monitoring - - -#compute_query_id = auto -#log_statement_stats = off -#log_parser_stats = off -#log_planner_stats = off -#log_executor_stats = off - - -#------------------------------------------------------------------------------ -# AUTOVACUUM -#------------------------------------------------------------------------------ - -#autovacuum = on # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -#autovacuum_max_workers = 3 # max number of autovacuum subprocesses - # (change requires restart) -#autovacuum_naptime = 1min # time between autovacuum runs -#autovacuum_vacuum_threshold = 50 # min number of row updates before - # vacuum -#autovacuum_vacuum_insert_threshold = 1000 # min number of row inserts - # before vacuum; -1 disables insert - # vacuums -#autovacuum_analyze_threshold = 50 # min number of row updates before - # analyze -#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum -#autovacuum_vacuum_insert_scale_factor = 0.2 # fraction of inserts over table - # size before insert vacuum -#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze -#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum - # (change requires restart) -#autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age - # before forced vacuum - # (change requires restart) -#autovacuum_vacuum_cost_delay = 2ms # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -#client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error -#search_path = '"$user", public' # schema names -#row_security = on -#default_table_access_method = 'heap' -#default_tablespace = '' # a tablespace name, '' uses the default -#default_toast_compression = 'pglz' # 'pglz' or 'lz4' -#temp_tablespaces = '' # a list of tablespace names, '' uses - # only default tablespace -#check_function_bodies = on -#default_transaction_isolation = 'read committed' -#default_transaction_read_only = off -#default_transaction_deferrable = off -#session_replication_role = 'origin' -#statement_timeout = 0 # in milliseconds, 0 is disabled -#lock_timeout = 0 # in milliseconds, 0 is disabled -#idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled -#idle_session_timeout = 0 # in milliseconds, 0 is disabled -#vacuum_freeze_table_age = 150000000 -#vacuum_freeze_min_age = 50000000 -#vacuum_failsafe_age = 1600000000 -#vacuum_multixact_freeze_table_age = 150000000 -#vacuum_multixact_freeze_min_age = 5000000 -#vacuum_multixact_failsafe_age = 1600000000 -#bytea_output = 'hex' # hex, escape -#xmlbinary = 'base64' -#xmloption = 'content' -#gin_pending_list_limit = 4MB - -# - Locale and Formatting - - -datestyle = 'iso, mdy' -#intervalstyle = 'postgres' -timezone = 'Etc/UTC' -#timezone_abbreviations = 'Default' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia (historical usage) - # India - # You can create your own file in - # share/timezonesets/. -#extra_float_digits = 1 # min -15, max 3; any value >0 actually - # selects precise output mode -#client_encoding = sql_ascii # actually, defaults to database - # encoding - -# These settings are initialized by initdb, but they can be changed. -lc_messages = 'en_US.utf8' # locale for system error message - # strings -lc_monetary = 'en_US.utf8' # locale for monetary formatting -lc_numeric = 'en_US.utf8' # locale for number formatting -lc_time = 'en_US.utf8' # locale for time formatting - -# default configuration for text search -default_text_search_config = 'pg_catalog.english' - -# - Shared Library Preloading - - -#local_preload_libraries = '' -#session_preload_libraries = '' -#shared_preload_libraries = '' # (change requires restart) -#jit_provider = 'llvmjit' # JIT library to use - -# - Other Defaults - - -#dynamic_library_path = '$libdir' -#extension_destdir = '' # prepend path when loading extensions - # and shared objects (added by Debian) -#gin_fuzzy_search_limit = 0 - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -#deadlock_timeout = 1s -#max_locks_per_transaction = 64 # min 10 - # (change requires restart) -#max_pred_locks_per_transaction = 64 # min 10 - # (change requires restart) -#max_pred_locks_per_relation = -2 # negative values mean - # (max_pred_locks_per_transaction - # / -max_pred_locks_per_relation) - 1 -#max_pred_locks_per_page = 2 # min 0 - - -#------------------------------------------------------------------------------ -# VERSION AND PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -#array_nulls = on -#backslash_quote = safe_encoding # on, off, or safe_encoding -#escape_string_warning = on -#lo_compat_privileges = off -#quote_all_identifiers = off -#standard_conforming_strings = on -#synchronize_seqscans = on - -# - Other Platforms and Clients - - -#transform_null_equals = off - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -#exit_on_error = off # terminate session on any error? -#restart_after_crash = on # reinitialize after backend crash? -#data_sync_retry = off # retry or panic on failure to fsync - # data? - # (change requires restart) -#recovery_init_sync_method = fsync # fsync, syncfs (Linux 5.8+) - - -#------------------------------------------------------------------------------ -# CONFIG FILE INCLUDES -#------------------------------------------------------------------------------ - -# These options allow settings to be loaded from files other than the -# default postgresql.conf. Note that these are directives, not variable -# assignments, so they can usefully be given more than once. - -#include_dir = '...' # include files ending in '.conf' from - # a directory, e.g., 'conf.d' -#include_if_exists = '...' # include file only if it exists -#include = '...' # include file - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -# Add settings for extensions here diff --git a/config/environments/public/public.node.config.toml b/config/environments/public/public.node.config.toml deleted file mode 100644 index b0b9b9e6..00000000 --- a/config/environments/public/public.node.config.toml +++ /dev/null @@ -1,65 +0,0 @@ -[Log] -Environment = "development" # "production" or "development" -Level = "info" -Outputs = ["stderr"] - -[StateDB] -User = "state_user" -Password = "state_password" -Name = "state_db" -Host = "zkevm-state-db" -Port = "5432" -EnableLog = false -MaxConns = 200 - -[Pool] -IntervalToRefreshBlockedAddresses = "5m" -MaxTxBytesSize=100132 -MaxTxDataBytesSize=100000 -DefaultMinGasPriceAllowed = 1000000000 -MinAllowedGasPriceInterval = "5m" -PollMinAllowedGasPriceInterval = "15s" - [Pool.DB] - User = "pool_user" - Password = "pool_password" - Name = "pool_db" - Host = "zkevm-pool-db" - Port = "5432" - EnableLog = false - MaxConns = 200 - -[Etherman] -URL = "http://your.L1node.url" -MultiGasProvider = false - [Etherman.Etherscan] - ApiKey = "" - -[RPC] -Host = "0.0.0.0" -Port = 8545 -ReadTimeout = "60s" -WriteTimeout = "60s" -MaxRequestsPerIPAndSecond = 5000 -SequencerNodeURI = "https://rpc.public.zkevm-test.net/" -EnableL2SuggestedGasPricePolling = false - [RPC.WebSockets] - Enabled = true - Port = 8546 - -[Synchronizer] -SyncInterval = "2s" -SyncChunkSize = 100 - -[MTClient] -URI = "zkevm-prover:50061" - -[Executor] -URI = "zkevm-prover:50071" - -[Metrics] -Host = "0.0.0.0" -Port = 9091 -Enabled = false -ProfilingHost = "0.0.0.0" -ProfilingPort = 6060 -ProfilingEnabled = false diff --git a/config/environments/public/public.prover.config.json b/config/environments/public/public.prover.config.json deleted file mode 100644 index 8d0c93b8..00000000 --- a/config/environments/public/public.prover.config.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "runProverServer": false, - "runProverServerMock": false, - "runProverClient": false, - - "runExecutorServer": true, - "runExecutorClient": false, - "runExecutorClientMultithread": false, - - "runStateDBServer": true, - "runStateDBTest": false, - - "runAggregatorServer": false, - "runAggregatorClient": false, - - "runFileGenProof": false, - "runFileGenBatchProof": false, - "runFileGenAggregatedProof": false, - "runFileGenFinalProof": false, - "runFileProcessBatch": false, - "runFileProcessBatchMultithread": false, - - "runKeccakScriptGenerator": false, - "runKeccakTest": false, - "runStorageSMTest": false, - "runBinarySMTest": false, - "runMemAlignSMTest": false, - "runSHA256Test": false, - "runBlakeTest": false, - - "executeInParallel": true, - "useMainExecGenerated": false, - "saveRequestToFile": false, - "saveInputToFile": false, - "saveDbReadsToFile": false, - "saveDbReadsToFileOnChange": false, - "saveOutputToFile": false, - "saveResponseToFile": false, - "loadDBToMemCache": true, - "opcodeTracer": false, - "logRemoteDbReads": false, - "logExecutorServerResponses": false, - - "proverServerPort": 50051, - "proverServerMockPort": 50052, - "proverServerMockTimeout": 10000000, - "proverClientPort": 50051, - "proverClientHost": "127.0.0.1", - - "executorServerPort": 50071, - "executorROMLineTraces": false, - "executorClientPort": 50071, - "executorClientHost": "127.0.0.1", - - "stateDBServerPort": 50061, - "stateDBURL": "local", - - "aggregatorServerPort": 50081, - "aggregatorClientPort": 50081, - "aggregatorClientHost": "127.0.0.1", - - "inputFile": "input_executor.json", - "outputPath": "output", - "cmPolsFile_disabled": "zkevm.commit", - "cmPolsFileC12a_disabled": "zkevm.c12a.commit", - "cmPolsFileRecursive1_disabled": "zkevm.recursive1.commit", - "constPolsFile": "zkevm.const", - "constPolsC12aFile": "zkevm.c12a.const", - "constPolsRecursive1File": "zkevm.recursive1.const", - "mapConstPolsFile": false, - "constantsTreeFile": "zkevm.consttree", - "constantsTreeC12aFile": "zkevm.c12a.consttree", - "constantsTreeRecursive1File": "zkevm.recursive1.consttree", - "mapConstantsTreeFile": false, - "starkFile": "zkevm.prove.json", - "starkZkIn": "zkevm.proof.zkin.json", - "starkZkInC12a":"zkevm.c12a.zkin.proof.json", - "starkFileRecursive1": "zkevm.recursive1.proof.json", - "verifierFile": "zkevm.verifier.dat", - "verifierFileRecursive1": "zkevm.recursive1.verifier.dat", - "witnessFile_disabled": "zkevm.witness.wtns", - "witnessFileRecursive1": "zkevm.recursive1.witness.wtns", - "execC12aFile": "zkevm.c12a.exec", - "execRecursive1File": "zkevm.recursive1.exec", - "starkVerifierFile": "zkevm.g16.0001.zkey", - "publicStarkFile": "zkevm.public.json", - "publicFile": "public.json", - "proofFile": "proof.json", - "keccakScriptFile": "keccak_script.json", - "keccakPolsFile_DISABLED": "keccak_pols.json", - "keccakConnectionsFile": "keccak_connections.json", - "starkInfoFile": "zkevm.starkinfo.json", - "starkInfoC12aFile": "zkevm.c12a.starkinfo.json", - "starkInfoRecursive1File": "zkevm.recursive1.starkinfo.json", - "databaseURL": "postgresql://prover_user:prover_pass@zkevm-state-db:5432/prover_db", - "dbNodesTableName": "state.nodes", - "dbProgramTableName": "state.program", - "dbAsyncWrite": false, - "dbMultiWrite": true, - "dbConnectionsPool": true, - "dbNumberOfPoolConnections": 30, - "dbMetrics": true, - "dbClearCache": false, - "dbGetTree": true, - "dbReadOnly": false, - "dbMTCacheSize": 8192, - "dbProgramCacheSize": 1024, - "cleanerPollingPeriod": 600, - "requestsPersistence": 3600, - "maxExecutorThreads": 20, - "maxProverThreads": 8, - "maxStateDBThreads": 8 -} \ No newline at end of file diff --git a/config/mainnetgenesis.go b/config/mainnetgenesis.go index a27e7b73..bbc4aff1 100644 --- a/config/mainnetgenesis.go +++ b/config/mainnetgenesis.go @@ -5,9 +5,9 @@ const MainnetNetworkConfigJSON = ` { "l1Config" : { "chainId": 1, - "polygonZkEVMAddress": "0x5132A183E9F3CB7C848b0AAC5Ae0c4f0491B7aB2", + "supernets2Address": "0x5132A183E9F3CB7C848b0AAC5Ae0c4f0491B7aB2", "maticTokenAddress": "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0", - "polygonZkEVMGlobalExitRootAddress": "0x580bda1e7A0CFAe92Fa7F6c20A3794F169CE3CFb" + "supernets2GlobalExitRootAddress": "0x580bda1e7A0CFAe92Fa7F6c20A3794F169CE3CFb" }, "root": "0x3f86b09b43e3e49a41fc20a07579b79eba044253367817d5c241d23c0e2bc5c9", "genesisBlockNumber": 16896721, diff --git a/config/network.go b/config/network.go index 6b1ea463..1e48ea3c 100644 --- a/config/network.go +++ b/config/network.go @@ -7,10 +7,10 @@ import ( "io" "os" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/etherman" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/merkletree" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/urfave/cli/v2" ) diff --git a/config/network_test.go b/config/network_test.go index 2f062654..0f790de3 100644 --- a/config/network_test.go +++ b/config/network_test.go @@ -5,9 +5,9 @@ import ( "os" "testing" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/etherman" + "github.com/0xPolygon/supernets2-node/merkletree" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" "github.com/urfave/cli/v2" @@ -27,9 +27,10 @@ func TestLoadCustomNetworkConfig(t *testing.T) { "genesisBlockNumber": 69, "l1Config" : { "chainId": 420, - "polygonZkEVMAddress": "0xc949254d682d8c9ad5682521675b8f43b102aec4", + "supernets2Address": "0xc949254d682d8c9ad5682521675b8f43b102aec4", "maticTokenAddress": "0xc949254d682d8c9ad5682521675b8f43b102aec4", - "polygonZkEVMGlobalExitRootAddress": "0xc949254d682d8c9ad5682521675b8f43b102aec4" + "supernets2GlobalExitRootAddress": "0xc949254d682d8c9ad5682521675b8f43b102aec4", + "supernets2DataCommitteeContract": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" }, "genesis": [ { @@ -74,9 +75,10 @@ func TestLoadCustomNetworkConfig(t *testing.T) { L2BridgeAddr: common.HexToAddress("0x9d98deabc42dd696deb9e40b4f1cab7ddbf55988"), L1Config: etherman.L1Config{ L1ChainID: 420, - ZkEVMAddr: common.HexToAddress("0xc949254d682d8c9ad5682521675b8f43b102aec4"), + Supernets2Addr: common.HexToAddress("0xc949254d682d8c9ad5682521675b8f43b102aec4"), MaticAddr: common.HexToAddress("0xc949254d682d8c9ad5682521675b8f43b102aec4"), GlobalExitRootManagerAddr: common.HexToAddress("0xc949254d682d8c9ad5682521675b8f43b102aec4"), + DataCommitteeAddr: common.HexToAddress("0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6"), }, Genesis: state.Genesis{ Root: common.HexToHash("0xBEEF"), diff --git a/config/testnetgenesis.go b/config/testnetgenesis.go index 869850a1..0350b57f 100644 --- a/config/testnetgenesis.go +++ b/config/testnetgenesis.go @@ -5,9 +5,9 @@ const TestnetNetworkConfigJSON = ` { "l1Config" : { "chainId": 5, - "polygonZkEVMAddress": "0xa997cfD539E703921fD1e3Cf25b4c241a27a4c7A", + "supernets2Address": "0xa997cfD539E703921fD1e3Cf25b4c241a27a4c7A", "maticTokenAddress": "0x1319D23c2F7034F52Eb07399702B040bA278Ca49", - "polygonZkEVMGlobalExitRootAddress": "0x4d9427DCA0406358445bC0a8F88C26b704004f74" + "supernets2GlobalExitRootAddress": "0x4d9427DCA0406358445bC0a8F88C26b704004f74" }, "root": "0x13a14c4a8288e782863d7ce916d224546c69dc428fbfa7115a0cc33a27a05b26", "genesisBlockNumber": 8572998, diff --git a/db/db.go b/db/db.go index 1b1e1d3f..9a3f73a5 100644 --- a/db/db.go +++ b/db/db.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/gobuffalo/packr/v2" "github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4/pgxpool" @@ -14,9 +14,9 @@ import ( const ( // StateMigrationName is the name of the migration used by packr to pack the migration file - StateMigrationName = "zkevm-state-db" + StateMigrationName = "supernets2-state-db" // PoolMigrationName is the name of the migration used by packr to pack the migration file - PoolMigrationName = "zkevm-pool-db" + PoolMigrationName = "supernets2-pool-db" ) var packrMigrations = map[string]*packr.Box{ diff --git a/db/logger.go b/db/logger.go index 06177005..c375033d 100644 --- a/db/logger.go +++ b/db/logger.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/jackc/pgx/v4" ) diff --git a/db/migrations/state/utils_test.go b/db/migrations/state/utils_test.go index 4284614d..8baa2f41 100644 --- a/db/migrations/state/utils_test.go +++ b/db/migrations/state/utils_test.go @@ -5,9 +5,9 @@ import ( "fmt" "testing" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/dbutils" "github.com/gobuffalo/packr/v2" "github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4/stdlib" diff --git a/docker-compose.yml b/docker-compose.yml index 4aee732f..c702e329 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,74 +1,176 @@ version: "3.5" networks: default: - name: zkevm + name: supernets2 + services: - zkevm-rpc: - container_name: zkevm-rpc - restart: unless-stopped + grafana: + container_name: grafana + image: grafana/grafana-oss + volumes: + - ./config/grafana/datasources.yml:/etc/grafana/provisioning/datasources/default.yml:ro + - ./config/grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/default.yml:ro + - ./config/grafana/dashboard-dockers.json:/etc/grafana/provisioning/dashboards/dashboard-dockers.json:ro + - ./config/grafana/dashboard-node.json:/etc/grafana/provisioning/dashboards/dashboard-node.json:ro + environment: + - GF_SECURITY_ADMIN_USER=supernets2 + - GF_SECURITY_ADMIN_PASSWORD=supernets2 + ports: + - 3000:3000 depends_on: - zkevm-pool-db: - condition: service_healthy - zkevm-state-db: - condition: service_healthy - zkevm-sync: - condition: service_started - image: zkevm-node - deploy: - resources: - limits: - memory: 1G - reservations: - memory: 512M + - telegraf + + telegraf: + container_name: telegraf + image: telegraf + volumes: + - ./config/telegraf.conf:/etc/telegraf/telegraf.conf:ro + - /var/run/docker.sock:/var/run/docker.sock:ro + user: telegraf:${DOCKERGID} + environment: + - POSTGRES_HOST=grafana-db + - POSTGRES_USER=user + - POSTGRES_PASSWORD=password + - POSTGRES_DB=grafana + depends_on: + - grafana-db + - supernets2-json-rpc + + grafana-db: + container_name: grafana-db + image: postgres + expose: + - 5432 + environment: + - POSTGRES_USER=user + - POSTGRES_PASSWORD=password + - POSTGRES_DB=grafana + + supernets2-sequencer: + container_name: supernets2-sequencer + image: supernets2-node ports: - - 8545:8545 + - 9092:9091 # needed if metrics enabled + - 6060:6060 + environment: + - SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db + - SUPERNETS2_NODE_POOL_DB_HOST=supernets2-pool-db + volumes: + - ./config/test.node.config.toml:/app/config.toml + - ./config/test.genesis.config.json:/app/genesis.json + command: + - "/bin/sh" + - "-c" + - "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components sequencer" + + supernets2-sequence-sender: + container_name: supernets2-sequence-sender + image: supernets2-node + environment: + - SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db + - SUPERNETS2_NODE_POOL_DB_HOST=supernets2-pool-db + - SUPERNETS2_NODE_SEQUENCER_SENDER_ADDRESS=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + volumes: + - ./sequencer.keystore:/pk/sequencer.keystore + - ./config/test.node.config.toml:/app/config.toml + - ./config/test.genesis.config.json:/app/genesis.json + command: + - "/bin/sh" + - "-c" + - "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components sequence-sender" + + supernets2-json-rpc: + container_name: supernets2-json-rpc + image: supernets2-node + ports: + - 8123:8123 + - 8133:8133 # needed if WebSockets enabled - 9091:9091 # needed if metrics enabled environment: - - ZKEVM_NODE_ETHERMAN_URL=${ZKEVM_NODE_ETHERMAN_URL} + - SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db + - SUPERNETS2_NODE_POOL_DB_HOST=supernets2-pool-db volumes: - - ${ZKEVM_ADVANCED_CONFIG_DIR:-./config/environments/public}/public.node.config.toml:/app/config.toml + - ./config/test.node.config.toml:/app/config.toml + - ./config/test.genesis.config.json:/app/genesis.json command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network ${ZKEVM_NETWORK} --cfg /app/config.toml --components rpc" + - "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components rpc" - zkevm-sync: - container_name: zkevm-sync - restart: unless-stopped - depends_on: - zkevm-state-db: - condition: service_healthy - image: zkevm-node - deploy: - resources: - limits: - memory: 1G - reservations: - memory: 512M + supernets2-aggregator: + container_name: supernets2-aggregator + image: supernets2-node + ports: + - 50081:50081 + - 9093:9091 # needed if metrics enabled environment: - - ZKEVM_NODE_ETHERMAN_URL=${ZKEVM_NODE_ETHERMAN_URL} + - SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db + - SUPERNETS2_NODE_AGGREGATOR_SENDER_ADDRESS=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 volumes: - - ${ZKEVM_ADVANCED_CONFIG_DIR:-./config/environments/public}/public.node.config.toml:/app/config.toml + - ./config/test.node.config.toml:/app/config.toml + - ./config/test.genesis.config.json:/app/genesis.json command: - "/bin/sh" - "-c" - - "/app/zkevm-node run --network ${ZKEVM_NETWORK} --cfg /app/config.toml --components synchronizer" + - "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components aggregator" - zkevm-state-db: - container_name: zkevm-state-db - restart: unless-stopped + supernets2-sync: + container_name: supernets2-sync + image: supernets2-node + environment: + - SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db + volumes: + - ./config/test.node.config.toml:/app/config.toml + - ./config/test.genesis.config.json:/app/genesis.json + command: + - "/bin/sh" + - "-c" + - "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components synchronizer" + + supernets2-eth-tx-manager: + container_name: supernets2-eth-tx-manager + image: supernets2-node + ports: + - 9094:9091 # needed if metrics enabled + environment: + - SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db + volumes: + - ./sequencer.keystore:/pk/sequencer.keystore + - ./aggregator.keystore:/pk/aggregator.keystore + - ./config/test.node.config.toml:/app/config.toml + - ./config/test.genesis.config.json:/app/genesis.json + command: + - "/bin/sh" + - "-c" + - "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components eth-tx-manager" + + supernets2-l2gaspricer: + container_name: supernets2-l2gaspricer + image: supernets2-node + environment: + - SUPERNETS2_NODE_POOL_DB_HOST=supernets2-pool-db + volumes: + - ./test.keystore:/pk/keystore + - ./config/test.node.config.toml:/app/config.toml + - ./config/test.genesis.config.json:/app/genesis.json + command: + - "/bin/sh" + - "-c" + - "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components l2gaspricer" + + supernets2-state-db: + container_name: supernets2-state-db image: postgres - healthcheck: - test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] - interval: 10s - timeout: 5s - retries: 5 + deploy: + resources: + limits: + memory: 2G + reservations: + memory: 1G ports: - 5432:5432 volumes: - - ./db/scripts/init_prover_db.sql:/docker-entrypoint-initdb.d/init.sql - - ${ZKEVM_NODE_STATEDB_DATA_DIR}:/var/lib/postgresql/data - - ${ZKEVM_ADVANCED_CONFIG_DIR:-./config/environments/public}/postgresql.conf:/etc/postgresql.conf + - ../db/scripts/init_prover_db.sql:/docker-entrypoint-initdb.d/init.sql environment: - POSTGRES_USER=state_user - POSTGRES_PASSWORD=state_password @@ -77,22 +179,18 @@ services: - "postgres" - "-N" - "500" - - "-c" - - "config_file=/etc/postgresql.conf" - zkevm-pool-db: - container_name: zkevm-pool-db - restart: unless-stopped + supernets2-pool-db: + container_name: supernets2-pool-db image: postgres - healthcheck: - test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] - interval: 10s - timeout: 5s - retries: 5 + deploy: + resources: + limits: + memory: 2G + reservations: + memory: 1G ports: - 5433:5432 - volumes: - - ${ZKEVM_NODE_POOLDB_DATA_DIR}:/var/lib/postgresql/data environment: - POSTGRES_USER=pool_user - POSTGRES_PASSWORD=pool_password @@ -102,17 +200,297 @@ services: - "-N" - "500" - zkevm-prover: - container_name: zkevm-prover - restart: unless-stopped - image: hermeznetwork/zkevm-prover:v1.1.3-RC2-fork.4 - depends_on: - zkevm-state-db: - condition: service_healthy + supernets2-event-db: + container_name: supernets2-event-db + image: postgres + deploy: + resources: + limits: + memory: 2G + reservations: + memory: 1G + ports: + - 5435:5432 + volumes: + - ../db/scripts/init_event_db.sql:/docker-entrypoint-initdb.d/init.sql + environment: + - POSTGRES_USER=event_user + - POSTGRES_PASSWORD=event_password + - POSTGRES_DB=event_db + command: + - "postgres" + - "-N" + - "500" + + supernets2-explorer-l1: + container_name: supernets2-explorer-l1 + image: hermeznetwork/hermez-node-blockscout:latest ports: + - 4000:4000 + environment: + - NETWORK=ETH + - SUBNETWORK=Local Ethereum + - COIN=ETH + - ETHEREUM_JSONRPC_VARIANT=geth + - ETHEREUM_JSONRPC_HTTP_URL=http://supernets2-mock-l1-network:8545 + - DATABASE_URL=postgres://l1_explorer_user:l1_explorer_password@supernets2-explorer-l1-db:5432/l1_explorer_db + - ECTO_USE_SSL=false + - MIX_ENV=prod + command: + - "/bin/sh" + - "-c" + - "mix do ecto.create, ecto.migrate; mix phx.server" + + supernets2-explorer-l1-db: + container_name: supernets2-explorer-l1-db + image: postgres + ports: + - 5435:5432 + environment: + - POSTGRES_USER=l1_explorer_user + - POSTGRES_PASSWORD=l1_explorer_password + - POSTGRES_DB=l1_explorer_db + command: + - "postgres" + - "-N" + - "500" + + supernets2-explorer-l2: + container_name: supernets2-explorer-l2 + image: hermeznetwork/hermez-node-blockscout:latest + ports: + - 4001:4000 + environment: + - NETWORK=POE + - SUBNETWORK=Polygon Hermez + - COIN=ETH + - ETHEREUM_JSONRPC_VARIANT=geth + - ETHEREUM_JSONRPC_HTTP_URL=http://supernets2-explorer-json-rpc:8124 + - DATABASE_URL=postgres://l2_explorer_user:l2_explorer_password@supernets2-explorer-l2-db:5432/l2_explorer_db + - ECTO_USE_SSL=false + - MIX_ENV=prod + - LOGO=/images/blockscout_logo.svg + - LOGO_FOOTER=/images/blockscout_logo.svg + command: + - "/bin/sh" + - "-c" + - "mix do ecto.create, ecto.migrate; mix phx.server" + + supernets2-explorer-json-rpc: + container_name: supernets2-explorer-json-rpc + image: supernets2-node + ports: + - 8124:8124 + - 8134:8134 # needed if WebSockets enabled + environment: + - SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db + - SUPERNETS2_NODE_POOL_DB_HOST=supernets2-pool-db + - SUPERNETS2_NODE_RPC_PORT=8124 + - SUPERNETS2_NODE_RPC_WEBSOCKETS_PORT=8134 + volumes: + - ./config/test.node.config.toml:/app/config.toml + - ./config/test.genesis.config.json:/app/genesis.json + command: + - "/bin/sh" + - "-c" + - "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components rpc --http.api eth,net,debug,supernets2,txpool,web3" + + supernets2-explorer-l2-db: + container_name: supernets2-explorer-l2-db + image: postgres + ports: + - 5436:5432 + environment: + - POSTGRES_USER=l2_explorer_user + - POSTGRES_PASSWORD=l2_explorer_password + - POSTGRES_DB=l2_explorer_db + command: [ "postgres", "-N", "500" ] + + supernets2-mock-l1-network: + container_name: supernets2-mock-l1-network + image: hermeznetwork/geth-supernets2-contracts + ports: + - 8545:8545 + - 8546:8546 + command: + - "--http" + - "--http.api" + - "admin,eth,debug,miner,net,txpool,personal,web3" + - "--http.addr" + - "0.0.0.0" + - "--http.corsdomain" + - "*" + - "--http.vhosts" + - "*" + - "--ws" + - "--ws.origins" + - "*" + - "--ws.addr" + - "0.0.0.0" + - "--dev" + - "--datadir" + - "/geth_data" + - "--syncmode" + - "full" + - "--rpc.allow-unprotected-txs" + + supernets2-prover: + container_name: supernets2-prover + image: hermeznetwork/supernets2-prover:v1.1.3-RC2-fork.4 + ports: + # - 50051:50051 # Prover + - 50052:50052 # Mock prover - 50061:50061 # MT - 50071:50071 # Executor volumes: - - ${ZKEVM_ADVANCED_CONFIG_DIR:-./config/environments/public}/public.prover.config.json:/usr/src/app/config.json + - ./config/test.prover.config.json:/usr/src/app/config.json command: > zkProver -c /usr/src/app/config.json + + zkprover-mock: + container_name: zkprover-mock + image: hermeznetwork/zkprover-mock:latest + ports: + - 43061:43061 # MT + - 43071:43071 # Executor + volumes: + - ./vectors/src:/app/testvectors + command: > + /app/zkprover-mock server --statedb-port 43061 --executor-port 43071 --test-vector-path /app/testvectors + + supernets2-approve: + container_name: supernets2-approve + image: supernets2-node + environment: + - SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db + volumes: + - ./sequencer.keystore:/pk/keystore + - ./config/test.node.config.toml:/app/config.toml + - ./config/test.genesis.config.json:/app/genesis.json + command: + - "/bin/sh" + - "-c" + - "/app/supernets2-node approve --network custom --custom-network-file /app/genesis.json --key-store-path /pk/keystore --pw testonly --am 115792089237316195423570985008687907853269984665640564039457584007913129639935 -y --cfg /app/config.toml" + + supernets2-permissionless-db: + container_name: supernets2-permissionless-db + image: postgres + deploy: + resources: + limits: + memory: 2G + reservations: + memory: 1G + ports: + - 5434:5432 + volumes: + - ../db/scripts/single_db_server.sql:/docker-entrypoint-initdb.d/init.sql + environment: + - POSTGRES_USER=test_user + - POSTGRES_PASSWORD=test_password + - POSTGRES_DB=test_db + command: + - "postgres" + - "-N" + - "500" + + supernets2-permissionless-node: + container_name: supernets2-permissionless-node + image: supernets2-node + ports: + - 8125:8125 + environment: + - SUPERNETS2_NODE_ISTRUSTEDSEQUENCER=false + - SUPERNETS2_NODE_STATEDB_USER=test_user + - SUPERNETS2_NODE_STATEDB_PASSWORD=test_password + - SUPERNETS2_NODE_STATEDB_NAME=state_db + - SUPERNETS2_NODE_STATEDB_HOST=supernets2-permissionless-db + - SUPERNETS2_NODE_POOL_DB_USER=test_user + - SUPERNETS2_NODE_POOL_DB_PASSWORD=test_password + - SUPERNETS2_NODE_POOL_DB_NAME=pool_db + - SUPERNETS2_NODE_POOL_DB_HOST=supernets2-permissionless-db + - SUPERNETS2_NODE_RPC_PORT=8125 + - SUPERNETS2_NODE_RPC_SEQUENCERNODEURI=http://supernets2-json-rpc:8123 + - SUPERNETS2_NODE_MTCLIENT_URI=supernets2-permissionless-prover:50061 + - SUPERNETS2_NODE_EXECUTOR_URI=supernets2-permissionless-prover:50071 + volumes: + - ./config/test.node.config.toml:/app/config.toml + - ./config/test.genesis.config.json:/app/genesis.json + command: + - "/bin/sh" + - "-c" + - "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components \"rpc,synchronizer\"" + + + supernets2-permissionless-node-forced-DAC: + container_name: supernets2-permissionless-node-forced-DAC + image: supernets2-node + ports: + - 8125:8125 + environment: + - SUPERNETS2_NODE_ISTRUSTEDSEQUENCER=false + - SUPERNETS2_NODE_STATEDB_USER=test_user + - SUPERNETS2_NODE_STATEDB_PASSWORD=test_password + - SUPERNETS2_NODE_STATEDB_NAME=state_db + - SUPERNETS2_NODE_STATEDB_HOST=supernets2-permissionless-db + - SUPERNETS2_NODE_POOL_DB_USER=test_user + - SUPERNETS2_NODE_POOL_DB_PASSWORD=test_password + - SUPERNETS2_NODE_POOL_DB_NAME=pool_db + - SUPERNETS2_NODE_POOL_DB_HOST=supernets2-permissionless-db + - SUPERNETS2_NODE_RPC_PORT=8125 + - SUPERNETS2_NODE_RPC_SEQUENCERNODEURI=http://supernets2-json-rpc:8123 + - SUPERNETS2_NODE_SYNCHRONIZER_TRUSTEDSEQUENCERURL=http://you-cant-touch-this:8123 + - SUPERNETS2_NODE_MTCLIENT_URI=supernets2-permissionless-prover:50061 + - SUPERNETS2_NODE_EXECUTOR_URI=supernets2-permissionless-prover:50071 + volumes: + - ./config/test.node.config.toml:/app/config.toml + - ./config/test.genesis.config.json:/app/genesis.json + command: + - "/bin/sh" + - "-c" + - "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components \"rpc,synchronizer\"" + + supernets2-permissionless-prover: + container_name: supernets2-permissionless-prover + image: hermeznetwork/supernets2-prover:v1.1.3-RC2-fork.4 + ports: + # - 50058:50058 # Prover + - 50059:50052 # Mock prover + - 50068:50061 # MT + - 50078:50071 # Executor + volumes: + - ./config/test.permissionless.prover.config.json:/usr/src/app/config.json + command: > + zkProver -c /usr/src/app/config.json + + supernets2-metrics: + image: prom/prometheus:v2.39.1 + container_name: supernets2-metrics + restart: unless-stopped + ports: + - 9090:9090 + command: + - --config.file=/etc/prometheus/prometheus.yml + - --web.enable-lifecycle + volumes: + - ../config/metrics/prometheus:/etc/prometheus + + zklidium-data-node-db: + container_name: zklidium-data-node-db + restart: unless-stopped + image: postgres + healthcheck: + test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] + interval: 10s + timeout: 5s + retries: 5 + ports: + - 5444:5432 + environment: + - POSTGRES_USER=committee_user + - POSTGRES_PASSWORD=committee_password + - POSTGRES_DB=committee_db + command: + - "postgres" + - "-N" + - "500" \ No newline at end of file diff --git a/docs/ci/actions.md b/docs/ci/actions.md index 821c6edc..8039d8ab 100644 --- a/docs/ci/actions.md +++ b/docs/ci/actions.md @@ -22,7 +22,7 @@ PR opened and pushing changes to PRs. ## push-docker-develop Pushes docker images to docker hub, the images pushed are: -* `hermeznetwork/zkevm-node:develop` +* `hermeznetwork/supernets2-node:develop` ### When is executed @@ -31,7 +31,7 @@ Changes pushed to the `develop` branch. ## push-docker Pushes docker images to docker hub, the images pushed are: -* `hermeznetwork/zkevm-node:latest` +* `hermeznetwork/supernets2-node:latest` ### When is executed diff --git a/docs/components/account_keystore.md b/docs/components/account_keystore.md index ea2f15db..b089e676 100644 --- a/docs/components/account_keystore.md +++ b/docs/components/account_keystore.md @@ -3,7 +3,7 @@ This file contains your Ethereum L1 private key, but it will be encrypted at rest using a password of your choice. The ZKEVM Node - depending on which operating mode it's set up - will use this file in conjunction with the password to authorize L1 transactions. ```bash -docker run --rm hermeznetwork/zkevm-node:latest sh -c "/app/zkevm-node encryptKey --pk=[your private key] --pw=[password to encrypt file] --output=./keystore; cat ./keystore/*" > account.keystore +docker run --rm hermeznetwork/supernets2-node:latest sh -c "/app/zkevm-node encryptKey --pk=[your private key] --pw=[password to encrypt file] --output=./keystore; cat ./keystore/*" > account.keystore ``` **NOTE**: diff --git a/docs/components/aggregator.md b/docs/components/aggregator.md index a1c314a2..d07ac257 100644 --- a/docs/components/aggregator.md +++ b/docs/components/aggregator.md @@ -15,7 +15,7 @@ The ZKEVM Aggregator is an optional module responsible for receiving connections The preferred way to run the ZKEVM Aggregator component is via Docker and Docker Compose. ```bash -docker pull hermeznetwork/zkevm-node +docker pull hermeznetwork/supernets2-node ``` To orchestrate multiple deployments of the different ZKEVM Node components, a `docker-compose.yaml` file for Docker Compose can be used: diff --git a/docs/components/databases.md b/docs/components/databases.md index 117a73b1..1920f0f0 100644 --- a/docs/components/databases.md +++ b/docs/components/databases.md @@ -12,7 +12,7 @@ Note the `environment` values will change per DB. The StateDB needs to generate some extra databases and tables (`merkletree`) for use with the MerkleTree/Executor service. -This is done via an sql file: [init_prover_db.sql](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/db/scripts/init_prover_db.sql) +This is done via an sql file: [init_prover_db.sql](https://github.com/0xPolygon/supernets2-node/blob/develop/db/scripts/init_prover_db.sql) ```yaml zkevm-state-db: diff --git a/docs/components/rpc.md b/docs/components/rpc.md index 3725ed04..a3d78c62 100644 --- a/docs/components/rpc.md +++ b/docs/components/rpc.md @@ -16,7 +16,7 @@ The ZKEVM RPC relays transactions to the Trusted sequencer. The preferred way to run the ZKEVM RPC component is via Docker and Docker Compose. ```bash -docker pull hermeznetwork/zkevm-node +docker pull hermeznetwork/supernets2-node ``` To orchestrate multiple deployments of the different ZKEVM Node components, a `docker-compose.yaml` file for Docker Compose can be used: diff --git a/docs/components/sequencer.md b/docs/components/sequencer.md index 3490494d..d2abcdeb 100644 --- a/docs/components/sequencer.md +++ b/docs/components/sequencer.md @@ -9,7 +9,7 @@ The ZKEVM Sequencer is an optional but ancillary module that proposes new batche The preferred way to run the ZKEVM Sequencer component is via Docker and Docker Compose. ```bash -docker pull hermeznetwork/zkevm-node +docker pull hermeznetwork/supernets2-node ``` To orchestrate multiple deployments of the different ZKEVM Node components, a `docker-compose.yaml` file for Docker Compose can be used: diff --git a/docs/components/synchronizer.md b/docs/components/synchronizer.md index 0e79e52a..b56d7957 100644 --- a/docs/components/synchronizer.md +++ b/docs/components/synchronizer.md @@ -11,7 +11,7 @@ This module syncs data between the Layer 1 Ethereum network and ZKEVM L2 network The preferred way to run the ZKEVM Synchronizer component is via Docker and Docker Compose. ```bash -docker pull hermeznetwork/zkevm-node +docker pull hermeznetwork/supernets2-node ``` To orchestrate multiple deployments of the different ZKEVM Node components, a `docker-compose.yaml` file for Docker Compose can be used: diff --git a/docs/json-rpc-endpoints.md b/docs/json-rpc-endpoints.md index 798ba494..ad548940 100644 --- a/docs/json-rpc-endpoints.md +++ b/docs/json-rpc-endpoints.md @@ -13,8 +13,8 @@ If the endpoint is not in the list below, it means this specific endpoint is not - `eth_blockNumber` - `eth_call` - - _doesn't support state override at the moment and pending block. Will be implemented [#1990](https://github.com/0xPolygonHermez/zkevm-node/issues/1990)_ - - _doesn't support `from` values that are smart contract addresses. Will be implemented [#2017](https://github.com/0xPolygonHermez/zkevm-node/issues/2017)_ + - _doesn't support state override at the moment and pending block. Will be implemented [#1990](https://github.com/0xPolygon/supernets2-node/issues/1990)_ + - _doesn't support `from` values that are smart contract addresses. Will be implemented [#2017](https://github.com/0xPolygon/supernets2-node/issues/2017)_ - `eth_chainId` - `eth_estimateGas` _* if the block number is set to pending we assume it is the latest_ - `eth_gasPrice` diff --git a/docs/modes.md b/docs/modes.md index d14510da..b3235fb8 100644 --- a/docs/modes.md +++ b/docs/modes.md @@ -19,7 +19,7 @@ By default the config files found in the repository will spin up the Node in JSO This will syncronize with the Trusted Sequencer (run by Polygon). -Use the default [public config file](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/config/environments/public/public.node.config.toml), and make sure the following values are set to: +Use the default [public config file](https://github.com/0xPolygon/supernets2-node/blob/develop/config/environments/public/public.node.config.toml), and make sure the following values are set to: ```toml [RPC] @@ -27,7 +27,7 @@ Use the default [public config file](https://github.com/0xPolygonHermez/zkevm-no SequencerNodeURI = "https://public.zkevm-test.net:2083" ``` -Same goes for the Prover Config ([prover-config.json](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/config/environments/public/public.prover.config.json)): +Same goes for the Prover Config ([prover-config.json](https://github.com/0xPolygon/supernets2-node/blob/develop/config/environments/public/public.prover.config.json)): ```json { @@ -78,7 +78,7 @@ Machine 1: #### Machine 1 -Use default [prover config](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/config/environments/public/public.prover.config.json) but change the following values (`runProverServer` set to true, rest false): +Use default [prover config](https://github.com/0xPolygon/supernets2-node/blob/develop/config/environments/public/public.prover.config.json) but change the following values (`runProverServer` set to true, rest false): For *only* Prover Config (`only-prover-config.json`): diff --git a/docs/production-setup.md b/docs/production-setup.md index f2c373da..9fd17b34 100644 --- a/docs/production-setup.md +++ b/docs/production-setup.md @@ -25,7 +25,7 @@ tl;dr: ZKEVM_NET=mainnet ZKEVM_DIR=./path/to/install # CHANGE THIS ZKEVM_CONFIG_DIR=./path/to/config # CHANGE THIS -curl -L https://github.com/0xPolygonHermez/zkevm-node/releases/latest/download/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip +curl -L https://github.com/0xPolygon/supernets2-node/releases/latest/download/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip cp $ZKEVM_DIR/$ZKEVM_NET/example.env $ZKEVM_CONFIG_DIR/.env # EDIT THIS env file: @@ -41,7 +41,7 @@ Explained step by step: 2. Define installation path: `ZKEVM_DIR=./path/to/install` 3. Define a config directory: `ZKEVM_CONFIG_DIR=./path/to/config` 4. It's recommended to source this env vars in your `~/.bashrc`, `~/.zshrc` or whatever you're using -5. Download and extract the artifacts: `curl -L https://github.com/0xPolygonHermez/zkevm-node/releases/latest/download/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip`. Note you may need to install `unzip` for this command to work +5. Download and extract the artifacts: `curl -L https://github.com/0xPolygon/supernets2-node/releases/latest/download/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip`. Note you may need to install `unzip` for this command to work 6. Copy the file with the env parameters: `cp $ZKEVM_DIR/$ZKEVM_NET/example.env $ZKEVM_CONFIG_DIR/.env` 7. Edit the env file, with your favourite editor. The example will use nano: `nano $ZKEVM_CONFIG_DIR/.env`. This file contains the configuration that anyone should modify. For advanced configuration: 1. Copy the config files into the config directory `cp $ZKEVM_DIR/$ZKEVM_NET/config/environments/public/* $ZKEVM_CONFIG_DIR/` diff --git a/encoding/encoding.go b/encoding/encoding.go index 9bcb9d31..42eaba2e 100644 --- a/encoding/encoding.go +++ b/encoding/encoding.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/0xPolygonHermez/zkevm-node/hex" + "github.com/0xPolygon/supernets2-node/hex" "github.com/ethereum/go-ethereum/common" ) diff --git a/etherman/config.go b/etherman/config.go index b91e4948..ea721240 100644 --- a/etherman/config.go +++ b/etherman/config.go @@ -1,7 +1,7 @@ package etherman import ( - "github.com/0xPolygonHermez/zkevm-node/etherman/etherscan" + "github.com/0xPolygon/supernets2-node/etherman/etherscan" ) // Config represents the configuration of the etherman diff --git a/etherman/datacommittee.go b/etherman/datacommittee.go new file mode 100644 index 00000000..a990dbe5 --- /dev/null +++ b/etherman/datacommittee.go @@ -0,0 +1,64 @@ +package etherman + +import ( + "fmt" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" +) + +// DataCommitteeMember represents a member of the Data Committee +type DataCommitteeMember struct { + Addr common.Address + URL string +} + +// DataCommittee represents a specific committee +type DataCommittee struct { + AddressesHash common.Hash + Members []DataCommitteeMember + RequiredSignatures uint64 +} + +// GetCurrentDataCommittee return the currently registered data committee +func (etherMan *Client) GetCurrentDataCommittee() (*DataCommittee, error) { + addrsHash, err := etherMan.DataCommittee.CommitteeHash(&bind.CallOpts{Pending: false}) + if err != nil { + return nil, fmt.Errorf("error getting CommitteeHash from L1 SC: %w", err) + } + reqSign, err := etherMan.DataCommittee.RequiredAmountOfSignatures(&bind.CallOpts{Pending: false}) + if err != nil { + return nil, fmt.Errorf("error getting RequiredAmountOfSignatures from L1 SC: %w", err) + } + members, err := etherMan.GetCurrentDataCommitteeMembers() + if err != nil { + return nil, err + } + + return &DataCommittee{ + AddressesHash: common.Hash(addrsHash), + RequiredSignatures: reqSign.Uint64(), + Members: members, + }, nil +} + +// GetCurrentDataCommitteeMembers return the currently registered data committee members +func (etherMan *Client) GetCurrentDataCommitteeMembers() ([]DataCommitteeMember, error) { + members := []DataCommitteeMember{} + nMembers, err := etherMan.DataCommittee.GetAmountOfMembers(&bind.CallOpts{Pending: false}) + if err != nil { + return nil, fmt.Errorf("error getting GetAmountOfMembers from L1 SC: %w", err) + } + for i := int64(0); i < nMembers.Int64(); i++ { + member, err := etherMan.DataCommittee.Members(&bind.CallOpts{Pending: false}, big.NewInt(i)) + if err != nil { + return nil, fmt.Errorf("error getting Members %d from L1 SC: %w", i, err) + } + members = append(members, DataCommitteeMember{ + Addr: member.Addr, + URL: member.Url, + }) + } + return members, nil +} diff --git a/etherman/datacommittee_test.go b/etherman/datacommittee_test.go new file mode 100644 index 00000000..c6695355 --- /dev/null +++ b/etherman/datacommittee_test.go @@ -0,0 +1,49 @@ +package etherman + +import ( + "math/big" + "testing" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestUpdateDataCommitteeEvent(t *testing.T) { + // Set up testing environment + etherman, ethBackend, auth, _, _, da := newTestingEnv() + + // Update the committee + requiredAmountOfSignatures := big.NewInt(2) + URLs := []string{"1", "2", "3"} + addrs := []common.Address{ + common.HexToAddress("0x1"), + common.HexToAddress("0x2"), + common.HexToAddress("0x3"), + } + addrsBytes := []byte{} + for _, addr := range addrs { + addrsBytes = append(addrsBytes, addr.Bytes()...) + } + _, err := da.SetupCommittee(auth, requiredAmountOfSignatures, URLs, addrsBytes) + require.NoError(t, err) + ethBackend.Commit() + + // Assert the committee update + actualSetup, err := etherman.GetCurrentDataCommittee() + require.NoError(t, err) + expectedMembers := []DataCommitteeMember{} + expectedSetup := DataCommittee{ + RequiredSignatures: uint64(len(URLs) - 1), + AddressesHash: crypto.Keccak256Hash(addrsBytes), + } + for i, url := range URLs { + expectedMembers = append(expectedMembers, DataCommitteeMember{ + URL: url, + Addr: addrs[i], + }) + } + expectedSetup.Members = expectedMembers + assert.Equal(t, expectedSetup, *actualSetup) +} diff --git a/etherman/etherman.go b/etherman/etherman.go index cec1edf5..8315e159 100644 --- a/etherman/etherman.go +++ b/etherman/etherman.go @@ -2,6 +2,7 @@ package etherman import ( "context" + "crypto/ecdsa" "encoding/json" "errors" "fmt" @@ -12,16 +13,17 @@ import ( "strings" "time" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/etherman/etherscan" - "github.com/0xPolygonHermez/zkevm-node/etherman/ethgasstation" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/matic" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevmglobalexitroot" - ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/etherman/etherscan" + "github.com/0xPolygon/supernets2-node/etherman/ethgasstation" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/matic" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2datacommittee" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2globalexitroot" + ethmanTypes "github.com/0xPolygon/supernets2-node/etherman/types" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -46,7 +48,7 @@ var ( transferOwnershipSignatureHash = crypto.Keccak256Hash([]byte("OwnershipTransferred(address,address)")) emergencyStateActivatedSignatureHash = crypto.Keccak256Hash([]byte("EmergencyStateActivated()")) emergencyStateDeactivatedSignatureHash = crypto.Keccak256Hash([]byte("EmergencyStateDeactivated()")) - updateZkEVMVersionSignatureHash = crypto.Keccak256Hash([]byte("UpdateZkEVMVersion(uint64,uint64,string)")) + updateZkEVMVersionSignatureHash = crypto.Keccak256Hash([]byte("UpdateSupernets2Version(uint64,uint64,string)")) consolidatePendingStateSignatureHash = crypto.Keccak256Hash([]byte("ConsolidatePendingState(uint64,bytes32,uint64)")) setTrustedAggregatorTimeoutSignatureHash = crypto.Keccak256Hash([]byte("SetTrustedAggregatorTimeout(uint64)")) setTrustedAggregatorSignatureHash = crypto.Keccak256Hash([]byte("SetTrustedAggregator(address)")) @@ -115,9 +117,10 @@ type ethereumClient interface { // L1Config represents the configuration of the network used in L1 type L1Config struct { L1ChainID uint64 `json:"chainId"` - ZkEVMAddr common.Address `json:"polygonZkEVMAddress"` + Supernets2Addr common.Address `json:"supernets2Address"` MaticAddr common.Address `json:"maticTokenAddress"` - GlobalExitRootManagerAddr common.Address `json:"polygonZkEVMGlobalExitRootAddress"` + GlobalExitRootManagerAddr common.Address `json:"supernets2GlobalExitRootAddress"` + DataCommitteeAddr common.Address `json:"supernets2DataCommitteeContract"` } type externalGasProviders struct { @@ -128,9 +131,10 @@ type externalGasProviders struct { // Client is a simple implementation of EtherMan. type Client struct { EthClient ethereumClient - ZkEVM *polygonzkevm.Polygonzkevm - GlobalExitRootManager *polygonzkevmglobalexitroot.Polygonzkevmglobalexitroot + Supernets2 *supernets2.Supernets2 + GlobalExitRootManager *supernets2globalexitroot.Supernets2globalexitroot Matic *matic.Matic + DataCommittee *supernets2datacommittee.Supernets2datacommittee SCAddresses []common.Address GasProviders externalGasProviders @@ -148,11 +152,11 @@ func NewClient(cfg Config, l1Config L1Config) (*Client, error) { return nil, err } // Create smc clients - poe, err := polygonzkevm.NewPolygonzkevm(l1Config.ZkEVMAddr, ethClient) + poe, err := supernets2.NewSupernets2(l1Config.Supernets2Addr, ethClient) if err != nil { return nil, err } - globalExitRoot, err := polygonzkevmglobalexitroot.NewPolygonzkevmglobalexitroot(l1Config.GlobalExitRootManagerAddr, ethClient) + globalExitRoot, err := supernets2globalexitroot.NewSupernets2globalexitroot(l1Config.GlobalExitRootManagerAddr, ethClient) if err != nil { return nil, err } @@ -160,8 +164,12 @@ func NewClient(cfg Config, l1Config L1Config) (*Client, error) { if err != nil { return nil, err } + dataCommittee, err := supernets2datacommittee.NewSupernets2datacommittee(l1Config.DataCommitteeAddr, ethClient) + if err != nil { + return nil, err + } var scAddresses []common.Address - scAddresses = append(scAddresses, l1Config.ZkEVMAddr, l1Config.GlobalExitRootManagerAddr) + scAddresses = append(scAddresses, l1Config.Supernets2Addr, l1Config.GlobalExitRootManagerAddr) gProviders := []ethereum.GasPricer{ethClient} if cfg.MultiGasProvider { @@ -176,9 +184,10 @@ func NewClient(cfg Config, l1Config L1Config) (*Client, error) { return &Client{ EthClient: ethClient, - ZkEVM: poe, + Supernets2: poe, Matic: matic, GlobalExitRootManager: globalExitRoot, + DataCommittee: dataCommittee, SCAddresses: scAddresses, GasProviders: externalGasProviders{ MultiGasProvider: cfg.MultiGasProvider, @@ -207,7 +216,7 @@ func (etherMan *Client) VerifyGenBlockNumber(ctx context.Context, genBlockNumber if len(logs) == 0 { return false, fmt.Errorf("the specified genBlockNumber in config file does not contain any forkID event. Please use the proper blockNumber.") } - zkevmVersion, err := etherMan.ZkEVM.ParseUpdateZkEVMVersion(logs[0]) + zkevmVersion, err := etherMan.Supernets2.ParseUpdateSupernets2Version(logs[0]) if err != nil { log.Error("error parsing the forkID event") return false, err @@ -233,7 +242,7 @@ func (etherMan *Client) GetForks(ctx context.Context, genBlockNumber uint64) ([] } var forks []state.ForkIDInterval for i, l := range logs { - zkevmVersion, err := etherMan.ZkEVM.ParseUpdateZkEVMVersion(l) + zkevmVersion, err := etherMan.Supernets2.ParseUpdateSupernets2Version(l) if err != nil { return []state.ForkIDInterval{}, err } @@ -388,7 +397,7 @@ func (etherMan *Client) processEvent(ctx context.Context, vLog types.Log, blocks func (etherMan *Client) updateZkevmVersion(ctx context.Context, vLog types.Log, blocks *[]Block, blocksOrder *map[common.Hash][]Order) error { log.Debug("UpdateZkEVMVersion event detected") - zkevmVersion, err := etherMan.ZkEVM.ParseUpdateZkEVMVersion(vLog) + zkevmVersion, err := etherMan.Supernets2.ParseUpdateSupernets2Version(vLog) if err != nil { log.Error("error parsing UpdateZkEVMVersion event. Error: ", err) return err @@ -469,14 +478,18 @@ func (etherMan *Client) WaitTxToBeMined(ctx context.Context, tx *types.Transacti } // EstimateGasSequenceBatches estimates gas for sending batches -func (etherMan *Client) EstimateGasSequenceBatches(sender common.Address, sequences []ethmanTypes.Sequence) (*types.Transaction, error) { +func (etherMan *Client) EstimateGasSequenceBatches( + sender common.Address, + sequences []ethmanTypes.Sequence, + committeeSignaturesAndAddrs []byte, +) (*types.Transaction, error) { opts, err := etherMan.getAuthByAddress(sender) if err == ErrNotFound { return nil, ErrPrivateKeyNotFound } opts.NoSend = true - tx, err := etherMan.sequenceBatches(opts, sequences) + tx, err := etherMan.sequenceBatches(opts, sequences, committeeSignaturesAndAddrs) if err != nil { return nil, err } @@ -485,7 +498,11 @@ func (etherMan *Client) EstimateGasSequenceBatches(sender common.Address, sequen } // BuildSequenceBatchesTxData builds a []bytes to be sent to the PoE SC method SequenceBatches. -func (etherMan *Client) BuildSequenceBatchesTxData(sender common.Address, sequences []ethmanTypes.Sequence) (to *common.Address, data []byte, err error) { +func (etherMan *Client) BuildSequenceBatchesTxData( + sender common.Address, + sequences []ethmanTypes.Sequence, + committeeSignaturesAndAddrs []byte, +) (to *common.Address, data []byte, err error) { opts, err := etherMan.getAuthByAddress(sender) if err == ErrNotFound { return nil, nil, fmt.Errorf("failed to build sequence batches, err: %w", ErrPrivateKeyNotFound) @@ -496,7 +513,7 @@ func (etherMan *Client) BuildSequenceBatchesTxData(sender common.Address, sequen opts.GasLimit = uint64(1) opts.GasPrice = big.NewInt(1) - tx, err := etherMan.sequenceBatches(opts, sequences) + tx, err := etherMan.sequenceBatches(opts, sequences, committeeSignaturesAndAddrs) if err != nil { return nil, nil, err } @@ -504,11 +521,15 @@ func (etherMan *Client) BuildSequenceBatchesTxData(sender common.Address, sequen return tx.To(), tx.Data(), nil } -func (etherMan *Client) sequenceBatches(opts bind.TransactOpts, sequences []ethmanTypes.Sequence) (*types.Transaction, error) { - var batches []polygonzkevm.PolygonZkEVMBatchData +func (etherMan *Client) sequenceBatches( + opts bind.TransactOpts, + sequences []ethmanTypes.Sequence, + committeeSignaturesAndAddrs []byte, +) (*types.Transaction, error) { + var batches []supernets2.Supernets2BatchData for _, seq := range sequences { - batch := polygonzkevm.PolygonZkEVMBatchData{ - Transactions: seq.BatchL2Data, + batch := supernets2.Supernets2BatchData{ + TransactionsHash: crypto.Keccak256Hash(seq.BatchL2Data), GlobalExitRoot: seq.GlobalExitRoot, Timestamp: uint64(seq.Timestamp), MinForcedTimestamp: uint64(seq.ForcedBatchTimestamp), @@ -517,11 +538,15 @@ func (etherMan *Client) sequenceBatches(opts bind.TransactOpts, sequences []ethm batches = append(batches, batch) } - tx, err := etherMan.ZkEVM.SequenceBatches(&opts, batches, opts.From) + tx, err := etherMan.Supernets2.SequenceBatches(&opts, batches, opts.From, committeeSignaturesAndAddrs) if err != nil { if parsedErr, ok := tryParseError(err); ok { err = parsedErr } + err = fmt.Errorf( + "error sequencing batches: %w, committeeSignaturesAndAddrs %s", + err, common.Bytes2Hex(committeeSignaturesAndAddrs), + ) } return tx, err @@ -552,7 +577,7 @@ func (etherMan *Client) BuildTrustedVerifyBatchesTxData(lastVerifiedBatch, newVe const pendStateNum = 0 // TODO hardcoded for now until we implement the pending state feature - tx, err := etherMan.ZkEVM.VerifyBatchesTrustedAggregator( + tx, err := etherMan.Supernets2.VerifyBatchesTrustedAggregator( &opts, pendStateNum, lastVerifiedBatch, @@ -573,7 +598,7 @@ func (etherMan *Client) BuildTrustedVerifyBatchesTxData(lastVerifiedBatch, newVe // GetSendSequenceFee get super/trusted sequencer fee func (etherMan *Client) GetSendSequenceFee(numBatches uint64) (*big.Int, error) { - f, err := etherMan.ZkEVM.BatchFee(&bind.CallOpts{Pending: false}) + f, err := etherMan.Supernets2.BatchFee(&bind.CallOpts{Pending: false}) if err != nil { return nil, err } @@ -583,12 +608,12 @@ func (etherMan *Client) GetSendSequenceFee(numBatches uint64) (*big.Int, error) // TrustedSequencer gets trusted sequencer address func (etherMan *Client) TrustedSequencer() (common.Address, error) { - return etherMan.ZkEVM.TrustedSequencer(&bind.CallOpts{Pending: false}) + return etherMan.Supernets2.TrustedSequencer(&bind.CallOpts{Pending: false}) } func (etherMan *Client) forcedBatchEvent(ctx context.Context, vLog types.Log, blocks *[]Block, blocksOrder *map[common.Hash][]Order) error { log.Debug("ForceBatch event detected") - fb, err := etherMan.ZkEVM.ParseForceBatch(vLog) + fb, err := etherMan.Supernets2.ParseForceBatch(vLog) if err != nil { return err } @@ -611,7 +636,7 @@ func (etherMan *Client) forcedBatchEvent(ctx context.Context, vLog types.Log, bl txData := tx.Data() // Extract coded txs. // Load contract ABI - abi, err := abi.JSON(strings.NewReader(polygonzkevm.PolygonzkevmABI)) + abi, err := abi.JSON(strings.NewReader(supernets2.Supernets2ABI)) if err != nil { return err } @@ -659,7 +684,7 @@ func (etherMan *Client) forcedBatchEvent(ctx context.Context, vLog types.Log, bl func (etherMan *Client) sequencedBatchesEvent(ctx context.Context, vLog types.Log, blocks *[]Block, blocksOrder *map[common.Hash][]Order) error { log.Debug("SequenceBatches event detected") - sb, err := etherMan.ZkEVM.ParseSequenceBatches(vLog) + sb, err := etherMan.Supernets2.ParseSequenceBatches(vLog) if err != nil { return err } @@ -704,7 +729,7 @@ func (etherMan *Client) sequencedBatchesEvent(ctx context.Context, vLog types.Lo func decodeSequences(txData []byte, lastBatchNumber uint64, sequencer common.Address, txHash common.Hash, nonce uint64) ([]SequencedBatch, error) { // Extract coded txs. // Load contract ABI - abi, err := abi.JSON(strings.NewReader(polygonzkevm.PolygonzkevmABI)) + abi, err := abi.JSON(strings.NewReader(supernets2.Supernets2ABI)) if err != nil { return nil, err } @@ -720,7 +745,7 @@ func decodeSequences(txData []byte, lastBatchNumber uint64, sequencer common.Add if err != nil { return nil, err } - var sequences []polygonzkevm.PolygonZkEVMBatchData + var sequences []supernets2.Supernets2BatchData bytedata, err := json.Marshal(data[0]) if err != nil { return nil, err @@ -734,12 +759,12 @@ func decodeSequences(txData []byte, lastBatchNumber uint64, sequencer common.Add for i, seq := range sequences { bn := lastBatchNumber - uint64(len(sequences)-(i+1)) sequencedBatches[i] = SequencedBatch{ - BatchNumber: bn, - SequencerAddr: sequencer, - TxHash: txHash, - Nonce: nonce, - Coinbase: coinbase, - PolygonZkEVMBatchData: seq, + BatchNumber: bn, + SequencerAddr: sequencer, + TxHash: txHash, + Nonce: nonce, + Coinbase: coinbase, + Supernets2BatchData: seq, } } @@ -748,7 +773,7 @@ func decodeSequences(txData []byte, lastBatchNumber uint64, sequencer common.Add func (etherMan *Client) verifyBatchesTrustedAggregatorEvent(ctx context.Context, vLog types.Log, blocks *[]Block, blocksOrder *map[common.Hash][]Order) error { log.Debug("TrustedVerifyBatches event detected") - vb, err := etherMan.ZkEVM.ParseVerifyBatchesTrustedAggregator(vLog) + vb, err := etherMan.Supernets2.ParseVerifyBatchesTrustedAggregator(vLog) if err != nil { return err } @@ -783,7 +808,7 @@ func (etherMan *Client) verifyBatchesTrustedAggregatorEvent(ctx context.Context, func (etherMan *Client) forceSequencedBatchesEvent(ctx context.Context, vLog types.Log, blocks *[]Block, blocksOrder *map[common.Hash][]Order) error { log.Debug("SequenceForceBatches event detect") - fsb, err := etherMan.ZkEVM.ParseSequenceForceBatches(vLog) + fsb, err := etherMan.Supernets2.ParseSequenceForceBatches(vLog) if err != nil { return err } @@ -830,7 +855,7 @@ func (etherMan *Client) forceSequencedBatchesEvent(ctx context.Context, vLog typ func decodeSequencedForceBatches(txData []byte, lastBatchNumber uint64, sequencer common.Address, txHash common.Hash, block *types.Block, nonce uint64) ([]SequencedForceBatch, error) { // Extract coded txs. // Load contract ABI - abi, err := abi.JSON(strings.NewReader(polygonzkevm.PolygonzkevmABI)) + abi, err := abi.JSON(strings.NewReader(supernets2.Supernets2ABI)) if err != nil { return nil, err } @@ -847,7 +872,7 @@ func decodeSequencedForceBatches(txData []byte, lastBatchNumber uint64, sequence return nil, err } - var forceBatches []polygonzkevm.PolygonZkEVMForcedBatchData + var forceBatches []supernets2.Supernets2ForcedBatchData bytedata, err := json.Marshal(data[0]) if err != nil { return nil, err @@ -861,12 +886,12 @@ func decodeSequencedForceBatches(txData []byte, lastBatchNumber uint64, sequence for i, force := range forceBatches { bn := lastBatchNumber - uint64(len(forceBatches)-(i+1)) sequencedForcedBatches[i] = SequencedForceBatch{ - BatchNumber: bn, - Coinbase: sequencer, - TxHash: txHash, - Timestamp: time.Unix(int64(block.Time()), 0), - Nonce: nonce, - PolygonZkEVMForcedBatchData: force, + BatchNumber: bn, + Coinbase: sequencer, + TxHash: txHash, + Timestamp: time.Unix(int64(block.Time()), 0), + Nonce: nonce, + Supernets2ForcedBatchData: force, } } return sequencedForcedBatches, nil @@ -911,12 +936,12 @@ func (etherMan *Client) EthBlockByNumber(ctx context.Context, blockNumber uint64 // GetLastBatchTimestamp function allows to retrieve the lastTimestamp value in the smc func (etherMan *Client) GetLastBatchTimestamp() (uint64, error) { - return etherMan.ZkEVM.LastTimestamp(&bind.CallOpts{Pending: false}) + return etherMan.Supernets2.LastTimestamp(&bind.CallOpts{Pending: false}) } // GetLatestBatchNumber function allows to retrieve the latest proposed batch in the smc func (etherMan *Client) GetLatestBatchNumber() (uint64, error) { - return etherMan.ZkEVM.LastBatchSequenced(&bind.CallOpts{Pending: false}) + return etherMan.Supernets2.LastBatchSequenced(&bind.CallOpts{Pending: false}) } // GetLatestBlockNumber gets the latest block number from the ethereum @@ -939,7 +964,7 @@ func (etherMan *Client) GetLatestBlockTimestamp(ctx context.Context) (uint64, er // GetLatestVerifiedBatchNum gets latest verified batch from ethereum func (etherMan *Client) GetLatestVerifiedBatchNum() (uint64, error) { - return etherMan.ZkEVM.LastVerifiedBatch(&bind.CallOpts{Pending: false}) + return etherMan.Supernets2.LastVerifiedBatch(&bind.CallOpts{Pending: false}) } // GetTx function get ethereum tx @@ -961,7 +986,7 @@ func (etherMan *Client) ApproveMatic(ctx context.Context, account common.Address if etherMan.GasProviders.MultiGasProvider { opts.GasPrice = etherMan.GetL1GasPrice(ctx) } - tx, err := etherMan.Matic.Approve(&opts, etherMan.l1Cfg.ZkEVMAddr, maticAmount) + tx, err := etherMan.Matic.Approve(&opts, etherMan.l1Cfg.Supernets2Addr, maticAmount) if err != nil { if parsedErr, ok := tryParseError(err); ok { err = parsedErr @@ -974,12 +999,12 @@ func (etherMan *Client) ApproveMatic(ctx context.Context, account common.Address // GetTrustedSequencerURL Gets the trusted sequencer url from rollup smc func (etherMan *Client) GetTrustedSequencerURL() (string, error) { - return etherMan.ZkEVM.TrustedSequencerURL(&bind.CallOpts{Pending: false}) + return etherMan.Supernets2.TrustedSequencerURL(&bind.CallOpts{Pending: false}) } // GetL2ChainID returns L2 Chain ID func (etherMan *Client) GetL2ChainID() (uint64, error) { - return etherMan.ZkEVM.ChainID(&bind.CallOpts{Pending: false}) + return etherMan.Supernets2.ChainID(&bind.CallOpts{Pending: false}) } // GetL2ForkID returns current L2 Fork ID @@ -1093,15 +1118,15 @@ func (etherMan *Client) AddOrReplaceAuth(auth bind.TransactOpts) error { } // LoadAuthFromKeyStore loads an authorization from a key store file -func (etherMan *Client) LoadAuthFromKeyStore(path, password string) (*bind.TransactOpts, error) { - auth, err := newAuthFromKeystore(path, password, etherMan.l1Cfg.L1ChainID) +func (etherMan *Client) LoadAuthFromKeyStore(path, password string) (*bind.TransactOpts, *ecdsa.PrivateKey, error) { + auth, pk, err := newAuthFromKeystore(path, password, etherMan.l1Cfg.L1ChainID) if err != nil { - return nil, err + return nil, nil, err } log.Infof("loaded authorization for address: %v", auth.From.String()) etherMan.auth[auth.From] = auth - return &auth, nil + return &auth, pk, nil } // newKeyFromKeystore creates an instance of a keystore key from a keystore file @@ -1122,20 +1147,20 @@ func newKeyFromKeystore(path, password string) (*keystore.Key, error) { } // newAuthFromKeystore an authorization instance from a keystore file -func newAuthFromKeystore(path, password string, chainID uint64) (bind.TransactOpts, error) { +func newAuthFromKeystore(path, password string, chainID uint64) (bind.TransactOpts, *ecdsa.PrivateKey, error) { log.Infof("reading key from: %v", path) key, err := newKeyFromKeystore(path, password) if err != nil { - return bind.TransactOpts{}, err + return bind.TransactOpts{}, nil, err } if key == nil { - return bind.TransactOpts{}, nil + return bind.TransactOpts{}, nil, nil } auth, err := bind.NewKeyedTransactorWithChainID(key.PrivateKey, new(big.Int).SetUint64(chainID)) if err != nil { - return bind.TransactOpts{}, err + return bind.TransactOpts{}, nil, err } - return *auth, nil + return *auth, key.PrivateKey, nil } // getAuthByAddress tries to get an authorization from the authorizations map diff --git a/etherman/etherman_test.go b/etherman/etherman_test.go index 8985bb2b..1ab4f0a3 100644 --- a/etherman/etherman_test.go +++ b/etherman/etherman_test.go @@ -9,11 +9,12 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevmbridge" - ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2bridge" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2datacommittee" + ethmanTypes "github.com/0xPolygon/supernets2-node/etherman/types" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" @@ -32,7 +33,14 @@ func init() { } // This function prepare the blockchain, the wallet with funds and deploy the smc -func newTestingEnv() (ethman *Client, ethBackend *backends.SimulatedBackend, auth *bind.TransactOpts, maticAddr common.Address, br *polygonzkevmbridge.Polygonzkevmbridge) { +func newTestingEnv() ( + ethman *Client, + ethBackend *backends.SimulatedBackend, + auth *bind.TransactOpts, + maticAddr common.Address, + br *supernets2bridge.Supernets2bridge, + da *supernets2datacommittee.Supernets2datacommittee, +) { privateKey, err := crypto.GenerateKey() if err != nil { log.Fatal(err) @@ -41,7 +49,7 @@ func newTestingEnv() (ethman *Client, ethBackend *backends.SimulatedBackend, aut if err != nil { log.Fatal(err) } - ethman, ethBackend, maticAddr, br, err = NewSimulatedEtherman(Config{}, auth) + ethman, ethBackend, maticAddr, br, da, err = NewSimulatedEtherman(Config{}, auth) if err != nil { log.Fatal(err) } @@ -49,12 +57,13 @@ func newTestingEnv() (ethman *Client, ethBackend *backends.SimulatedBackend, aut if err != nil { log.Fatal(err) } - return ethman, ethBackend, auth, maticAddr, br + + return ethman, ethBackend, auth, maticAddr, br, da } func TestGEREvent(t *testing.T) { // Set up testing environment - etherman, ethBackend, auth, _, br := newTestingEnv() + etherman, ethBackend, auth, _, br, _ := newTestingEnv() // Read currentBlock ctx := context.Background() @@ -83,19 +92,19 @@ func TestGEREvent(t *testing.T) { func TestForcedBatchEvent(t *testing.T) { // Set up testing environment - etherman, ethBackend, auth, _, _ := newTestingEnv() + etherman, ethBackend, auth, _, _, _ := newTestingEnv() // Read currentBlock ctx := context.Background() initBlock, err := etherman.EthClient.BlockByNumber(ctx, nil) require.NoError(t, err) - amount, err := etherman.ZkEVM.GetForcedBatchFee(&bind.CallOpts{Pending: false}) + amount, err := etherman.Supernets2.GetForcedBatchFee(&bind.CallOpts{Pending: false}) require.NoError(t, err) rawTxs := "f84901843b9aca00827b0c945fbdb2315678afecb367f032d93f642f64180aa380a46057361d00000000000000000000000000000000000000000000000000000000000000048203e9808073efe1fa2d3e27f26f32208550ea9b0274d49050b816cadab05a771f4275d0242fd5d92b3fb89575c070e6c930587c520ee65a3aa8cfe382fcad20421bf51d621c" data, err := hex.DecodeString(rawTxs) require.NoError(t, err) - _, err = etherman.ZkEVM.ForceBatch(auth, data, amount) + _, err = etherman.Supernets2.ForceBatch(auth, data, amount) require.NoError(t, err) // Mine the tx in a block @@ -119,7 +128,7 @@ func TestForcedBatchEvent(t *testing.T) { func TestSequencedBatchesEvent(t *testing.T) { // Set up testing environment - etherman, ethBackend, auth, _, br := newTestingEnv() + etherman, ethBackend, auth, _, br, _ := newTestingEnv() // Read currentBlock ctx := context.Background() @@ -137,12 +146,12 @@ func TestSequencedBatchesEvent(t *testing.T) { ger, err := etherman.GlobalExitRootManager.GetLastGlobalExitRoot(nil) require.NoError(t, err) - amount, err := etherman.ZkEVM.GetForcedBatchFee(&bind.CallOpts{Pending: false}) + amount, err := etherman.Supernets2.GetForcedBatchFee(&bind.CallOpts{Pending: false}) require.NoError(t, err) rawTxs := "f84901843b9aca00827b0c945fbdb2315678afecb367f032d93f642f64180aa380a46057361d00000000000000000000000000000000000000000000000000000000000000048203e9808073efe1fa2d3e27f26f32208550ea9b0274d49050b816cadab05a771f4275d0242fd5d92b3fb89575c070e6c930587c520ee65a3aa8cfe382fcad20421bf51d621c" data, err := hex.DecodeString(rawTxs) require.NoError(t, err) - _, err = etherman.ZkEVM.ForceBatch(auth, data, amount) + _, err = etherman.Supernets2.ForceBatch(auth, data, amount) require.NoError(t, err) require.NoError(t, err) ethBackend.Commit() @@ -154,20 +163,20 @@ func TestSequencedBatchesEvent(t *testing.T) { blocks, _, err := etherman.GetRollupInfoByBlockRange(ctx, initBlock.NumberU64(), ¤tBlockNumber) require.NoError(t, err) t.Log("Blocks: ", blocks) - var sequences []polygonzkevm.PolygonZkEVMBatchData - sequences = append(sequences, polygonzkevm.PolygonZkEVMBatchData{ + var sequences []supernets2.Supernets2BatchData + sequences = append(sequences, supernets2.Supernets2BatchData{ GlobalExitRoot: ger, Timestamp: currentBlock.Time(), MinForcedTimestamp: uint64(blocks[2].ForcedBatches[0].ForcedAt.Unix()), - Transactions: common.Hex2Bytes(rawTxs), + TransactionsHash: crypto.Keccak256Hash(common.Hex2Bytes(rawTxs)), }) - sequences = append(sequences, polygonzkevm.PolygonZkEVMBatchData{ + sequences = append(sequences, supernets2.Supernets2BatchData{ GlobalExitRoot: ger, Timestamp: currentBlock.Time() + 1, MinForcedTimestamp: 0, - Transactions: common.Hex2Bytes(rawTxs), + TransactionsHash: crypto.Keccak256Hash(common.Hex2Bytes(rawTxs)), }) - _, err = etherman.ZkEVM.SequenceBatches(auth, sequences, auth.From) + _, err = etherman.Supernets2.SequenceBatches(auth, sequences, auth.From, []byte{}) require.NoError(t, err) // Mine the tx in a block @@ -182,7 +191,7 @@ func TestSequencedBatchesEvent(t *testing.T) { t.Log("Blocks: ", blocks) assert.Equal(t, 4, len(blocks)) assert.Equal(t, 1, len(blocks[3].SequencedBatches)) - assert.Equal(t, common.Hex2Bytes(rawTxs), blocks[3].SequencedBatches[0][1].Transactions) + assert.Equal(t, crypto.Keccak256Hash(common.Hex2Bytes(rawTxs)), common.Hash(blocks[3].SequencedBatches[0][1].TransactionsHash)) assert.Equal(t, currentBlock.Time(), blocks[3].SequencedBatches[0][0].Timestamp) assert.Equal(t, ger, blocks[3].SequencedBatches[0][0].GlobalExitRoot) assert.Equal(t, auth.From, blocks[3].SequencedBatches[0][0].Coinbase) @@ -193,7 +202,7 @@ func TestSequencedBatchesEvent(t *testing.T) { func TestVerifyBatchEvent(t *testing.T) { // Set up testing environment - etherman, ethBackend, auth, _, _ := newTestingEnv() + etherman, ethBackend, auth, _, _, _ := newTestingEnv() // Read currentBlock ctx := context.Background() @@ -202,19 +211,19 @@ func TestVerifyBatchEvent(t *testing.T) { require.NoError(t, err) rawTxs := "f84901843b9aca00827b0c945fbdb2315678afecb367f032d93f642f64180aa380a46057361d00000000000000000000000000000000000000000000000000000000000000048203e9808073efe1fa2d3e27f26f32208550ea9b0274d49050b816cadab05a771f4275d0242fd5d92b3fb89575c070e6c930587c520ee65a3aa8cfe382fcad20421bf51d621c" - tx := polygonzkevm.PolygonZkEVMBatchData{ + tx := supernets2.Supernets2BatchData{ GlobalExitRoot: common.Hash{}, Timestamp: initBlock.Time(), MinForcedTimestamp: 0, - Transactions: common.Hex2Bytes(rawTxs), + TransactionsHash: crypto.Keccak256Hash(common.Hex2Bytes(rawTxs)), } - _, err = etherman.ZkEVM.SequenceBatches(auth, []polygonzkevm.PolygonZkEVMBatchData{tx}, auth.From) + _, err = etherman.Supernets2.SequenceBatches(auth, []supernets2.Supernets2BatchData{tx}, auth.From, []byte{}) require.NoError(t, err) // Mine the tx in a block ethBackend.Commit() - _, err = etherman.ZkEVM.VerifyBatchesTrustedAggregator(auth, uint64(0), uint64(0), uint64(1), [32]byte{}, [32]byte{}, []byte{}) + _, err = etherman.Supernets2.VerifyBatchesTrustedAggregator(auth, uint64(0), uint64(0), uint64(1), [32]byte{}, [32]byte{}, []byte{}) require.NoError(t, err) // Mine the tx in a block @@ -239,19 +248,19 @@ func TestVerifyBatchEvent(t *testing.T) { func TestSequenceForceBatchesEvent(t *testing.T) { // Set up testing environment - etherman, ethBackend, auth, _, _ := newTestingEnv() + etherman, ethBackend, auth, _, _, _ := newTestingEnv() // Read currentBlock ctx := context.Background() initBlock, err := etherman.EthClient.BlockByNumber(ctx, nil) require.NoError(t, err) - amount, err := etherman.ZkEVM.GetForcedBatchFee(&bind.CallOpts{Pending: false}) + amount, err := etherman.Supernets2.GetForcedBatchFee(&bind.CallOpts{Pending: false}) require.NoError(t, err) rawTxs := "f84901843b9aca00827b0c945fbdb2315678afecb367f032d93f642f64180aa380a46057361d00000000000000000000000000000000000000000000000000000000000000048203e9808073efe1fa2d3e27f26f32208550ea9b0274d49050b816cadab05a771f4275d0242fd5d92b3fb89575c070e6c930587c520ee65a3aa8cfe382fcad20421bf51d621c" data, err := hex.DecodeString(rawTxs) require.NoError(t, err) - _, err = etherman.ZkEVM.ForceBatch(auth, data, amount) + _, err = etherman.Supernets2.ForceBatch(auth, data, amount) require.NoError(t, err) ethBackend.Commit() @@ -267,12 +276,12 @@ func TestSequenceForceBatchesEvent(t *testing.T) { require.NoError(t, err) t.Log("Blocks: ", blocks) - forceBatchData := polygonzkevm.PolygonZkEVMForcedBatchData{ + forceBatchData := supernets2.Supernets2ForcedBatchData{ Transactions: blocks[1].ForcedBatches[0].RawTxsData, GlobalExitRoot: blocks[1].ForcedBatches[0].GlobalExitRoot, MinForcedTimestamp: uint64(blocks[1].ForcedBatches[0].ForcedAt.Unix()), } - _, err = etherman.ZkEVM.SequenceForceBatches(auth, []polygonzkevm.PolygonZkEVMForcedBatchData{forceBatchData}) + _, err = etherman.Supernets2.SequenceForceBatches(auth, []supernets2.Supernets2ForcedBatchData{forceBatchData}) require.NoError(t, err) ethBackend.Commit() @@ -291,7 +300,7 @@ func TestSequenceForceBatchesEvent(t *testing.T) { func TestSendSequences(t *testing.T) { // Set up testing environment - etherman, ethBackend, auth, _, br := newTestingEnv() + etherman, ethBackend, auth, _, br, _ := newTestingEnv() // Read currentBlock ctx := context.Background() @@ -320,7 +329,7 @@ func TestSendSequences(t *testing.T) { Timestamp: int64(currentBlock.Time() - 1), BatchL2Data: batchL2Data, } - tx, err := etherman.sequenceBatches(*auth, []ethmanTypes.Sequence{sequence}) + tx, err := etherman.sequenceBatches(*auth, []ethmanTypes.Sequence{sequence}, []byte{}) require.NoError(t, err) log.Debug("TX: ", tx.Hash()) ethBackend.Commit() @@ -344,7 +353,7 @@ func TestSendSequences(t *testing.T) { func TestGasPrice(t *testing.T) { // Set up testing environment - etherman, _, _, _, _ := newTestingEnv() + etherman, _, _, _, _, _ := newTestingEnv() etherscanM := new(etherscanMock) ethGasStationM := new(ethGasStationMock) etherman.GasProviders.Providers = []ethereum.GasPricer{etherman.EthClient, etherscanM, ethGasStationM} @@ -363,7 +372,7 @@ func TestGasPrice(t *testing.T) { func TestErrorEthGasStationPrice(t *testing.T) { // Set up testing environment - etherman, _, _, _, _ := newTestingEnv() + etherman, _, _, _, _, _ := newTestingEnv() ethGasStationM := new(ethGasStationMock) etherman.GasProviders.Providers = []ethereum.GasPricer{etherman.EthClient, ethGasStationM} ctx := context.Background() @@ -382,7 +391,7 @@ func TestErrorEthGasStationPrice(t *testing.T) { func TestErrorEtherScanPrice(t *testing.T) { // Set up testing environment - etherman, _, _, _, _ := newTestingEnv() + etherman, _, _, _, _, _ := newTestingEnv() etherscanM := new(etherscanMock) ethGasStationM := new(ethGasStationMock) etherman.GasProviders.Providers = []ethereum.GasPricer{etherman.EthClient, etherscanM, ethGasStationM} @@ -396,7 +405,7 @@ func TestErrorEtherScanPrice(t *testing.T) { func TestGetForks(t *testing.T) { // Set up testing environment - etherman, _, _, _, _ := newTestingEnv() + etherman, _, _, _, _, _ := newTestingEnv() ctx := context.Background() forks, err := etherman.GetForks(ctx, 0) require.NoError(t, err) diff --git a/etherman/etherscan/etherscan.go b/etherman/etherscan/etherscan.go index b83f75f0..0b1e6b4c 100644 --- a/etherman/etherscan/etherscan.go +++ b/etherman/etherscan/etherscan.go @@ -8,7 +8,7 @@ import ( "math/big" "net/http" - "github.com/0xPolygonHermez/zkevm-node/encoding" + "github.com/0xPolygon/supernets2-node/encoding" ) type etherscanResponse struct { diff --git a/etherman/etherscan/etherscan_test.go b/etherman/etherscan/etherscan_test.go index c55999b1..5b7a65cf 100644 --- a/etherman/etherscan/etherscan_test.go +++ b/etherman/etherscan/etherscan_test.go @@ -8,7 +8,7 @@ import ( "net/http/httptest" "testing" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/etherman/ethgasstation/ethgasstation.go b/etherman/ethgasstation/ethgasstation.go index 571ca2df..b8bbd188 100644 --- a/etherman/ethgasstation/ethgasstation.go +++ b/etherman/ethgasstation/ethgasstation.go @@ -8,7 +8,7 @@ import ( "math/big" "net/http" - "github.com/0xPolygonHermez/zkevm-node/encoding" + "github.com/0xPolygon/supernets2-node/encoding" ) type ethGasStationResponse struct { diff --git a/etherman/ethgasstation/ethgasstation_test.go b/etherman/ethgasstation/ethgasstation_test.go index eaffadfd..44173413 100644 --- a/etherman/ethgasstation/ethgasstation_test.go +++ b/etherman/ethgasstation/ethgasstation_test.go @@ -8,7 +8,7 @@ import ( "net/http/httptest" "testing" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/etherman/simulated.go b/etherman/simulated.go index 28e31628..60160140 100644 --- a/etherman/simulated.go +++ b/etherman/simulated.go @@ -5,11 +5,12 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/matic" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/mockverifier" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevmbridge" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevmglobalexitroot" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/matic" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/mockverifier" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2bridge" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2datacommittee" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2globalexitroot" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" "github.com/ethereum/go-ethereum/common" @@ -19,10 +20,17 @@ import ( // NewSimulatedEtherman creates an etherman that uses a simulated blockchain. It's important to notice that the ChainID of the auth // must be 1337. The address that holds the auth will have an initial balance of 10 ETH -func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) (etherman *Client, ethBackend *backends.SimulatedBackend, maticAddr common.Address, br *polygonzkevmbridge.Polygonzkevmbridge, err error) { +func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) ( + etherman *Client, + ethBackend *backends.SimulatedBackend, + maticAddr common.Address, + br *supernets2bridge.Supernets2bridge, + da *supernets2datacommittee.Supernets2datacommittee, + err error, +) { if auth == nil { // read only client - return &Client{}, nil, common.Address{}, nil, nil + return &Client{}, nil, common.Address{}, nil, nil, nil } // 10000000 ETH in wei balance, _ := new(big.Int).SetString("10000000000000000000000000", 10) //nolint:gomnd @@ -35,44 +43,58 @@ func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) (etherman *Client blockGasLimit := uint64(999999999999999999) //nolint:gomnd client := backends.NewSimulatedBackend(genesisAlloc, blockGasLimit) + // DAC Setup + dataCommitteeAddr, _, da, err := supernets2datacommittee.DeploySupernets2datacommittee(auth, client) + if err != nil { + return nil, nil, common.Address{}, nil, nil, err + } + _, err = da.Initialize(auth) + if err != nil { + return nil, nil, common.Address{}, nil, nil, err + } + _, err = da.SetupCommittee(auth, big.NewInt(0), []string{}, []byte{}) + if err != nil { + return nil, nil, common.Address{}, nil, nil, err + } + // Deploy contracts const maticDecimalPlaces = 18 totalSupply, _ := new(big.Int).SetString("10000000000000000000000000000", 10) //nolint:gomnd maticAddr, _, maticContract, err := matic.DeployMatic(auth, client, "Matic Token", "MATIC", maticDecimalPlaces, totalSupply) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } rollupVerifierAddr, _, _, err := mockverifier.DeployMockverifier(auth, client) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } nonce, err := client.PendingNonceAt(context.TODO(), auth.From) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } const posBridge = 1 calculatedBridgeAddr := crypto.CreateAddress(auth.From, nonce+posBridge) const posPoE = 2 calculatedPoEAddr := crypto.CreateAddress(auth.From, nonce+posPoE) genesis := common.HexToHash("0xfd3434cd8f67e59d73488a2b8da242dd1f02849ea5dd99f0ca22c836c3d5b4a9") // Random value. Needs to be different to 0x0 - exitManagerAddr, _, globalExitRoot, err := polygonzkevmglobalexitroot.DeployPolygonzkevmglobalexitroot(auth, client, calculatedPoEAddr, calculatedBridgeAddr) + exitManagerAddr, _, globalExitRoot, err := supernets2globalexitroot.DeploySupernets2globalexitroot(auth, client, calculatedPoEAddr, calculatedBridgeAddr) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } - bridgeAddr, _, br, err := polygonzkevmbridge.DeployPolygonzkevmbridge(auth, client) + bridgeAddr, _, br, err := supernets2bridge.DeploySupernets2bridge(auth, client) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } - poeAddr, _, poe, err := polygonzkevm.DeployPolygonzkevm(auth, client, exitManagerAddr, maticAddr, rollupVerifierAddr, bridgeAddr, 1000, 1) //nolint + poeAddr, _, poe, err := supernets2.DeploySupernets2(auth, client, exitManagerAddr, maticAddr, rollupVerifierAddr, bridgeAddr, dataCommitteeAddr, 1000, 1) //nolint if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } _, err = br.Initialize(auth, 0, exitManagerAddr, poeAddr) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } - poeParams := polygonzkevm.PolygonZkEVMInitializePackedParameters{ + poeParams := supernets2.Supernets2InitializePackedParameters{ Admin: auth.From, TrustedSequencer: auth.From, PendingStateTimeout: 10000, //nolint:gomnd @@ -81,15 +103,15 @@ func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) (etherman *Client } _, err = poe.Initialize(auth, poeParams, genesis, "http://localhost", "L2", "v1") //nolint:gomnd if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } if calculatedBridgeAddr != bridgeAddr { - return nil, nil, common.Address{}, nil, fmt.Errorf("bridgeAddr (%s) is different from the expected contract address (%s)", + return nil, nil, common.Address{}, nil, nil, fmt.Errorf("bridgeAddr (%s) is different from the expected contract address (%s)", bridgeAddr.String(), calculatedBridgeAddr.String()) } if calculatedPoEAddr != poeAddr { - return nil, nil, common.Address{}, nil, fmt.Errorf("poeAddr (%s) is different from the expected contract address (%s)", + return nil, nil, common.Address{}, nil, nil, fmt.Errorf("poeAddr (%s) is different from the expected contract address (%s)", poeAddr.String(), calculatedPoEAddr.String()) } @@ -97,29 +119,30 @@ func NewSimulatedEtherman(cfg Config, auth *bind.TransactOpts) (etherman *Client approvedAmount, _ := new(big.Int).SetString("10000000000000000000000", 10) //nolint:gomnd _, err = maticContract.Approve(auth, bridgeAddr, approvedAmount) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } _, err = maticContract.Approve(auth, poeAddr, approvedAmount) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } _, err = poe.ActivateForceBatches(auth) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } client.Commit() c := &Client{ EthClient: client, - ZkEVM: poe, + Supernets2: poe, Matic: maticContract, GlobalExitRootManager: globalExitRoot, - SCAddresses: []common.Address{poeAddr, exitManagerAddr}, + DataCommittee: da, + SCAddresses: []common.Address{poeAddr, exitManagerAddr, dataCommitteeAddr}, auth: map[common.Address]bind.TransactOpts{}, } err = c.AddOrReplaceAuth(*auth) if err != nil { - return nil, nil, common.Address{}, nil, err + return nil, nil, common.Address{}, nil, nil, err } - return c, client, maticAddr, br, nil + return c, client, maticAddr, br, da, nil } diff --git a/etherman/smartcontracts/abi/polygonzkevm.abi b/etherman/smartcontracts/abi/polygonzkevm.abi deleted file mode 100644 index 75e28943..00000000 --- a/etherman/smartcontracts/abi/polygonzkevm.abi +++ /dev/null @@ -1,1709 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract IPolygonZkEVMGlobalExitRoot", - "name": "_globalExitRootManager", - "type": "address" - }, - { - "internalType": "contract IERC20Upgradeable", - "name": "_matic", - "type": "address" - }, - { - "internalType": "contract IVerifierRollup", - "name": "_rollupVerifier", - "type": "address" - }, - { - "internalType": "contract IPolygonZkEVMBridge", - "name": "_bridgeAddress", - "type": "address" - }, - { - "internalType": "uint64", - "name": "_chainID", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "_forkID", - "type": "uint64" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "BatchAlreadyVerified", - "type": "error" - }, - { - "inputs": [], - "name": "BatchNotSequencedOrNotSequenceEnd", - "type": "error" - }, - { - "inputs": [], - "name": "ExceedMaxVerifyBatches", - "type": "error" - }, - { - "inputs": [], - "name": "FinalNumBatchBelowLastVerifiedBatch", - "type": "error" - }, - { - "inputs": [], - "name": "FinalNumBatchDoesNotMatchPendingState", - "type": "error" - }, - { - "inputs": [], - "name": "FinalPendingStateNumInvalid", - "type": "error" - }, - { - "inputs": [], - "name": "ForceBatchNotAllowed", - "type": "error" - }, - { - "inputs": [], - "name": "ForceBatchTimeoutNotExpired", - "type": "error" - }, - { - "inputs": [], - "name": "ForceBatchesAlreadyActive", - "type": "error" - }, - { - "inputs": [], - "name": "ForceBatchesOverflow", - "type": "error" - }, - { - "inputs": [], - "name": "ForcedDataDoesNotMatch", - "type": "error" - }, - { - "inputs": [], - "name": "GlobalExitRootNotExist", - "type": "error" - }, - { - "inputs": [], - "name": "HaltTimeoutNotExpired", - "type": "error" - }, - { - "inputs": [], - "name": "InitNumBatchAboveLastVerifiedBatch", - "type": "error" - }, - { - "inputs": [], - "name": "InitNumBatchDoesNotMatchPendingState", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidProof", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRangeBatchTimeTarget", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRangeForceBatchTimeout", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRangeMultiplierBatchFee", - "type": "error" - }, - { - "inputs": [], - "name": "NewAccInputHashDoesNotExist", - "type": "error" - }, - { - "inputs": [], - "name": "NewPendingStateTimeoutMustBeLower", - "type": "error" - }, - { - "inputs": [], - "name": "NewStateRootNotInsidePrime", - "type": "error" - }, - { - "inputs": [], - "name": "NewTrustedAggregatorTimeoutMustBeLower", - "type": "error" - }, - { - "inputs": [], - "name": "NotEnoughMaticAmount", - "type": "error" - }, - { - "inputs": [], - "name": "OldAccInputHashDoesNotExist", - "type": "error" - }, - { - "inputs": [], - "name": "OldStateRootDoesNotExist", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyAdmin", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyEmergencyState", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyNotEmergencyState", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyPendingAdmin", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyTrustedAggregator", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyTrustedSequencer", - "type": "error" - }, - { - "inputs": [], - "name": "PendingStateDoesNotExist", - "type": "error" - }, - { - "inputs": [], - "name": "PendingStateInvalid", - "type": "error" - }, - { - "inputs": [], - "name": "PendingStateNotConsolidable", - "type": "error" - }, - { - "inputs": [], - "name": "PendingStateTimeoutExceedHaltAggregationTimeout", - "type": "error" - }, - { - "inputs": [], - "name": "SequenceZeroBatches", - "type": "error" - }, - { - "inputs": [], - "name": "SequencedTimestampBelowForcedTimestamp", - "type": "error" - }, - { - "inputs": [], - "name": "SequencedTimestampInvalid", - "type": "error" - }, - { - "inputs": [], - "name": "StoredRootMustBeDifferentThanNewRoot", - "type": "error" - }, - { - "inputs": [], - "name": "TransactionsLengthAboveMax", - "type": "error" - }, - { - "inputs": [], - "name": "TrustedAggregatorTimeoutExceedHaltAggregationTimeout", - "type": "error" - }, - { - "inputs": [], - "name": "TrustedAggregatorTimeoutNotExpired", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AcceptAdminRole", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "ActivateForceBatches", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "numBatch", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "stateRoot", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "uint64", - "name": "pendingStateNum", - "type": "uint64" - } - ], - "name": "ConsolidatePendingState", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "EmergencyStateActivated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "EmergencyStateDeactivated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "forceBatchNum", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "lastGlobalExitRoot", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "address", - "name": "sequencer", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "transactions", - "type": "bytes" - } - ], - "name": "ForceBatch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "numBatch", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "stateRoot", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "aggregator", - "type": "address" - } - ], - "name": "OverridePendingState", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "storedStateRoot", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "provedStateRoot", - "type": "bytes32" - } - ], - "name": "ProveNonDeterministicPendingState", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "numBatch", - "type": "uint64" - } - ], - "name": "SequenceBatches", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "numBatch", - "type": "uint64" - } - ], - "name": "SequenceForceBatches", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "newforceBatchTimeout", - "type": "uint64" - } - ], - "name": "SetForceBatchTimeout", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint16", - "name": "newMultiplierBatchFee", - "type": "uint16" - } - ], - "name": "SetMultiplierBatchFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "newPendingStateTimeout", - "type": "uint64" - } - ], - "name": "SetPendingStateTimeout", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "newTrustedAggregator", - "type": "address" - } - ], - "name": "SetTrustedAggregator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "newTrustedAggregatorTimeout", - "type": "uint64" - } - ], - "name": "SetTrustedAggregatorTimeout", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "newTrustedSequencer", - "type": "address" - } - ], - "name": "SetTrustedSequencer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "string", - "name": "newTrustedSequencerURL", - "type": "string" - } - ], - "name": "SetTrustedSequencerURL", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "newVerifyBatchTimeTarget", - "type": "uint64" - } - ], - "name": "SetVerifyBatchTimeTarget", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "TransferAdminRole", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "numBatch", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "forkID", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "string", - "name": "version", - "type": "string" - } - ], - "name": "UpdateZkEVMVersion", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "numBatch", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "stateRoot", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "aggregator", - "type": "address" - } - ], - "name": "VerifyBatches", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint64", - "name": "numBatch", - "type": "uint64" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "stateRoot", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "aggregator", - "type": "address" - } - ], - "name": "VerifyBatchesTrustedAggregator", - "type": "event" - }, - { - "inputs": [], - "name": "acceptAdminRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "sequencedBatchNum", - "type": "uint64" - } - ], - "name": "activateEmergencyState", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "activateForceBatches", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "batchFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "name": "batchNumToStateRoot", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bridgeAddress", - "outputs": [ - { - "internalType": "contract IPolygonZkEVMBridge", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "calculateRewardPerBatch", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "chainID", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newStateRoot", - "type": "uint256" - } - ], - "name": "checkStateRootInsidePrime", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "pendingStateNum", - "type": "uint64" - } - ], - "name": "consolidatePendingState", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "deactivateEmergencyState", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "transactions", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "maticAmount", - "type": "uint256" - } - ], - "name": "forceBatch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "forceBatchTimeout", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "name": "forcedBatches", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "forkID", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getForcedBatchFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "initNumBatch", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "finalNewBatch", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "newLocalExitRoot", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "oldStateRoot", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "newStateRoot", - "type": "bytes32" - } - ], - "name": "getInputSnarkBytes", - "outputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLastVerifiedBatch", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "globalExitRootManager", - "outputs": [ - { - "internalType": "contract IPolygonZkEVMGlobalExitRoot", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "admin", - "type": "address" - }, - { - "internalType": "address", - "name": "trustedSequencer", - "type": "address" - }, - { - "internalType": "uint64", - "name": "pendingStateTimeout", - "type": "uint64" - }, - { - "internalType": "address", - "name": "trustedAggregator", - "type": "address" - }, - { - "internalType": "uint64", - "name": "trustedAggregatorTimeout", - "type": "uint64" - } - ], - "internalType": "struct PolygonZkEVM.InitializePackedParameters", - "name": "initializePackedParameters", - "type": "tuple" - }, - { - "internalType": "bytes32", - "name": "genesisRoot", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "_trustedSequencerURL", - "type": "string" - }, - { - "internalType": "string", - "name": "_networkName", - "type": "string" - }, - { - "internalType": "string", - "name": "_version", - "type": "string" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isEmergencyState", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isForcedBatchDisallowed", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "pendingStateNum", - "type": "uint64" - } - ], - "name": "isPendingStateConsolidable", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastBatchSequenced", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastForceBatch", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastForceBatchSequenced", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastPendingState", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastPendingStateConsolidated", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastTimestamp", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastVerifiedBatch", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "matic", - "outputs": [ - { - "internalType": "contract IERC20Upgradeable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "multiplierBatchFee", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "networkName", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "initPendingStateNum", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "finalPendingStateNum", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "initNumBatch", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "finalNewBatch", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "newLocalExitRoot", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "newStateRoot", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "proof", - "type": "bytes" - } - ], - "name": "overridePendingState", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingStateTimeout", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "pendingStateTransitions", - "outputs": [ - { - "internalType": "uint64", - "name": "timestamp", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "lastVerifiedBatch", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "exitRoot", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "stateRoot", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "initPendingStateNum", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "finalPendingStateNum", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "initNumBatch", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "finalNewBatch", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "newLocalExitRoot", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "newStateRoot", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "proof", - "type": "bytes" - } - ], - "name": "proveNonDeterministicPendingState", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rollupVerifier", - "outputs": [ - { - "internalType": "contract IVerifierRollup", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes", - "name": "transactions", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "globalExitRoot", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "timestamp", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "minForcedTimestamp", - "type": "uint64" - } - ], - "internalType": "struct PolygonZkEVM.BatchData[]", - "name": "batches", - "type": "tuple[]" - }, - { - "internalType": "address", - "name": "l2Coinbase", - "type": "address" - } - ], - "name": "sequenceBatches", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes", - "name": "transactions", - "type": "bytes" - }, - { - "internalType": "bytes32", - "name": "globalExitRoot", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "minForcedTimestamp", - "type": "uint64" - } - ], - "internalType": "struct PolygonZkEVM.ForcedBatchData[]", - "name": "batches", - "type": "tuple[]" - } - ], - "name": "sequenceForceBatches", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "name": "sequencedBatches", - "outputs": [ - { - "internalType": "bytes32", - "name": "accInputHash", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "sequencedTimestamp", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "previousLastBatchSequenced", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "newforceBatchTimeout", - "type": "uint64" - } - ], - "name": "setForceBatchTimeout", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "newMultiplierBatchFee", - "type": "uint16" - } - ], - "name": "setMultiplierBatchFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "newPendingStateTimeout", - "type": "uint64" - } - ], - "name": "setPendingStateTimeout", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newTrustedAggregator", - "type": "address" - } - ], - "name": "setTrustedAggregator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "newTrustedAggregatorTimeout", - "type": "uint64" - } - ], - "name": "setTrustedAggregatorTimeout", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newTrustedSequencer", - "type": "address" - } - ], - "name": "setTrustedSequencer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "newTrustedSequencerURL", - "type": "string" - } - ], - "name": "setTrustedSequencerURL", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "newVerifyBatchTimeTarget", - "type": "uint64" - } - ], - "name": "setVerifyBatchTimeTarget", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "transferAdminRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "trustedAggregator", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "trustedAggregatorTimeout", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "trustedSequencer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "trustedSequencerURL", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "verifyBatchTimeTarget", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "pendingStateNum", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "initNumBatch", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "finalNewBatch", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "newLocalExitRoot", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "newStateRoot", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "proof", - "type": "bytes" - } - ], - "name": "verifyBatches", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "pendingStateNum", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "initNumBatch", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "finalNewBatch", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "newLocalExitRoot", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "newStateRoot", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "proof", - "type": "bytes" - } - ], - "name": "verifyBatchesTrustedAggregator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/etherman/smartcontracts/abi/polygonzkevmbridge.abi b/etherman/smartcontracts/abi/polygonzkevmbridge.abi deleted file mode 100644 index f7547c00..00000000 --- a/etherman/smartcontracts/abi/polygonzkevmbridge.abi +++ /dev/null @@ -1,774 +0,0 @@ -[ - { - "inputs": [], - "name": "AlreadyClaimed", - "type": "error" - }, - { - "inputs": [], - "name": "AmountDoesNotMatchMsgValue", - "type": "error" - }, - { - "inputs": [], - "name": "DestinationNetworkInvalid", - "type": "error" - }, - { - "inputs": [], - "name": "EtherTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "GlobalExitRootInvalid", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidSmtProof", - "type": "error" - }, - { - "inputs": [], - "name": "MerkleTreeFull", - "type": "error" - }, - { - "inputs": [], - "name": "MessageFailed", - "type": "error" - }, - { - "inputs": [], - "name": "MsgValueNotZero", - "type": "error" - }, - { - "inputs": [], - "name": "NotValidAmount", - "type": "error" - }, - { - "inputs": [], - "name": "NotValidOwner", - "type": "error" - }, - { - "inputs": [], - "name": "NotValidSignature", - "type": "error" - }, - { - "inputs": [], - "name": "NotValidSpender", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyEmergencyState", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyNotEmergencyState", - "type": "error" - }, - { - "inputs": [], - "name": "OnlyPolygonZkEVM", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "leafType", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "originNetwork", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "address", - "name": "originAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "destinationNetwork", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "metadata", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "depositCount", - "type": "uint32" - } - ], - "name": "BridgeEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "index", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "originNetwork", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "address", - "name": "originAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ClaimEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "EmergencyStateActivated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "EmergencyStateDeactivated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint32", - "name": "originNetwork", - "type": "uint32" - }, - { - "indexed": false, - "internalType": "address", - "name": "originTokenAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "wrappedTokenAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "metadata", - "type": "bytes" - } - ], - "name": "NewWrappedToken", - "type": "event" - }, - { - "inputs": [], - "name": "activateEmergencyState", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "destinationNetwork", - "type": "uint32" - }, - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "bool", - "name": "forceUpdateGlobalExitRoot", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "permitData", - "type": "bytes" - } - ], - "name": "bridgeAsset", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "destinationNetwork", - "type": "uint32" - }, - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "bool", - "name": "forceUpdateGlobalExitRoot", - "type": "bool" - }, - { - "internalType": "bytes", - "name": "metadata", - "type": "bytes" - } - ], - "name": "bridgeMessage", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[32]", - "name": "smtProof", - "type": "bytes32[32]" - }, - { - "internalType": "uint32", - "name": "index", - "type": "uint32" - }, - { - "internalType": "bytes32", - "name": "mainnetExitRoot", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "rollupExitRoot", - "type": "bytes32" - }, - { - "internalType": "uint32", - "name": "originNetwork", - "type": "uint32" - }, - { - "internalType": "address", - "name": "originTokenAddress", - "type": "address" - }, - { - "internalType": "uint32", - "name": "destinationNetwork", - "type": "uint32" - }, - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "metadata", - "type": "bytes" - } - ], - "name": "claimAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[32]", - "name": "smtProof", - "type": "bytes32[32]" - }, - { - "internalType": "uint32", - "name": "index", - "type": "uint32" - }, - { - "internalType": "bytes32", - "name": "mainnetExitRoot", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "rollupExitRoot", - "type": "bytes32" - }, - { - "internalType": "uint32", - "name": "originNetwork", - "type": "uint32" - }, - { - "internalType": "address", - "name": "originAddress", - "type": "address" - }, - { - "internalType": "uint32", - "name": "destinationNetwork", - "type": "uint32" - }, - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "metadata", - "type": "bytes" - } - ], - "name": "claimMessage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "claimedBitMap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "deactivateEmergencyState", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "depositCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getDepositRoot", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "leafType", - "type": "uint8" - }, - { - "internalType": "uint32", - "name": "originNetwork", - "type": "uint32" - }, - { - "internalType": "address", - "name": "originAddress", - "type": "address" - }, - { - "internalType": "uint32", - "name": "destinationNetwork", - "type": "uint32" - }, - { - "internalType": "address", - "name": "destinationAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "metadataHash", - "type": "bytes32" - } - ], - "name": "getLeafValue", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "originNetwork", - "type": "uint32" - }, - { - "internalType": "address", - "name": "originTokenAddress", - "type": "address" - } - ], - "name": "getTokenWrappedAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "globalExitRootManager", - "outputs": [ - { - "internalType": "contract IBasePolygonZkEVMGlobalExitRoot", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "_networkID", - "type": "uint32" - }, - { - "internalType": "contract IBasePolygonZkEVMGlobalExitRoot", - "name": "_globalExitRootManager", - "type": "address" - }, - { - "internalType": "address", - "name": "_polygonZkEVMaddress", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "isClaimed", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isEmergencyState", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastUpdatedDepositCount", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "networkID", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "polygonZkEVMaddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint32", - "name": "originNetwork", - "type": "uint32" - }, - { - "internalType": "address", - "name": "originTokenAddress", - "type": "address" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "decimals", - "type": "uint8" - } - ], - "name": "precalculatedWrapperAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "tokenInfoToWrappedToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "updateGlobalExitRoot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "leafHash", - "type": "bytes32" - }, - { - "internalType": "bytes32[32]", - "name": "smtProof", - "type": "bytes32[32]" - }, - { - "internalType": "uint32", - "name": "index", - "type": "uint32" - }, - { - "internalType": "bytes32", - "name": "root", - "type": "bytes32" - } - ], - "name": "verifyMerkleProof", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "wrappedTokenToTokenInfo", - "outputs": [ - { - "internalType": "uint32", - "name": "originNetwork", - "type": "uint32" - }, - { - "internalType": "address", - "name": "originTokenAddress", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/etherman/smartcontracts/abi/polygonzkevmglobalexitroot.abi b/etherman/smartcontracts/abi/polygonzkevmglobalexitroot.abi deleted file mode 100644 index 85f18141..00000000 --- a/etherman/smartcontracts/abi/polygonzkevmglobalexitroot.abi +++ /dev/null @@ -1,139 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "_rollupAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "_bridgeAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "OnlyAllowedContracts", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "mainnetExitRoot", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "rollupExitRoot", - "type": "bytes32" - } - ], - "name": "UpdateGlobalExitRoot", - "type": "event" - }, - { - "inputs": [], - "name": "bridgeAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLastGlobalExitRoot", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "globalExitRootMap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastMainnetExitRoot", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastRollupExitRoot", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rollupAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "newRoot", - "type": "bytes32" - } - ], - "name": "updateExitRoot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/etherman/smartcontracts/abi/supernets2.abi b/etherman/smartcontracts/abi/supernets2.abi new file mode 100644 index 00000000..ac45d7f3 --- /dev/null +++ b/etherman/smartcontracts/abi/supernets2.abi @@ -0,0 +1,1732 @@ +[ + { + "inputs": [ + { + "internalType": "contract ISupernets2GlobalExitRoot", + "name": "_globalExitRootManager", + "type": "address" + }, + { + "internalType": "contract IERC20Upgradeable", + "name": "_matic", + "type": "address" + }, + { + "internalType": "contract IVerifierRollup", + "name": "_rollupVerifier", + "type": "address" + }, + { + "internalType": "contract ISupernets2Bridge", + "name": "_bridgeAddress", + "type": "address" + }, + { + "internalType": "contract ISupernets2DataCommittee", + "name": "_dataCommitteeAddress", + "type": "address" + }, + { + "internalType": "uint64", + "name": "_chainID", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "_forkID", + "type": "uint64" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BatchAlreadyVerified", + "type": "error" + }, + { + "inputs": [], + "name": "BatchNotSequencedOrNotSequenceEnd", + "type": "error" + }, + { + "inputs": [], + "name": "ExceedMaxVerifyBatches", + "type": "error" + }, + { + "inputs": [], + "name": "FinalNumBatchBelowLastVerifiedBatch", + "type": "error" + }, + { + "inputs": [], + "name": "FinalNumBatchDoesNotMatchPendingState", + "type": "error" + }, + { + "inputs": [], + "name": "FinalPendingStateNumInvalid", + "type": "error" + }, + { + "inputs": [], + "name": "ForceBatchNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "ForceBatchTimeoutNotExpired", + "type": "error" + }, + { + "inputs": [], + "name": "ForceBatchesAlreadyActive", + "type": "error" + }, + { + "inputs": [], + "name": "ForceBatchesOverflow", + "type": "error" + }, + { + "inputs": [], + "name": "ForcedDataDoesNotMatch", + "type": "error" + }, + { + "inputs": [], + "name": "GlobalExitRootNotExist", + "type": "error" + }, + { + "inputs": [], + "name": "HaltTimeoutNotExpired", + "type": "error" + }, + { + "inputs": [], + "name": "InitNumBatchAboveLastVerifiedBatch", + "type": "error" + }, + { + "inputs": [], + "name": "InitNumBatchDoesNotMatchPendingState", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidProof", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidRangeBatchTimeTarget", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidRangeForceBatchTimeout", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidRangeMultiplierBatchFee", + "type": "error" + }, + { + "inputs": [], + "name": "NewAccInputHashDoesNotExist", + "type": "error" + }, + { + "inputs": [], + "name": "NewPendingStateTimeoutMustBeLower", + "type": "error" + }, + { + "inputs": [], + "name": "NewStateRootNotInsidePrime", + "type": "error" + }, + { + "inputs": [], + "name": "NewTrustedAggregatorTimeoutMustBeLower", + "type": "error" + }, + { + "inputs": [], + "name": "NotEnoughMaticAmount", + "type": "error" + }, + { + "inputs": [], + "name": "OldAccInputHashDoesNotExist", + "type": "error" + }, + { + "inputs": [], + "name": "OldStateRootDoesNotExist", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyAdmin", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyEmergencyState", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyNotEmergencyState", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyPendingAdmin", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyTrustedAggregator", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyTrustedSequencer", + "type": "error" + }, + { + "inputs": [], + "name": "PendingStateDoesNotExist", + "type": "error" + }, + { + "inputs": [], + "name": "PendingStateInvalid", + "type": "error" + }, + { + "inputs": [], + "name": "PendingStateNotConsolidable", + "type": "error" + }, + { + "inputs": [], + "name": "PendingStateTimeoutExceedHaltAggregationTimeout", + "type": "error" + }, + { + "inputs": [], + "name": "SequenceZeroBatches", + "type": "error" + }, + { + "inputs": [], + "name": "SequencedTimestampBelowForcedTimestamp", + "type": "error" + }, + { + "inputs": [], + "name": "SequencedTimestampInvalid", + "type": "error" + }, + { + "inputs": [], + "name": "StoredRootMustBeDifferentThanNewRoot", + "type": "error" + }, + { + "inputs": [], + "name": "TransactionsLengthAboveMax", + "type": "error" + }, + { + "inputs": [], + "name": "TrustedAggregatorTimeoutExceedHaltAggregationTimeout", + "type": "error" + }, + { + "inputs": [], + "name": "TrustedAggregatorTimeoutNotExpired", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AcceptAdminRole", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "ActivateForceBatches", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "numBatch", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "pendingStateNum", + "type": "uint64" + } + ], + "name": "ConsolidatePendingState", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EmergencyStateActivated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EmergencyStateDeactivated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "forceBatchNum", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "lastGlobalExitRoot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "sequencer", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "transactions", + "type": "bytes" + } + ], + "name": "ForceBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "numBatch", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "aggregator", + "type": "address" + } + ], + "name": "OverridePendingState", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "storedStateRoot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "provedStateRoot", + "type": "bytes32" + } + ], + "name": "ProveNonDeterministicPendingState", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "numBatch", + "type": "uint64" + } + ], + "name": "SequenceBatches", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "numBatch", + "type": "uint64" + } + ], + "name": "SequenceForceBatches", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "newforceBatchTimeout", + "type": "uint64" + } + ], + "name": "SetForceBatchTimeout", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "newMultiplierBatchFee", + "type": "uint16" + } + ], + "name": "SetMultiplierBatchFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "newPendingStateTimeout", + "type": "uint64" + } + ], + "name": "SetPendingStateTimeout", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newTrustedAggregator", + "type": "address" + } + ], + "name": "SetTrustedAggregator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "newTrustedAggregatorTimeout", + "type": "uint64" + } + ], + "name": "SetTrustedAggregatorTimeout", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newTrustedSequencer", + "type": "address" + } + ], + "name": "SetTrustedSequencer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "newTrustedSequencerURL", + "type": "string" + } + ], + "name": "SetTrustedSequencerURL", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "newVerifyBatchTimeTarget", + "type": "uint64" + } + ], + "name": "SetVerifyBatchTimeTarget", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "TransferAdminRole", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "numBatch", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "forkID", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "string", + "name": "version", + "type": "string" + } + ], + "name": "UpdateSupernets2Version", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "numBatch", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "aggregator", + "type": "address" + } + ], + "name": "VerifyBatches", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "numBatch", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "aggregator", + "type": "address" + } + ], + "name": "VerifyBatchesTrustedAggregator", + "type": "event" + }, + { + "inputs": [], + "name": "acceptAdminRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "sequencedBatchNum", + "type": "uint64" + } + ], + "name": "activateEmergencyState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "activateForceBatches", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "batchFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "batchNumToStateRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bridgeAddress", + "outputs": [ + { + "internalType": "contract ISupernets2Bridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "calculateRewardPerBatch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "chainID", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newStateRoot", + "type": "uint256" + } + ], + "name": "checkStateRootInsidePrime", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "pendingStateNum", + "type": "uint64" + } + ], + "name": "consolidatePendingState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dataCommitteeAddress", + "outputs": [ + { + "internalType": "contract ISupernets2DataCommittee", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deactivateEmergencyState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "transactions", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "maticAmount", + "type": "uint256" + } + ], + "name": "forceBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "forceBatchTimeout", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "forcedBatches", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "forkID", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getForcedBatchFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "initNumBatch", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "finalNewBatch", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "newLocalExitRoot", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "oldStateRoot", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "newStateRoot", + "type": "bytes32" + } + ], + "name": "getInputSnarkBytes", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLastVerifiedBatch", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "globalExitRootManager", + "outputs": [ + { + "internalType": "contract ISupernets2GlobalExitRoot", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "admin", + "type": "address" + }, + { + "internalType": "address", + "name": "trustedSequencer", + "type": "address" + }, + { + "internalType": "uint64", + "name": "pendingStateTimeout", + "type": "uint64" + }, + { + "internalType": "address", + "name": "trustedAggregator", + "type": "address" + }, + { + "internalType": "uint64", + "name": "trustedAggregatorTimeout", + "type": "uint64" + } + ], + "internalType": "struct Supernets2.InitializePackedParameters", + "name": "initializePackedParameters", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "genesisRoot", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "_trustedSequencerURL", + "type": "string" + }, + { + "internalType": "string", + "name": "_networkName", + "type": "string" + }, + { + "internalType": "string", + "name": "_version", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isEmergencyState", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isForcedBatchDisallowed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "pendingStateNum", + "type": "uint64" + } + ], + "name": "isPendingStateConsolidable", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastBatchSequenced", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastForceBatch", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastForceBatchSequenced", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastPendingState", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastPendingStateConsolidated", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastTimestamp", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastVerifiedBatch", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "matic", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "multiplierBatchFee", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "networkName", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "initPendingStateNum", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "finalPendingStateNum", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "initNumBatch", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "finalNewBatch", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "newLocalExitRoot", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "newStateRoot", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "proof", + "type": "bytes" + } + ], + "name": "overridePendingState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingStateTimeout", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "pendingStateTransitions", + "outputs": [ + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "lastVerifiedBatch", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "exitRoot", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "initPendingStateNum", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "finalPendingStateNum", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "initNumBatch", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "finalNewBatch", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "newLocalExitRoot", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "newStateRoot", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "proof", + "type": "bytes" + } + ], + "name": "proveNonDeterministicPendingState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rollupVerifier", + "outputs": [ + { + "internalType": "contract IVerifierRollup", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "transactionsHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "globalExitRoot", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minForcedTimestamp", + "type": "uint64" + } + ], + "internalType": "struct Supernets2.BatchData[]", + "name": "batches", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "l2Coinbase", + "type": "address" + }, + { + "internalType": "bytes", + "name": "signaturesAndAddrs", + "type": "bytes" + } + ], + "name": "sequenceBatches", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes", + "name": "transactions", + "type": "bytes" + }, + { + "internalType": "bytes32", + "name": "globalExitRoot", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "minForcedTimestamp", + "type": "uint64" + } + ], + "internalType": "struct Supernets2.ForcedBatchData[]", + "name": "batches", + "type": "tuple[]" + } + ], + "name": "sequenceForceBatches", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "sequencedBatches", + "outputs": [ + { + "internalType": "bytes32", + "name": "accInputHash", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "sequencedTimestamp", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "previousLastBatchSequenced", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newforceBatchTimeout", + "type": "uint64" + } + ], + "name": "setForceBatchTimeout", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "newMultiplierBatchFee", + "type": "uint16" + } + ], + "name": "setMultiplierBatchFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newPendingStateTimeout", + "type": "uint64" + } + ], + "name": "setPendingStateTimeout", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newTrustedAggregator", + "type": "address" + } + ], + "name": "setTrustedAggregator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newTrustedAggregatorTimeout", + "type": "uint64" + } + ], + "name": "setTrustedAggregatorTimeout", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newTrustedSequencer", + "type": "address" + } + ], + "name": "setTrustedSequencer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "newTrustedSequencerURL", + "type": "string" + } + ], + "name": "setTrustedSequencerURL", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newVerifyBatchTimeTarget", + "type": "uint64" + } + ], + "name": "setVerifyBatchTimeTarget", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "transferAdminRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "trustedAggregator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "trustedAggregatorTimeout", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "trustedSequencer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "trustedSequencerURL", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "verifyBatchTimeTarget", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "pendingStateNum", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "initNumBatch", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "finalNewBatch", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "newLocalExitRoot", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "newStateRoot", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "proof", + "type": "bytes" + } + ], + "name": "verifyBatches", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "pendingStateNum", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "initNumBatch", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "finalNewBatch", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "newLocalExitRoot", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "newStateRoot", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "proof", + "type": "bytes" + } + ], + "name": "verifyBatchesTrustedAggregator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] \ No newline at end of file diff --git a/etherman/smartcontracts/abi/supernets2bridge.abi b/etherman/smartcontracts/abi/supernets2bridge.abi new file mode 100644 index 00000000..163479e6 --- /dev/null +++ b/etherman/smartcontracts/abi/supernets2bridge.abi @@ -0,0 +1,774 @@ +[ + { + "inputs": [], + "name": "AlreadyClaimed", + "type": "error" + }, + { + "inputs": [], + "name": "AmountDoesNotMatchMsgValue", + "type": "error" + }, + { + "inputs": [], + "name": "DestinationNetworkInvalid", + "type": "error" + }, + { + "inputs": [], + "name": "EtherTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "GlobalExitRootInvalid", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidSmtProof", + "type": "error" + }, + { + "inputs": [], + "name": "MerkleTreeFull", + "type": "error" + }, + { + "inputs": [], + "name": "MessageFailed", + "type": "error" + }, + { + "inputs": [], + "name": "MsgValueNotZero", + "type": "error" + }, + { + "inputs": [], + "name": "NotValidAmount", + "type": "error" + }, + { + "inputs": [], + "name": "NotValidOwner", + "type": "error" + }, + { + "inputs": [], + "name": "NotValidSignature", + "type": "error" + }, + { + "inputs": [], + "name": "NotValidSpender", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyEmergencyState", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyNotEmergencyState", + "type": "error" + }, + { + "inputs": [], + "name": "OnlySupernets2", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "leafType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "originNetwork", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "originAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "destinationNetwork", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "metadata", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "depositCount", + "type": "uint32" + } + ], + "name": "BridgeEvent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "index", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "originNetwork", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "originAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ClaimEvent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EmergencyStateActivated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EmergencyStateDeactivated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "originNetwork", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address", + "name": "originTokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "wrappedTokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "metadata", + "type": "bytes" + } + ], + "name": "NewWrappedToken", + "type": "event" + }, + { + "inputs": [], + "name": "activateEmergencyState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "destinationNetwork", + "type": "uint32" + }, + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "bool", + "name": "forceUpdateGlobalExitRoot", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "permitData", + "type": "bytes" + } + ], + "name": "bridgeAsset", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "destinationNetwork", + "type": "uint32" + }, + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "forceUpdateGlobalExitRoot", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "metadata", + "type": "bytes" + } + ], + "name": "bridgeMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[32]", + "name": "smtProof", + "type": "bytes32[32]" + }, + { + "internalType": "uint32", + "name": "index", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "mainnetExitRoot", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "rollupExitRoot", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "originNetwork", + "type": "uint32" + }, + { + "internalType": "address", + "name": "originTokenAddress", + "type": "address" + }, + { + "internalType": "uint32", + "name": "destinationNetwork", + "type": "uint32" + }, + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "metadata", + "type": "bytes" + } + ], + "name": "claimAsset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[32]", + "name": "smtProof", + "type": "bytes32[32]" + }, + { + "internalType": "uint32", + "name": "index", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "mainnetExitRoot", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "rollupExitRoot", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "originNetwork", + "type": "uint32" + }, + { + "internalType": "address", + "name": "originAddress", + "type": "address" + }, + { + "internalType": "uint32", + "name": "destinationNetwork", + "type": "uint32" + }, + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "metadata", + "type": "bytes" + } + ], + "name": "claimMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "claimedBitMap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deactivateEmergencyState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "depositCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDepositRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "leafType", + "type": "uint8" + }, + { + "internalType": "uint32", + "name": "originNetwork", + "type": "uint32" + }, + { + "internalType": "address", + "name": "originAddress", + "type": "address" + }, + { + "internalType": "uint32", + "name": "destinationNetwork", + "type": "uint32" + }, + { + "internalType": "address", + "name": "destinationAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "metadataHash", + "type": "bytes32" + } + ], + "name": "getLeafValue", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "originNetwork", + "type": "uint32" + }, + { + "internalType": "address", + "name": "originTokenAddress", + "type": "address" + } + ], + "name": "getTokenWrappedAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "globalExitRootManager", + "outputs": [ + { + "internalType": "contract IBaseSupernets2GlobalExitRoot", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_networkID", + "type": "uint32" + }, + { + "internalType": "contract IBaseSupernets2GlobalExitRoot", + "name": "_globalExitRootManager", + "type": "address" + }, + { + "internalType": "address", + "name": "_supernets2address", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "isClaimed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isEmergencyState", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastUpdatedDepositCount", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "networkID", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "originNetwork", + "type": "uint32" + }, + { + "internalType": "address", + "name": "originTokenAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals", + "type": "uint8" + } + ], + "name": "precalculatedWrapperAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "supernets2address", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "tokenInfoToWrappedToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateGlobalExitRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "leafHash", + "type": "bytes32" + }, + { + "internalType": "bytes32[32]", + "name": "smtProof", + "type": "bytes32[32]" + }, + { + "internalType": "uint32", + "name": "index", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "root", + "type": "bytes32" + } + ], + "name": "verifyMerkleProof", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "wrappedTokenToTokenInfo", + "outputs": [ + { + "internalType": "uint32", + "name": "originNetwork", + "type": "uint32" + }, + { + "internalType": "address", + "name": "originTokenAddress", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ] \ No newline at end of file diff --git a/etherman/smartcontracts/abi/supernets2datacommittee.abi b/etherman/smartcontracts/abi/supernets2datacommittee.abi new file mode 100644 index 00000000..76d893ff --- /dev/null +++ b/etherman/smartcontracts/abi/supernets2datacommittee.abi @@ -0,0 +1,226 @@ +[ + { + "inputs": [], + "name": "CommitteeAddressDoesntExist", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyURLNotAllowed", + "type": "error" + }, + { + "inputs": [], + "name": "TooManyRequiredSignatures", + "type": "error" + }, + { + "inputs": [], + "name": "UnexpectedAddrsAndSignaturesSize", + "type": "error" + }, + { + "inputs": [], + "name": "UnexpectedAddrsBytesLength", + "type": "error" + }, + { + "inputs": [], + "name": "UnexpectedCommitteeHash", + "type": "error" + }, + { + "inputs": [], + "name": "WrongAddrOrder", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "committeeHash", + "type": "bytes32" + } + ], + "name": "CommitteeUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "committeeHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAmountOfMembers", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "members", + "outputs": [ + { + "internalType": "string", + "name": "url", + "type": "string" + }, + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "requiredAmountOfSignatures", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_requiredAmountOfSignatures", + "type": "uint256" + }, + { + "internalType": "string[]", + "name": "urls", + "type": "string[]" + }, + { + "internalType": "bytes", + "name": "addrsBytes", + "type": "bytes" + } + ], + "name": "setupCommittee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "signedHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signaturesAndAddrs", + "type": "bytes" + } + ], + "name": "verifySignatures", + "outputs": [], + "stateMutability": "view", + "type": "function" + } + ] \ No newline at end of file diff --git a/etherman/smartcontracts/abi/supernets2globalexitroot.abi b/etherman/smartcontracts/abi/supernets2globalexitroot.abi new file mode 100644 index 00000000..cf6178ae --- /dev/null +++ b/etherman/smartcontracts/abi/supernets2globalexitroot.abi @@ -0,0 +1,139 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_rollupAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_bridgeAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "OnlyAllowedContracts", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "mainnetExitRoot", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "rollupExitRoot", + "type": "bytes32" + } + ], + "name": "UpdateGlobalExitRoot", + "type": "event" + }, + { + "inputs": [], + "name": "bridgeAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLastGlobalExitRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "globalExitRootMap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastMainnetExitRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastRollupExitRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rollupAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "newRoot", + "type": "bytes32" + } + ], + "name": "updateExitRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] \ No newline at end of file diff --git a/etherman/smartcontracts/bin/polygonzkevm.bin b/etherman/smartcontracts/bin/polygonzkevm.bin deleted file mode 100644 index 5e5425e7..00000000 --- a/etherman/smartcontracts/bin/polygonzkevm.bin +++ /dev/null @@ -1 +0,0 @@ -6101406040523480156200001257600080fd5b5060405162004f5038038062004f508339810160408190526200003591620000a5565b6001600160a01b0395861660c05293851660805291841660a05290921660e0526001600160401b0391821661010052166101205262000131565b6001600160a01b03811681146200008557600080fd5b50565b80516001600160401b0381168114620000a057600080fd5b919050565b60008060008060008060c08789031215620000bf57600080fd5b8651620000cc816200006f565b6020880151909650620000df816200006f565b6040880151909550620000f2816200006f565b606088015190945062000105816200006f565b9250620001156080880162000088565b91506200012560a0880162000088565b90509295509295509295565b60805160a05160c05160e0516101005161012051614d51620001ff6000396000818161063801528181610d3201526126ef01526000818161077b0152610d0801526000818161072e0152818161192301528181612baf015261356f0152600081816108b9015281816111eb015281816115f3015281816120fa01528181612cd401528181612eb001526136e60152600081816109550152818161347601526139ac015260008181610830015281816118f101528181611d9301528181612e840152613a740152614d516000f3fe608060405234801561001057600080fd5b50600436106103ba5760003560e01c80638c3d7301116101f4578063c89e42df1161011a578063e7a7ed02116100ad578063f14916d61161007c578063f14916d61461099e578063f2fde38b146109b1578063f851a440146109c4578063f8b823e4146109d757600080fd5b8063e7a7ed0214610936578063e8bf92ed14610950578063eaeb077b14610977578063ed6b01041461098a57600080fd5b8063d8d1091b116100e9578063d8d1091b146108ee578063d939b31514610901578063dbc169761461091b578063e6ad707e1461092357600080fd5b8063c89e42df14610887578063cfa8ed471461089a578063d02103ca146108b4578063d2e129f9146108db57600080fd5b8063ada8f91911610192578063b6b0b09711610161578063b6b0b0971461082b578063ba58ae3914610852578063c0ed84e014610865578063c754c7ed1461086d57600080fd5b8063ada8f91914610763578063adc879e914610776578063afd23cbe1461079d578063b4d63f58146107cb57600080fd5b80639c9f3dfe116101ce5780639c9f3dfe14610703578063a066215c14610716578063a3c573eb14610729578063a50a164b1461075057600080fd5b80638c3d7301146106e25780638da5cb5b146106ea57806399f5634e146106fb57600080fd5b80634a910e6a116102e45780636b8616ce116102775780637fcb3653116102465780637fcb365314610620578063831c7ead14610633578063837a47381461065a578063841b24d7146106c857600080fd5b80636b8616ce146105d25780636ff512cc146105f2578063715018a6146106055780637215541a1461060d57600080fd5b8063542028d5116102b3578063542028d5146105a75780635e9145c9146105af5780635ec91958146105c257806360469169146105ca57600080fd5b80634a910e6a146105405780634e487706146105535780634fd70464146105665780635392c5e01461057957600080fd5b8063267822471161035c578063423fa8561161032b578063423fa856146104df57806345605267146104f9578063458c0477146105135780634a1a89a71461052657600080fd5b80632678224714610474578063298789831461049f578063383b3be8146104b9578063394218e9146104cc57600080fd5b806315064c961161039857806315064c961461041e5780631816b7e51461043b57806319d8ac611461044e578063220d78991461046157600080fd5b80630808270c146103bf5780630a0d9fbe146103d4578063107bf28c14610409575b600080fd5b6103d26103cd366004614303565b6109e0565b005b606f546103ec9061010090046001600160401b031681565b6040516001600160401b0390911681526020015b60405180910390f35b610411610a79565b60405161040091906143eb565b606f5461042b9060ff1681565b6040519015158152602001610400565b6103d26104493660046143fe565b610b07565b6073546103ec906001600160401b031681565b61041161046f366004614422565b610be5565b607b54610487906001600160a01b031681565b6040516001600160a01b039091168152602001610400565b60745461048790600160401b90046001600160a01b031681565b61042b6104c736600461446f565b610d90565b6103d26104da36600461446f565b610dd7565b6073546103ec90600160401b90046001600160401b031681565b6073546103ec90600160801b90046001600160401b031681565b6079546103ec906001600160401b031681565b6079546103ec90600160401b90046001600160401b031681565b6103d261054e36600461446f565b610eef565b6103d261056136600461446f565b610f77565b6103d261057436600461448a565b61107e565b61059961058736600461446f565b60756020526000908152604090205481565b604051908152602001610400565b610411611358565b6103d26105bd36600461456d565b611365565b6103d26119d4565b610599611a95565b6105996105e036600461446f565b60716020526000908152604090205481565b6103d26106003660046145c0565b611aab565b6103d2611b45565b6103d261061b36600461446f565b611b59565b6074546103ec906001600160401b031681565b6103ec7f000000000000000000000000000000000000000000000000000000000000000081565b61069d6106683660046145db565b6078602052600090815260409020805460018201546002909201546001600160401b0380831693600160401b90930416919084565b604080516001600160401b039586168152949093166020850152918301526060820152608001610400565b6079546103ec90600160c01b90046001600160401b031681565b6103d2611cb1565b6033546001600160a01b0316610487565b610599611d58565b6103d261071136600461446f565b611e7b565b6103d261072436600461446f565b611f87565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b6103d261075e36600461448a565b61204f565b6103d26107713660046145c0565b61219b565b6103ec7f000000000000000000000000000000000000000000000000000000000000000081565b606f546107b8906901000000000000000000900461ffff1681565b60405161ffff9091168152602001610400565b6108066107d936600461446f565b607260205260009081526040902080546001909101546001600160401b0380821691600160401b90041683565b604080519384526001600160401b039283166020850152911690820152606001610400565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b61042b6108603660046145db565b612221565b6103ec6122a8565b607b546103ec90600160a01b90046001600160401b031681565b6103d2610895366004614696565b6122f5565b606f5461048790600160581b90046001600160a01b031681565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b6103d26108e93660046146d2565b61235c565b6103d26108fc366004614784565b612777565b6079546103ec90600160801b90046001600160401b031681565b6103d2612b82565b6103d2610931366004614303565b612c28565b6073546103ec90600160c01b90046001600160401b031681565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b6103d26109853660046147c5565b612dbf565b607b5461042b90600160e01b900460ff1681565b6103d26109ac3660046145c0565b6130bb565b6103d26109bf3660046145c0565b613155565b607a54610487906001600160a01b031681565b61059960705481565b606f5460ff1615610a0457604051630bc011ff60e21b815260040160405180910390fd5b610a1488888888888888886131e2565b6001600160401b0385166000908152607560209081526040918290205482519081529081018590527f1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010910160405180910390a1610a6f61356d565b5050505050505050565b60778054610a8690614810565b80601f0160208091040260200160405190810160405280929190818152602001828054610ab290614810565b8015610aff5780601f10610ad457610100808354040283529160200191610aff565b820191906000526020600020905b815481529060010190602001808311610ae257829003601f168201915b505050505081565b607a546001600160a01b03163314610b3257604051634755657960e01b815260040160405180910390fd5b6103e88161ffff161080610b4b57506103ff8161ffff16115b15610b82576040517f4c2533c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80546affff0000000000000000001916690100000000000000000061ffff8416908102919091179091556040519081527f7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5906020015b60405180910390a150565b6001600160401b038086166000818152607260205260408082205493881682529020546060929115801590610c18575081155b15610c4f576040517f6818c29e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80610c86576040517f66385b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c8f84612221565b610cc5576040517f176b913c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516bffffffffffffffffffffffff193360601b166020820152603481019690965260548601929092526001600160c01b031960c098891b811660748701527f0000000000000000000000000000000000000000000000000000000000000000891b8116607c8701527f0000000000000000000000000000000000000000000000000000000000000000891b81166084870152608c86019490945260ac85015260cc840194909452509290931b90911660ec830152805180830360d401815260f4909201905290565b6079546001600160401b0382811660009081526078602052604081205490924292610dc692600160801b90920481169116614860565b6001600160401b0316111592915050565b607a546001600160a01b03163314610e0257604051634755657960e01b815260040160405180910390fd5b62093a806001600160401b0382161115610e2f57604051631d06e87960e01b815260040160405180910390fd5b606f5460ff16610e88576079546001600160401b03600160c01b909104811690821610610e88576040517f401636df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b6001600160401b038416908102919091179091556040519081527f1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a190602001610bda565b607454600160401b90046001600160a01b03163314610f6b57606f5460ff1615610f2c57604051630bc011ff60e21b815260040160405180910390fd5b610f3581610d90565b610f6b576040517f0ce9e4a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f74816135e8565b50565b607a546001600160a01b03163314610fa257604051634755657960e01b815260040160405180910390fd5b62093a806001600160401b0382161115610fcf5760405163f5e37f2f60e01b815260040160405180910390fd5b606f5460ff1661100f57607b546001600160401b03600160a01b90910481169082161061100f5760405163f5e37f2f60e01b815260040160405180910390fd5b607b80547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff16600160a01b6001600160401b038416908102919091179091556040519081527fa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b90602001610bda565b606f5460ff16156110a257604051630bc011ff60e21b815260040160405180910390fd5b6079546001600160401b0386811660009081526072602052604090206001015442926110d992600160c01b90910481169116614860565b6001600160401b0316111561111a576040517f8a0704d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e86111278787614887565b6001600160401b0316111561114f57604051635acfba9d60e11b815260040160405180910390fd5b61115e878787878787876137a0565b61116785613a9b565b607954600160801b90046001600160401b0316600003611254576074805467ffffffffffffffff19166001600160401b03878116918217909255600090815260756020526040902084905560795416156111d557607980546fffffffffffffffffffffffffffffffff191690555b6040516333d6247d60e01b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906333d6247d90602401600060405180830381600087803b15801561123757600080fd5b505af115801561124b573d6000803e3d6000fd5b5050505061130e565b61125c613c70565b607980546001600160401b0316906000611275836148a7565b82546001600160401b039182166101009390930a92830292820219169190911790915560408051608081018252428316815288831660208083019182528284018a8152606084018a8152607954871660009081526078909352949091209251835492518616600160401b026fffffffffffffffffffffffffffffffff199093169516949094171781559151600183015551600290910155505b60405183815233906001600160401b038716907f9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966906020015b60405180910390a350505050505050565b60768054610a8690614810565b606f5460ff161561138957604051630bc011ff60e21b815260040160405180910390fd5b606f54600160581b90046001600160a01b031633146113d4576040517f11e7be1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160008190036113f75760405163cb591a5f60e01b815260040160405180910390fd5b6103e881111561141a57604051635acfba9d60e11b815260040160405180910390fd5b6073546001600160401b03600160401b82048116600081815260726020526040812054838516949293600160801b909304909216919082905b868110156117b15760008a8a8381811061146f5761146f6148cd565b905060200281019061148191906148e3565b61148a90614903565b805180516020909101206060820151919250906001600160401b0316156115b057856114b5816148a7565b965050600081836020015184606001516040516020016114f593929190928352602083019190915260c01b6001600160c01b031916604082015260480190565b60408051601f1981840301815291815281516020928301206001600160401b038a166000908152607190935291205490915081146115465760405163671ebaaf60e11b815260040160405180910390fd5b6001600160401b0380881660009081526071602052604080822091909155606085015190850151908216911610156115aa576040517f7f7ab87200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506116c7565b60208201511580159061166a575060208201516040517f257b363200000000000000000000000000000000000000000000000000000000815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063257b3632906024016020604051808303816000875af1158015611644573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611668919061498f565b155b156116a1576040517f73bd668d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151516201d4c010156116c7576040516328a69b1f60e21b815260040160405180910390fd5b876001600160401b031682604001516001600160401b031610806116f757504282604001516001600160401b0316115b1561172e576040517fea82791600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602082810151604080850151815193840189905290830184905260608084019290925260c01b6001600160c01b03191660808301528b901b6bffffffffffffffffffffffff19166088820152609c0160405160208183030381529060405280519060200120945081604001519750505080806117a9906149a8565b915050611453565b506117bc8685614860565b6073549094506001600160401b03600160c01b909104811690841611156117f65760405163c630a00d60e01b815260040160405180910390fd5b60006118028285614887565b611815906001600160401b0316886149c1565b60408051606081018252858152426001600160401b03908116602080840191825260738054600160401b9081900485168688019081528d861660008181526072909552979093209551865592516001909501805492519585166fffffffffffffffffffffffffffffffff199384161795851684029590951790945583548c84169116179302929092179055909150828116908516146118d4576073805467ffffffffffffffff60801b1916600160801b6001600160401b038716021790555b6119193330836070546118e791906149da565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190613d14565b611921613c70565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166379e2cf976040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561197c57600080fd5b505af1158015611990573d6000803e3d6000fd5b50506040516001600160401b03881692507f303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce9150600090a250505050505050505050565b607a546001600160a01b031633146119ff57604051634755657960e01b815260040160405180910390fd5b607b54600160e01b900460ff16611a42576040517ff6ba91a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690556040517f854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f90600090a1565b60006070546064611aa691906149da565b905090565b607a546001600160a01b03163314611ad657604051634755657960e01b815260040160405180910390fd5b606f80547fff0000000000000000000000000000000000000000ffffffffffffffffffffff16600160581b6001600160a01b038416908102919091179091556040519081527ff54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc090602001610bda565b611b4d613dcb565b611b576000613e25565b565b6033546001600160a01b03163314611ca9576000611b756122a8565b9050806001600160401b0316826001600160401b031611611bc2576040517f812a372d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6073546001600160401b03600160401b90910481169083161180611c0157506001600160401b0380831660009081526072602052604090206001015416155b15611c38576040517f98c5c01400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160401b038083166000908152607260205260409020600101544291611c669162093a809116614860565b6001600160401b03161115611ca7576040517fd257555a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b610f7461356d565b607b546001600160a01b03163314611cf5576040517fd1ec4b2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b54607a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0390921691821790556040519081527f056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e9060200160405180910390a1565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dfe919061498f565b90506000611e0a6122a8565b6073546001600160401b03600160401b8204811691611e3a91600160801b8204811691600160c01b900416614887565b611e449190614860565b611e4e9190614887565b6001600160401b0316905080600003611e6a5760009250505090565b611e748183614a07565b9250505090565b607a546001600160a01b03163314611ea657604051634755657960e01b815260040160405180910390fd5b62093a806001600160401b0382161115611ed357604051630cc9650760e41b815260040160405180910390fd5b606f5460ff16611f2c576079546001600160401b03600160801b909104811690821610611f2c576040517f48a05a9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6079805467ffffffffffffffff60801b1916600160801b6001600160401b038416908102919091179091556040519081527fc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c7590602001610bda565b607a546001600160a01b03163314611fb257604051634755657960e01b815260040160405180910390fd5b62015180816001600160401b03161115611ff8576040517fe067dfe800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f805468ffffffffffffffff0019166101006001600160401b038416908102919091179091556040519081527f1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c2890602001610bda565b607454600160401b90046001600160a01b031633146120815760405163bbcbbc0560e01b815260040160405180910390fd5b612090878787878787876137a0565b6074805467ffffffffffffffff19166001600160401b03878116918217909255600090815260756020526040902084905560795416156120e457607980546fffffffffffffffffffffffffffffffff191690555b6040516333d6247d60e01b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906333d6247d90602401600060405180830381600087803b15801561214657600080fd5b505af115801561215a573d6000803e3d6000fd5b50506040518581523392506001600160401b03881691507fcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe90602001611347565b607a546001600160a01b031633146121c657604051634755657960e01b815260040160405180910390fd5b607b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce690602001610bda565b600067ffffffff000000016001600160401b038316108015612257575067ffffffff00000001604083901c6001600160401b0316105b8015612277575067ffffffff00000001608083901c6001600160401b0316105b801561228e575067ffffffff0000000160c083901c105b1561229b57506001919050565b506000919050565b919050565b6079546000906001600160401b0316156122e557506079546001600160401b03908116600090815260786020526040902054600160401b90041690565b506074546001600160401b031690565b607a546001600160a01b0316331461232057604051634755657960e01b815260040160405180910390fd5b607661232c8282614a69565b507f6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b2081604051610bda91906143eb565b600054610100900460ff161580801561237c5750600054600160ff909116105b806123965750303b158015612396575060005460ff166001145b61240d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000805460ff191660011790558015612430576000805461ff0019166101001790555b61243d60208801886145c0565b607a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905561247a60408801602089016145c0565b606f80546001600160a01b0392909216600160581b027fff0000000000000000000000000000000000000000ffffffffffffffffffffff9092169190911790556124ca60808801606089016145c0565b607480546001600160a01b0392909216600160401b027fffffffff0000000000000000000000000000000000000000ffffffffffffffff9092169190911790556000805260756020527ff9e3fbf150b7a0077118526f473c53cb4734f166167e2c6213e3567dd390b4ad86905560766125438682614a69565b5060776125508582614a69565b5062093a806125656060890160408a0161446f565b6001600160401b0316111561258d57604051630cc9650760e41b815260040160405180910390fd5b61259d606088016040890161446f565b607980546001600160401b0392909216600160801b0267ffffffffffffffff60801b1990921691909117905562093a806125dd60a0890160808a0161446f565b6001600160401b0316111561260557604051631d06e87960e01b815260040160405180910390fd5b61261560a088016080890161446f565b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b6001600160401b03939093169290920291909117905567016345785d8a0000607055606f80546affffffffffffffffffff0019166a03ea000000000000070800179055607b80547fffffff000000000000000000ffffffffffffffffffffffffffffffffffffffff167c01000000000006978000000000000000000000000000000000000000001790556126ca613e84565b7fed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd660007f000000000000000000000000000000000000000000000000000000000000000085856040516127209493929190614b51565b60405180910390a1801561276e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b607b54600160e01b900460ff16156127a2576040516324eff8c360e01b815260040160405180910390fd5b606f5460ff16156127c657604051630bc011ff60e21b815260040160405180910390fd5b8060008190036127e95760405163cb591a5f60e01b815260040160405180910390fd5b6103e881111561280c57604051635acfba9d60e11b815260040160405180910390fd5b6073546001600160401b03600160c01b8204811691612834918491600160801b900416614b88565b11156128535760405163c630a00d60e01b815260040160405180910390fd5b6073546001600160401b03600160401b820481166000818152607260205260408120549193600160801b9004909216915b84811015612a6c5760008787838181106128a0576128a06148cd565b90506020028101906128b29190614b9b565b6128bb90614bb1565b9050836128c7816148a7565b825180516020918201208185015160408087015190519499509194506000936129119386939101928352602083019190915260c01b6001600160c01b031916604082015260480190565b60408051601f1981840301815291815281516020928301206001600160401b0389166000908152607190935291205490915081146129625760405163671ebaaf60e11b815260040160405180910390fd5b6001600160401b0386166000908152607160205260408120556129866001896149c1565b84036129f35742607b60149054906101000a90046001600160401b031684604001516129b29190614860565b6001600160401b031611156129f3576040517fc44a082100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020838101516040805192830188905282018490526060808301919091524260c01b6001600160c01b031916608083015233901b6bffffffffffffffffffffffff19166088820152609c016040516020818303038152906040528051906020012094505050508080612a64906149a8565b915050612884565b50612a778484614860565b607380546001600160401b0342811667ffffffffffffffff199092168217808455604080516060810182528781526020808201958652600160401b9384900485168284019081528589166000818152607290935284832093518455965160019390930180549151871686026fffffffffffffffffffffffffffffffff1990921693871693909317179091558554938916600160801b0267ffffffffffffffff60801b19938602939093167fffffffffffffffff00000000000000000000000000000000ffffffffffffffff90941693909317919091179093559151929550917f648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a49190a2505050505050565b607a546001600160a01b03163314612bad57604051634755657960e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dbc169766040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612c0857600080fd5b505af1158015612c1c573d6000803e3d6000fd5b50505050611b57613f0a565b607454600160401b90046001600160a01b03163314612c5a5760405163bbcbbc0560e01b815260040160405180910390fd5b612c6a88888888888888886131e2565b6074805467ffffffffffffffff19166001600160401b0387811691821790925560009081526075602052604090208490556079541615612cbe57607980546fffffffffffffffffffffffffffffffff191690555b6040516333d6247d60e01b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906333d6247d90602401600060405180830381600087803b158015612d2057600080fd5b505af1158015612d34573d6000803e3d6000fd5b50506079805477ffffffffffffffffffffffffffffffffffffffffffffffff167a093a80000000000000000000000000000000000000000000000000179055505060405183815233906001600160401b038716907fcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf729060200160405180910390a35050505050505050565b607b54600160e01b900460ff1615612dea576040516324eff8c360e01b815260040160405180910390fd5b606f5460ff1615612e0e57604051630bc011ff60e21b815260040160405180910390fd5b6000612e18611a95565b905081811115612e54576040517f4732fdb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611388831115612e77576040516328a69b1f60e21b815260040160405180910390fd5b612eac6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084613d14565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633ed691ef6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f30919061498f565b60738054919250600160c01b9091046001600160401b0316906018612f54836148a7565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550508484604051612f89929190614c2c565b60408051918290038220602083015281018290526001600160c01b03194260c01b16606082015260680160408051808303601f190181529181528151602092830120607354600160c01b90046001600160401b03166000908152607190935291205532330361305757607354604080518381523360208201526060918101829052600091810191909152600160c01b9091046001600160401b0316907ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc9319060800160405180910390a26130b4565b607360189054906101000a90046001600160401b03166001600160401b03167ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc931823388886040516130ab9493929190614c3c565b60405180910390a25b5050505050565b607a546001600160a01b031633146130e657604051634755657960e01b815260040160405180910390fd5b607480547fffffffff0000000000000000000000000000000000000000ffffffffffffffff16600160401b6001600160a01b038416908102919091179091556040519081527f61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca90602001610bda565b61315d613dcb565b6001600160a01b0381166131d95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401612404565b610f7481613e25565b60006001600160401b03891615613276576079546001600160401b03908116908a1611156132235760405163bb14c20560e01b815260040160405180910390fd5b506001600160401b038089166000908152607860205260409020600281015481549092898116600160401b909204161461327057604051632bd2e3e760e01b815260040160405180910390fd5b506132de565b506001600160401b038616600090815260756020526040902054806132ae576040516324cbdcc360e11b815260040160405180910390fd5b6074546001600160401b0390811690881611156132de57604051630f2b74f160e11b815260040160405180910390fd5b6079546001600160401b03908116908916118061330d5750886001600160401b0316886001600160401b031611155b8061332e57506079546001600160401b03600160401b909104811690891611155b15613365576040517fbfa7079f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160401b03888116600090815260786020526040902054600160401b90048116908716146133c2576040517f32a2a77f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006133d18888888589610be5565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016002836040516134069190614c65565b602060405180830381855afa158015613423573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190613446919061498f565b6134509190614c77565b604080516020810182528281529051632363e29760e21b81529192506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691638d8f8a5c916134ad9189918991600401614c8b565b602060405180830381865afa1580156134ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134ee9190614cd3565b61350b576040516309bde33960e01b815260040160405180910390fd5b6001600160401b038a16600090815260786020526040902060020154869003613560576040517fa47276bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632072f6c56040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156135c857600080fd5b505af11580156135dc573d6000803e3d6000fd5b50505050611b57613f7b565b6079546001600160401b03600160401b909104811690821611158061361b57506079546001600160401b03908116908216115b15613652576040517fd086b70b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160401b038181166000818152607860209081526040808320805460748054600160401b9283900490981667ffffffffffffffff1990981688179055600282015487865260759094529382902092909255607980546fffffffffffffffff000000000000000019169390940292909217909255600182015490516333d6247d60e01b815260048101919091529091907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906333d6247d90602401600060405180830381600087803b15801561373257600080fd5b505af1158015613746573d6000803e3d6000fd5b50505050826001600160401b0316816001600160401b03167f328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e846002015460405161379391815260200190565b60405180910390a3505050565b6000806137ab6122a8565b90506001600160401b03891615613841576079546001600160401b03908116908a1611156137ec5760405163bb14c20560e01b815260040160405180910390fd5b6001600160401b03808a1660009081526078602052604090206002810154815490945090918a8116600160401b909204161461383b57604051632bd2e3e760e01b815260040160405180910390fd5b506138ad565b6001600160401b03881660009081526075602052604090205491508161387a576040516324cbdcc360e11b815260040160405180910390fd5b806001600160401b0316886001600160401b031611156138ad57604051630f2b74f160e11b815260040160405180910390fd5b806001600160401b0316876001600160401b0316116138f8576040517fb9b18f5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000613907898989868a610be5565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160028360405161393c9190614c65565b602060405180830381855afa158015613959573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061397c919061498f565b6139869190614c77565b604080516020810182528281529051632363e29760e21b81529192506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691638d8f8a5c916139e3918a918a91600401614c8b565b602060405180830381865afa158015613a00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a249190614cd3565b613a41576040516309bde33960e01b815260040160405180910390fd5b61356033613a4f858c614887565b6001600160401b0316613a60611d58565b613a6a91906149da565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190613fd7565b6000613aa56122a8565b905081600080613ab58484614887565b606f546001600160401b039182169250600091613ad891610100900416426149c1565b90505b846001600160401b0316846001600160401b031614613b59576001600160401b0380851660009081526072602052604090206001810154909116821015613b38576001810154600160401b90046001600160401b03169450613b53565b613b428686614887565b6001600160401b0316935050613b59565b50613adb565b6000613b6584846149c1565b905083811015613bbc57808403600c8111613b805780613b83565b600c5b9050806103e80a81606f60099054906101000a900461ffff1661ffff160a6070540281613bb257613bb26149f1565b0460705550613c2c565b838103600c8111613bcd5780613bd0565b600c5b90506000816103e80a82606f60099054906101000a900461ffff1661ffff160a670de0b6b3a76400000281613c0757613c076149f1565b04905080607054670de0b6b3a76400000281613c2557613c256149f1565b0460705550505b683635c9adc5dea000006070541115613c5157683635c9adc5dea0000060705561276e565b633b9aca00607054101561276e57633b9aca0060705550505050505050565b6079546001600160401b03600160401b8204811691161115611b5757607954600090613cad90600160401b90046001600160401b03166001614860565b9050613cb881610d90565b15610f7457607954600090600290613cda9084906001600160401b0316614887565b613ce49190614cf5565b613cee9083614860565b9050613cf981610d90565b15613d0b57613d07816135e8565b5050565b613d07826135e8565b6040516001600160a01b0380851660248301528316604482015260648101829052613dc59085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614025565b50505050565b6033546001600160a01b03163314611b575760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401612404565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16613f015760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401612404565b611b5733613e25565b606f5460ff16613f46576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f805460ff191690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b606f5460ff1615613f9f57604051630bc011ff60e21b815260040160405180910390fd5b606f805460ff191660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b6040516001600160a01b0383166024820152604481018290526140209084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401613d61565b505050565b600061407a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661410a9092919063ffffffff16565b80519091501561402057808060200190518101906140989190614cd3565b6140205760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401612404565b60606141198484600085614123565b90505b9392505050565b60608247101561419b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401612404565b6001600160a01b0385163b6141f25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612404565b600080866001600160a01b0316858760405161420e9190614c65565b60006040518083038185875af1925050503d806000811461424b576040519150601f19603f3d011682016040523d82523d6000602084013e614250565b606091505b509150915061426082828661426b565b979650505050505050565b6060831561427a57508161411c565b82511561428a5782518084602001fd5b8160405162461bcd60e51b815260040161240491906143eb565b80356001600160401b03811681146122a357600080fd5b60008083601f8401126142cd57600080fd5b5081356001600160401b038111156142e457600080fd5b6020830191508360208285010111156142fc57600080fd5b9250929050565b60008060008060008060008060e0898b03121561431f57600080fd5b614328896142a4565b975061433660208a016142a4565b965061434460408a016142a4565b955061435260608a016142a4565b94506080890135935060a0890135925060c08901356001600160401b0381111561437b57600080fd5b6143878b828c016142bb565b999c989b5096995094979396929594505050565b60005b838110156143b657818101518382015260200161439e565b50506000910152565b600081518084526143d781602086016020860161439b565b601f01601f19169290920160200192915050565b60208152600061411c60208301846143bf565b60006020828403121561441057600080fd5b813561ffff8116811461411c57600080fd5b600080600080600060a0868803121561443a57600080fd5b614443866142a4565b9450614451602087016142a4565b94979496505050506040830135926060810135926080909101359150565b60006020828403121561448157600080fd5b61411c826142a4565b600080600080600080600060c0888a0312156144a557600080fd5b6144ae886142a4565b96506144bc602089016142a4565b95506144ca604089016142a4565b9450606088013593506080880135925060a08801356001600160401b038111156144f357600080fd5b6144ff8a828b016142bb565b989b979a50959850939692959293505050565b60008083601f84011261452457600080fd5b5081356001600160401b0381111561453b57600080fd5b6020830191508360208260051b85010111156142fc57600080fd5b80356001600160a01b03811681146122a357600080fd5b60008060006040848603121561458257600080fd5b83356001600160401b0381111561459857600080fd5b6145a486828701614512565b90945092506145b7905060208501614556565b90509250925092565b6000602082840312156145d257600080fd5b61411c82614556565b6000602082840312156145ed57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261461b57600080fd5b81356001600160401b0380821115614635576146356145f4565b604051601f8301601f19908116603f0116810190828211818310171561465d5761465d6145f4565b8160405283815286602085880101111561467657600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000602082840312156146a857600080fd5b81356001600160401b038111156146be57600080fd5b6146ca8482850161460a565b949350505050565b6000806000806000808688036101208112156146ed57600080fd5b60a08112156146fb57600080fd5b5086955060a0870135945060c08701356001600160401b038082111561472057600080fd5b61472c8a838b0161460a565b955060e089013591508082111561474257600080fd5b61474e8a838b0161460a565b945061010089013591508082111561476557600080fd5b5061477289828a016142bb565b979a9699509497509295939492505050565b6000806020838503121561479757600080fd5b82356001600160401b038111156147ad57600080fd5b6147b985828601614512565b90969095509350505050565b6000806000604084860312156147da57600080fd5b83356001600160401b038111156147f057600080fd5b6147fc868287016142bb565b909790965060209590950135949350505050565b600181811c9082168061482457607f821691505b60208210810361484457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6001600160401b038181168382160190808211156148805761488061484a565b5092915050565b6001600160401b038281168282160390808211156148805761488061484a565b60006001600160401b038083168181036148c3576148c361484a565b6001019392505050565b634e487b7160e01b600052603260045260246000fd5b60008235607e198336030181126148f957600080fd5b9190910192915050565b60006080823603121561491557600080fd5b604051608081016001600160401b038282108183111715614938576149386145f4565b81604052843591508082111561494d57600080fd5b5061495a3682860161460a565b82525060208301356020820152614973604084016142a4565b6040820152614984606084016142a4565b606082015292915050565b6000602082840312156149a157600080fd5b5051919050565b6000600182016149ba576149ba61484a565b5060010190565b818103818111156149d4576149d461484a565b92915050565b80820281158282048414176149d4576149d461484a565b634e487b7160e01b600052601260045260246000fd5b600082614a1657614a166149f1565b500490565b601f82111561402057600081815260208120601f850160051c81016020861015614a425750805b601f850160051c820191505b81811015614a6157828155600101614a4e565b505050505050565b81516001600160401b03811115614a8257614a826145f4565b614a9681614a908454614810565b84614a1b565b602080601f831160018114614acb5760008415614ab35750858301515b600019600386901b1c1916600185901b178555614a61565b600085815260208120601f198616915b82811015614afa57888601518255948401946001909101908401614adb565b5085821015614b185787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60006001600160401b03808716835280861660208401525060606040830152614b7e606083018486614b28565b9695505050505050565b808201808211156149d4576149d461484a565b60008235605e198336030181126148f957600080fd5b600060608236031215614bc357600080fd5b604051606081016001600160401b038282108183111715614be657614be66145f4565b816040528435915080821115614bfb57600080fd5b50614c083682860161460a565b82525060208301356020820152614c21604084016142a4565b604082015292915050565b8183823760009101908152919050565b8481526001600160a01b0384166020820152606060408201526000614b7e606083018486614b28565b600082516148f981846020870161439b565b600082614c8657614c866149f1565b500690565b604081526000614c9f604083018587614b28565b905060208083018460005b6001811015614cc757815183529183019190830190600101614caa565b50505050949350505050565b600060208284031215614ce557600080fd5b8151801515811461411c57600080fd5b60006001600160401b0380841680614d0f57614d0f6149f1565b9216919091049291505056fea26469706673582212200b586a4d2a78f3585b9b741ea1f06c0afab4d66b48c408bc1e7be9fa34df798364736f6c63430008110033 \ No newline at end of file diff --git a/etherman/smartcontracts/bin/polygonzkevmbridge.bin b/etherman/smartcontracts/bin/polygonzkevmbridge.bin deleted file mode 100644 index dfd72577..00000000 --- a/etherman/smartcontracts/bin/polygonzkevmbridge.bin +++ /dev/null @@ -1 +0,0 @@ -608060405234801561001057600080fd5b50614e0e806100206000396000f3fe6080604052600436106200019f5760003560e01c8063647c576c11620000e7578063be5831c71162000089578063dbc169761162000060578063dbc169761462000506578063ee25560b146200051e578063fb570834146200054f57600080fd5b8063be5831c7146200049e578063cd58657914620004c4578063d02103ca14620004db57600080fd5b80639e34070f11620000be5780639e34070f14620003fa578063aaa13cc2146200043f578063bab161bf146200046457600080fd5b8063647c576c146200038357806379e2cf9714620003a857806381b1c17414620003c057600080fd5b80632d2c9d94116200015157806334ac9cf2116200012857806334ac9cf214620003245780633ae0504714620003465780633e197043146200035e57600080fd5b80632d2c9d9414620002695780632dfdf0b5146200028e578063318aee3d14620002b557600080fd5b806322e95f2c116200018657806322e95f2c14620001ef578063240ff378146200022d5780632cffd02e146200024457600080fd5b806315064c9614620001a45780632072f6c514620001d5575b600080fd5b348015620001b157600080fd5b50606854620001c09060ff1681565b60405190151581526020015b60405180910390f35b348015620001e257600080fd5b50620001ed62000574565b005b348015620001fc57600080fd5b50620002146200020e36600462002938565b620005ac565b6040516001600160a01b039091168152602001620001cc565b620001ed6200023e366004620029cf565b62000617565b3480156200025157600080fd5b50620001ed6200026336600462002a66565b6200073e565b3480156200027657600080fd5b50620001ed6200028836600462002a66565b62000b98565b3480156200029b57600080fd5b50620002a660535481565b604051908152602001620001cc565b348015620002c257600080fd5b50620002ff620002d436600462002b4c565b606b6020526000908152604090205463ffffffff81169064010000000090046001600160a01b031682565b6040805163ffffffff90931683526001600160a01b03909116602083015201620001cc565b3480156200033157600080fd5b50606c5462000214906001600160a01b031681565b3480156200035357600080fd5b50620002a662000d36565b3480156200036b57600080fd5b50620002a66200037d36600462002b7c565b62000e1c565b3480156200039057600080fd5b50620001ed620003a236600462002c06565b62000ec6565b348015620003b557600080fd5b50620001ed62001096565b348015620003cd57600080fd5b5062000214620003df36600462002c56565b606a602052600090815260409020546001600160a01b031681565b3480156200040757600080fd5b50620001c06200041936600462002c56565b600881901c600090815260696020526040902054600160ff9092169190911b9081161490565b3480156200044c57600080fd5b50620002146200045e36600462002c70565b620010ba565b3480156200047157600080fd5b506068546200048890610100900463ffffffff1681565b60405163ffffffff9091168152602001620001cc565b348015620004ab57600080fd5b506068546200048890600160c81b900463ffffffff1681565b620001ed620004d536600462002d24565b6200120e565b348015620004e857600080fd5b5060685462000214906501000000000090046001600160a01b031681565b3480156200051357600080fd5b50620001ed620015f1565b3480156200052b57600080fd5b50620002a66200053d36600462002c56565b60696020526000908152604090205481565b3480156200055c57600080fd5b50620001c06200056e36600462002dc6565b62001627565b606c546001600160a01b03163314620005a05760405163e2e8106b60e01b815260040160405180910390fd5b620005aa6200170e565b565b6040805160e084901b6001600160e01b031916602080830191909152606084901b6bffffffffffffffffffffffff1916602483015282516018818403018152603890920183528151918101919091206000908152606a90915220546001600160a01b03165b92915050565b60685460ff16156200063c57604051630bc011ff60e21b815260040160405180910390fd5b60685463ffffffff868116610100909204161480620006625750600263ffffffff861610155b1562000681576040516302caf51760e11b815260040160405180910390fd5b7f501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b6001606860019054906101000a900463ffffffff16338888348888605354604051620006d79998979695949392919062002e3c565b60405180910390a162000726620007206001606860019054906101000a900463ffffffff163389893489896040516200071292919062002eaa565b604051809103902062000e1c565b6200176b565b821562000737576200073762001882565b5050505050565b60685460ff16156200076357604051630bc011ff60e21b815260040160405180910390fd5b6200077a8b8b8b8b8b8b8b8b8b8b8b600062001934565b6001600160a01b0386166200083c57604080516000808252602082019092526001600160a01b038616908590604051620007b5919062002ef6565b60006040518083038185875af1925050503d8060008114620007f4576040519150601f19603f3d011682016040523d82523d6000602084013e620007f9565b606091505b505090508062000835576040517f6747a28800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5062000b2d565b60685463ffffffff61010090910481169088160362000871576200086b6001600160a01b038716858562001aff565b62000b2d565b6040516001600160e01b031960e089901b1660208201526bffffffffffffffffffffffff19606088901b16602482015260009060380160408051601f1981840301815291815281516020928301206000818152606a9093529120549091506001600160a01b03168062000ac55760008080620008f08688018862002fcf565b9250925092506000858484846040516200090a90620028fc565b620009189392919062003073565b8190604051809103906000f590508015801562000939573d6000803e3d6000fd5b506040516340c10f1960e01b81526001600160a01b038c81166004830152602482018c9052919250908216906340c10f1990604401600060405180830381600087803b1580156200098957600080fd5b505af11580156200099e573d6000803e3d6000fd5b5050505080606a600088815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060405180604001604052808e63ffffffff1681526020018d6001600160a01b0316815250606b6000836001600160a01b03166001600160a01b0316815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154816001600160a01b0302191690836001600160a01b031602179055509050507f490e59a1701b938786ac72570a1efeac994a3dbe96e2e883e19e902ace6e6a398d8d838b8b60405162000ab3959493929190620030b0565b60405180910390a15050505062000b2a565b6040516340c10f1960e01b81526001600160a01b038781166004830152602482018790528216906340c10f1990604401600060405180830381600087803b15801562000b1057600080fd5b505af115801562000b25573d6000803e3d6000fd5b505050505b50505b6040805163ffffffff8c81168252891660208201526001600160a01b0388811682840152861660608201526080810185905290517f25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe275459839181900360a00190a15050505050505050505050565b60685460ff161562000bbd57604051630bc011ff60e21b815260040160405180910390fd5b62000bd48b8b8b8b8b8b8b8b8b8b8b600162001934565b6000846001600160a01b031684888a868660405160240162000bfa9493929190620030eb565b60408051601f198184030181529181526020820180516001600160e01b03167f1806b5f2000000000000000000000000000000000000000000000000000000001790525162000c4a919062002ef6565b60006040518083038185875af1925050503d806000811462000c89576040519150601f19603f3d011682016040523d82523d6000602084013e62000c8e565b606091505b505090508062000cca576040517f37e391c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805163ffffffff8d811682528a1660208201526001600160a01b0389811682840152871660608201526080810186905290517f25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe275459839181900360a00190a1505050505050505050505050565b605354600090819081805b602081101562000e13578083901c60011660010362000da4576033816020811062000d705762000d7062003126565b0154604080516020810192909252810185905260600160405160208183030381529060405280519060200120935062000dd1565b60408051602081018690529081018390526060016040516020818303038152906040528051906020012093505b6040805160208101849052908101839052606001604051602081830303815290604052805190602001209150808062000e0a9062003152565b91505062000d41565b50919392505050565b6040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201526001600160e01b031960e088811b821660218401526bffffffffffffffffffffffff19606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b600054610100900460ff161580801562000ee75750600054600160ff909116105b8062000f035750303b15801562000f03575060005460ff166001145b62000f7b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000805460ff19166001179055801562000f9f576000805461ff0019166101001790555b606880547fffffffffffffff000000000000000000000000000000000000000000000000ff1661010063ffffffff8716027fffffffffffffff0000000000000000000000000000000000000000ffffffffff1617650100000000006001600160a01b038681169190910291909117909155606c80547fffffffffffffffffffffffff0000000000000000000000000000000000000000169184169190911790556200104962001b7d565b801562001090576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b605354606854600160c81b900463ffffffff161015620005aa57620005aa62001882565b6040516001600160e01b031960e089901b1660208201526bffffffffffffffffffffffff19606088901b1660248201526000908190603801604051602081830303815290604052805190602001209050600060ff60f81b3083604051806020016200112590620028fc565b601f1982820381018352601f90910116604081905262001152908d908d908d908d908d906020016200316e565b60408051601f1981840301815290829052620011729291602001620031af565b60405160208183030381529060405280519060200120604051602001620011e894939291907fff0000000000000000000000000000000000000000000000000000000000000094909416845260609290921b6bffffffffffffffffffffffff191660018401526015830152603582015260550190565b60408051808303601f1901815291905280516020909101209a9950505050505050505050565b60685460ff16156200123357604051630bc011ff60e21b815260040160405180910390fd5b6200123d62001bf4565b60685463ffffffff888116610100909204161480620012635750600263ffffffff881610155b1562001282576040516302caf51760e11b815260040160405180910390fd5b6000806060876001600160a01b038816620012db57883414620012d1576040517fb89240f500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000925062001562565b341562001314576040517f798ee6f100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038089166000908152606b602090815260409182902082518084019093525463ffffffff8116835264010000000090049092169181018290529015620013ea576040517f9dc29fac000000000000000000000000000000000000000000000000000000008152336004820152602481018b90526001600160a01b038a1690639dc29fac90604401600060405180830381600087803b158015620013bd57600080fd5b505af1158015620013d2573d6000803e3d6000fd5b50505050806020015194508060000151935062001560565b8515620013ff57620013ff898b898962001c4f565b6040516370a0823160e01b81523060048201526000906001600160a01b038b16906370a0823190602401602060405180830381865afa15801562001447573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200146d9190620031e2565b9050620014866001600160a01b038b1633308e62002015565b6040516370a0823160e01b81523060048201526000906001600160a01b038c16906370a0823190602401602060405180830381865afa158015620014ce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620014f49190620031e2565b9050620015028282620031fc565b6068548c9850610100900463ffffffff1696509350620015228762002068565b6200152d8c62002166565b620015388d62002251565b6040516020016200154c9392919062003073565b604051602081830303815290604052945050505b505b7f501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b600084868e8e8688605354604051620015a498979695949392919062003212565b60405180910390a1620015c962000720600085878f8f87898051906020012062000e1c565b8615620015da57620015da62001882565b50505050620015e860018055565b50505050505050565b606c546001600160a01b031633146200161d5760405163e2e8106b60e01b815260040160405180910390fd5b620005aa62002331565b600084815b60208110156200170257600163ffffffff8616821c811690036200169e578581602081106200165f576200165f62003126565b60200201358260405160200162001680929190918252602082015260400190565b604051602081830303815290604052805190602001209150620016ed565b81868260208110620016b457620016b462003126565b6020020135604051602001620016d4929190918252602082015260400190565b6040516020818303038152906040528051906020012091505b80620016f98162003152565b9150506200162c565b50909114949350505050565b60685460ff16156200173357604051630bc011ff60e21b815260040160405180910390fd5b6068805460ff191660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b8060016200177c602060026200337b565b620017889190620031fc565b60535410620017c3576040517fef5ccf6600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000605360008154620017d69062003152565b9182905550905060005b602081101562001872578082901c6001166001036200181857826033826020811062001810576200181062003126565b015550505050565b603381602081106200182e576200182e62003126565b015460408051602081019290925281018490526060016040516020818303038152906040528051906020012092508080620018699062003152565b915050620017e0565b506200187d62003389565b505050565b6053546068805463ffffffff909216600160c81b027fffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffffff90921691909117908190556001600160a01b0365010000000000909104166333d6247d620018e562000d36565b6040518263ffffffff1660e01b81526004016200190491815260200190565b600060405180830381600087803b1580156200191f57600080fd5b505af115801562001090573d6000803e3d6000fd5b620019458b63ffffffff16620023a3565b6068546040805160208082018e90528183018d9052825180830384018152606083019384905280519101207f257b36320000000000000000000000000000000000000000000000000000000090925260648101919091526000916501000000000090046001600160a01b03169063257b3632906084016020604051808303816000875af1158015620019db573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a019190620031e2565b90508060000362001a3d576040517e2f6fad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60685463ffffffff888116610100909204161462001a6e576040516302caf51760e11b815260040160405180910390fd5b606854600090610100900463ffffffff1662001a8c57508962001a8f565b508a5b62001ab862001aaf848c8c8c8c8c8c8c6040516200071292919062002eaa565b8f8f8462001627565b62001aef576040517fe0417cec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050505050565b6040516001600160a01b0383166024820152604481018290526200187d9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915262002408565b600054610100900460ff1662001bea5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840162000f72565b620005aa620024f4565b60026001540362001c485760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640162000f72565b6002600155565b600062001c6060048284866200339f565b62001c6b91620033cb565b90507f2afa5331000000000000000000000000000000000000000000000000000000006001600160e01b031982160162001e5757600080808080808062001cb6896004818d6200339f565b81019062001cc59190620033fc565b9650965096509650965096509650336001600160a01b0316876001600160a01b03161462001d065760405163912ecce760e01b815260040160405180910390fd5b6001600160a01b038616301462001d305760405163750643af60e01b815260040160405180910390fd5b8a851462001d6a576040517f03fffc4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516001600160a01b0389811660248301528881166044830152606482018890526084820187905260ff861660a483015260c4820185905260e48083018590528351808403909101815261010490920183526020820180516001600160e01b03167fd505accf000000000000000000000000000000000000000000000000000000001790529151918e169162001e03919062002ef6565b6000604051808303816000865af19150503d806000811462001e42576040519150601f19603f3d011682016040523d82523d6000602084013e62001e47565b606091505b5050505050505050505062000737565b6001600160e01b031981166323f2ebc360e21b1462001ea2576040517fe282c0ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008080808080808062001eba8a6004818e6200339f565b81019062001ec9919062003457565b97509750975097509750975097509750336001600160a01b0316886001600160a01b03161462001f0c5760405163912ecce760e01b815260040160405180910390fd5b6001600160a01b038716301462001f365760405163750643af60e01b815260040160405180910390fd5b604080516001600160a01b038a811660248301528981166044830152606482018990526084820188905286151560a483015260ff861660c483015260e482018590526101048083018590528351808403909101815261012490920183526020820180516001600160e01b03166323f2ebc360e21b1790529151918f169162001fbf919062002ef6565b6000604051808303816000865af19150503d806000811462001ffe576040519150601f19603f3d011682016040523d82523d6000602084013e62002003565b606091505b50505050505050505050505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052620010909085907f23b872dd000000000000000000000000000000000000000000000000000000009060840162001b45565b60408051600481526024810182526020810180516001600160e01b03167f06fdde0300000000000000000000000000000000000000000000000000000000179052905160609160009182916001600160a01b03861691620020ca919062002ef6565b600060405180830381855afa9150503d806000811462002107576040519150601f19603f3d011682016040523d82523d6000602084013e6200210c565b606091505b50915091508162002153576040518060400160405280600781526020017f4e4f5f4e414d45000000000000000000000000000000000000000000000000008152506200215e565b6200215e8162002561565b949350505050565b60408051600481526024810182526020810180516001600160e01b03167f95d89b4100000000000000000000000000000000000000000000000000000000179052905160609160009182916001600160a01b03861691620021c8919062002ef6565b600060405180830381855afa9150503d806000811462002205576040519150601f19603f3d011682016040523d82523d6000602084013e6200220a565b606091505b50915091508162002153576040518060400160405280600981526020017f4e4f5f53594d424f4c00000000000000000000000000000000000000000000008152506200215e565b60408051600481526024810182526020810180516001600160e01b03167f313ce567000000000000000000000000000000000000000000000000000000001790529051600091829182916001600160a01b03861691620022b2919062002ef6565b600060405180830381855afa9150503d8060008114620022ef576040519150601f19603f3d011682016040523d82523d6000602084013e620022f4565b606091505b509150915081801562002308575080516020145b620023155760126200215e565b808060200190518101906200215e9190620034e3565b60018055565b60685460ff166200236e576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6068805460ff191690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b600881901c60008181526069602052604081208054600160ff861690811b9182189283905592909190818316900362000737576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006200245f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316620027519092919063ffffffff16565b8051909150156200187d578080602001905181019062002480919062003503565b6200187d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840162000f72565b600054610100900460ff166200232b5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840162000f72565b6060604082511062002583578180602001905181019062000611919062003523565b8151602003620027135760005b602081108015620025db5750828181518110620025b157620025b162003126565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b15620025f65780620025ed8162003152565b91505062002590565b806000036200263a57505060408051808201909152601281527f4e4f545f56414c49445f454e434f44494e4700000000000000000000000000006020820152919050565b60008167ffffffffffffffff81111562002658576200265862002eba565b6040519080825280601f01601f19166020018201604052801562002683576020820181803683370190505b50905060005b828110156200270b57848181518110620026a757620026a762003126565b602001015160f81c60f81b828281518110620026c757620026c762003126565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080620027028162003152565b91505062002689565b509392505050565b505060408051808201909152601281527f4e4f545f56414c49445f454e434f44494e470000000000000000000000000000602082015290565b919050565b60606200276284846000856200276c565b90505b9392505050565b606082471015620027e65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840162000f72565b6001600160a01b0385163b6200283f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000f72565b600080866001600160a01b031685876040516200285d919062002ef6565b60006040518083038185875af1925050503d80600081146200289c576040519150601f19603f3d011682016040523d82523d6000602084013e620028a1565b606091505b5091509150620028b3828286620028be565b979650505050505050565b60608315620028cf57508162002765565b825115620028e05782518084602001fd5b8160405162461bcd60e51b815260040162000f729190620035a3565b61182080620035b983390190565b803563ffffffff811681146200274c57600080fd5b6001600160a01b03811681146200293557600080fd5b50565b600080604083850312156200294c57600080fd5b62002957836200290a565b9150602083013562002969816200291f565b809150509250929050565b80151581146200293557600080fd5b60008083601f8401126200299657600080fd5b50813567ffffffffffffffff811115620029af57600080fd5b602083019150836020828501011115620029c857600080fd5b9250929050565b600080600080600060808688031215620029e857600080fd5b620029f3866200290a565b9450602086013562002a05816200291f565b9350604086013562002a178162002974565b9250606086013567ffffffffffffffff81111562002a3457600080fd5b62002a428882890162002983565b969995985093965092949392505050565b8061040081018310156200061157600080fd5b60008060008060008060008060008060006105208c8e03121562002a8957600080fd5b62002a958d8d62002a53565b9a5062002aa66104008d016200290a565b99506104208c013598506104408c0135975062002ac76104608d016200290a565b96506104808c013562002ada816200291f565b955062002aeb6104a08d016200290a565b94506104c08c013562002afe816200291f565b93506104e08c013592506105008c013567ffffffffffffffff81111562002b2457600080fd5b62002b328e828f0162002983565b915080935050809150509295989b509295989b9093969950565b60006020828403121562002b5f57600080fd5b813562002765816200291f565b60ff811681146200293557600080fd5b600080600080600080600060e0888a03121562002b9857600080fd5b873562002ba58162002b6c565b965062002bb5602089016200290a565b9550604088013562002bc7816200291f565b945062002bd7606089016200290a565b9350608088013562002be9816200291f565b9699959850939692959460a0840135945060c09093013592915050565b60008060006060848603121562002c1c57600080fd5b62002c27846200290a565b9250602084013562002c39816200291f565b9150604084013562002c4b816200291f565b809150509250925092565b60006020828403121562002c6957600080fd5b5035919050565b600080600080600080600060a0888a03121562002c8c57600080fd5b62002c97886200290a565b9650602088013562002ca9816200291f565b9550604088013567ffffffffffffffff8082111562002cc757600080fd5b62002cd58b838c0162002983565b909750955060608a013591508082111562002cef57600080fd5b5062002cfe8a828b0162002983565b909450925050608088013562002d148162002b6c565b8091505092959891949750929550565b600080600080600080600060c0888a03121562002d4057600080fd5b62002d4b886200290a565b9650602088013562002d5d816200291f565b955060408801359450606088013562002d76816200291f565b9350608088013562002d888162002974565b925060a088013567ffffffffffffffff81111562002da557600080fd5b62002db38a828b0162002983565b989b979a50959850939692959293505050565b600080600080610460858703121562002dde57600080fd5b8435935062002df1866020870162002a53565b925062002e0261042086016200290a565b939692955092936104400135925050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600061010060ff8c16835263ffffffff808c1660208501526001600160a01b03808c166040860152818b166060860152808a166080860152508760a08501528160c085015262002e90828501878962002e13565b925080851660e085015250509a9950505050505050505050565b8183823760009101908152919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562002eed57818101518382015260200162002ed3565b50506000910152565b6000825162002f0a81846020870162002ed0565b9190910192915050565b604051601f8201601f1916810167ffffffffffffffff8111828210171562002f405762002f4062002eba565b604052919050565b600067ffffffffffffffff82111562002f655762002f6562002eba565b50601f01601f191660200190565b600082601f83011262002f8557600080fd5b813562002f9c62002f968262002f48565b62002f14565b81815284602083860101111562002fb257600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121562002fe557600080fd5b833567ffffffffffffffff8082111562002ffe57600080fd5b6200300c8783880162002f73565b945060208601359150808211156200302357600080fd5b50620030328682870162002f73565b925050604084013562002c4b8162002b6c565b600081518084526200305f81602086016020860162002ed0565b601f01601f19169290920160200192915050565b60608152600062003088606083018662003045565b82810360208401526200309c818662003045565b91505060ff83166040830152949350505050565b63ffffffff8616815260006001600160a01b03808716602084015280861660408401525060806060830152620028b360808301848662002e13565b6001600160a01b038516815263ffffffff841660208201526060604082015260006200311c60608301848662002e13565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016200316757620031676200313c565b5060010190565b6060815260006200318460608301878962002e13565b82810360208401526200319981868862002e13565b91505060ff831660408301529695505050505050565b60008351620031c381846020880162002ed0565b835190830190620031d981836020880162002ed0565b01949350505050565b600060208284031215620031f557600080fd5b5051919050565b818103818111156200061157620006116200313c565b600061010060ff8b16835263ffffffff808b1660208501526001600160a01b03808b166040860152818a1660608601528089166080860152508660a08501528160c0850152620032658285018762003045565b925080851660e085015250509998505050505050505050565b600181815b80851115620032bf578160001904821115620032a357620032a36200313c565b80851615620032b157918102915b93841c939080029062003283565b509250929050565b600082620032d85750600162000611565b81620032e75750600062000611565b81600181146200330057600281146200330b576200332b565b600191505062000611565b60ff8411156200331f576200331f6200313c565b50506001821b62000611565b5060208310610133831016604e8410600b841016171562003350575081810a62000611565b6200335c83836200327e565b80600019048211156200337357620033736200313c565b029392505050565b6000620027658383620032c7565b634e487b7160e01b600052600160045260246000fd5b60008085851115620033b057600080fd5b83861115620033be57600080fd5b5050820193919092039150565b6001600160e01b03198135818116916004851015620033f45780818660040360031b1b83161692505b505092915050565b600080600080600080600060e0888a0312156200341857600080fd5b873562003425816200291f565b9650602088013562003437816200291f565b95506040880135945060608801359350608088013562002be98162002b6c565b600080600080600080600080610100898b0312156200347557600080fd5b883562003482816200291f565b9750602089013562003494816200291f565b965060408901359550606089013594506080890135620034b48162002974565b935060a0890135620034c68162002b6c565b979a969950949793969295929450505060c08201359160e0013590565b600060208284031215620034f657600080fd5b8151620027658162002b6c565b6000602082840312156200351657600080fd5b8151620027658162002974565b6000602082840312156200353657600080fd5b815167ffffffffffffffff8111156200354e57600080fd5b8201601f810184136200356057600080fd5b80516200357162002f968262002f48565b8181528560208385010111156200358757600080fd5b6200359a82602083016020860162002ed0565b95945050505050565b6020815260006200276560208301846200304556fe6101006040523480156200001257600080fd5b50604051620018203803806200182083398101604081905262000035916200028d565b82826003620000458382620003a1565b506004620000548282620003a1565b50503360c0525060ff811660e052466080819052620000739062000080565b60a052506200046d915050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620000ad6200012e565b805160209182012060408051808201825260018152603160f81b90840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b6060600380546200013f9062000312565b80601f01602080910402602001604051908101604052809291908181526020018280546200016d9062000312565b8015620001be5780601f106200019257610100808354040283529160200191620001be565b820191906000526020600020905b815481529060010190602001808311620001a057829003601f168201915b5050505050905090565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001f057600080fd5b81516001600160401b03808211156200020d576200020d620001c8565b604051601f8301601f19908116603f01168101908282118183101715620002385762000238620001c8565b816040528381526020925086838588010111156200025557600080fd5b600091505b838210156200027957858201830151818301840152908201906200025a565b600093810190920192909252949350505050565b600080600060608486031215620002a357600080fd5b83516001600160401b0380821115620002bb57600080fd5b620002c987838801620001de565b94506020860151915080821115620002e057600080fd5b50620002ef86828701620001de565b925050604084015160ff811681146200030757600080fd5b809150509250925092565b600181811c908216806200032757607f821691505b6020821081036200034857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200039c57600081815260208120601f850160051c81016020861015620003775750805b601f850160051c820191505b81811015620003985782815560010162000383565b5050505b505050565b81516001600160401b03811115620003bd57620003bd620001c8565b620003d581620003ce845462000312565b846200034e565b602080601f8311600181146200040d5760008415620003f45750858301515b600019600386901b1c1916600185901b17855562000398565b600085815260208120601f198616915b828110156200043e578886015182559484019460019091019084016200041d565b50858210156200045d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e051611364620004bc60003960006102370152600081816102fa015281816105630152610623015260006104f701526000818161035f01526104c101526113646000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806370a08231116100d8578063a457c2d71161008c578063d505accf11610066578063d505accf14610381578063dd62ed3e14610394578063ffa1ad74146103cd57600080fd5b8063a457c2d714610334578063a9059cbb14610347578063cd0d00961461035a57600080fd5b806395d89b41116100bd57806395d89b41146102da5780639dc29fac146102e2578063a3c573eb146102f557600080fd5b806370a08231146102915780637ecebe00146102ba57600080fd5b806330adf81f1161012f5780633644e515116101145780633644e51514610261578063395093511461026957806340c10f191461027c57600080fd5b806330adf81f14610209578063313ce5671461023057600080fd5b806318160ddd1161016057806318160ddd146101bd57806320606b70146101cf57806323b872dd146101f657600080fd5b806306fdde031461017c578063095ea7b31461019a575b600080fd5b6101846103ed565b6040516101919190611107565b60405180910390f35b6101ad6101a8366004611171565b61047f565b6040519015158152602001610191565b6002545b604051908152602001610191565b6101c17f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6101ad61020436600461119b565b610499565b6101c17f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610191565b6101c16104bd565b6101ad610277366004611171565b610519565b61028f61028a366004611171565b610558565b005b6101c161029f3660046111d7565b6001600160a01b031660009081526020819052604090205490565b6101c16102c83660046111d7565b60056020526000908152604090205481565b610184610609565b61028f6102f0366004611171565b610618565b61031c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610191565b6101ad610342366004611171565b6106c0565b6101ad610355366004611171565b61076a565b6101c17f000000000000000000000000000000000000000000000000000000000000000081565b61028f61038f3660046111f9565b610778565b6101c16103a236600461126c565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610184604051806040016040528060018152602001603160f81b81525081565b6060600380546103fc9061129f565b80601f01602080910402602001604051908101604052809291908181526020018280546104289061129f565b80156104755780601f1061044a57610100808354040283529160200191610475565b820191906000526020600020905b81548152906001019060200180831161045857829003601f168201915b5050505050905090565b60003361048d8185856109fd565b60019150505b92915050565b6000336104a7858285610b56565b6104b2858585610be8565b506001949350505050565b60007f000000000000000000000000000000000000000000000000000000000000000046146104f4576104ef46610dff565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048d90829086906105539087906112ef565b6109fd565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105fb5760405162461bcd60e51b815260206004820152603060248201527f546f6b656e577261707065643a3a6f6e6c794272696467653a204e6f7420506f60448201527f6c79676f6e5a6b45564d4272696467650000000000000000000000000000000060648201526084015b60405180910390fd5b6106058282610eab565b5050565b6060600480546103fc9061129f565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106b65760405162461bcd60e51b815260206004820152603060248201527f546f6b656e577261707065643a3a6f6e6c794272696467653a204e6f7420506f60448201527f6c79676f6e5a6b45564d4272696467650000000000000000000000000000000060648201526084016105f2565b6106058282610f8a565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091908381101561075d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016105f2565b6104b282868684036109fd565b60003361048d818585610be8565b834211156107ed5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e577261707065643a3a7065726d69743a204578706972656420706560448201527f726d69740000000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b038716600090815260056020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918a918a918a91908661083a83611302565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006108986104bd565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101919091526042810183905260620160408051601f198184030181528282528051602091820120600080855291840180845281905260ff89169284019290925260608301879052608083018690529092509060019060a0016020604051602081039080840390855afa15801561093e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906109745750896001600160a01b0316816001600160a01b0316145b6109e65760405162461bcd60e51b815260206004820152602760248201527f546f6b656e577261707065643a3a7065726d69743a20496e76616c696420736960448201527f676e61747572650000000000000000000000000000000000000000000000000060648201526084016105f2565b6109f18a8a8a6109fd565b50505050505050505050565b6001600160a01b038316610a785760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b038216610af45760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610be25781811015610bd55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105f2565b610be284848484036109fd565b50505050565b6001600160a01b038316610c645760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b038216610ce05760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b03831660009081526020819052604090205481811015610d6f5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610da69084906112ef565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610df291815260200190565b60405180910390a3610be2565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f610e2a6103ed565b805160209182012060408051808201825260018152603160f81b90840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b6001600160a01b038216610f015760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105f2565b8060026000828254610f1391906112ef565b90915550506001600160a01b03821660009081526020819052604081208054839290610f409084906112ef565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0382166110065760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b038216600090815260208190526040902054818110156110955760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b03831660009081526020819052604081208383039055600280548492906110c490849061131b565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610b49565b600060208083528351808285015260005b8181101561113457858101830151858201604001528201611118565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461116c57600080fd5b919050565b6000806040838503121561118457600080fd5b61118d83611155565b946020939093013593505050565b6000806000606084860312156111b057600080fd5b6111b984611155565b92506111c760208501611155565b9150604084013590509250925092565b6000602082840312156111e957600080fd5b6111f282611155565b9392505050565b600080600080600080600060e0888a03121561121457600080fd5b61121d88611155565b965061122b60208901611155565b95506040880135945060608801359350608088013560ff8116811461124f57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561127f57600080fd5b61128883611155565b915061129660208401611155565b90509250929050565b600181811c908216806112b357607f821691505b6020821081036112d357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610493576104936112d9565b600060018201611314576113146112d9565b5060010190565b81810381811115610493576104936112d956fea264697066735822122096b785fb92e9d4372a52fbc641ca1490dd9eca1990f97279973ebfb2e360d35264736f6c63430008110033a26469706673582212203e56a8c8e90f8393064aa68599de6b13ecf8da3fea75bef5ecea9d2366baca9264736f6c63430008110033 \ No newline at end of file diff --git a/etherman/smartcontracts/bin/supernets2.bin b/etherman/smartcontracts/bin/supernets2.bin new file mode 100644 index 00000000..85742fa4 --- /dev/null +++ b/etherman/smartcontracts/bin/supernets2.bin @@ -0,0 +1 @@ +6101606040523480156200001257600080fd5b50604051620061cb380380620061cb8339810160408190526200003591620000ac565b6001600160a01b0396871660c05294861660805292851660a05290841660e052909216610100526001600160401b039182166101205216610140526200014f565b6001600160a01b03811681146200008c57600080fd5b50565b80516001600160401b0381168114620000a757600080fd5b919050565b600080600080600080600060e0888a031215620000c857600080fd5b8751620000d58162000076565b6020890151909750620000e88162000076565b6040890151909650620000fb8162000076565b60608901519095506200010e8162000076565b6080890151909450620001218162000076565b92506200013160a089016200008f565b91506200014160c089016200008f565b905092959891949750929550565b60805160a05160c05160e051610100516101205161014051615f9c6200022f600039600081816106b501528181610ed101526130120152600081816108220152610ea70152600081816105c001526116750152600081816107d5015281816118c5015281816136ac015261430801526000818161098e0152818161145001528181611dc20152818161288c0152818161384901528181613aa40152614667015260008181610a4e015281816141f501526149d30152600081816108de01528181611893015281816123e301528181613a780152614ac20152615f9c6000f3fe608060405234801561001057600080fd5b50600436106103c55760003560e01c8063841b24d7116101ff578063c89e42df1161011a578063e7a7ed02116100ad578063f14916d61161007c578063f14916d614610ab0578063f2fde38b14610ac3578063f851a44014610ad6578063f8b823e414610af657600080fd5b8063e7a7ed0214610a19578063e8bf92ed14610a49578063eaeb077b14610a70578063ed6b010414610a8357600080fd5b8063d8d1091b116100e9578063d8d1091b146109c3578063d939b315146109d6578063dbc16976146109fe578063e6ad707e14610a0657600080fd5b8063c89e42df14610947578063cfa8ed471461095a578063d02103ca14610989578063d2e129f9146109b057600080fd5b8063ada8f91911610192578063b6b0b09711610161578063b6b0b097146108d9578063ba58ae3914610900578063c0ed84e014610913578063c754c7ed1461091b57600080fd5b8063ada8f9191461080a578063adc879e91461081d578063afd23cbe14610844578063b4d63f581461087257600080fd5b80639c9f3dfe116101ce5780639c9f3dfe146107aa578063a066215c146107bd578063a3c573eb146107d0578063a50a164b146107f757600080fd5b8063841b24d71461074c5780638c3d73011461077c5780638da5cb5b1461078457806399f5634e146107a257600080fd5b80634a1a89a7116102ef57806360469169116102825780637215541a116102515780637215541a146106895780637fcb36531461069c578063831c7ead146106b0578063837a4738146106d757600080fd5b806360469169146106465780636b8616ce1461064e5780636ff512cc1461066e578063715018a61461068157600080fd5b80634fd70464116102be5780634fd70464146105f55780635392c5e014610608578063542028d5146106365780635ec919581461063e57600080fd5b80634a1a89a7146105885780634a910e6a146105a85780634df61d24146105bb5780634e487706146105e257600080fd5b80632678224711610367578063423fa85611610336578063423fa85614610519578063438a539914610539578063456052671461054c578063458c04771461057457600080fd5b8063267822471461048257806329878983146104c7578063383b3be8146104f3578063394218e91461050657600080fd5b806315064c96116103a357806315064c961461042b5780631816b7e51461044857806319d8ac611461045b578063220d78991461046f57600080fd5b80630808270c146103ca5780630a0d9fbe146103df578063107bf28c14610416575b600080fd5b6103dd6103d836600461535a565b610aff565b005b606f546103f890610100900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b61041e610bb2565b60405161040d9190615461565b606f546104389060ff1681565b604051901515815260200161040d565b6103dd61045636600461547b565b610c40565b6073546103f89067ffffffffffffffff1681565b61041e61047d36600461549f565b610d58565b607b546104a29073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161040d565b6074546104a29068010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b6104386105013660046154ec565b610f2f565b6103dd6105143660046154ec565b610f85565b6073546103f89068010000000000000000900467ffffffffffffffff1681565b6103dd61054736600461552b565b611109565b6073546103f890700100000000000000000000000000000000900467ffffffffffffffff1681565b6079546103f89067ffffffffffffffff1681565b6079546103f89068010000000000000000900467ffffffffffffffff1681565b6103dd6105b63660046154ec565b611986565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd6105f03660046154ec565b611a39565b6103dd6106033660046155dd565b611bbd565b6106286106163660046154ec565b60756020526000908152604090205481565b60405190815260200161040d565b61041e611f53565b6103dd611f60565b610628612060565b61062861065c3660046154ec565b60716020526000908152604090205481565b6103dd61067c366004615666565b612076565b6103dd61214b565b6103dd6106973660046154ec565b61215f565b6074546103f89067ffffffffffffffff1681565b6103f87f000000000000000000000000000000000000000000000000000000000000000081565b6107206106e5366004615681565b60786020526000908152604090208054600182015460029092015467ffffffffffffffff808316936801000000000000000090930416919084565b6040805167ffffffffffffffff958616815294909316602085015291830152606082015260800161040d565b6079546103f8907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b6103dd6122cf565b60335473ffffffffffffffffffffffffffffffffffffffff166104a2565b61062861239b565b6103dd6107b83660046154ec565b6124f4565b6103dd6107cb3660046154ec565b612670565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd6108053660046155dd565b612776565b6103dd610818366004615666565b61293b565b6103f87f000000000000000000000000000000000000000000000000000000000000000081565b606f5461085f906901000000000000000000900461ffff1681565b60405161ffff909116815260200161040d565b6108b36108803660046154ec565b6072602052600090815260409020805460019091015467ffffffffffffffff808216916801000000000000000090041683565b6040805193845267ffffffffffffffff928316602085015291169082015260600161040d565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b61043861090e366004615681565b6129ff565b6103f8612a89565b607b546103f89074010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6103dd61095536600461577d565b612ade565b606f546104a2906b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd6109be3660046157b2565b612b6b565b6103dd6109d1366004615865565b6130b7565b6079546103f890700100000000000000000000000000000000900467ffffffffffffffff1681565b6103dd613659565b6103dd610a1436600461535a565b613732565b6073546103f8907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd610a7e3660046158da565b613942565b607b54610438907c0100000000000000000000000000000000000000000000000000000000900460ff1681565b6103dd610abe366004615666565b613d38565b6103dd610ad1366004615666565b613e0a565b607a546104a29073ffffffffffffffffffffffffffffffffffffffff1681565b61062860705481565b606f5460ff1615610b3c576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b4c8888888888888888613ebe565b67ffffffffffffffff85166000908152607560209081526040918290205482519081529081018590527f1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010910160405180910390a1610ba8614306565b5050505050505050565b60778054610bbf90615926565b80601f0160208091040260200160405190810160405280929190818152602001828054610beb90615926565b8015610c385780601f10610c0d57610100808354040283529160200191610c38565b820191906000526020600020905b815481529060010190602001808311610c1b57829003601f168201915b505050505081565b607a5473ffffffffffffffffffffffffffffffffffffffff163314610c91576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e88161ffff161080610caa57506103ff8161ffff16115b15610ce1576040517f4c2533c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffff16690100000000000000000061ffff8416908102919091179091556040519081527f7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5906020015b60405180910390a150565b67ffffffffffffffff8086166000818152607260205260408082205493881682529020546060929115801590610d8c575081155b15610dc3576040517f6818c29e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80610dfa576040517f66385b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e03846129ff565b610e39576040517f176b913c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152603481019690965260548601929092527fffffffffffffffff00000000000000000000000000000000000000000000000060c098891b811660748701527f0000000000000000000000000000000000000000000000000000000000000000891b8116607c8701527f0000000000000000000000000000000000000000000000000000000000000000891b81166084870152608c86019490945260ac85015260cc840194909452509290931b90911660ec830152805180830360d401815260f4909201905290565b60795467ffffffffffffffff82811660009081526078602052604081205490924292610f7392700100000000000000000000000000000000909204811691166159a8565b67ffffffffffffffff16111592915050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314610fd6576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff8216111561101d576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff1661108c5760795467ffffffffffffffff780100000000000000000000000000000000000000000000000090910481169082161061108c576040517f401636df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527f1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a190602001610d4d565b606f5460ff1615611146576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f546b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146111a6576040517f11e7be1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8360008190036111e2576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e881111561121e576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff6801000000000000000082048116600081815260726020526040812054838516949293700100000000000000000000000000000000909304909216919082905b868110156116375760008c8c83818110611286576112866159d0565b90506080020180360381019061129c91906159ff565b606081015190915067ffffffffffffffff161561140d57846112bd81615a70565b955050600081600001518260200151836060015160405160200161131993929190928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff89166000908152607190935291205490915081146113a2576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8087166000908152607160205260408082209190915560608401519084015190821691161015611407576040517f7f7ab87200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061150b565b6020810151158015906114d4575060208101516040517f257b363200000000000000000000000000000000000000000000000000000000815260048101919091527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063257b3632906024016020604051808303816000875af11580156114ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d29190615a97565b155b1561150b576040517f73bd668d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8667ffffffffffffffff16816040015167ffffffffffffffff16108061153e575042816040015167ffffffffffffffff16115b15611575576040517fea82791600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838160000151826020015183604001518e6040516020016116049594939291909485526020850193909352604084019190915260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166060808401919091521b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166068820152607c0190565b6040516020818303038152906040528051906020012093508060400151965050808061162f90615ab0565b91505061126a565b506040517fc7a823e000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063c7a823e0906116ae9085908c908c90600401615b31565b60006040518083038186803b1580156116c657600080fd5b505afa1580156116da573d6000803e3d6000fd5b5050505085846116ea91906159a8565b60735490945067ffffffffffffffff780100000000000000000000000000000000000000000000000090910481169084161115611753576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061175f8285615b54565b6117739067ffffffffffffffff1688615b75565b604080516060810182528581524267ffffffffffffffff908116602080840191825260738054680100000000000000009081900485168688019081528d861660008181526072909552979093209551865592516001909501805492519585167fffffffffffffffffffffffffffffffff000000000000000000000000000000009384161795851684029590951790945583548c841691161793029290921790559091508281169085161461186957607380547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8716021790555b6118bb33308360705461187c9190615b8e565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001692919061438e565b6118c3614470565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379e2cf976040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561192b57600080fd5b505af115801561193f573d6000803e3d6000fd5b505060405167ffffffffffffffff881692507f303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce9150600090a2505050505050505050505050565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314611a2d57606f5460ff16156119ee576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119f781610f2f565b611a2d576040517f0ce9e4a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611a368161451d565b50565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611a8a576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115611ad1576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16611b3c57607b5467ffffffffffffffff74010000000000000000000000000000000000000000909104811690821610611b3c576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b90602001610d4d565b606f5460ff1615611bfa576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff8681166000908152607260205260409020600101544292611c47927801000000000000000000000000000000000000000000000000909104811691166159a8565b67ffffffffffffffff161115611c89576040517f8a0704d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e8611c968787615b54565b67ffffffffffffffff161115611cd8576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ce787878787878787614730565b611cf085614ae9565b607954700100000000000000000000000000000000900467ffffffffffffffff16600003611e3857607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff87811691821790925560009081526075602052604090208490556079541615611d9357607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018590527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b158015611e1b57600080fd5b505af1158015611e2f573d6000803e3d6000fd5b50505050611f08565b611e40614470565b6079805467ffffffffffffffff16906000611e5a83615a70565b825467ffffffffffffffff9182166101009390930a92830292820219169190911790915560408051608081018252428316815288831660208083019182528284018a8152606084018a815260795487166000908152607890935294909120925183549251861668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009093169516949094171781559151600183015551600290910155505b604051838152339067ffffffffffffffff8716907f9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966906020015b60405180910390a350505050505050565b60768054610bbf90615926565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611fb1576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b547c0100000000000000000000000000000000000000000000000000000000900460ff1661200d576040517ff6ba91a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690556040517f854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f90600090a1565b600060705460646120719190615b8e565b905090565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146120c7576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fff0000000000000000000000000000000000000000ffffffffffffffffffffff166b01000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527ff54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc090602001610d4d565b612153614cc9565b61215d6000614d4a565b565b60335473ffffffffffffffffffffffffffffffffffffffff1633146122c7576000612188612a89565b90508067ffffffffffffffff168267ffffffffffffffff16116121d7576040517f812a372d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff680100000000000000009091048116908316118061221d575067ffffffffffffffff80831660009081526072602052604090206001015416155b15612254576040517f98c5c01400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80831660009081526072602052604090206001015442916122839162093a8091166159a8565b67ffffffffffffffff1611156122c5576040517fd257555a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b611a36614306565b607b5473ffffffffffffffffffffffffffffffffffffffff163314612320576040517fd1ec4b2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b54607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691821790556040519081527f056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e9060200160405180910390a1565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa15801561242a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061244e9190615a97565b9050600061245a612a89565b60735467ffffffffffffffff6801000000000000000082048116916124b29170010000000000000000000000000000000082048116917801000000000000000000000000000000000000000000000000900416615b54565b6124bc91906159a8565b6124c69190615b54565b67ffffffffffffffff169050806000036124e35760009250505090565b6124ed8183615bd4565b9250505090565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612545576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff8216111561258c576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166125f35760795467ffffffffffffffff7001000000000000000000000000000000009091048116908216106125f3576040517f48a05a9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607980547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c7590602001610d4d565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146126c1576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620151808167ffffffffffffffff161115612708576040517fe067dfe800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff1661010067ffffffffffffffff8416908102919091179091556040519081527f1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c2890602001610d4d565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146127d3576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6127e287878787878787614730565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8781169182179092556000908152607560205260409020849055607954161561285d57607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018590527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156128e557600080fd5b505af11580156128f9573d6000803e3d6000fd5b505060405185815233925067ffffffffffffffff881691507fcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe90602001611f42565b607a5473ffffffffffffffffffffffffffffffffffffffff16331461298c576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce690602001610d4d565b600067ffffffff0000000167ffffffffffffffff8316108015612a37575067ffffffff00000001604083901c67ffffffffffffffff16105b8015612a58575067ffffffff00000001608083901c67ffffffffffffffff16105b8015612a6f575067ffffffff0000000160c083901c105b15612a7c57506001919050565b506000919050565b919050565b60795460009067ffffffffffffffff1615612acd575060795467ffffffffffffffff9081166000908152607860205260409020546801000000000000000090041690565b5060745467ffffffffffffffff1690565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612b2f576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6076612b3b8282615c36565b507f6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b2081604051610d4d9190615461565b600054610100900460ff1615808015612b8b5750600054600160ff909116105b80612ba55750303b158015612ba5575060005460ff166001145b612c36576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015612c9457600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b612ca16020880188615666565b607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055612cf66040880160208901615666565b606f805473ffffffffffffffffffffffffffffffffffffffff929092166b010000000000000000000000027fff0000000000000000000000000000000000000000ffffffffffffffffffffff909216919091179055612d5b6080880160608901615666565b6074805473ffffffffffffffffffffffffffffffffffffffff9290921668010000000000000000027fffffffff0000000000000000000000000000000000000000ffffffffffffffff9092169190911790556000805260756020527ff9e3fbf150b7a0077118526f473c53cb4734f166167e2c6213e3567dd390b4ad8690556076612de68682615c36565b506077612df38582615c36565b5062093a80612e086060890160408a016154ec565b67ffffffffffffffff161115612e4a576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612e5a60608801604089016154ec565b6079805467ffffffffffffffff92909216700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff90921691909117905562093a80612ebc60a0890160808a016154ec565b67ffffffffffffffff161115612efe576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612f0e60a08801608089016154ec565b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff939093169290920291909117905567016345785d8a0000607055606f80547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000ff166a03ea000000000000070800179055607b80547fffffff000000000000000000ffffffffffffffffffffffffffffffffffffffff167c0100000000000697800000000000000000000000000000000000000000179055612fed614dc1565b7f13e60734641bd97ab6e444f419277d9983e2c3eab9bb631a578ffa07756b635160007f000000000000000000000000000000000000000000000000000000000000000085856040516130439493929190615d50565b60405180910390a180156130ae57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff1615613114576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff1615613151576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600081900361318d576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e88111156131c9576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff78010000000000000000000000000000000000000000000000008204811691613214918491700100000000000000000000000000000000900416615d88565b111561324c576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff680100000000000000008204811660008181526072602052604081205491937001000000000000000000000000000000009004909216915b848110156134f65760008787838181106132ac576132ac6159d0565b90506020028101906132be9190615d9b565b6132c790615dd9565b9050836132d381615a70565b825180516020918201208185015160408087015190519499509194506000936133359386939101928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff89166000908152607190935291205490915081146133be576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff86166000908152607160205260408120556133e3600189615b75565b84036134525742607b60149054906101000a900467ffffffffffffffff16846040015161341091906159a8565b67ffffffffffffffff161115613452576040517fc44a082100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020838101516040805192830188905282018490526060808301919091524260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016608083015233901b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166088820152609c0160405160208183030381529060405280519060200120945050505080806134ee90615ab0565b915050613290565b5061350184846159a8565b6073805467ffffffffffffffff4281167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009092168217808455604080516060810182528781526020808201958652680100000000000000009384900485168284019081528589166000818152607290935284832093518455965160019390930180549151871686027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921693871693909317179091558554938916700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff938602939093167fffffffffffffffff00000000000000000000000000000000ffffffffffffffff90941693909317919091179093559151929550917f648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a49190a2505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146136aa576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663dbc169766040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561371257600080fd5b505af1158015613726573d6000803e3d6000fd5b5050505061215d614e61565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff16331461378f576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61379f8888888888888888613ebe565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8781169182179092556000908152607560205260409020849055607954161561381a57607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018590527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156138a257600080fd5b505af11580156138b6573d6000803e3d6000fd5b50506079805477ffffffffffffffffffffffffffffffffffffffffffffffff167a093a800000000000000000000000000000000000000000000000001790555050604051838152339067ffffffffffffffff8716907fcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf729060200160405180910390a35050505050505050565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff161561399f576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16156139dc576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006139e6612060565b905081811115613a22576040517f4732fdb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611388831115613a5e576040517fa29a6c7c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613aa073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633308461438e565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633ed691ef6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b319190615a97565b60738054919250780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16906018613b6b83615a70565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550508484604051613ba2929190615e69565b60408051918290038220602083015281018290527fffffffffffffffff0000000000000000000000000000000000000000000000004260c01b166060820152606801604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291815281516020928301206073547801000000000000000000000000000000000000000000000000900467ffffffffffffffff1660009081526071909352912055323303613cd257607354604080518381523360208201526060918101829052600091810191909152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16907ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc9319060800160405180910390a2613d31565b607360189054906101000a900467ffffffffffffffff1667ffffffffffffffff167ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc93182338888604051613d289493929190615e79565b60405180910390a25b5050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314613d89576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607480547fffffffff0000000000000000000000000000000000000000ffffffffffffffff166801000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527f61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca90602001610d4d565b613e12614cc9565b73ffffffffffffffffffffffffffffffffffffffff8116613eb5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401612c2d565b611a3681614d4a565b600067ffffffffffffffff891615613f8c5760795467ffffffffffffffff908116908a161115613f1a576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5067ffffffffffffffff8089166000908152607860205260409020600281015481549092898116680100000000000000009092041614613f86576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50614028565b5067ffffffffffffffff861660009081526075602052604090205480613fde576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60745467ffffffffffffffff9081169088161115614028576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff908116908916118061405a57508867ffffffffffffffff168867ffffffffffffffff1611155b80614081575060795467ffffffffffffffff68010000000000000000909104811690891611155b156140b8576040517fbfa7079f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff88811660009081526078602052604090205468010000000000000000900481169087161461411b576040517f32a2a77f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061412a8888888589610d58565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160028360405161415f9190615eaf565b602060405180830381855afa15801561417c573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061419f9190615a97565b6141a99190615ec1565b6040805160208101825282815290517f8d8f8a5c00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691638d8f8a5c9161422c9189918991600401615ed5565b602060405180830381865afa158015614249573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061426d9190615f1d565b6142a3576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8a166000908152607860205260409020600201548690036142f9576040517fa47276bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632072f6c56040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561436e57600080fd5b505af1158015614382573d6000803e3d6000fd5b5050505061215d614ef0565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261446a9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614f83565b50505050565b60795467ffffffffffffffff68010000000000000000820481169116111561215d576079546000906144b99068010000000000000000900467ffffffffffffffff1660016159a8565b90506144c481610f2f565b15611a36576079546000906002906144e790849067ffffffffffffffff16615b54565b6144f19190615f3f565b6144fb90836159a8565b905061450681610f2f565b15614518576145148161451d565b5050565b614514825b60795467ffffffffffffffff680100000000000000009091048116908216111580614557575060795467ffffffffffffffff908116908216115b1561458e576040517fd086b70b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff818116600081815260786020908152604080832080546074805468010000000000000000928390049098167fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090981688179055600282015487865260759094529382902092909255607980547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169390940292909217909255600182015490517f33d6247d00000000000000000000000000000000000000000000000000000000815260048101919091529091907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156146c057600080fd5b505af11580156146d4573d6000803e3d6000fd5b505050508267ffffffffffffffff168167ffffffffffffffff167f328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e846002015460405161472391815260200190565b60405180910390a3505050565b60008061473b612a89565b905067ffffffffffffffff89161561480b5760795467ffffffffffffffff908116908a161115614797576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff808a1660009081526078602052604090206002810154815490945090918a8116680100000000000000009092041614614805576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506148ac565b67ffffffffffffffff881660009081526075602052604090205491508161485e576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168867ffffffffffffffff1611156148ac576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168767ffffffffffffffff16116148f9576040517fb9b18f5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000614908898989868a610d58565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160028360405161493d9190615eaf565b602060405180830381855afa15801561495a573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061497d9190615a97565b6149879190615ec1565b6040805160208101825282815290517f8d8f8a5c00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691638d8f8a5c91614a0a918a918a91600401615ed5565b602060405180830381865afa158015614a27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a4b9190615f1d565b614a81576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6142f933614a8f858c615b54565b67ffffffffffffffff16614aa161239b565b614aab9190615b8e565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169190615094565b6000614af3612a89565b905081600080614b038484615b54565b606f5467ffffffffffffffff9182169250600091614b279161010090041642615b75565b90505b8467ffffffffffffffff168467ffffffffffffffff1614614bb25767ffffffffffffffff80851660009081526072602052604090206001810154909116821015614b9057600181015468010000000000000000900467ffffffffffffffff169450614bac565b614b9a8686615b54565b67ffffffffffffffff16935050614bb2565b50614b2a565b6000614bbe8484615b75565b905083811015614c1557808403600c8111614bd95780614bdc565b600c5b9050806103e80a81606f60099054906101000a900461ffff1661ffff160a6070540281614c0b57614c0b615ba5565b0460705550614c85565b838103600c8111614c265780614c29565b600c5b90506000816103e80a82606f60099054906101000a900461ffff1661ffff160a670de0b6b3a76400000281614c6057614c60615ba5565b04905080607054670de0b6b3a76400000281614c7e57614c7e615ba5565b0460705550505b683635c9adc5dea000006070541115614caa57683635c9adc5dea000006070556130ae565b633b9aca0060705410156130ae57633b9aca0060705550505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff16331461215d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401612c2d565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16614e58576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401612c2d565b61215d33614d4a565b606f5460ff16614e9d576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b606f5460ff1615614f2d576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b6000614fe5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166150ea9092919063ffffffff16565b80519091501561508f57808060200190518101906150039190615f1d565b61508f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401612c2d565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261508f9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016143e8565b60606150f98484600085615101565b949350505050565b606082471015615193576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401612c2d565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516151bc9190615eaf565b60006040518083038185875af1925050503d80600081146151f9576040519150601f19603f3d011682016040523d82523d6000602084013e6151fe565b606091505b509150915061520f8783838761521a565b979650505050505050565b606083156152b05782516000036152a95773ffffffffffffffffffffffffffffffffffffffff85163b6152a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612c2d565b50816150f9565b6150f983838151156152c55781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c2d9190615461565b803567ffffffffffffffff81168114612a8457600080fd5b60008083601f84011261532357600080fd5b50813567ffffffffffffffff81111561533b57600080fd5b60208301915083602082850101111561535357600080fd5b9250929050565b60008060008060008060008060e0898b03121561537657600080fd5b61537f896152f9565b975061538d60208a016152f9565b965061539b60408a016152f9565b95506153a960608a016152f9565b94506080890135935060a0890135925060c089013567ffffffffffffffff8111156153d357600080fd5b6153df8b828c01615311565b999c989b5096995094979396929594505050565b60005b8381101561540e5781810151838201526020016153f6565b50506000910152565b6000815180845261542f8160208601602086016153f3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006154746020830184615417565b9392505050565b60006020828403121561548d57600080fd5b813561ffff8116811461547457600080fd5b600080600080600060a086880312156154b757600080fd5b6154c0866152f9565b94506154ce602087016152f9565b94979496505050506040830135926060810135926080909101359150565b6000602082840312156154fe57600080fd5b615474826152f9565b803573ffffffffffffffffffffffffffffffffffffffff81168114612a8457600080fd5b60008060008060006060868803121561554357600080fd5b853567ffffffffffffffff8082111561555b57600080fd5b818801915088601f83011261556f57600080fd5b81358181111561557e57600080fd5b8960208260071b850101111561559357600080fd5b602083019750809650506155a960208901615507565b945060408801359150808211156155bf57600080fd5b506155cc88828901615311565b969995985093965092949392505050565b600080600080600080600060c0888a0312156155f857600080fd5b615601886152f9565b965061560f602089016152f9565b955061561d604089016152f9565b9450606088013593506080880135925060a088013567ffffffffffffffff81111561564757600080fd5b6156538a828b01615311565b989b979a50959850939692959293505050565b60006020828403121561567857600080fd5b61547482615507565b60006020828403121561569357600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff808411156156e4576156e461569a565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561572a5761572a61569a565b8160405280935085815286868601111561574357600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261576e57600080fd5b615474838335602085016156c9565b60006020828403121561578f57600080fd5b813567ffffffffffffffff8111156157a657600080fd5b6150f98482850161575d565b6000806000806000808688036101208112156157cd57600080fd5b60a08112156157db57600080fd5b5086955060a0870135945060c087013567ffffffffffffffff8082111561580157600080fd5b61580d8a838b0161575d565b955060e089013591508082111561582357600080fd5b61582f8a838b0161575d565b945061010089013591508082111561584657600080fd5b5061585389828a01615311565b979a9699509497509295939492505050565b6000806020838503121561587857600080fd5b823567ffffffffffffffff8082111561589057600080fd5b818501915085601f8301126158a457600080fd5b8135818111156158b357600080fd5b8660208260051b85010111156158c857600080fd5b60209290920196919550909350505050565b6000806000604084860312156158ef57600080fd5b833567ffffffffffffffff81111561590657600080fd5b61591286828701615311565b909790965060209590950135949350505050565b600181811c9082168061593a57607f821691505b602082108103615973577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b67ffffffffffffffff8181168382160190808211156159c9576159c9615979565b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060808284031215615a1157600080fd5b6040516080810181811067ffffffffffffffff82111715615a3457615a3461569a565b80604052508235815260208301356020820152615a53604084016152f9565b6040820152615a64606084016152f9565b60608201529392505050565b600067ffffffffffffffff808316818103615a8d57615a8d615979565b6001019392505050565b600060208284031215615aa957600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615ae157615ae1615979565b5060010190565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b838152604060208201526000615b4b604083018486615ae8565b95945050505050565b67ffffffffffffffff8281168282160390808211156159c9576159c9615979565b81810381811115615b8857615b88615979565b92915050565b8082028115828204841417615b8857615b88615979565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615be357615be3615ba5565b500490565b601f82111561508f57600081815260208120601f850160051c81016020861015615c0f5750805b601f850160051c820191505b81811015615c2e57828155600101615c1b565b505050505050565b815167ffffffffffffffff811115615c5057615c5061569a565b615c6481615c5e8454615926565b84615be8565b602080601f831160018114615cb75760008415615c815750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555615c2e565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015615d0457888601518255948401946001909101908401615ce5565b5085821015615d4057878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600067ffffffffffffffff808716835280861660208401525060606040830152615d7e606083018486615ae8565b9695505050505050565b80820180821115615b8857615b88615979565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112615dcf57600080fd5b9190910192915050565b600060608236031215615deb57600080fd5b6040516060810167ffffffffffffffff8282108183111715615e0f57615e0f61569a565b816040528435915080821115615e2457600080fd5b50830136601f820112615e3657600080fd5b615e45368235602084016156c9565b82525060208301356020820152615e5e604084016152f9565b604082015292915050565b8183823760009101908152919050565b84815273ffffffffffffffffffffffffffffffffffffffff84166020820152606060408201526000615d7e606083018486615ae8565b60008251615dcf8184602087016153f3565b600082615ed057615ed0615ba5565b500690565b604081526000615ee9604083018587615ae8565b905060208083018460005b6001811015615f1157815183529183019190830190600101615ef4565b50505050949350505050565b600060208284031215615f2f57600080fd5b8151801515811461547457600080fd5b600067ffffffffffffffff80841680615f5a57615f5a615ba5565b9216919091049291505056fea26469706673582212205f6db821da6f759d2be7ce71edb3709e45a5d7fdf189e8a24601801279bb362364736f6c63430008110033 \ No newline at end of file diff --git a/etherman/smartcontracts/bin/supernets2bridge.bin b/etherman/smartcontracts/bin/supernets2bridge.bin new file mode 100644 index 00000000..80db95f3 --- /dev/null +++ b/etherman/smartcontracts/bin/supernets2bridge.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b50615c83806100206000396000f3fe6080604052600436106200019f5760003560e01c806379e2cf9711620000e7578063be5831c71162000089578063dbc169761162000060578063dbc169761462000639578063ee25560b1462000651578063fb570834146200068257600080fd5b8063be5831c714620005ae578063cd58657914620005ea578063d02103ca146200060157600080fd5b80639e34070f11620000be5780639e34070f146200050a578063aaa13cc2146200054f578063bab161bf146200057457600080fd5b806379e2cf97146200047c57806381b1c1741462000494578063900fca6814620004db57600080fd5b80632d2c9d9411620001515780633ae0504711620001285780633ae05047146200034b5780633e1970431462000363578063647c576c146200045757600080fd5b80632d2c9d9414620002765780632dfdf0b5146200029b578063318aee3d14620002c257600080fd5b806322e95f2c116200018657806322e95f2c14620001ef578063240ff378146200023a5780632cffd02e146200025157600080fd5b806315064c9614620001a45780632072f6c514620001d5575b600080fd5b348015620001b157600080fd5b50606854620001c09060ff1681565b60405190151581526020015b60405180910390f35b348015620001e257600080fd5b50620001ed620006a7565b005b348015620001fc57600080fd5b50620002146200020e366004620032db565b62000705565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001620001cc565b620001ed6200024b36600462003372565b620007a8565b3480156200025e57600080fd5b50620001ed6200027036600462003409565b620009d0565b3480156200028357600080fd5b50620001ed6200029536600462003409565b62000f74565b348015620002a857600080fd5b50620002b360535481565b604051908152602001620001cc565b348015620002cf57600080fd5b5062000319620002e1366004620034ef565b606b6020526000908152604090205463ffffffff811690640100000000900473ffffffffffffffffffffffffffffffffffffffff1682565b6040805163ffffffff909316835273ffffffffffffffffffffffffffffffffffffffff909116602083015201620001cc565b3480156200035857600080fd5b50620002b362001178565b3480156200037057600080fd5b50620002b36200038236600462003526565b6040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b3480156200046457600080fd5b50620001ed62000476366004620035b0565b6200125e565b3480156200048957600080fd5b50620001ed620014ad565b348015620004a157600080fd5b5062000214620004b336600462003600565b606a6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b348015620004e857600080fd5b50606c54620002149073ffffffffffffffffffffffffffffffffffffffff1681565b3480156200051757600080fd5b50620001c06200052936600462003600565b600881901c600090815260696020526040902054600160ff9092169190911b9081161490565b3480156200055c57600080fd5b50620002146200056e3660046200361a565b620014e7565b3480156200058157600080fd5b506068546200059890610100900463ffffffff1681565b60405163ffffffff9091168152602001620001cc565b348015620005bb57600080fd5b506068546200059890790100000000000000000000000000000000000000000000000000900463ffffffff1681565b620001ed620005fb366004620036ce565b620016d3565b3480156200060e57600080fd5b50606854620002149065010000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b3480156200064657600080fd5b50620001ed62001c37565b3480156200065e57600080fd5b50620002b36200067036600462003600565b60696020526000908152604090205481565b3480156200068f57600080fd5b50620001c0620006a136600462003770565b62001c93565b606c5473ffffffffffffffffffffffffffffffffffffffff163314620006f9576040517f3fa8b6e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200070362001d7c565b565b6040805160e084901b7fffffffff0000000000000000000000000000000000000000000000000000000016602080830191909152606084901b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602483015282516018818403018152603890920183528151918101919091206000908152606a909152205473ffffffffffffffffffffffffffffffffffffffff165b92915050565b60685460ff1615620007e6576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60685463ffffffff8681166101009092041614806200080c5750600263ffffffff861610155b1562000844576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b6001606860019054906101000a900463ffffffff163388883488886053546040516200089a9998979695949392919062003806565b60405180910390a1620009b8620009b26001606860019054906101000a900463ffffffff16338989348989604051620008d592919062003881565b60405180910390206040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b62001e10565b8215620009c957620009c962001f27565b5050505050565b60685460ff161562000a0e576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000a258b8b8b8b8b8b8b8b8b8b8b600062001ffc565b73ffffffffffffffffffffffffffffffffffffffff861662000b01576040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff861690859060405162000a7a9190620038e6565b60006040518083038185875af1925050503d806000811462000ab9576040519150601f19603f3d011682016040523d82523d6000602084013e62000abe565b606091505b505090508062000afa576040517f6747a28800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5062000efc565b60685463ffffffff61010090910481169088160362000b435762000b3d73ffffffffffffffffffffffffffffffffffffffff87168585620021ed565b62000efc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b1660208201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b166024820152600090603801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152606a90935291205490915073ffffffffffffffffffffffffffffffffffffffff168062000e6e576000808062000c1886880188620039fb565b92509250925060008584848460405162000c329062003292565b62000c409392919062003abd565b8190604051809103906000f590508015801562000c61573d6000803e3d6000fd5b506040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c81166004830152602482018c9052919250908216906340c10f1990604401600060405180830381600087803b15801562000cd757600080fd5b505af115801562000cec573d6000803e3d6000fd5b5050505080606a600088815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060405180604001604052808e63ffffffff1681526020018d73ffffffffffffffffffffffffffffffffffffffff16815250606b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050507f490e59a1701b938786ac72570a1efeac994a3dbe96e2e883e19e902ace6e6a398d8d838b8b60405162000e5c95949392919062003afa565b60405180910390a15050505062000ef9565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152602482018790528216906340c10f1990604401600060405180830381600087803b15801562000edf57600080fd5b505af115801562000ef4573d6000803e3d6000fd5b505050505b50505b6040805163ffffffff8c811682528916602082015273ffffffffffffffffffffffffffffffffffffffff88811682840152861660608201526080810185905290517f25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe275459839181900360a00190a15050505050505050505050565b60685460ff161562000fb2576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000fc98b8b8b8b8b8b8b8b8b8b8b600162001ffc565b60008473ffffffffffffffffffffffffffffffffffffffff1684888a868660405160240162000ffc949392919062003b42565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1806b5f200000000000000000000000000000000000000000000000000000000179052516200107f9190620038e6565b60006040518083038185875af1925050503d8060008114620010be576040519150601f19603f3d011682016040523d82523d6000602084013e620010c3565b606091505b5050905080620010ff576040517f37e391c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805163ffffffff8d811682528a16602082015273ffffffffffffffffffffffffffffffffffffffff89811682840152871660608201526080810186905290517f25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe275459839181900360a00190a1505050505050505050505050565b605354600090819081805b602081101562001255578083901c600116600103620011e65760338160208110620011b257620011b262003b8a565b0154604080516020810192909252810185905260600160405160208183030381529060405280519060200120935062001213565b60408051602081018690529081018390526060016040516020818303038152906040528051906020012093505b604080516020810184905290810183905260600160405160208183030381529060405280519060200120915080806200124c9062003be8565b91505062001183565b50919392505050565b600054610100900460ff16158080156200127f5750600054600160ff909116105b806200129b5750303b1580156200129b575060005460ff166001145b6200132d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156200138c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b606880547fffffffffffffff000000000000000000000000000000000000000000000000ff1661010063ffffffff8716027fffffffffffffff0000000000000000000000000000000000000000ffffffffff16176501000000000073ffffffffffffffffffffffffffffffffffffffff8681169190910291909117909155606c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001691841691909117905562001443620022c3565b8015620014a757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b605354606854790100000000000000000000000000000000000000000000000000900463ffffffff16101562000703576200070362001f27565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b1660208201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b1660248201526000908190603801604051602081830303815290604052805190602001209050600060ff60f81b3083604051806020016200157d9062003292565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f909101166040819052620015c8908d908d908d908d908d9060200162003c23565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905262001606929160200162003c64565b604051602081830303815290604052805190602001206040516020016200168f94939291907fff0000000000000000000000000000000000000000000000000000000000000094909416845260609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660018401526015830152603582015260550190565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291905280516020909101209a9950505050505050505050565b60685460ff161562001711576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200171b62002366565b60685463ffffffff888116610100909204161480620017415750600263ffffffff881610155b1562001779576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060608773ffffffffffffffffffffffffffffffffffffffff8816620017df57883414620017d5576040517fb89240f500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000925062001ad9565b341562001818576040517f798ee6f100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8089166000908152606b602090815260409182902082518084019093525463ffffffff811683526401000000009004909216918101829052901562001908576040517f9dc29fac000000000000000000000000000000000000000000000000000000008152336004820152602481018b905273ffffffffffffffffffffffffffffffffffffffff8a1690639dc29fac90604401600060405180830381600087803b158015620018db57600080fd5b505af1158015620018f0573d6000803e3d6000fd5b50505050806020015194508060000151935062001ad7565b85156200191d576200191d898b8989620023db565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8b16906370a0823190602401602060405180830381865afa1580156200198b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620019b1919062003c97565b9050620019d773ffffffffffffffffffffffffffffffffffffffff8b1633308e620028f9565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8c16906370a0823190602401602060405180830381865afa15801562001a45573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a6b919062003c97565b905062001a79828262003cb1565b6068548c9850610100900463ffffffff169650935062001a998762002959565b62001aa48c62002a71565b62001aaf8d62002b7e565b60405160200162001ac39392919062003abd565b604051602081830303815290604052945050505b505b7f501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b600084868e8e868860535460405162001b1b98979695949392919062003cc7565b60405180910390a162001c0f620009b2600085878f8f8789805190602001206040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b861562001c205762001c2062001f27565b5050505062001c2e60018055565b50505050505050565b606c5473ffffffffffffffffffffffffffffffffffffffff16331462001c89576040517f3fa8b6e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200070362002c80565b600084815b602081101562001d6e57600163ffffffff8616821c8116900362001d0a5785816020811062001ccb5762001ccb62003b8a565b60200201358260405160200162001cec929190918252602082015260400190565b60405160208183030381529060405280519060200120915062001d59565b8186826020811062001d205762001d2062003b8a565b602002013560405160200162001d40929190918252602082015260400190565b6040516020818303038152906040528051906020012091505b8062001d658162003be8565b91505062001c98565b50821490505b949350505050565b60685460ff161562001dba576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b80600162001e216020600262003e79565b62001e2d919062003cb1565b6053541062001e68576040517fef5ccf6600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060536000815462001e7b9062003be8565b9182905550905060005b602081101562001f17578082901c60011660010362001ebd57826033826020811062001eb55762001eb562003b8a565b015550505050565b6033816020811062001ed35762001ed362003b8a565b01546040805160208101929092528101849052606001604051602081830303815290604052805190602001209250808062001f0e9062003be8565b91505062001e85565b5062001f2262003e87565b505050565b6053546068805463ffffffff909216790100000000000000000000000000000000000000000000000000027fffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffffff909216919091179081905573ffffffffffffffffffffffffffffffffffffffff65010000000000909104166333d6247d62001fad62001178565b6040518263ffffffff1660e01b815260040162001fcc91815260200190565b600060405180830381600087803b15801562001fe757600080fd5b505af1158015620014a7573d6000803e3d6000fd5b6200200d8b63ffffffff1662002d10565b6068546040805160208082018e90528183018d9052825180830384018152606083019384905280519101207f257b363200000000000000000000000000000000000000000000000000000000909252606481019190915260009165010000000000900473ffffffffffffffffffffffffffffffffffffffff169063257b3632906084016020604051808303816000875af1158015620020b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620020d6919062003c97565b90508060000362002112576040517e2f6fad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60685463ffffffff88811661010090920416146200215c576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606854600090610100900463ffffffff166200217a5750896200217d565b508a5b620021a66200219d848c8c8c8c8c8c8c604051620008d592919062003881565b8f8f8462001c93565b620021dd576040517fe0417cec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905262001f229084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915262002d75565b600054610100900460ff166200235c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840162001324565b6200070362002e88565b600260015403620023d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640162001324565b6002600155565b6000620023ec600482848662003eb6565b620023f79162003ee2565b90507f2afa5331000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601620026765760008080808080806200245a896004818d62003eb6565b81019062002469919062003f2b565b96509650965096509650965096503373ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614620024dd576040517f912ecce700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff861630146200252d576040517f750643af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8a851462002567576040517f03fffc4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff89811660248301528881166044830152606482018890526084820187905260ff861660a483015260c4820185905260e48083018590528351808403909101815261010490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd505accf000000000000000000000000000000000000000000000000000000001790529151918e1691620026229190620038e6565b6000604051808303816000865af19150503d806000811462002661576040519150601f19603f3d011682016040523d82523d6000602084013e62002666565b606091505b50505050505050505050620009c9565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f8fcbaf0c0000000000000000000000000000000000000000000000000000000014620026f2576040517fe282c0ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808080808080806200270a8a6004818e62003eb6565b81019062002719919062003f86565b975097509750975097509750975097503373ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146200278f576040517f912ecce700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff87163014620027df576040517f750643af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8a811660248301528981166044830152606482018990526084820188905286151560a483015260ff861660c483015260e482018590526101048083018590528351808403909101815261012490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8fcbaf0c000000000000000000000000000000000000000000000000000000001790529151918f1691620028a39190620038e6565b6000604051808303816000865af19150503d8060008114620028e2576040519150601f19603f3d011682016040523d82523d6000602084013e620028e7565b606091505b50505050505050505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052620014a79085907f23b872dd000000000000000000000000000000000000000000000000000000009060840162002240565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f06fdde03000000000000000000000000000000000000000000000000000000001790529051606091600091829173ffffffffffffffffffffffffffffffffffffffff861691620029dd9190620038e6565b600060405180830381855afa9150503d806000811462002a1a576040519150601f19603f3d011682016040523d82523d6000602084013e62002a1f565b606091505b50915091508162002a66576040518060400160405280600781526020017f4e4f5f4e414d450000000000000000000000000000000000000000000000000081525062001d74565b62001d748162002f21565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f95d89b41000000000000000000000000000000000000000000000000000000001790529051606091600091829173ffffffffffffffffffffffffffffffffffffffff86169162002af59190620038e6565b600060405180830381855afa9150503d806000811462002b32576040519150601f19603f3d011682016040523d82523d6000602084013e62002b37565b606091505b50915091508162002a66576040518060400160405280600981526020017f4e4f5f53594d424f4c000000000000000000000000000000000000000000000081525062001d74565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f313ce5670000000000000000000000000000000000000000000000000000000017905290516000918291829173ffffffffffffffffffffffffffffffffffffffff86169162002c019190620038e6565b600060405180830381855afa9150503d806000811462002c3e576040519150601f19603f3d011682016040523d82523d6000602084013e62002c43565b606091505b509150915081801562002c57575080516020145b62002c6457601262001d74565b8080602001905181019062001d74919062004012565b60018055565b60685460ff1662002cbd576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b600881901c60008181526069602052604081208054600160ff861690811b91821892839055929091908183169003620009c9576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600062002dd9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16620031119092919063ffffffff16565b80519091501562001f22578080602001905181019062002dfa919062004032565b62001f22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840162001324565b600054610100900460ff1662002c7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840162001324565b6060604082511062002f435781806020019051810190620007a2919062004052565b8151602003620030d35760005b60208110801562002f9b575082818151811062002f715762002f7162003b8a565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b1562002fb6578062002fad8162003be8565b91505062002f50565b8060000362002ffa57505060408051808201909152601281527f4e4f545f56414c49445f454e434f44494e4700000000000000000000000000006020820152919050565b60008167ffffffffffffffff81111562003018576200301862003891565b6040519080825280601f01601f19166020018201604052801562003043576020820181803683370190505b50905060005b82811015620030cb5784818151811062003067576200306762003b8a565b602001015160f81c60f81b82828151811062003087576200308762003b8a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080620030c28162003be8565b91505062003049565b509392505050565b505060408051808201909152601281527f4e4f545f56414c49445f454e434f44494e470000000000000000000000000000602082015290565b919050565b606062001d748484600085856000808673ffffffffffffffffffffffffffffffffffffffff168587604051620031489190620038e6565b60006040518083038185875af1925050503d806000811462003187576040519150601f19603f3d011682016040523d82523d6000602084013e6200318c565b606091505b50915091506200319f87838387620031aa565b979650505050505050565b60608315620032455782516000036200323d5773ffffffffffffffffffffffffffffffffffffffff85163b6200323d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162001324565b508162001d74565b62001d7483838151156200325c5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620013249190620040d2565b611b6680620040e883390190565b803563ffffffff811681146200310c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114620032d857600080fd5b50565b60008060408385031215620032ef57600080fd5b620032fa83620032a0565b915060208301356200330c81620032b5565b809150509250929050565b8015158114620032d857600080fd5b60008083601f8401126200333957600080fd5b50813567ffffffffffffffff8111156200335257600080fd5b6020830191508360208285010111156200336b57600080fd5b9250929050565b6000806000806000608086880312156200338b57600080fd5b6200339686620032a0565b94506020860135620033a881620032b5565b93506040860135620033ba8162003317565b9250606086013567ffffffffffffffff811115620033d757600080fd5b620033e58882890162003326565b969995985093965092949392505050565b806104008101831015620007a257600080fd5b60008060008060008060008060008060006105208c8e0312156200342c57600080fd5b620034388d8d620033f6565b9a50620034496104008d01620032a0565b99506104208c013598506104408c013597506200346a6104608d01620032a0565b96506104808c01356200347d81620032b5565b95506200348e6104a08d01620032a0565b94506104c08c0135620034a181620032b5565b93506104e08c013592506105008c013567ffffffffffffffff811115620034c757600080fd5b620034d58e828f0162003326565b915080935050809150509295989b509295989b9093969950565b6000602082840312156200350257600080fd5b81356200350f81620032b5565b9392505050565b60ff81168114620032d857600080fd5b600080600080600080600060e0888a0312156200354257600080fd5b87356200354f8162003516565b96506200355f60208901620032a0565b955060408801356200357181620032b5565b94506200358160608901620032a0565b935060808801356200359381620032b5565b9699959850939692959460a0840135945060c09093013592915050565b600080600060608486031215620035c657600080fd5b620035d184620032a0565b92506020840135620035e381620032b5565b91506040840135620035f581620032b5565b809150509250925092565b6000602082840312156200361357600080fd5b5035919050565b600080600080600080600060a0888a0312156200363657600080fd5b6200364188620032a0565b965060208801356200365381620032b5565b9550604088013567ffffffffffffffff808211156200367157600080fd5b6200367f8b838c0162003326565b909750955060608a01359150808211156200369957600080fd5b50620036a88a828b0162003326565b9094509250506080880135620036be8162003516565b8091505092959891949750929550565b600080600080600080600060c0888a031215620036ea57600080fd5b620036f588620032a0565b965060208801356200370781620032b5565b95506040880135945060608801356200372081620032b5565b93506080880135620037328162003317565b925060a088013567ffffffffffffffff8111156200374f57600080fd5b6200375d8a828b0162003326565b989b979a50959850939692959293505050565b60008060008061046085870312156200378857600080fd5b843593506200379b8660208701620033f6565b9250620037ac6104208601620032a0565b939692955092936104400135925050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600061010060ff8c16835263ffffffff808c16602085015273ffffffffffffffffffffffffffffffffffffffff808c166040860152818b166060860152808a166080860152508760a08501528160c0850152620038678285018789620037bd565b925080851660e085015250509a9950505050505050505050565b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60005b83811015620038dd578181015183820152602001620038c3565b50506000910152565b60008251620038fa818460208701620038c0565b9190910192915050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156200394e576200394e62003891565b604052919050565b600067ffffffffffffffff82111562003973576200397362003891565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112620039b157600080fd5b8135620039c8620039c28262003956565b62003904565b818152846020838601011115620039de57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121562003a1157600080fd5b833567ffffffffffffffff8082111562003a2a57600080fd5b62003a38878388016200399f565b9450602086013591508082111562003a4f57600080fd5b5062003a5e868287016200399f565b9250506040840135620035f58162003516565b6000815180845262003a8b816020860160208601620038c0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60608152600062003ad2606083018662003a71565b828103602084015262003ae6818662003a71565b91505060ff83166040830152949350505050565b63ffffffff86168152600073ffffffffffffffffffffffffffffffffffffffff8087166020840152808616604084015250608060608301526200319f608083018486620037bd565b73ffffffffffffffffffffffffffffffffffffffff8516815263ffffffff8416602082015260606040820152600062003b80606083018486620037bd565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820362003c1c5762003c1c62003bb9565b5060010190565b60608152600062003c39606083018789620037bd565b828103602084015262003c4e818688620037bd565b91505060ff831660408301529695505050505050565b6000835162003c78818460208801620038c0565b83519083019062003c8e818360208801620038c0565b01949350505050565b60006020828403121562003caa57600080fd5b5051919050565b81810381811115620007a257620007a262003bb9565b600061010060ff8b16835263ffffffff808b16602085015273ffffffffffffffffffffffffffffffffffffffff808b166040860152818a1660608601528089166080860152508660a08501528160c085015262003d278285018762003a71565b925080851660e085015250509998505050505050505050565b600181815b8085111562003d9f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111562003d835762003d8362003bb9565b8085161562003d9157918102915b93841c939080029062003d45565b509250929050565b60008262003db857506001620007a2565b8162003dc757506000620007a2565b816001811462003de0576002811462003deb5762003e0b565b6001915050620007a2565b60ff84111562003dff5762003dff62003bb9565b50506001821b620007a2565b5060208310610133831016604e8410600b841016171562003e30575081810a620007a2565b62003e3c838362003d40565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111562003e715762003e7162003bb9565b029392505050565b60006200350f838362003da7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b6000808585111562003ec757600080fd5b8386111562003ed557600080fd5b5050820193919092039150565b7fffffffff00000000000000000000000000000000000000000000000000000000813581811691600485101562003f235780818660040360031b1b83161692505b505092915050565b600080600080600080600060e0888a03121562003f4757600080fd5b873562003f5481620032b5565b9650602088013562003f6681620032b5565b955060408801359450606088013593506080880135620035938162003516565b600080600080600080600080610100898b03121562003fa457600080fd5b883562003fb181620032b5565b9750602089013562003fc381620032b5565b96506040890135955060608901359450608089013562003fe38162003317565b935060a089013562003ff58162003516565b979a969950949793969295929450505060c08201359160e0013590565b6000602082840312156200402557600080fd5b81516200350f8162003516565b6000602082840312156200404557600080fd5b81516200350f8162003317565b6000602082840312156200406557600080fd5b815167ffffffffffffffff8111156200407d57600080fd5b8201601f810184136200408f57600080fd5b8051620040a0620039c28262003956565b818152856020838501011115620040b657600080fd5b620040c9826020830160208601620038c0565b95945050505050565b6020815260006200350f602083018462003a7156fe6101006040523480156200001257600080fd5b5060405162001b6638038062001b6683398101604081905262000035916200028d565b82826003620000458382620003a1565b506004620000548282620003a1565b50503360c0525060ff811660e052466080819052620000739062000080565b60a052506200046d915050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620000ad6200012e565b805160209182012060408051808201825260018152603160f81b90840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b6060600380546200013f9062000312565b80601f01602080910402602001604051908101604052809291908181526020018280546200016d9062000312565b8015620001be5780601f106200019257610100808354040283529160200191620001be565b820191906000526020600020905b815481529060010190602001808311620001a057829003601f168201915b5050505050905090565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001f057600080fd5b81516001600160401b03808211156200020d576200020d620001c8565b604051601f8301601f19908116603f01168101908282118183101715620002385762000238620001c8565b816040528381526020925086838588010111156200025557600080fd5b600091505b838210156200027957858201830151818301840152908201906200025a565b600093810190920192909252949350505050565b600080600060608486031215620002a357600080fd5b83516001600160401b0380821115620002bb57600080fd5b620002c987838801620001de565b94506020860151915080821115620002e057600080fd5b50620002ef86828701620001de565b925050604084015160ff811681146200030757600080fd5b809150509250925092565b600181811c908216806200032757607f821691505b6020821081036200034857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200039c57600081815260208120601f850160051c81016020861015620003775750805b601f850160051c820191505b81811015620003985782815560010162000383565b5050505b505050565b81516001600160401b03811115620003bd57620003bd620001c8565b620003d581620003ce845462000312565b846200034e565b602080601f8311600181146200040d5760008415620003f45750858301515b600019600386901b1c1916600185901b17855562000398565b600085815260208120601f198616915b828110156200043e578886015182559484019460019091019084016200041d565b50858210156200045d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e0516116aa620004bc6000396000610237015260008181610307015281816105c001526106a70152600061053a015260008181610379015261050401526116aa6000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806370a08231116100d8578063a457c2d71161008c578063d505accf11610066578063d505accf1461039b578063dd62ed3e146103ae578063ffa1ad74146103f457600080fd5b8063a457c2d71461034e578063a9059cbb14610361578063cd0d00961461037457600080fd5b806395d89b41116100bd57806395d89b41146102e75780639dc29fac146102ef578063a3c573eb1461030257600080fd5b806370a08231146102915780637ecebe00146102c757600080fd5b806330adf81f1161012f5780633644e515116101145780633644e51514610261578063395093511461026957806340c10f191461027c57600080fd5b806330adf81f14610209578063313ce5671461023057600080fd5b806318160ddd1161016057806318160ddd146101bd57806320606b70146101cf57806323b872dd146101f657600080fd5b806306fdde031461017c578063095ea7b31461019a575b600080fd5b610184610430565b60405161019191906113e4565b60405180910390f35b6101ad6101a8366004611479565b6104c2565b6040519015158152602001610191565b6002545b604051908152602001610191565b6101c17f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6101ad6102043660046114a3565b6104dc565b6101c17f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610191565b6101c1610500565b6101ad610277366004611479565b61055c565b61028f61028a366004611479565b6105a8565b005b6101c161029f3660046114df565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6101c16102d53660046114df565b60056020526000908152604090205481565b610184610680565b61028f6102fd366004611479565b61068f565b6103297f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610191565b6101ad61035c366004611479565b61075e565b6101ad61036f366004611479565b61082f565b6101c17f000000000000000000000000000000000000000000000000000000000000000081565b61028f6103a9366004611501565b61083d565b6101c16103bc366004611574565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101846040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b60606003805461043f906115a7565b80601f016020809104026020016040519081016040528092919081815260200182805461046b906115a7565b80156104b85780601f1061048d576101008083540402835291602001916104b8565b820191906000526020600020905b81548152906001019060200180831161049b57829003601f168201915b5050505050905090565b6000336104d0818585610b73565b60019150505b92915050565b6000336104ea858285610d27565b6104f5858585610dfe565b506001949350505050565b60007f00000000000000000000000000000000000000000000000000000000000000004614610537576105324661106d565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906104d090829086906105a3908790611629565b610b73565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610672576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f546f6b656e577261707065643a3a6f6e6c794272696467653a204e6f7420537560448201527f7065726e6574733242726964676500000000000000000000000000000000000060648201526084015b60405180910390fd5b61067c8282611135565b5050565b60606004805461043f906115a7565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610754576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f546f6b656e577261707065643a3a6f6e6c794272696467653a204e6f7420537560448201527f7065726e657473324272696467650000000000000000000000000000000000006064820152608401610669565b61067c8282611228565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610669565b6104f58286868403610b73565b6000336104d0818585610dfe565b834211156108cc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f546f6b656e577261707065643a3a7065726d69743a204578706972656420706560448201527f726d6974000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8716600090815260056020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918a918a918a9190866109268361163c565b9091555060408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610991610500565b6040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281019190915260428101839052606201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600080855291840180845281905260ff89169284019290925260608301879052608083018690529092509060019060a0016020604051602081039080840390855afa158015610a55573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590610ad057508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f546f6b656e577261707065643a3a7065726d69743a20496e76616c696420736960448201527f676e6174757265000000000000000000000000000000000000000000000000006064820152608401610669565b610b678a8a8a610b73565b50505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8316610c15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8216610cb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610df85781811015610deb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610669565b610df88484848403610b73565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610ea1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8216610f44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610df8565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611098610430565b8051602091820120604080518082018252600181527f310000000000000000000000000000000000000000000000000000000000000090840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b73ffffffffffffffffffffffffffffffffffffffff82166111b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610669565b80600260008282546111c49190611629565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff82166112cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090205481811015611381576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff83166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610d1a565b600060208083528351808285015260005b81811015611411578581018301518582016040015282016113f5565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461147457600080fd5b919050565b6000806040838503121561148c57600080fd5b61149583611450565b946020939093013593505050565b6000806000606084860312156114b857600080fd5b6114c184611450565b92506114cf60208501611450565b9150604084013590509250925092565b6000602082840312156114f157600080fd5b6114fa82611450565b9392505050565b600080600080600080600060e0888a03121561151c57600080fd5b61152588611450565b965061153360208901611450565b95506040880135945060608801359350608088013560ff8116811461155757600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561158757600080fd5b61159083611450565b915061159e60208401611450565b90509250929050565b600181811c908216806115bb57607f821691505b6020821081036115f4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156104d6576104d66115fa565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361166d5761166d6115fa565b506001019056fea264697066735822122051f33791a57b9eec9504fba7401051e93f4cd7af7facd3f699991bdda18c9f7064736f6c63430008110033a264697066735822122005725ef3340b4b249151d4ba864fa3b4273f883606a7929bf58470971f213fca64736f6c63430008110033 \ No newline at end of file diff --git a/etherman/smartcontracts/bin/supernets2datacommittee.bin b/etherman/smartcontracts/bin/supernets2datacommittee.bin new file mode 100644 index 00000000..54afc604 --- /dev/null +++ b/etherman/smartcontracts/bin/supernets2datacommittee.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b506115e0806100206000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638129fc1c11610076578063c7a823e01161005b578063c7a823e01461015a578063dce1e2b61461016d578063f2fde38b1461017557600080fd5b80638129fc1c1461012a5780638da5cb5b1461013257600080fd5b8063609d4544116100a7578063609d4544146101025780636beedd3914610119578063715018a61461012257600080fd5b8063078fba2a146100c35780635daf08ca146100d8575b600080fd5b6100d66100d1366004610fa9565b610188565b005b6100eb6100e6366004611054565b61048c565b6040516100f992919061106d565b60405180910390f35b61010b60665481565b6040519081526020016100f9565b61010b60655481565b6100d661055e565b6100d6610572565b60335460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f9565b6100d66101683660046110f6565b610709565b60675461010b565b6100d6610183366004611142565b61095c565b610190610a10565b82858110156101cb576040517f2e7dcd6e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101d66014826111ae565b821461020e576040517f2ab6a12900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61021a60676000610eb5565b6000805b828110156104305760006102336014836111ae565b905060008682876102456014836111c5565b92610252939291906111d8565b61025b91611202565b60601c90508888848181106102725761027261124a565b90506020028101906102849190611279565b90506000036102bf576040517fb54b70e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610610324576040517fd53cfbe000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b809350606760405180604001604052808b8b878181106103465761034661124a565b90506020028101906103589190611279565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250505073ffffffffffffffffffffffffffffffffffffffff851660209283015283546001810185559381522081519192600202019081906103cc90826113af565b5060209190910151600190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905550819050610428816114c9565b91505061021e565b508383604051610441929190611501565b6040519081900381206066819055606589905581527f831403fd381b3e6ac875d912ec2eee0e0203d0d29f7b3e0c96fc8f582d6db6579060200160405180910390a150505050505050565b6067818154811061049c57600080fd5b90600052602060002090600202016000915090508060000180546104bf9061130d565b80601f01602080910402602001604051908101604052809291908181526020018280546104eb9061130d565b80156105385780601f1061050d57610100808354040283529160200191610538565b820191906000526020600020905b81548152906001019060200180831161051b57829003601f168201915b5050506001909301549192505073ffffffffffffffffffffffffffffffffffffffff1682565b610566610a10565b6105706000610a91565b565b600054610100900460ff16158080156105925750600054600160ff909116105b806105ac5750303b1580156105ac575060005460ff166001145b61063d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561069b57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6106a3610b08565b801561070657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000606554604161071a91906111ae565b90508082108061073e575060146107318284611511565b61073b9190611553565b15155b15610775576040517f6b8eec4600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606654610784838381876111d8565b604051610792929190611501565b6040518091039020146107d1576040517f6b156b2800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060146107e08486611511565b6107ea9190611567565b905060005b60655481101561095357600061086a88888861080c6041876111ae565b90604161081981896111ae565b61082391906111c5565b92610830939291906111d8565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610ba892505050565b90506000845b848110156109065760006108856014836111ae565b61088f90896111c5565b905060008a828b6108a16014836111c5565b926108ae939291906111d8565b6108b791611202565b60601c905073ffffffffffffffffffffffffffffffffffffffff851681036108f1576108e48360016111c5565b9750600193505050610906565b505080806108fe906114c9565b915050610870565b508061093e576040517f8431721300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050808061094b906114c9565b9150506107ef565b50505050505050565b610964610a10565b73ffffffffffffffffffffffffffffffffffffffff8116610a07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610634565b61070681610a91565b60335473ffffffffffffffffffffffffffffffffffffffff163314610570576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610634565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610634565b61057033610a91565b6000806000610bb78585610bce565b91509150610bc481610c13565b5090505b92915050565b6000808251604103610c045760208301516040840151606085015160001a610bf887828585610dc6565b94509450505050610c0c565b506000905060025b9250929050565b6000816004811115610c2757610c2761157b565b03610c2f5750565b6001816004811115610c4357610c4361157b565b03610caa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610634565b6002816004811115610cbe57610cbe61157b565b03610d25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610634565b6003816004811115610d3957610d3961157b565b03610706576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610634565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610dfd5750600090506003610eac565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610e51573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116610ea557600060019250925050610eac565b9150600090505b94509492505050565b508054600082556002029060005260206000209081019061070691905b80821115610f19576000610ee68282610f1d565b506001810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600201610ed2565b5090565b508054610f299061130d565b6000825580601f10610f39575050565b601f01602090049060005260206000209081019061070691905b80821115610f195760008155600101610f53565b60008083601f840112610f7957600080fd5b50813567ffffffffffffffff811115610f9157600080fd5b602083019150836020828501011115610c0c57600080fd5b600080600080600060608688031215610fc157600080fd5b85359450602086013567ffffffffffffffff80821115610fe057600080fd5b818801915088601f830112610ff457600080fd5b81358181111561100357600080fd5b8960208260051b850101111561101857600080fd5b60208301965080955050604088013591508082111561103657600080fd5b5061104388828901610f67565b969995985093965092949392505050565b60006020828403121561106657600080fd5b5035919050565b604081526000835180604084015260005b8181101561109b576020818701810151606086840101520161107e565b5060006060828501015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505073ffffffffffffffffffffffffffffffffffffffff831660208301529392505050565b60008060006040848603121561110b57600080fd5b83359250602084013567ffffffffffffffff81111561112957600080fd5b61113586828701610f67565b9497909650939450505050565b60006020828403121561115457600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461117857600080fd5b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082028115828204841417610bc857610bc861117f565b80820180821115610bc857610bc861117f565b600080858511156111e857600080fd5b838611156111f557600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156112425780818660140360031b1b83161692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126112ae57600080fd5b83018035915067ffffffffffffffff8211156112c957600080fd5b602001915036819003821315610c0c57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600181811c9082168061132157607f821691505b60208210810361135a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156113aa57600081815260208120601f850160051c810160208610156113875750805b601f850160051c820191505b818110156113a657828155600101611393565b5050505b505050565b815167ffffffffffffffff8111156113c9576113c96112de565b6113dd816113d7845461130d565b84611360565b602080601f83116001811461143057600084156113fa5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556113a6565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561147d5788860151825594840194600190910190840161145e565b50858210156114b957878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036114fa576114fa61117f565b5060010190565b8183823760009101908152919050565b81810381811115610bc857610bc861117f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261156257611562611524565b500690565b60008261157657611576611524565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea2646970667358221220a7cda335f388ab7e6f034edd256ac3bf132ec1297e19d952a06acd1bacb553ff64736f6c63430008110033 \ No newline at end of file diff --git a/etherman/smartcontracts/bin/polygonzkevmglobalexitroot.bin b/etherman/smartcontracts/bin/supernets2globalexitroot.bin similarity index 94% rename from etherman/smartcontracts/bin/polygonzkevmglobalexitroot.bin rename to etherman/smartcontracts/bin/supernets2globalexitroot.bin index 466fe05c..2bc0d5e3 100644 --- a/etherman/smartcontracts/bin/polygonzkevmglobalexitroot.bin +++ b/etherman/smartcontracts/bin/supernets2globalexitroot.bin @@ -1 +1 @@ -60c060405234801561001057600080fd5b506040516103f83803806103f883398101604081905261002f91610062565b6001600160a01b0391821660a05216608052610095565b80516001600160a01b038116811461005d57600080fd5b919050565b6000806040838503121561007557600080fd5b61007e83610046565b915061008c60208401610046565b90509250929050565b60805160a0516103316100c76000396000818160e901526101bd015260008181610135015261017401526103316000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806333d6247d1161005b57806333d6247d146100c75780633ed691ef146100dc5780635ec6a8df146100e4578063a3c573eb1461013057600080fd5b806301fd904414610082578063257b36321461009e578063319cf735146100be575b600080fd5b61008b60005481565b6040519081526020015b60405180910390f35b61008b6100ac3660046102e2565b60026020526000908152604090205481565b61008b60015481565b6100da6100d53660046102e2565b610157565b005b61008b6102a6565b61010b7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610095565b61010b7f000000000000000000000000000000000000000000000000000000000000000081565b60005460015473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036101a65750600182905581610222565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036101f0576000839055829150610222565b6040517fb49365dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051602080820184905281830185905282518083038401815260609092019092528051910120600090600081815260026020526040812054919250036102a05760008181526002602052604080822042905551849184917f61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce39190a35b50505050565b60006102dd600154600054604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b905090565b6000602082840312156102f457600080fd5b503591905056fea26469706673582212209f4342d0e9635341e8c77469d3bc7ae71f0dddc6e79aebfb62c8bb1ad4fe68d664736f6c63430008110033 \ No newline at end of file +60c060405234801561001057600080fd5b506040516103f83803806103f883398101604081905261002f91610062565b6001600160a01b0391821660a05216608052610095565b80516001600160a01b038116811461005d57600080fd5b919050565b6000806040838503121561007557600080fd5b61007e83610046565b915061008c60208401610046565b90509250929050565b60805160a0516103316100c76000396000818160e901526101bd015260008181610135015261017401526103316000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806333d6247d1161005b57806333d6247d146100c75780633ed691ef146100dc5780635ec6a8df146100e4578063a3c573eb1461013057600080fd5b806301fd904414610082578063257b36321461009e578063319cf735146100be575b600080fd5b61008b60005481565b6040519081526020015b60405180910390f35b61008b6100ac3660046102e2565b60026020526000908152604090205481565b61008b60015481565b6100da6100d53660046102e2565b610157565b005b61008b6102a6565b61010b7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610095565b61010b7f000000000000000000000000000000000000000000000000000000000000000081565b60005460015473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036101a65750600182905581610222565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036101f0576000839055829150610222565b6040517fb49365dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051602080820184905281830185905282518083038401815260609092019092528051910120600090600081815260026020526040812054919250036102a05760008181526002602052604080822042905551849184917f61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce39190a35b50505050565b60006102dd600154600054604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b905090565b6000602082840312156102f457600080fd5b503591905056fea26469706673582212203c4d2d0547a17af6dc140c2a13674ce2911241efa8d9600104536fdae5d3693664736f6c63430008110033 \ No newline at end of file diff --git a/etherman/smartcontracts/polygonzkevm/polygonzkevm.go b/etherman/smartcontracts/polygonzkevm/polygonzkevm.go deleted file mode 100644 index 525612a1..00000000 --- a/etherman/smartcontracts/polygonzkevm/polygonzkevm.go +++ /dev/null @@ -1,5308 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package polygonzkevm - -import ( - "errors" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -// PolygonZkEVMBatchData is an auto generated low-level Go binding around an user-defined struct. -type PolygonZkEVMBatchData struct { - Transactions []byte - GlobalExitRoot [32]byte - Timestamp uint64 - MinForcedTimestamp uint64 -} - -// PolygonZkEVMForcedBatchData is an auto generated low-level Go binding around an user-defined struct. -type PolygonZkEVMForcedBatchData struct { - Transactions []byte - GlobalExitRoot [32]byte - MinForcedTimestamp uint64 -} - -// PolygonZkEVMInitializePackedParameters is an auto generated low-level Go binding around an user-defined struct. -type PolygonZkEVMInitializePackedParameters struct { - Admin common.Address - TrustedSequencer common.Address - PendingStateTimeout uint64 - TrustedAggregator common.Address - TrustedAggregatorTimeout uint64 -} - -// PolygonzkevmMetaData contains all meta data concerning the Polygonzkevm contract. -var PolygonzkevmMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractIPolygonZkEVMGlobalExitRoot\",\"name\":\"_globalExitRootManager\",\"type\":\"address\"},{\"internalType\":\"contractIERC20Upgradeable\",\"name\":\"_matic\",\"type\":\"address\"},{\"internalType\":\"contractIVerifierRollup\",\"name\":\"_rollupVerifier\",\"type\":\"address\"},{\"internalType\":\"contractIPolygonZkEVMBridge\",\"name\":\"_bridgeAddress\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_chainID\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"_forkID\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"BatchAlreadyVerified\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchNotSequencedOrNotSequenceEnd\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExceedMaxVerifyBatches\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalNumBatchBelowLastVerifiedBatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalNumBatchDoesNotMatchPendingState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalPendingStateNumInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchTimeoutNotExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchesAlreadyActive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchesOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForcedDataDoesNotMatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GlobalExitRootNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HaltTimeoutNotExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InitNumBatchAboveLastVerifiedBatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InitNumBatchDoesNotMatchPendingState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProof\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRangeBatchTimeTarget\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRangeForceBatchTimeout\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRangeMultiplierBatchFee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewAccInputHashDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewPendingStateTimeoutMustBeLower\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewStateRootNotInsidePrime\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewTrustedAggregatorTimeoutMustBeLower\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEnoughMaticAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OldAccInputHashDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OldStateRootDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyEmergencyState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyNotEmergencyState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPendingAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyTrustedAggregator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyTrustedSequencer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateNotConsolidable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateTimeoutExceedHaltAggregationTimeout\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SequenceZeroBatches\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SequencedTimestampBelowForcedTimestamp\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SequencedTimestampInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StoredRootMustBeDifferentThanNewRoot\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransactionsLengthAboveMax\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TrustedAggregatorTimeoutExceedHaltAggregationTimeout\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TrustedAggregatorTimeoutNotExpired\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AcceptAdminRole\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"ActivateForceBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"}],\"name\":\"ConsolidatePendingState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyStateActivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyStateDeactivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"forceBatchNum\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"lastGlobalExitRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sequencer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"}],\"name\":\"ForceBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aggregator\",\"type\":\"address\"}],\"name\":\"OverridePendingState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"storedStateRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"provedStateRoot\",\"type\":\"bytes32\"}],\"name\":\"ProveNonDeterministicPendingState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"}],\"name\":\"SequenceBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"}],\"name\":\"SequenceForceBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newforceBatchTimeout\",\"type\":\"uint64\"}],\"name\":\"SetForceBatchTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"newMultiplierBatchFee\",\"type\":\"uint16\"}],\"name\":\"SetMultiplierBatchFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newPendingStateTimeout\",\"type\":\"uint64\"}],\"name\":\"SetPendingStateTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newTrustedAggregator\",\"type\":\"address\"}],\"name\":\"SetTrustedAggregator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newTrustedAggregatorTimeout\",\"type\":\"uint64\"}],\"name\":\"SetTrustedAggregatorTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newTrustedSequencer\",\"type\":\"address\"}],\"name\":\"SetTrustedSequencer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newTrustedSequencerURL\",\"type\":\"string\"}],\"name\":\"SetTrustedSequencerURL\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newVerifyBatchTimeTarget\",\"type\":\"uint64\"}],\"name\":\"SetVerifyBatchTimeTarget\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"TransferAdminRole\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"forkID\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"UpdateZkEVMVersion\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aggregator\",\"type\":\"address\"}],\"name\":\"VerifyBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aggregator\",\"type\":\"address\"}],\"name\":\"VerifyBatchesTrustedAggregator\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptAdminRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sequencedBatchNum\",\"type\":\"uint64\"}],\"name\":\"activateEmergencyState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"activateForceBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batchFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"batchNumToStateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeAddress\",\"outputs\":[{\"internalType\":\"contractIPolygonZkEVMBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"calculateRewardPerBatch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainID\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newStateRoot\",\"type\":\"uint256\"}],\"name\":\"checkStateRootInsidePrime\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"}],\"name\":\"consolidatePendingState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deactivateEmergencyState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"maticAmount\",\"type\":\"uint256\"}],\"name\":\"forceBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"forceBatchTimeout\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"forcedBatches\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"forkID\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getForcedBatchFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"oldStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"}],\"name\":\"getInputSnarkBytes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastVerifiedBatch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"globalExitRootManager\",\"outputs\":[{\"internalType\":\"contractIPolygonZkEVMGlobalExitRoot\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"trustedSequencer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"pendingStateTimeout\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"trustedAggregator\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"trustedAggregatorTimeout\",\"type\":\"uint64\"}],\"internalType\":\"structPolygonZkEVM.InitializePackedParameters\",\"name\":\"initializePackedParameters\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"genesisRoot\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"_trustedSequencerURL\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_networkName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_version\",\"type\":\"string\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isEmergencyState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isForcedBatchDisallowed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"}],\"name\":\"isPendingStateConsolidable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSequenced\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastForceBatch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastForceBatchSequenced\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPendingState\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPendingStateConsolidated\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastTimestamp\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastVerifiedBatch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"matic\",\"outputs\":[{\"internalType\":\"contractIERC20Upgradeable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"multiplierBatchFee\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"networkName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"initPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"overridePendingState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingStateTimeout\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"pendingStateTransitions\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"exitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"initPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"proveNonDeterministicPendingState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupVerifier\",\"outputs\":[{\"internalType\":\"contractIVerifierRollup\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"globalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minForcedTimestamp\",\"type\":\"uint64\"}],\"internalType\":\"structPolygonZkEVM.BatchData[]\",\"name\":\"batches\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"l2Coinbase\",\"type\":\"address\"}],\"name\":\"sequenceBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"globalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"minForcedTimestamp\",\"type\":\"uint64\"}],\"internalType\":\"structPolygonZkEVM.ForcedBatchData[]\",\"name\":\"batches\",\"type\":\"tuple[]\"}],\"name\":\"sequenceForceBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"sequencedBatches\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"accInputHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sequencedTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"previousLastBatchSequenced\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newforceBatchTimeout\",\"type\":\"uint64\"}],\"name\":\"setForceBatchTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newMultiplierBatchFee\",\"type\":\"uint16\"}],\"name\":\"setMultiplierBatchFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newPendingStateTimeout\",\"type\":\"uint64\"}],\"name\":\"setPendingStateTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTrustedAggregator\",\"type\":\"address\"}],\"name\":\"setTrustedAggregator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newTrustedAggregatorTimeout\",\"type\":\"uint64\"}],\"name\":\"setTrustedAggregatorTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTrustedSequencer\",\"type\":\"address\"}],\"name\":\"setTrustedSequencer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newTrustedSequencerURL\",\"type\":\"string\"}],\"name\":\"setTrustedSequencerURL\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newVerifyBatchTimeTarget\",\"type\":\"uint64\"}],\"name\":\"setVerifyBatchTimeTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"transferAdminRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedAggregator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedAggregatorTimeout\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedSequencer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedSequencerURL\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifyBatchTimeTarget\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"verifyBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"verifyBatchesTrustedAggregator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6101406040523480156200001257600080fd5b5060405162004f5038038062004f508339810160408190526200003591620000a5565b6001600160a01b0395861660c05293851660805291841660a05290921660e0526001600160401b0391821661010052166101205262000131565b6001600160a01b03811681146200008557600080fd5b50565b80516001600160401b0381168114620000a057600080fd5b919050565b60008060008060008060c08789031215620000bf57600080fd5b8651620000cc816200006f565b6020880151909650620000df816200006f565b6040880151909550620000f2816200006f565b606088015190945062000105816200006f565b9250620001156080880162000088565b91506200012560a0880162000088565b90509295509295509295565b60805160a05160c05160e0516101005161012051614d51620001ff6000396000818161063801528181610d3201526126ef01526000818161077b0152610d0801526000818161072e0152818161192301528181612baf015261356f0152600081816108b9015281816111eb015281816115f3015281816120fa01528181612cd401528181612eb001526136e60152600081816109550152818161347601526139ac015260008181610830015281816118f101528181611d9301528181612e840152613a740152614d516000f3fe608060405234801561001057600080fd5b50600436106103ba5760003560e01c80638c3d7301116101f4578063c89e42df1161011a578063e7a7ed02116100ad578063f14916d61161007c578063f14916d61461099e578063f2fde38b146109b1578063f851a440146109c4578063f8b823e4146109d757600080fd5b8063e7a7ed0214610936578063e8bf92ed14610950578063eaeb077b14610977578063ed6b01041461098a57600080fd5b8063d8d1091b116100e9578063d8d1091b146108ee578063d939b31514610901578063dbc169761461091b578063e6ad707e1461092357600080fd5b8063c89e42df14610887578063cfa8ed471461089a578063d02103ca146108b4578063d2e129f9146108db57600080fd5b8063ada8f91911610192578063b6b0b09711610161578063b6b0b0971461082b578063ba58ae3914610852578063c0ed84e014610865578063c754c7ed1461086d57600080fd5b8063ada8f91914610763578063adc879e914610776578063afd23cbe1461079d578063b4d63f58146107cb57600080fd5b80639c9f3dfe116101ce5780639c9f3dfe14610703578063a066215c14610716578063a3c573eb14610729578063a50a164b1461075057600080fd5b80638c3d7301146106e25780638da5cb5b146106ea57806399f5634e146106fb57600080fd5b80634a910e6a116102e45780636b8616ce116102775780637fcb3653116102465780637fcb365314610620578063831c7ead14610633578063837a47381461065a578063841b24d7146106c857600080fd5b80636b8616ce146105d25780636ff512cc146105f2578063715018a6146106055780637215541a1461060d57600080fd5b8063542028d5116102b3578063542028d5146105a75780635e9145c9146105af5780635ec91958146105c257806360469169146105ca57600080fd5b80634a910e6a146105405780634e487706146105535780634fd70464146105665780635392c5e01461057957600080fd5b8063267822471161035c578063423fa8561161032b578063423fa856146104df57806345605267146104f9578063458c0477146105135780634a1a89a71461052657600080fd5b80632678224714610474578063298789831461049f578063383b3be8146104b9578063394218e9146104cc57600080fd5b806315064c961161039857806315064c961461041e5780631816b7e51461043b57806319d8ac611461044e578063220d78991461046157600080fd5b80630808270c146103bf5780630a0d9fbe146103d4578063107bf28c14610409575b600080fd5b6103d26103cd366004614303565b6109e0565b005b606f546103ec9061010090046001600160401b031681565b6040516001600160401b0390911681526020015b60405180910390f35b610411610a79565b60405161040091906143eb565b606f5461042b9060ff1681565b6040519015158152602001610400565b6103d26104493660046143fe565b610b07565b6073546103ec906001600160401b031681565b61041161046f366004614422565b610be5565b607b54610487906001600160a01b031681565b6040516001600160a01b039091168152602001610400565b60745461048790600160401b90046001600160a01b031681565b61042b6104c736600461446f565b610d90565b6103d26104da36600461446f565b610dd7565b6073546103ec90600160401b90046001600160401b031681565b6073546103ec90600160801b90046001600160401b031681565b6079546103ec906001600160401b031681565b6079546103ec90600160401b90046001600160401b031681565b6103d261054e36600461446f565b610eef565b6103d261056136600461446f565b610f77565b6103d261057436600461448a565b61107e565b61059961058736600461446f565b60756020526000908152604090205481565b604051908152602001610400565b610411611358565b6103d26105bd36600461456d565b611365565b6103d26119d4565b610599611a95565b6105996105e036600461446f565b60716020526000908152604090205481565b6103d26106003660046145c0565b611aab565b6103d2611b45565b6103d261061b36600461446f565b611b59565b6074546103ec906001600160401b031681565b6103ec7f000000000000000000000000000000000000000000000000000000000000000081565b61069d6106683660046145db565b6078602052600090815260409020805460018201546002909201546001600160401b0380831693600160401b90930416919084565b604080516001600160401b039586168152949093166020850152918301526060820152608001610400565b6079546103ec90600160c01b90046001600160401b031681565b6103d2611cb1565b6033546001600160a01b0316610487565b610599611d58565b6103d261071136600461446f565b611e7b565b6103d261072436600461446f565b611f87565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b6103d261075e36600461448a565b61204f565b6103d26107713660046145c0565b61219b565b6103ec7f000000000000000000000000000000000000000000000000000000000000000081565b606f546107b8906901000000000000000000900461ffff1681565b60405161ffff9091168152602001610400565b6108066107d936600461446f565b607260205260009081526040902080546001909101546001600160401b0380821691600160401b90041683565b604080519384526001600160401b039283166020850152911690820152606001610400565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b61042b6108603660046145db565b612221565b6103ec6122a8565b607b546103ec90600160a01b90046001600160401b031681565b6103d2610895366004614696565b6122f5565b606f5461048790600160581b90046001600160a01b031681565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b6103d26108e93660046146d2565b61235c565b6103d26108fc366004614784565b612777565b6079546103ec90600160801b90046001600160401b031681565b6103d2612b82565b6103d2610931366004614303565b612c28565b6073546103ec90600160c01b90046001600160401b031681565b6104877f000000000000000000000000000000000000000000000000000000000000000081565b6103d26109853660046147c5565b612dbf565b607b5461042b90600160e01b900460ff1681565b6103d26109ac3660046145c0565b6130bb565b6103d26109bf3660046145c0565b613155565b607a54610487906001600160a01b031681565b61059960705481565b606f5460ff1615610a0457604051630bc011ff60e21b815260040160405180910390fd5b610a1488888888888888886131e2565b6001600160401b0385166000908152607560209081526040918290205482519081529081018590527f1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010910160405180910390a1610a6f61356d565b5050505050505050565b60778054610a8690614810565b80601f0160208091040260200160405190810160405280929190818152602001828054610ab290614810565b8015610aff5780601f10610ad457610100808354040283529160200191610aff565b820191906000526020600020905b815481529060010190602001808311610ae257829003601f168201915b505050505081565b607a546001600160a01b03163314610b3257604051634755657960e01b815260040160405180910390fd5b6103e88161ffff161080610b4b57506103ff8161ffff16115b15610b82576040517f4c2533c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80546affff0000000000000000001916690100000000000000000061ffff8416908102919091179091556040519081527f7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5906020015b60405180910390a150565b6001600160401b038086166000818152607260205260408082205493881682529020546060929115801590610c18575081155b15610c4f576040517f6818c29e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80610c86576040517f66385b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c8f84612221565b610cc5576040517f176b913c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516bffffffffffffffffffffffff193360601b166020820152603481019690965260548601929092526001600160c01b031960c098891b811660748701527f0000000000000000000000000000000000000000000000000000000000000000891b8116607c8701527f0000000000000000000000000000000000000000000000000000000000000000891b81166084870152608c86019490945260ac85015260cc840194909452509290931b90911660ec830152805180830360d401815260f4909201905290565b6079546001600160401b0382811660009081526078602052604081205490924292610dc692600160801b90920481169116614860565b6001600160401b0316111592915050565b607a546001600160a01b03163314610e0257604051634755657960e01b815260040160405180910390fd5b62093a806001600160401b0382161115610e2f57604051631d06e87960e01b815260040160405180910390fd5b606f5460ff16610e88576079546001600160401b03600160c01b909104811690821610610e88576040517f401636df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b6001600160401b038416908102919091179091556040519081527f1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a190602001610bda565b607454600160401b90046001600160a01b03163314610f6b57606f5460ff1615610f2c57604051630bc011ff60e21b815260040160405180910390fd5b610f3581610d90565b610f6b576040517f0ce9e4a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f74816135e8565b50565b607a546001600160a01b03163314610fa257604051634755657960e01b815260040160405180910390fd5b62093a806001600160401b0382161115610fcf5760405163f5e37f2f60e01b815260040160405180910390fd5b606f5460ff1661100f57607b546001600160401b03600160a01b90910481169082161061100f5760405163f5e37f2f60e01b815260040160405180910390fd5b607b80547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff16600160a01b6001600160401b038416908102919091179091556040519081527fa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b90602001610bda565b606f5460ff16156110a257604051630bc011ff60e21b815260040160405180910390fd5b6079546001600160401b0386811660009081526072602052604090206001015442926110d992600160c01b90910481169116614860565b6001600160401b0316111561111a576040517f8a0704d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e86111278787614887565b6001600160401b0316111561114f57604051635acfba9d60e11b815260040160405180910390fd5b61115e878787878787876137a0565b61116785613a9b565b607954600160801b90046001600160401b0316600003611254576074805467ffffffffffffffff19166001600160401b03878116918217909255600090815260756020526040902084905560795416156111d557607980546fffffffffffffffffffffffffffffffff191690555b6040516333d6247d60e01b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906333d6247d90602401600060405180830381600087803b15801561123757600080fd5b505af115801561124b573d6000803e3d6000fd5b5050505061130e565b61125c613c70565b607980546001600160401b0316906000611275836148a7565b82546001600160401b039182166101009390930a92830292820219169190911790915560408051608081018252428316815288831660208083019182528284018a8152606084018a8152607954871660009081526078909352949091209251835492518616600160401b026fffffffffffffffffffffffffffffffff199093169516949094171781559151600183015551600290910155505b60405183815233906001600160401b038716907f9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966906020015b60405180910390a350505050505050565b60768054610a8690614810565b606f5460ff161561138957604051630bc011ff60e21b815260040160405180910390fd5b606f54600160581b90046001600160a01b031633146113d4576040517f11e7be1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160008190036113f75760405163cb591a5f60e01b815260040160405180910390fd5b6103e881111561141a57604051635acfba9d60e11b815260040160405180910390fd5b6073546001600160401b03600160401b82048116600081815260726020526040812054838516949293600160801b909304909216919082905b868110156117b15760008a8a8381811061146f5761146f6148cd565b905060200281019061148191906148e3565b61148a90614903565b805180516020909101206060820151919250906001600160401b0316156115b057856114b5816148a7565b965050600081836020015184606001516040516020016114f593929190928352602083019190915260c01b6001600160c01b031916604082015260480190565b60408051601f1981840301815291815281516020928301206001600160401b038a166000908152607190935291205490915081146115465760405163671ebaaf60e11b815260040160405180910390fd5b6001600160401b0380881660009081526071602052604080822091909155606085015190850151908216911610156115aa576040517f7f7ab87200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506116c7565b60208201511580159061166a575060208201516040517f257b363200000000000000000000000000000000000000000000000000000000815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063257b3632906024016020604051808303816000875af1158015611644573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611668919061498f565b155b156116a1576040517f73bd668d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151516201d4c010156116c7576040516328a69b1f60e21b815260040160405180910390fd5b876001600160401b031682604001516001600160401b031610806116f757504282604001516001600160401b0316115b1561172e576040517fea82791600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602082810151604080850151815193840189905290830184905260608084019290925260c01b6001600160c01b03191660808301528b901b6bffffffffffffffffffffffff19166088820152609c0160405160208183030381529060405280519060200120945081604001519750505080806117a9906149a8565b915050611453565b506117bc8685614860565b6073549094506001600160401b03600160c01b909104811690841611156117f65760405163c630a00d60e01b815260040160405180910390fd5b60006118028285614887565b611815906001600160401b0316886149c1565b60408051606081018252858152426001600160401b03908116602080840191825260738054600160401b9081900485168688019081528d861660008181526072909552979093209551865592516001909501805492519585166fffffffffffffffffffffffffffffffff199384161795851684029590951790945583548c84169116179302929092179055909150828116908516146118d4576073805467ffffffffffffffff60801b1916600160801b6001600160401b038716021790555b6119193330836070546118e791906149da565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016929190613d14565b611921613c70565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166379e2cf976040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561197c57600080fd5b505af1158015611990573d6000803e3d6000fd5b50506040516001600160401b03881692507f303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce9150600090a250505050505050505050565b607a546001600160a01b031633146119ff57604051634755657960e01b815260040160405180910390fd5b607b54600160e01b900460ff16611a42576040517ff6ba91a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690556040517f854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f90600090a1565b60006070546064611aa691906149da565b905090565b607a546001600160a01b03163314611ad657604051634755657960e01b815260040160405180910390fd5b606f80547fff0000000000000000000000000000000000000000ffffffffffffffffffffff16600160581b6001600160a01b038416908102919091179091556040519081527ff54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc090602001610bda565b611b4d613dcb565b611b576000613e25565b565b6033546001600160a01b03163314611ca9576000611b756122a8565b9050806001600160401b0316826001600160401b031611611bc2576040517f812a372d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6073546001600160401b03600160401b90910481169083161180611c0157506001600160401b0380831660009081526072602052604090206001015416155b15611c38576040517f98c5c01400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160401b038083166000908152607260205260409020600101544291611c669162093a809116614860565b6001600160401b03161115611ca7576040517fd257555a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b610f7461356d565b607b546001600160a01b03163314611cf5576040517fd1ec4b2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b54607a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0390921691821790556040519081527f056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e9060200160405180910390a1565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dfe919061498f565b90506000611e0a6122a8565b6073546001600160401b03600160401b8204811691611e3a91600160801b8204811691600160c01b900416614887565b611e449190614860565b611e4e9190614887565b6001600160401b0316905080600003611e6a5760009250505090565b611e748183614a07565b9250505090565b607a546001600160a01b03163314611ea657604051634755657960e01b815260040160405180910390fd5b62093a806001600160401b0382161115611ed357604051630cc9650760e41b815260040160405180910390fd5b606f5460ff16611f2c576079546001600160401b03600160801b909104811690821610611f2c576040517f48a05a9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6079805467ffffffffffffffff60801b1916600160801b6001600160401b038416908102919091179091556040519081527fc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c7590602001610bda565b607a546001600160a01b03163314611fb257604051634755657960e01b815260040160405180910390fd5b62015180816001600160401b03161115611ff8576040517fe067dfe800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f805468ffffffffffffffff0019166101006001600160401b038416908102919091179091556040519081527f1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c2890602001610bda565b607454600160401b90046001600160a01b031633146120815760405163bbcbbc0560e01b815260040160405180910390fd5b612090878787878787876137a0565b6074805467ffffffffffffffff19166001600160401b03878116918217909255600090815260756020526040902084905560795416156120e457607980546fffffffffffffffffffffffffffffffff191690555b6040516333d6247d60e01b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906333d6247d90602401600060405180830381600087803b15801561214657600080fd5b505af115801561215a573d6000803e3d6000fd5b50506040518581523392506001600160401b03881691507fcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe90602001611347565b607a546001600160a01b031633146121c657604051634755657960e01b815260040160405180910390fd5b607b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce690602001610bda565b600067ffffffff000000016001600160401b038316108015612257575067ffffffff00000001604083901c6001600160401b0316105b8015612277575067ffffffff00000001608083901c6001600160401b0316105b801561228e575067ffffffff0000000160c083901c105b1561229b57506001919050565b506000919050565b919050565b6079546000906001600160401b0316156122e557506079546001600160401b03908116600090815260786020526040902054600160401b90041690565b506074546001600160401b031690565b607a546001600160a01b0316331461232057604051634755657960e01b815260040160405180910390fd5b607661232c8282614a69565b507f6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b2081604051610bda91906143eb565b600054610100900460ff161580801561237c5750600054600160ff909116105b806123965750303b158015612396575060005460ff166001145b61240d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000805460ff191660011790558015612430576000805461ff0019166101001790555b61243d60208801886145c0565b607a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905561247a60408801602089016145c0565b606f80546001600160a01b0392909216600160581b027fff0000000000000000000000000000000000000000ffffffffffffffffffffff9092169190911790556124ca60808801606089016145c0565b607480546001600160a01b0392909216600160401b027fffffffff0000000000000000000000000000000000000000ffffffffffffffff9092169190911790556000805260756020527ff9e3fbf150b7a0077118526f473c53cb4734f166167e2c6213e3567dd390b4ad86905560766125438682614a69565b5060776125508582614a69565b5062093a806125656060890160408a0161446f565b6001600160401b0316111561258d57604051630cc9650760e41b815260040160405180910390fd5b61259d606088016040890161446f565b607980546001600160401b0392909216600160801b0267ffffffffffffffff60801b1990921691909117905562093a806125dd60a0890160808a0161446f565b6001600160401b0316111561260557604051631d06e87960e01b815260040160405180910390fd5b61261560a088016080890161446f565b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b6001600160401b03939093169290920291909117905567016345785d8a0000607055606f80546affffffffffffffffffff0019166a03ea000000000000070800179055607b80547fffffff000000000000000000ffffffffffffffffffffffffffffffffffffffff167c01000000000006978000000000000000000000000000000000000000001790556126ca613e84565b7fed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd660007f000000000000000000000000000000000000000000000000000000000000000085856040516127209493929190614b51565b60405180910390a1801561276e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b607b54600160e01b900460ff16156127a2576040516324eff8c360e01b815260040160405180910390fd5b606f5460ff16156127c657604051630bc011ff60e21b815260040160405180910390fd5b8060008190036127e95760405163cb591a5f60e01b815260040160405180910390fd5b6103e881111561280c57604051635acfba9d60e11b815260040160405180910390fd5b6073546001600160401b03600160c01b8204811691612834918491600160801b900416614b88565b11156128535760405163c630a00d60e01b815260040160405180910390fd5b6073546001600160401b03600160401b820481166000818152607260205260408120549193600160801b9004909216915b84811015612a6c5760008787838181106128a0576128a06148cd565b90506020028101906128b29190614b9b565b6128bb90614bb1565b9050836128c7816148a7565b825180516020918201208185015160408087015190519499509194506000936129119386939101928352602083019190915260c01b6001600160c01b031916604082015260480190565b60408051601f1981840301815291815281516020928301206001600160401b0389166000908152607190935291205490915081146129625760405163671ebaaf60e11b815260040160405180910390fd5b6001600160401b0386166000908152607160205260408120556129866001896149c1565b84036129f35742607b60149054906101000a90046001600160401b031684604001516129b29190614860565b6001600160401b031611156129f3576040517fc44a082100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020838101516040805192830188905282018490526060808301919091524260c01b6001600160c01b031916608083015233901b6bffffffffffffffffffffffff19166088820152609c016040516020818303038152906040528051906020012094505050508080612a64906149a8565b915050612884565b50612a778484614860565b607380546001600160401b0342811667ffffffffffffffff199092168217808455604080516060810182528781526020808201958652600160401b9384900485168284019081528589166000818152607290935284832093518455965160019390930180549151871686026fffffffffffffffffffffffffffffffff1990921693871693909317179091558554938916600160801b0267ffffffffffffffff60801b19938602939093167fffffffffffffffff00000000000000000000000000000000ffffffffffffffff90941693909317919091179093559151929550917f648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a49190a2505050505050565b607a546001600160a01b03163314612bad57604051634755657960e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dbc169766040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612c0857600080fd5b505af1158015612c1c573d6000803e3d6000fd5b50505050611b57613f0a565b607454600160401b90046001600160a01b03163314612c5a5760405163bbcbbc0560e01b815260040160405180910390fd5b612c6a88888888888888886131e2565b6074805467ffffffffffffffff19166001600160401b0387811691821790925560009081526075602052604090208490556079541615612cbe57607980546fffffffffffffffffffffffffffffffff191690555b6040516333d6247d60e01b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906333d6247d90602401600060405180830381600087803b158015612d2057600080fd5b505af1158015612d34573d6000803e3d6000fd5b50506079805477ffffffffffffffffffffffffffffffffffffffffffffffff167a093a80000000000000000000000000000000000000000000000000179055505060405183815233906001600160401b038716907fcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf729060200160405180910390a35050505050505050565b607b54600160e01b900460ff1615612dea576040516324eff8c360e01b815260040160405180910390fd5b606f5460ff1615612e0e57604051630bc011ff60e21b815260040160405180910390fd5b6000612e18611a95565b905081811115612e54576040517f4732fdb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611388831115612e77576040516328a69b1f60e21b815260040160405180910390fd5b612eac6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084613d14565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633ed691ef6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f30919061498f565b60738054919250600160c01b9091046001600160401b0316906018612f54836148a7565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550508484604051612f89929190614c2c565b60408051918290038220602083015281018290526001600160c01b03194260c01b16606082015260680160408051808303601f190181529181528151602092830120607354600160c01b90046001600160401b03166000908152607190935291205532330361305757607354604080518381523360208201526060918101829052600091810191909152600160c01b9091046001600160401b0316907ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc9319060800160405180910390a26130b4565b607360189054906101000a90046001600160401b03166001600160401b03167ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc931823388886040516130ab9493929190614c3c565b60405180910390a25b5050505050565b607a546001600160a01b031633146130e657604051634755657960e01b815260040160405180910390fd5b607480547fffffffff0000000000000000000000000000000000000000ffffffffffffffff16600160401b6001600160a01b038416908102919091179091556040519081527f61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca90602001610bda565b61315d613dcb565b6001600160a01b0381166131d95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401612404565b610f7481613e25565b60006001600160401b03891615613276576079546001600160401b03908116908a1611156132235760405163bb14c20560e01b815260040160405180910390fd5b506001600160401b038089166000908152607860205260409020600281015481549092898116600160401b909204161461327057604051632bd2e3e760e01b815260040160405180910390fd5b506132de565b506001600160401b038616600090815260756020526040902054806132ae576040516324cbdcc360e11b815260040160405180910390fd5b6074546001600160401b0390811690881611156132de57604051630f2b74f160e11b815260040160405180910390fd5b6079546001600160401b03908116908916118061330d5750886001600160401b0316886001600160401b031611155b8061332e57506079546001600160401b03600160401b909104811690891611155b15613365576040517fbfa7079f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160401b03888116600090815260786020526040902054600160401b90048116908716146133c2576040517f32a2a77f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006133d18888888589610be5565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000016002836040516134069190614c65565b602060405180830381855afa158015613423573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190613446919061498f565b6134509190614c77565b604080516020810182528281529051632363e29760e21b81529192506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691638d8f8a5c916134ad9189918991600401614c8b565b602060405180830381865afa1580156134ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134ee9190614cd3565b61350b576040516309bde33960e01b815260040160405180910390fd5b6001600160401b038a16600090815260786020526040902060020154869003613560576040517fa47276bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632072f6c56040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156135c857600080fd5b505af11580156135dc573d6000803e3d6000fd5b50505050611b57613f7b565b6079546001600160401b03600160401b909104811690821611158061361b57506079546001600160401b03908116908216115b15613652576040517fd086b70b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160401b038181166000818152607860209081526040808320805460748054600160401b9283900490981667ffffffffffffffff1990981688179055600282015487865260759094529382902092909255607980546fffffffffffffffff000000000000000019169390940292909217909255600182015490516333d6247d60e01b815260048101919091529091907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906333d6247d90602401600060405180830381600087803b15801561373257600080fd5b505af1158015613746573d6000803e3d6000fd5b50505050826001600160401b0316816001600160401b03167f328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e846002015460405161379391815260200190565b60405180910390a3505050565b6000806137ab6122a8565b90506001600160401b03891615613841576079546001600160401b03908116908a1611156137ec5760405163bb14c20560e01b815260040160405180910390fd5b6001600160401b03808a1660009081526078602052604090206002810154815490945090918a8116600160401b909204161461383b57604051632bd2e3e760e01b815260040160405180910390fd5b506138ad565b6001600160401b03881660009081526075602052604090205491508161387a576040516324cbdcc360e11b815260040160405180910390fd5b806001600160401b0316886001600160401b031611156138ad57604051630f2b74f160e11b815260040160405180910390fd5b806001600160401b0316876001600160401b0316116138f8576040517fb9b18f5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000613907898989868a610be5565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160028360405161393c9190614c65565b602060405180830381855afa158015613959573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061397c919061498f565b6139869190614c77565b604080516020810182528281529051632363e29760e21b81529192506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691638d8f8a5c916139e3918a918a91600401614c8b565b602060405180830381865afa158015613a00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a249190614cd3565b613a41576040516309bde33960e01b815260040160405180910390fd5b61356033613a4f858c614887565b6001600160401b0316613a60611d58565b613a6a91906149da565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190613fd7565b6000613aa56122a8565b905081600080613ab58484614887565b606f546001600160401b039182169250600091613ad891610100900416426149c1565b90505b846001600160401b0316846001600160401b031614613b59576001600160401b0380851660009081526072602052604090206001810154909116821015613b38576001810154600160401b90046001600160401b03169450613b53565b613b428686614887565b6001600160401b0316935050613b59565b50613adb565b6000613b6584846149c1565b905083811015613bbc57808403600c8111613b805780613b83565b600c5b9050806103e80a81606f60099054906101000a900461ffff1661ffff160a6070540281613bb257613bb26149f1565b0460705550613c2c565b838103600c8111613bcd5780613bd0565b600c5b90506000816103e80a82606f60099054906101000a900461ffff1661ffff160a670de0b6b3a76400000281613c0757613c076149f1565b04905080607054670de0b6b3a76400000281613c2557613c256149f1565b0460705550505b683635c9adc5dea000006070541115613c5157683635c9adc5dea0000060705561276e565b633b9aca00607054101561276e57633b9aca0060705550505050505050565b6079546001600160401b03600160401b8204811691161115611b5757607954600090613cad90600160401b90046001600160401b03166001614860565b9050613cb881610d90565b15610f7457607954600090600290613cda9084906001600160401b0316614887565b613ce49190614cf5565b613cee9083614860565b9050613cf981610d90565b15613d0b57613d07816135e8565b5050565b613d07826135e8565b6040516001600160a01b0380851660248301528316604482015260648101829052613dc59085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614025565b50505050565b6033546001600160a01b03163314611b575760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401612404565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16613f015760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401612404565b611b5733613e25565b606f5460ff16613f46576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f805460ff191690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b606f5460ff1615613f9f57604051630bc011ff60e21b815260040160405180910390fd5b606f805460ff191660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b6040516001600160a01b0383166024820152604481018290526140209084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401613d61565b505050565b600061407a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661410a9092919063ffffffff16565b80519091501561402057808060200190518101906140989190614cd3565b6140205760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401612404565b60606141198484600085614123565b90505b9392505050565b60608247101561419b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401612404565b6001600160a01b0385163b6141f25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612404565b600080866001600160a01b0316858760405161420e9190614c65565b60006040518083038185875af1925050503d806000811461424b576040519150601f19603f3d011682016040523d82523d6000602084013e614250565b606091505b509150915061426082828661426b565b979650505050505050565b6060831561427a57508161411c565b82511561428a5782518084602001fd5b8160405162461bcd60e51b815260040161240491906143eb565b80356001600160401b03811681146122a357600080fd5b60008083601f8401126142cd57600080fd5b5081356001600160401b038111156142e457600080fd5b6020830191508360208285010111156142fc57600080fd5b9250929050565b60008060008060008060008060e0898b03121561431f57600080fd5b614328896142a4565b975061433660208a016142a4565b965061434460408a016142a4565b955061435260608a016142a4565b94506080890135935060a0890135925060c08901356001600160401b0381111561437b57600080fd5b6143878b828c016142bb565b999c989b5096995094979396929594505050565b60005b838110156143b657818101518382015260200161439e565b50506000910152565b600081518084526143d781602086016020860161439b565b601f01601f19169290920160200192915050565b60208152600061411c60208301846143bf565b60006020828403121561441057600080fd5b813561ffff8116811461411c57600080fd5b600080600080600060a0868803121561443a57600080fd5b614443866142a4565b9450614451602087016142a4565b94979496505050506040830135926060810135926080909101359150565b60006020828403121561448157600080fd5b61411c826142a4565b600080600080600080600060c0888a0312156144a557600080fd5b6144ae886142a4565b96506144bc602089016142a4565b95506144ca604089016142a4565b9450606088013593506080880135925060a08801356001600160401b038111156144f357600080fd5b6144ff8a828b016142bb565b989b979a50959850939692959293505050565b60008083601f84011261452457600080fd5b5081356001600160401b0381111561453b57600080fd5b6020830191508360208260051b85010111156142fc57600080fd5b80356001600160a01b03811681146122a357600080fd5b60008060006040848603121561458257600080fd5b83356001600160401b0381111561459857600080fd5b6145a486828701614512565b90945092506145b7905060208501614556565b90509250925092565b6000602082840312156145d257600080fd5b61411c82614556565b6000602082840312156145ed57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261461b57600080fd5b81356001600160401b0380821115614635576146356145f4565b604051601f8301601f19908116603f0116810190828211818310171561465d5761465d6145f4565b8160405283815286602085880101111561467657600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000602082840312156146a857600080fd5b81356001600160401b038111156146be57600080fd5b6146ca8482850161460a565b949350505050565b6000806000806000808688036101208112156146ed57600080fd5b60a08112156146fb57600080fd5b5086955060a0870135945060c08701356001600160401b038082111561472057600080fd5b61472c8a838b0161460a565b955060e089013591508082111561474257600080fd5b61474e8a838b0161460a565b945061010089013591508082111561476557600080fd5b5061477289828a016142bb565b979a9699509497509295939492505050565b6000806020838503121561479757600080fd5b82356001600160401b038111156147ad57600080fd5b6147b985828601614512565b90969095509350505050565b6000806000604084860312156147da57600080fd5b83356001600160401b038111156147f057600080fd5b6147fc868287016142bb565b909790965060209590950135949350505050565b600181811c9082168061482457607f821691505b60208210810361484457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6001600160401b038181168382160190808211156148805761488061484a565b5092915050565b6001600160401b038281168282160390808211156148805761488061484a565b60006001600160401b038083168181036148c3576148c361484a565b6001019392505050565b634e487b7160e01b600052603260045260246000fd5b60008235607e198336030181126148f957600080fd5b9190910192915050565b60006080823603121561491557600080fd5b604051608081016001600160401b038282108183111715614938576149386145f4565b81604052843591508082111561494d57600080fd5b5061495a3682860161460a565b82525060208301356020820152614973604084016142a4565b6040820152614984606084016142a4565b606082015292915050565b6000602082840312156149a157600080fd5b5051919050565b6000600182016149ba576149ba61484a565b5060010190565b818103818111156149d4576149d461484a565b92915050565b80820281158282048414176149d4576149d461484a565b634e487b7160e01b600052601260045260246000fd5b600082614a1657614a166149f1565b500490565b601f82111561402057600081815260208120601f850160051c81016020861015614a425750805b601f850160051c820191505b81811015614a6157828155600101614a4e565b505050505050565b81516001600160401b03811115614a8257614a826145f4565b614a9681614a908454614810565b84614a1b565b602080601f831160018114614acb5760008415614ab35750858301515b600019600386901b1c1916600185901b178555614a61565b600085815260208120601f198616915b82811015614afa57888601518255948401946001909101908401614adb565b5085821015614b185787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60006001600160401b03808716835280861660208401525060606040830152614b7e606083018486614b28565b9695505050505050565b808201808211156149d4576149d461484a565b60008235605e198336030181126148f957600080fd5b600060608236031215614bc357600080fd5b604051606081016001600160401b038282108183111715614be657614be66145f4565b816040528435915080821115614bfb57600080fd5b50614c083682860161460a565b82525060208301356020820152614c21604084016142a4565b604082015292915050565b8183823760009101908152919050565b8481526001600160a01b0384166020820152606060408201526000614b7e606083018486614b28565b600082516148f981846020870161439b565b600082614c8657614c866149f1565b500690565b604081526000614c9f604083018587614b28565b905060208083018460005b6001811015614cc757815183529183019190830190600101614caa565b50505050949350505050565b600060208284031215614ce557600080fd5b8151801515811461411c57600080fd5b60006001600160401b0380841680614d0f57614d0f6149f1565b9216919091049291505056fea26469706673582212200b586a4d2a78f3585b9b741ea1f06c0afab4d66b48c408bc1e7be9fa34df798364736f6c63430008110033", -} - -// PolygonzkevmABI is the input ABI used to generate the binding from. -// Deprecated: Use PolygonzkevmMetaData.ABI instead. -var PolygonzkevmABI = PolygonzkevmMetaData.ABI - -// PolygonzkevmBin is the compiled bytecode used for deploying new contracts. -// Deprecated: Use PolygonzkevmMetaData.Bin instead. -var PolygonzkevmBin = PolygonzkevmMetaData.Bin - -// DeployPolygonzkevm deploys a new Ethereum contract, binding an instance of Polygonzkevm to it. -func DeployPolygonzkevm(auth *bind.TransactOpts, backend bind.ContractBackend, _globalExitRootManager common.Address, _matic common.Address, _rollupVerifier common.Address, _bridgeAddress common.Address, _chainID uint64, _forkID uint64) (common.Address, *types.Transaction, *Polygonzkevm, error) { - parsed, err := PolygonzkevmMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(PolygonzkevmBin), backend, _globalExitRootManager, _matic, _rollupVerifier, _bridgeAddress, _chainID, _forkID) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Polygonzkevm{PolygonzkevmCaller: PolygonzkevmCaller{contract: contract}, PolygonzkevmTransactor: PolygonzkevmTransactor{contract: contract}, PolygonzkevmFilterer: PolygonzkevmFilterer{contract: contract}}, nil -} - -// Polygonzkevm is an auto generated Go binding around an Ethereum contract. -type Polygonzkevm struct { - PolygonzkevmCaller // Read-only binding to the contract - PolygonzkevmTransactor // Write-only binding to the contract - PolygonzkevmFilterer // Log filterer for contract events -} - -// PolygonzkevmCaller is an auto generated read-only Go binding around an Ethereum contract. -type PolygonzkevmCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PolygonzkevmTransactor is an auto generated write-only Go binding around an Ethereum contract. -type PolygonzkevmTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PolygonzkevmFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type PolygonzkevmFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PolygonzkevmSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type PolygonzkevmSession struct { - Contract *Polygonzkevm // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// PolygonzkevmCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type PolygonzkevmCallerSession struct { - Contract *PolygonzkevmCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// PolygonzkevmTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type PolygonzkevmTransactorSession struct { - Contract *PolygonzkevmTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// PolygonzkevmRaw is an auto generated low-level Go binding around an Ethereum contract. -type PolygonzkevmRaw struct { - Contract *Polygonzkevm // Generic contract binding to access the raw methods on -} - -// PolygonzkevmCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type PolygonzkevmCallerRaw struct { - Contract *PolygonzkevmCaller // Generic read-only contract binding to access the raw methods on -} - -// PolygonzkevmTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type PolygonzkevmTransactorRaw struct { - Contract *PolygonzkevmTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewPolygonzkevm creates a new instance of Polygonzkevm, bound to a specific deployed contract. -func NewPolygonzkevm(address common.Address, backend bind.ContractBackend) (*Polygonzkevm, error) { - contract, err := bindPolygonzkevm(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Polygonzkevm{PolygonzkevmCaller: PolygonzkevmCaller{contract: contract}, PolygonzkevmTransactor: PolygonzkevmTransactor{contract: contract}, PolygonzkevmFilterer: PolygonzkevmFilterer{contract: contract}}, nil -} - -// NewPolygonzkevmCaller creates a new read-only instance of Polygonzkevm, bound to a specific deployed contract. -func NewPolygonzkevmCaller(address common.Address, caller bind.ContractCaller) (*PolygonzkevmCaller, error) { - contract, err := bindPolygonzkevm(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &PolygonzkevmCaller{contract: contract}, nil -} - -// NewPolygonzkevmTransactor creates a new write-only instance of Polygonzkevm, bound to a specific deployed contract. -func NewPolygonzkevmTransactor(address common.Address, transactor bind.ContractTransactor) (*PolygonzkevmTransactor, error) { - contract, err := bindPolygonzkevm(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &PolygonzkevmTransactor{contract: contract}, nil -} - -// NewPolygonzkevmFilterer creates a new log filterer instance of Polygonzkevm, bound to a specific deployed contract. -func NewPolygonzkevmFilterer(address common.Address, filterer bind.ContractFilterer) (*PolygonzkevmFilterer, error) { - contract, err := bindPolygonzkevm(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &PolygonzkevmFilterer{contract: contract}, nil -} - -// bindPolygonzkevm binds a generic wrapper to an already deployed contract. -func bindPolygonzkevm(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := PolygonzkevmMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_Polygonzkevm *PolygonzkevmRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Polygonzkevm.Contract.PolygonzkevmCaller.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_Polygonzkevm *PolygonzkevmRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevm.Contract.PolygonzkevmTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Polygonzkevm *PolygonzkevmRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Polygonzkevm.Contract.PolygonzkevmTransactor.contract.Transact(opts, method, params...) -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_Polygonzkevm *PolygonzkevmCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Polygonzkevm.Contract.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_Polygonzkevm *PolygonzkevmTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevm.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Polygonzkevm *PolygonzkevmTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Polygonzkevm.Contract.contract.Transact(opts, method, params...) -} - -// Admin is a free data retrieval call binding the contract method 0xf851a440. -// -// Solidity: function admin() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) Admin(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "admin") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Admin is a free data retrieval call binding the contract method 0xf851a440. -// -// Solidity: function admin() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) Admin() (common.Address, error) { - return _Polygonzkevm.Contract.Admin(&_Polygonzkevm.CallOpts) -} - -// Admin is a free data retrieval call binding the contract method 0xf851a440. -// -// Solidity: function admin() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) Admin() (common.Address, error) { - return _Polygonzkevm.Contract.Admin(&_Polygonzkevm.CallOpts) -} - -// BatchFee is a free data retrieval call binding the contract method 0xf8b823e4. -// -// Solidity: function batchFee() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmCaller) BatchFee(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "batchFee") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// BatchFee is a free data retrieval call binding the contract method 0xf8b823e4. -// -// Solidity: function batchFee() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmSession) BatchFee() (*big.Int, error) { - return _Polygonzkevm.Contract.BatchFee(&_Polygonzkevm.CallOpts) -} - -// BatchFee is a free data retrieval call binding the contract method 0xf8b823e4. -// -// Solidity: function batchFee() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmCallerSession) BatchFee() (*big.Int, error) { - return _Polygonzkevm.Contract.BatchFee(&_Polygonzkevm.CallOpts) -} - -// BatchNumToStateRoot is a free data retrieval call binding the contract method 0x5392c5e0. -// -// Solidity: function batchNumToStateRoot(uint64 ) view returns(bytes32) -func (_Polygonzkevm *PolygonzkevmCaller) BatchNumToStateRoot(opts *bind.CallOpts, arg0 uint64) ([32]byte, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "batchNumToStateRoot", arg0) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// BatchNumToStateRoot is a free data retrieval call binding the contract method 0x5392c5e0. -// -// Solidity: function batchNumToStateRoot(uint64 ) view returns(bytes32) -func (_Polygonzkevm *PolygonzkevmSession) BatchNumToStateRoot(arg0 uint64) ([32]byte, error) { - return _Polygonzkevm.Contract.BatchNumToStateRoot(&_Polygonzkevm.CallOpts, arg0) -} - -// BatchNumToStateRoot is a free data retrieval call binding the contract method 0x5392c5e0. -// -// Solidity: function batchNumToStateRoot(uint64 ) view returns(bytes32) -func (_Polygonzkevm *PolygonzkevmCallerSession) BatchNumToStateRoot(arg0 uint64) ([32]byte, error) { - return _Polygonzkevm.Contract.BatchNumToStateRoot(&_Polygonzkevm.CallOpts, arg0) -} - -// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. -// -// Solidity: function bridgeAddress() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) BridgeAddress(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "bridgeAddress") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. -// -// Solidity: function bridgeAddress() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) BridgeAddress() (common.Address, error) { - return _Polygonzkevm.Contract.BridgeAddress(&_Polygonzkevm.CallOpts) -} - -// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. -// -// Solidity: function bridgeAddress() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) BridgeAddress() (common.Address, error) { - return _Polygonzkevm.Contract.BridgeAddress(&_Polygonzkevm.CallOpts) -} - -// CalculateRewardPerBatch is a free data retrieval call binding the contract method 0x99f5634e. -// -// Solidity: function calculateRewardPerBatch() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmCaller) CalculateRewardPerBatch(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "calculateRewardPerBatch") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// CalculateRewardPerBatch is a free data retrieval call binding the contract method 0x99f5634e. -// -// Solidity: function calculateRewardPerBatch() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmSession) CalculateRewardPerBatch() (*big.Int, error) { - return _Polygonzkevm.Contract.CalculateRewardPerBatch(&_Polygonzkevm.CallOpts) -} - -// CalculateRewardPerBatch is a free data retrieval call binding the contract method 0x99f5634e. -// -// Solidity: function calculateRewardPerBatch() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmCallerSession) CalculateRewardPerBatch() (*big.Int, error) { - return _Polygonzkevm.Contract.CalculateRewardPerBatch(&_Polygonzkevm.CallOpts) -} - -// ChainID is a free data retrieval call binding the contract method 0xadc879e9. -// -// Solidity: function chainID() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) ChainID(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "chainID") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// ChainID is a free data retrieval call binding the contract method 0xadc879e9. -// -// Solidity: function chainID() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) ChainID() (uint64, error) { - return _Polygonzkevm.Contract.ChainID(&_Polygonzkevm.CallOpts) -} - -// ChainID is a free data retrieval call binding the contract method 0xadc879e9. -// -// Solidity: function chainID() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) ChainID() (uint64, error) { - return _Polygonzkevm.Contract.ChainID(&_Polygonzkevm.CallOpts) -} - -// CheckStateRootInsidePrime is a free data retrieval call binding the contract method 0xba58ae39. -// -// Solidity: function checkStateRootInsidePrime(uint256 newStateRoot) pure returns(bool) -func (_Polygonzkevm *PolygonzkevmCaller) CheckStateRootInsidePrime(opts *bind.CallOpts, newStateRoot *big.Int) (bool, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "checkStateRootInsidePrime", newStateRoot) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// CheckStateRootInsidePrime is a free data retrieval call binding the contract method 0xba58ae39. -// -// Solidity: function checkStateRootInsidePrime(uint256 newStateRoot) pure returns(bool) -func (_Polygonzkevm *PolygonzkevmSession) CheckStateRootInsidePrime(newStateRoot *big.Int) (bool, error) { - return _Polygonzkevm.Contract.CheckStateRootInsidePrime(&_Polygonzkevm.CallOpts, newStateRoot) -} - -// CheckStateRootInsidePrime is a free data retrieval call binding the contract method 0xba58ae39. -// -// Solidity: function checkStateRootInsidePrime(uint256 newStateRoot) pure returns(bool) -func (_Polygonzkevm *PolygonzkevmCallerSession) CheckStateRootInsidePrime(newStateRoot *big.Int) (bool, error) { - return _Polygonzkevm.Contract.CheckStateRootInsidePrime(&_Polygonzkevm.CallOpts, newStateRoot) -} - -// ForceBatchTimeout is a free data retrieval call binding the contract method 0xc754c7ed. -// -// Solidity: function forceBatchTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) ForceBatchTimeout(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "forceBatchTimeout") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// ForceBatchTimeout is a free data retrieval call binding the contract method 0xc754c7ed. -// -// Solidity: function forceBatchTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) ForceBatchTimeout() (uint64, error) { - return _Polygonzkevm.Contract.ForceBatchTimeout(&_Polygonzkevm.CallOpts) -} - -// ForceBatchTimeout is a free data retrieval call binding the contract method 0xc754c7ed. -// -// Solidity: function forceBatchTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) ForceBatchTimeout() (uint64, error) { - return _Polygonzkevm.Contract.ForceBatchTimeout(&_Polygonzkevm.CallOpts) -} - -// ForcedBatches is a free data retrieval call binding the contract method 0x6b8616ce. -// -// Solidity: function forcedBatches(uint64 ) view returns(bytes32) -func (_Polygonzkevm *PolygonzkevmCaller) ForcedBatches(opts *bind.CallOpts, arg0 uint64) ([32]byte, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "forcedBatches", arg0) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// ForcedBatches is a free data retrieval call binding the contract method 0x6b8616ce. -// -// Solidity: function forcedBatches(uint64 ) view returns(bytes32) -func (_Polygonzkevm *PolygonzkevmSession) ForcedBatches(arg0 uint64) ([32]byte, error) { - return _Polygonzkevm.Contract.ForcedBatches(&_Polygonzkevm.CallOpts, arg0) -} - -// ForcedBatches is a free data retrieval call binding the contract method 0x6b8616ce. -// -// Solidity: function forcedBatches(uint64 ) view returns(bytes32) -func (_Polygonzkevm *PolygonzkevmCallerSession) ForcedBatches(arg0 uint64) ([32]byte, error) { - return _Polygonzkevm.Contract.ForcedBatches(&_Polygonzkevm.CallOpts, arg0) -} - -// ForkID is a free data retrieval call binding the contract method 0x831c7ead. -// -// Solidity: function forkID() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) ForkID(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "forkID") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// ForkID is a free data retrieval call binding the contract method 0x831c7ead. -// -// Solidity: function forkID() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) ForkID() (uint64, error) { - return _Polygonzkevm.Contract.ForkID(&_Polygonzkevm.CallOpts) -} - -// ForkID is a free data retrieval call binding the contract method 0x831c7ead. -// -// Solidity: function forkID() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) ForkID() (uint64, error) { - return _Polygonzkevm.Contract.ForkID(&_Polygonzkevm.CallOpts) -} - -// GetForcedBatchFee is a free data retrieval call binding the contract method 0x60469169. -// -// Solidity: function getForcedBatchFee() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmCaller) GetForcedBatchFee(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "getForcedBatchFee") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetForcedBatchFee is a free data retrieval call binding the contract method 0x60469169. -// -// Solidity: function getForcedBatchFee() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmSession) GetForcedBatchFee() (*big.Int, error) { - return _Polygonzkevm.Contract.GetForcedBatchFee(&_Polygonzkevm.CallOpts) -} - -// GetForcedBatchFee is a free data retrieval call binding the contract method 0x60469169. -// -// Solidity: function getForcedBatchFee() view returns(uint256) -func (_Polygonzkevm *PolygonzkevmCallerSession) GetForcedBatchFee() (*big.Int, error) { - return _Polygonzkevm.Contract.GetForcedBatchFee(&_Polygonzkevm.CallOpts) -} - -// GetInputSnarkBytes is a free data retrieval call binding the contract method 0x220d7899. -// -// Solidity: function getInputSnarkBytes(uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 oldStateRoot, bytes32 newStateRoot) view returns(bytes) -func (_Polygonzkevm *PolygonzkevmCaller) GetInputSnarkBytes(opts *bind.CallOpts, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, oldStateRoot [32]byte, newStateRoot [32]byte) ([]byte, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "getInputSnarkBytes", initNumBatch, finalNewBatch, newLocalExitRoot, oldStateRoot, newStateRoot) - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -// GetInputSnarkBytes is a free data retrieval call binding the contract method 0x220d7899. -// -// Solidity: function getInputSnarkBytes(uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 oldStateRoot, bytes32 newStateRoot) view returns(bytes) -func (_Polygonzkevm *PolygonzkevmSession) GetInputSnarkBytes(initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, oldStateRoot [32]byte, newStateRoot [32]byte) ([]byte, error) { - return _Polygonzkevm.Contract.GetInputSnarkBytes(&_Polygonzkevm.CallOpts, initNumBatch, finalNewBatch, newLocalExitRoot, oldStateRoot, newStateRoot) -} - -// GetInputSnarkBytes is a free data retrieval call binding the contract method 0x220d7899. -// -// Solidity: function getInputSnarkBytes(uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 oldStateRoot, bytes32 newStateRoot) view returns(bytes) -func (_Polygonzkevm *PolygonzkevmCallerSession) GetInputSnarkBytes(initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, oldStateRoot [32]byte, newStateRoot [32]byte) ([]byte, error) { - return _Polygonzkevm.Contract.GetInputSnarkBytes(&_Polygonzkevm.CallOpts, initNumBatch, finalNewBatch, newLocalExitRoot, oldStateRoot, newStateRoot) -} - -// GetLastVerifiedBatch is a free data retrieval call binding the contract method 0xc0ed84e0. -// -// Solidity: function getLastVerifiedBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) GetLastVerifiedBatch(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "getLastVerifiedBatch") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// GetLastVerifiedBatch is a free data retrieval call binding the contract method 0xc0ed84e0. -// -// Solidity: function getLastVerifiedBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) GetLastVerifiedBatch() (uint64, error) { - return _Polygonzkevm.Contract.GetLastVerifiedBatch(&_Polygonzkevm.CallOpts) -} - -// GetLastVerifiedBatch is a free data retrieval call binding the contract method 0xc0ed84e0. -// -// Solidity: function getLastVerifiedBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) GetLastVerifiedBatch() (uint64, error) { - return _Polygonzkevm.Contract.GetLastVerifiedBatch(&_Polygonzkevm.CallOpts) -} - -// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. -// -// Solidity: function globalExitRootManager() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) GlobalExitRootManager(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "globalExitRootManager") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. -// -// Solidity: function globalExitRootManager() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) GlobalExitRootManager() (common.Address, error) { - return _Polygonzkevm.Contract.GlobalExitRootManager(&_Polygonzkevm.CallOpts) -} - -// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. -// -// Solidity: function globalExitRootManager() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) GlobalExitRootManager() (common.Address, error) { - return _Polygonzkevm.Contract.GlobalExitRootManager(&_Polygonzkevm.CallOpts) -} - -// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. -// -// Solidity: function isEmergencyState() view returns(bool) -func (_Polygonzkevm *PolygonzkevmCaller) IsEmergencyState(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "isEmergencyState") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. -// -// Solidity: function isEmergencyState() view returns(bool) -func (_Polygonzkevm *PolygonzkevmSession) IsEmergencyState() (bool, error) { - return _Polygonzkevm.Contract.IsEmergencyState(&_Polygonzkevm.CallOpts) -} - -// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. -// -// Solidity: function isEmergencyState() view returns(bool) -func (_Polygonzkevm *PolygonzkevmCallerSession) IsEmergencyState() (bool, error) { - return _Polygonzkevm.Contract.IsEmergencyState(&_Polygonzkevm.CallOpts) -} - -// IsForcedBatchDisallowed is a free data retrieval call binding the contract method 0xed6b0104. -// -// Solidity: function isForcedBatchDisallowed() view returns(bool) -func (_Polygonzkevm *PolygonzkevmCaller) IsForcedBatchDisallowed(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "isForcedBatchDisallowed") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsForcedBatchDisallowed is a free data retrieval call binding the contract method 0xed6b0104. -// -// Solidity: function isForcedBatchDisallowed() view returns(bool) -func (_Polygonzkevm *PolygonzkevmSession) IsForcedBatchDisallowed() (bool, error) { - return _Polygonzkevm.Contract.IsForcedBatchDisallowed(&_Polygonzkevm.CallOpts) -} - -// IsForcedBatchDisallowed is a free data retrieval call binding the contract method 0xed6b0104. -// -// Solidity: function isForcedBatchDisallowed() view returns(bool) -func (_Polygonzkevm *PolygonzkevmCallerSession) IsForcedBatchDisallowed() (bool, error) { - return _Polygonzkevm.Contract.IsForcedBatchDisallowed(&_Polygonzkevm.CallOpts) -} - -// IsPendingStateConsolidable is a free data retrieval call binding the contract method 0x383b3be8. -// -// Solidity: function isPendingStateConsolidable(uint64 pendingStateNum) view returns(bool) -func (_Polygonzkevm *PolygonzkevmCaller) IsPendingStateConsolidable(opts *bind.CallOpts, pendingStateNum uint64) (bool, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "isPendingStateConsolidable", pendingStateNum) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsPendingStateConsolidable is a free data retrieval call binding the contract method 0x383b3be8. -// -// Solidity: function isPendingStateConsolidable(uint64 pendingStateNum) view returns(bool) -func (_Polygonzkevm *PolygonzkevmSession) IsPendingStateConsolidable(pendingStateNum uint64) (bool, error) { - return _Polygonzkevm.Contract.IsPendingStateConsolidable(&_Polygonzkevm.CallOpts, pendingStateNum) -} - -// IsPendingStateConsolidable is a free data retrieval call binding the contract method 0x383b3be8. -// -// Solidity: function isPendingStateConsolidable(uint64 pendingStateNum) view returns(bool) -func (_Polygonzkevm *PolygonzkevmCallerSession) IsPendingStateConsolidable(pendingStateNum uint64) (bool, error) { - return _Polygonzkevm.Contract.IsPendingStateConsolidable(&_Polygonzkevm.CallOpts, pendingStateNum) -} - -// LastBatchSequenced is a free data retrieval call binding the contract method 0x423fa856. -// -// Solidity: function lastBatchSequenced() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) LastBatchSequenced(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "lastBatchSequenced") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// LastBatchSequenced is a free data retrieval call binding the contract method 0x423fa856. -// -// Solidity: function lastBatchSequenced() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) LastBatchSequenced() (uint64, error) { - return _Polygonzkevm.Contract.LastBatchSequenced(&_Polygonzkevm.CallOpts) -} - -// LastBatchSequenced is a free data retrieval call binding the contract method 0x423fa856. -// -// Solidity: function lastBatchSequenced() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) LastBatchSequenced() (uint64, error) { - return _Polygonzkevm.Contract.LastBatchSequenced(&_Polygonzkevm.CallOpts) -} - -// LastForceBatch is a free data retrieval call binding the contract method 0xe7a7ed02. -// -// Solidity: function lastForceBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) LastForceBatch(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "lastForceBatch") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// LastForceBatch is a free data retrieval call binding the contract method 0xe7a7ed02. -// -// Solidity: function lastForceBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) LastForceBatch() (uint64, error) { - return _Polygonzkevm.Contract.LastForceBatch(&_Polygonzkevm.CallOpts) -} - -// LastForceBatch is a free data retrieval call binding the contract method 0xe7a7ed02. -// -// Solidity: function lastForceBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) LastForceBatch() (uint64, error) { - return _Polygonzkevm.Contract.LastForceBatch(&_Polygonzkevm.CallOpts) -} - -// LastForceBatchSequenced is a free data retrieval call binding the contract method 0x45605267. -// -// Solidity: function lastForceBatchSequenced() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) LastForceBatchSequenced(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "lastForceBatchSequenced") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// LastForceBatchSequenced is a free data retrieval call binding the contract method 0x45605267. -// -// Solidity: function lastForceBatchSequenced() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) LastForceBatchSequenced() (uint64, error) { - return _Polygonzkevm.Contract.LastForceBatchSequenced(&_Polygonzkevm.CallOpts) -} - -// LastForceBatchSequenced is a free data retrieval call binding the contract method 0x45605267. -// -// Solidity: function lastForceBatchSequenced() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) LastForceBatchSequenced() (uint64, error) { - return _Polygonzkevm.Contract.LastForceBatchSequenced(&_Polygonzkevm.CallOpts) -} - -// LastPendingState is a free data retrieval call binding the contract method 0x458c0477. -// -// Solidity: function lastPendingState() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) LastPendingState(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "lastPendingState") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// LastPendingState is a free data retrieval call binding the contract method 0x458c0477. -// -// Solidity: function lastPendingState() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) LastPendingState() (uint64, error) { - return _Polygonzkevm.Contract.LastPendingState(&_Polygonzkevm.CallOpts) -} - -// LastPendingState is a free data retrieval call binding the contract method 0x458c0477. -// -// Solidity: function lastPendingState() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) LastPendingState() (uint64, error) { - return _Polygonzkevm.Contract.LastPendingState(&_Polygonzkevm.CallOpts) -} - -// LastPendingStateConsolidated is a free data retrieval call binding the contract method 0x4a1a89a7. -// -// Solidity: function lastPendingStateConsolidated() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) LastPendingStateConsolidated(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "lastPendingStateConsolidated") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// LastPendingStateConsolidated is a free data retrieval call binding the contract method 0x4a1a89a7. -// -// Solidity: function lastPendingStateConsolidated() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) LastPendingStateConsolidated() (uint64, error) { - return _Polygonzkevm.Contract.LastPendingStateConsolidated(&_Polygonzkevm.CallOpts) -} - -// LastPendingStateConsolidated is a free data retrieval call binding the contract method 0x4a1a89a7. -// -// Solidity: function lastPendingStateConsolidated() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) LastPendingStateConsolidated() (uint64, error) { - return _Polygonzkevm.Contract.LastPendingStateConsolidated(&_Polygonzkevm.CallOpts) -} - -// LastTimestamp is a free data retrieval call binding the contract method 0x19d8ac61. -// -// Solidity: function lastTimestamp() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) LastTimestamp(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "lastTimestamp") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// LastTimestamp is a free data retrieval call binding the contract method 0x19d8ac61. -// -// Solidity: function lastTimestamp() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) LastTimestamp() (uint64, error) { - return _Polygonzkevm.Contract.LastTimestamp(&_Polygonzkevm.CallOpts) -} - -// LastTimestamp is a free data retrieval call binding the contract method 0x19d8ac61. -// -// Solidity: function lastTimestamp() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) LastTimestamp() (uint64, error) { - return _Polygonzkevm.Contract.LastTimestamp(&_Polygonzkevm.CallOpts) -} - -// LastVerifiedBatch is a free data retrieval call binding the contract method 0x7fcb3653. -// -// Solidity: function lastVerifiedBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) LastVerifiedBatch(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "lastVerifiedBatch") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// LastVerifiedBatch is a free data retrieval call binding the contract method 0x7fcb3653. -// -// Solidity: function lastVerifiedBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) LastVerifiedBatch() (uint64, error) { - return _Polygonzkevm.Contract.LastVerifiedBatch(&_Polygonzkevm.CallOpts) -} - -// LastVerifiedBatch is a free data retrieval call binding the contract method 0x7fcb3653. -// -// Solidity: function lastVerifiedBatch() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) LastVerifiedBatch() (uint64, error) { - return _Polygonzkevm.Contract.LastVerifiedBatch(&_Polygonzkevm.CallOpts) -} - -// Matic is a free data retrieval call binding the contract method 0xb6b0b097. -// -// Solidity: function matic() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) Matic(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "matic") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Matic is a free data retrieval call binding the contract method 0xb6b0b097. -// -// Solidity: function matic() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) Matic() (common.Address, error) { - return _Polygonzkevm.Contract.Matic(&_Polygonzkevm.CallOpts) -} - -// Matic is a free data retrieval call binding the contract method 0xb6b0b097. -// -// Solidity: function matic() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) Matic() (common.Address, error) { - return _Polygonzkevm.Contract.Matic(&_Polygonzkevm.CallOpts) -} - -// MultiplierBatchFee is a free data retrieval call binding the contract method 0xafd23cbe. -// -// Solidity: function multiplierBatchFee() view returns(uint16) -func (_Polygonzkevm *PolygonzkevmCaller) MultiplierBatchFee(opts *bind.CallOpts) (uint16, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "multiplierBatchFee") - - if err != nil { - return *new(uint16), err - } - - out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) - - return out0, err - -} - -// MultiplierBatchFee is a free data retrieval call binding the contract method 0xafd23cbe. -// -// Solidity: function multiplierBatchFee() view returns(uint16) -func (_Polygonzkevm *PolygonzkevmSession) MultiplierBatchFee() (uint16, error) { - return _Polygonzkevm.Contract.MultiplierBatchFee(&_Polygonzkevm.CallOpts) -} - -// MultiplierBatchFee is a free data retrieval call binding the contract method 0xafd23cbe. -// -// Solidity: function multiplierBatchFee() view returns(uint16) -func (_Polygonzkevm *PolygonzkevmCallerSession) MultiplierBatchFee() (uint16, error) { - return _Polygonzkevm.Contract.MultiplierBatchFee(&_Polygonzkevm.CallOpts) -} - -// NetworkName is a free data retrieval call binding the contract method 0x107bf28c. -// -// Solidity: function networkName() view returns(string) -func (_Polygonzkevm *PolygonzkevmCaller) NetworkName(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "networkName") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// NetworkName is a free data retrieval call binding the contract method 0x107bf28c. -// -// Solidity: function networkName() view returns(string) -func (_Polygonzkevm *PolygonzkevmSession) NetworkName() (string, error) { - return _Polygonzkevm.Contract.NetworkName(&_Polygonzkevm.CallOpts) -} - -// NetworkName is a free data retrieval call binding the contract method 0x107bf28c. -// -// Solidity: function networkName() view returns(string) -func (_Polygonzkevm *PolygonzkevmCallerSession) NetworkName() (string, error) { - return _Polygonzkevm.Contract.NetworkName(&_Polygonzkevm.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) Owner() (common.Address, error) { - return _Polygonzkevm.Contract.Owner(&_Polygonzkevm.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) Owner() (common.Address, error) { - return _Polygonzkevm.Contract.Owner(&_Polygonzkevm.CallOpts) -} - -// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. -// -// Solidity: function pendingAdmin() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) PendingAdmin(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "pendingAdmin") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. -// -// Solidity: function pendingAdmin() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) PendingAdmin() (common.Address, error) { - return _Polygonzkevm.Contract.PendingAdmin(&_Polygonzkevm.CallOpts) -} - -// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. -// -// Solidity: function pendingAdmin() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) PendingAdmin() (common.Address, error) { - return _Polygonzkevm.Contract.PendingAdmin(&_Polygonzkevm.CallOpts) -} - -// PendingStateTimeout is a free data retrieval call binding the contract method 0xd939b315. -// -// Solidity: function pendingStateTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) PendingStateTimeout(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "pendingStateTimeout") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// PendingStateTimeout is a free data retrieval call binding the contract method 0xd939b315. -// -// Solidity: function pendingStateTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) PendingStateTimeout() (uint64, error) { - return _Polygonzkevm.Contract.PendingStateTimeout(&_Polygonzkevm.CallOpts) -} - -// PendingStateTimeout is a free data retrieval call binding the contract method 0xd939b315. -// -// Solidity: function pendingStateTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) PendingStateTimeout() (uint64, error) { - return _Polygonzkevm.Contract.PendingStateTimeout(&_Polygonzkevm.CallOpts) -} - -// PendingStateTransitions is a free data retrieval call binding the contract method 0x837a4738. -// -// Solidity: function pendingStateTransitions(uint256 ) view returns(uint64 timestamp, uint64 lastVerifiedBatch, bytes32 exitRoot, bytes32 stateRoot) -func (_Polygonzkevm *PolygonzkevmCaller) PendingStateTransitions(opts *bind.CallOpts, arg0 *big.Int) (struct { - Timestamp uint64 - LastVerifiedBatch uint64 - ExitRoot [32]byte - StateRoot [32]byte -}, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "pendingStateTransitions", arg0) - - outstruct := new(struct { - Timestamp uint64 - LastVerifiedBatch uint64 - ExitRoot [32]byte - StateRoot [32]byte - }) - if err != nil { - return *outstruct, err - } - - outstruct.Timestamp = *abi.ConvertType(out[0], new(uint64)).(*uint64) - outstruct.LastVerifiedBatch = *abi.ConvertType(out[1], new(uint64)).(*uint64) - outstruct.ExitRoot = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte) - outstruct.StateRoot = *abi.ConvertType(out[3], new([32]byte)).(*[32]byte) - - return *outstruct, err - -} - -// PendingStateTransitions is a free data retrieval call binding the contract method 0x837a4738. -// -// Solidity: function pendingStateTransitions(uint256 ) view returns(uint64 timestamp, uint64 lastVerifiedBatch, bytes32 exitRoot, bytes32 stateRoot) -func (_Polygonzkevm *PolygonzkevmSession) PendingStateTransitions(arg0 *big.Int) (struct { - Timestamp uint64 - LastVerifiedBatch uint64 - ExitRoot [32]byte - StateRoot [32]byte -}, error) { - return _Polygonzkevm.Contract.PendingStateTransitions(&_Polygonzkevm.CallOpts, arg0) -} - -// PendingStateTransitions is a free data retrieval call binding the contract method 0x837a4738. -// -// Solidity: function pendingStateTransitions(uint256 ) view returns(uint64 timestamp, uint64 lastVerifiedBatch, bytes32 exitRoot, bytes32 stateRoot) -func (_Polygonzkevm *PolygonzkevmCallerSession) PendingStateTransitions(arg0 *big.Int) (struct { - Timestamp uint64 - LastVerifiedBatch uint64 - ExitRoot [32]byte - StateRoot [32]byte -}, error) { - return _Polygonzkevm.Contract.PendingStateTransitions(&_Polygonzkevm.CallOpts, arg0) -} - -// RollupVerifier is a free data retrieval call binding the contract method 0xe8bf92ed. -// -// Solidity: function rollupVerifier() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) RollupVerifier(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "rollupVerifier") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// RollupVerifier is a free data retrieval call binding the contract method 0xe8bf92ed. -// -// Solidity: function rollupVerifier() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) RollupVerifier() (common.Address, error) { - return _Polygonzkevm.Contract.RollupVerifier(&_Polygonzkevm.CallOpts) -} - -// RollupVerifier is a free data retrieval call binding the contract method 0xe8bf92ed. -// -// Solidity: function rollupVerifier() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) RollupVerifier() (common.Address, error) { - return _Polygonzkevm.Contract.RollupVerifier(&_Polygonzkevm.CallOpts) -} - -// SequencedBatches is a free data retrieval call binding the contract method 0xb4d63f58. -// -// Solidity: function sequencedBatches(uint64 ) view returns(bytes32 accInputHash, uint64 sequencedTimestamp, uint64 previousLastBatchSequenced) -func (_Polygonzkevm *PolygonzkevmCaller) SequencedBatches(opts *bind.CallOpts, arg0 uint64) (struct { - AccInputHash [32]byte - SequencedTimestamp uint64 - PreviousLastBatchSequenced uint64 -}, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "sequencedBatches", arg0) - - outstruct := new(struct { - AccInputHash [32]byte - SequencedTimestamp uint64 - PreviousLastBatchSequenced uint64 - }) - if err != nil { - return *outstruct, err - } - - outstruct.AccInputHash = *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - outstruct.SequencedTimestamp = *abi.ConvertType(out[1], new(uint64)).(*uint64) - outstruct.PreviousLastBatchSequenced = *abi.ConvertType(out[2], new(uint64)).(*uint64) - - return *outstruct, err - -} - -// SequencedBatches is a free data retrieval call binding the contract method 0xb4d63f58. -// -// Solidity: function sequencedBatches(uint64 ) view returns(bytes32 accInputHash, uint64 sequencedTimestamp, uint64 previousLastBatchSequenced) -func (_Polygonzkevm *PolygonzkevmSession) SequencedBatches(arg0 uint64) (struct { - AccInputHash [32]byte - SequencedTimestamp uint64 - PreviousLastBatchSequenced uint64 -}, error) { - return _Polygonzkevm.Contract.SequencedBatches(&_Polygonzkevm.CallOpts, arg0) -} - -// SequencedBatches is a free data retrieval call binding the contract method 0xb4d63f58. -// -// Solidity: function sequencedBatches(uint64 ) view returns(bytes32 accInputHash, uint64 sequencedTimestamp, uint64 previousLastBatchSequenced) -func (_Polygonzkevm *PolygonzkevmCallerSession) SequencedBatches(arg0 uint64) (struct { - AccInputHash [32]byte - SequencedTimestamp uint64 - PreviousLastBatchSequenced uint64 -}, error) { - return _Polygonzkevm.Contract.SequencedBatches(&_Polygonzkevm.CallOpts, arg0) -} - -// TrustedAggregator is a free data retrieval call binding the contract method 0x29878983. -// -// Solidity: function trustedAggregator() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) TrustedAggregator(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "trustedAggregator") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// TrustedAggregator is a free data retrieval call binding the contract method 0x29878983. -// -// Solidity: function trustedAggregator() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) TrustedAggregator() (common.Address, error) { - return _Polygonzkevm.Contract.TrustedAggregator(&_Polygonzkevm.CallOpts) -} - -// TrustedAggregator is a free data retrieval call binding the contract method 0x29878983. -// -// Solidity: function trustedAggregator() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) TrustedAggregator() (common.Address, error) { - return _Polygonzkevm.Contract.TrustedAggregator(&_Polygonzkevm.CallOpts) -} - -// TrustedAggregatorTimeout is a free data retrieval call binding the contract method 0x841b24d7. -// -// Solidity: function trustedAggregatorTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) TrustedAggregatorTimeout(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "trustedAggregatorTimeout") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// TrustedAggregatorTimeout is a free data retrieval call binding the contract method 0x841b24d7. -// -// Solidity: function trustedAggregatorTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) TrustedAggregatorTimeout() (uint64, error) { - return _Polygonzkevm.Contract.TrustedAggregatorTimeout(&_Polygonzkevm.CallOpts) -} - -// TrustedAggregatorTimeout is a free data retrieval call binding the contract method 0x841b24d7. -// -// Solidity: function trustedAggregatorTimeout() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) TrustedAggregatorTimeout() (uint64, error) { - return _Polygonzkevm.Contract.TrustedAggregatorTimeout(&_Polygonzkevm.CallOpts) -} - -// TrustedSequencer is a free data retrieval call binding the contract method 0xcfa8ed47. -// -// Solidity: function trustedSequencer() view returns(address) -func (_Polygonzkevm *PolygonzkevmCaller) TrustedSequencer(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "trustedSequencer") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// TrustedSequencer is a free data retrieval call binding the contract method 0xcfa8ed47. -// -// Solidity: function trustedSequencer() view returns(address) -func (_Polygonzkevm *PolygonzkevmSession) TrustedSequencer() (common.Address, error) { - return _Polygonzkevm.Contract.TrustedSequencer(&_Polygonzkevm.CallOpts) -} - -// TrustedSequencer is a free data retrieval call binding the contract method 0xcfa8ed47. -// -// Solidity: function trustedSequencer() view returns(address) -func (_Polygonzkevm *PolygonzkevmCallerSession) TrustedSequencer() (common.Address, error) { - return _Polygonzkevm.Contract.TrustedSequencer(&_Polygonzkevm.CallOpts) -} - -// TrustedSequencerURL is a free data retrieval call binding the contract method 0x542028d5. -// -// Solidity: function trustedSequencerURL() view returns(string) -func (_Polygonzkevm *PolygonzkevmCaller) TrustedSequencerURL(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "trustedSequencerURL") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// TrustedSequencerURL is a free data retrieval call binding the contract method 0x542028d5. -// -// Solidity: function trustedSequencerURL() view returns(string) -func (_Polygonzkevm *PolygonzkevmSession) TrustedSequencerURL() (string, error) { - return _Polygonzkevm.Contract.TrustedSequencerURL(&_Polygonzkevm.CallOpts) -} - -// TrustedSequencerURL is a free data retrieval call binding the contract method 0x542028d5. -// -// Solidity: function trustedSequencerURL() view returns(string) -func (_Polygonzkevm *PolygonzkevmCallerSession) TrustedSequencerURL() (string, error) { - return _Polygonzkevm.Contract.TrustedSequencerURL(&_Polygonzkevm.CallOpts) -} - -// VerifyBatchTimeTarget is a free data retrieval call binding the contract method 0x0a0d9fbe. -// -// Solidity: function verifyBatchTimeTarget() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCaller) VerifyBatchTimeTarget(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _Polygonzkevm.contract.Call(opts, &out, "verifyBatchTimeTarget") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// VerifyBatchTimeTarget is a free data retrieval call binding the contract method 0x0a0d9fbe. -// -// Solidity: function verifyBatchTimeTarget() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmSession) VerifyBatchTimeTarget() (uint64, error) { - return _Polygonzkevm.Contract.VerifyBatchTimeTarget(&_Polygonzkevm.CallOpts) -} - -// VerifyBatchTimeTarget is a free data retrieval call binding the contract method 0x0a0d9fbe. -// -// Solidity: function verifyBatchTimeTarget() view returns(uint64) -func (_Polygonzkevm *PolygonzkevmCallerSession) VerifyBatchTimeTarget() (uint64, error) { - return _Polygonzkevm.Contract.VerifyBatchTimeTarget(&_Polygonzkevm.CallOpts) -} - -// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. -// -// Solidity: function acceptAdminRole() returns() -func (_Polygonzkevm *PolygonzkevmTransactor) AcceptAdminRole(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "acceptAdminRole") -} - -// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. -// -// Solidity: function acceptAdminRole() returns() -func (_Polygonzkevm *PolygonzkevmSession) AcceptAdminRole() (*types.Transaction, error) { - return _Polygonzkevm.Contract.AcceptAdminRole(&_Polygonzkevm.TransactOpts) -} - -// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. -// -// Solidity: function acceptAdminRole() returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) AcceptAdminRole() (*types.Transaction, error) { - return _Polygonzkevm.Contract.AcceptAdminRole(&_Polygonzkevm.TransactOpts) -} - -// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x7215541a. -// -// Solidity: function activateEmergencyState(uint64 sequencedBatchNum) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) ActivateEmergencyState(opts *bind.TransactOpts, sequencedBatchNum uint64) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "activateEmergencyState", sequencedBatchNum) -} - -// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x7215541a. -// -// Solidity: function activateEmergencyState(uint64 sequencedBatchNum) returns() -func (_Polygonzkevm *PolygonzkevmSession) ActivateEmergencyState(sequencedBatchNum uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ActivateEmergencyState(&_Polygonzkevm.TransactOpts, sequencedBatchNum) -} - -// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x7215541a. -// -// Solidity: function activateEmergencyState(uint64 sequencedBatchNum) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) ActivateEmergencyState(sequencedBatchNum uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ActivateEmergencyState(&_Polygonzkevm.TransactOpts, sequencedBatchNum) -} - -// ActivateForceBatches is a paid mutator transaction binding the contract method 0x5ec91958. -// -// Solidity: function activateForceBatches() returns() -func (_Polygonzkevm *PolygonzkevmTransactor) ActivateForceBatches(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "activateForceBatches") -} - -// ActivateForceBatches is a paid mutator transaction binding the contract method 0x5ec91958. -// -// Solidity: function activateForceBatches() returns() -func (_Polygonzkevm *PolygonzkevmSession) ActivateForceBatches() (*types.Transaction, error) { - return _Polygonzkevm.Contract.ActivateForceBatches(&_Polygonzkevm.TransactOpts) -} - -// ActivateForceBatches is a paid mutator transaction binding the contract method 0x5ec91958. -// -// Solidity: function activateForceBatches() returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) ActivateForceBatches() (*types.Transaction, error) { - return _Polygonzkevm.Contract.ActivateForceBatches(&_Polygonzkevm.TransactOpts) -} - -// ConsolidatePendingState is a paid mutator transaction binding the contract method 0x4a910e6a. -// -// Solidity: function consolidatePendingState(uint64 pendingStateNum) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) ConsolidatePendingState(opts *bind.TransactOpts, pendingStateNum uint64) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "consolidatePendingState", pendingStateNum) -} - -// ConsolidatePendingState is a paid mutator transaction binding the contract method 0x4a910e6a. -// -// Solidity: function consolidatePendingState(uint64 pendingStateNum) returns() -func (_Polygonzkevm *PolygonzkevmSession) ConsolidatePendingState(pendingStateNum uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ConsolidatePendingState(&_Polygonzkevm.TransactOpts, pendingStateNum) -} - -// ConsolidatePendingState is a paid mutator transaction binding the contract method 0x4a910e6a. -// -// Solidity: function consolidatePendingState(uint64 pendingStateNum) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) ConsolidatePendingState(pendingStateNum uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ConsolidatePendingState(&_Polygonzkevm.TransactOpts, pendingStateNum) -} - -// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. -// -// Solidity: function deactivateEmergencyState() returns() -func (_Polygonzkevm *PolygonzkevmTransactor) DeactivateEmergencyState(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "deactivateEmergencyState") -} - -// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. -// -// Solidity: function deactivateEmergencyState() returns() -func (_Polygonzkevm *PolygonzkevmSession) DeactivateEmergencyState() (*types.Transaction, error) { - return _Polygonzkevm.Contract.DeactivateEmergencyState(&_Polygonzkevm.TransactOpts) -} - -// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. -// -// Solidity: function deactivateEmergencyState() returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) DeactivateEmergencyState() (*types.Transaction, error) { - return _Polygonzkevm.Contract.DeactivateEmergencyState(&_Polygonzkevm.TransactOpts) -} - -// ForceBatch is a paid mutator transaction binding the contract method 0xeaeb077b. -// -// Solidity: function forceBatch(bytes transactions, uint256 maticAmount) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) ForceBatch(opts *bind.TransactOpts, transactions []byte, maticAmount *big.Int) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "forceBatch", transactions, maticAmount) -} - -// ForceBatch is a paid mutator transaction binding the contract method 0xeaeb077b. -// -// Solidity: function forceBatch(bytes transactions, uint256 maticAmount) returns() -func (_Polygonzkevm *PolygonzkevmSession) ForceBatch(transactions []byte, maticAmount *big.Int) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ForceBatch(&_Polygonzkevm.TransactOpts, transactions, maticAmount) -} - -// ForceBatch is a paid mutator transaction binding the contract method 0xeaeb077b. -// -// Solidity: function forceBatch(bytes transactions, uint256 maticAmount) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) ForceBatch(transactions []byte, maticAmount *big.Int) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ForceBatch(&_Polygonzkevm.TransactOpts, transactions, maticAmount) -} - -// Initialize is a paid mutator transaction binding the contract method 0xd2e129f9. -// -// Solidity: function initialize((address,address,uint64,address,uint64) initializePackedParameters, bytes32 genesisRoot, string _trustedSequencerURL, string _networkName, string _version) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) Initialize(opts *bind.TransactOpts, initializePackedParameters PolygonZkEVMInitializePackedParameters, genesisRoot [32]byte, _trustedSequencerURL string, _networkName string, _version string) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "initialize", initializePackedParameters, genesisRoot, _trustedSequencerURL, _networkName, _version) -} - -// Initialize is a paid mutator transaction binding the contract method 0xd2e129f9. -// -// Solidity: function initialize((address,address,uint64,address,uint64) initializePackedParameters, bytes32 genesisRoot, string _trustedSequencerURL, string _networkName, string _version) returns() -func (_Polygonzkevm *PolygonzkevmSession) Initialize(initializePackedParameters PolygonZkEVMInitializePackedParameters, genesisRoot [32]byte, _trustedSequencerURL string, _networkName string, _version string) (*types.Transaction, error) { - return _Polygonzkevm.Contract.Initialize(&_Polygonzkevm.TransactOpts, initializePackedParameters, genesisRoot, _trustedSequencerURL, _networkName, _version) -} - -// Initialize is a paid mutator transaction binding the contract method 0xd2e129f9. -// -// Solidity: function initialize((address,address,uint64,address,uint64) initializePackedParameters, bytes32 genesisRoot, string _trustedSequencerURL, string _networkName, string _version) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) Initialize(initializePackedParameters PolygonZkEVMInitializePackedParameters, genesisRoot [32]byte, _trustedSequencerURL string, _networkName string, _version string) (*types.Transaction, error) { - return _Polygonzkevm.Contract.Initialize(&_Polygonzkevm.TransactOpts, initializePackedParameters, genesisRoot, _trustedSequencerURL, _networkName, _version) -} - -// OverridePendingState is a paid mutator transaction binding the contract method 0xe6ad707e. -// -// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) OverridePendingState(opts *bind.TransactOpts, initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "overridePendingState", initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) -} - -// OverridePendingState is a paid mutator transaction binding the contract method 0xe6ad707e. -// -// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() -func (_Polygonzkevm *PolygonzkevmSession) OverridePendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.OverridePendingState(&_Polygonzkevm.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) -} - -// OverridePendingState is a paid mutator transaction binding the contract method 0xe6ad707e. -// -// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) OverridePendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.OverridePendingState(&_Polygonzkevm.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) -} - -// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x0808270c. -// -// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) ProveNonDeterministicPendingState(opts *bind.TransactOpts, initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "proveNonDeterministicPendingState", initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) -} - -// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x0808270c. -// -// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() -func (_Polygonzkevm *PolygonzkevmSession) ProveNonDeterministicPendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ProveNonDeterministicPendingState(&_Polygonzkevm.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) -} - -// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x0808270c. -// -// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) ProveNonDeterministicPendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.ProveNonDeterministicPendingState(&_Polygonzkevm.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Polygonzkevm *PolygonzkevmTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Polygonzkevm *PolygonzkevmSession) RenounceOwnership() (*types.Transaction, error) { - return _Polygonzkevm.Contract.RenounceOwnership(&_Polygonzkevm.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _Polygonzkevm.Contract.RenounceOwnership(&_Polygonzkevm.TransactOpts) -} - -// SequenceBatches is a paid mutator transaction binding the contract method 0x5e9145c9. -// -// Solidity: function sequenceBatches((bytes,bytes32,uint64,uint64)[] batches, address l2Coinbase) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SequenceBatches(opts *bind.TransactOpts, batches []PolygonZkEVMBatchData, l2Coinbase common.Address) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "sequenceBatches", batches, l2Coinbase) -} - -// SequenceBatches is a paid mutator transaction binding the contract method 0x5e9145c9. -// -// Solidity: function sequenceBatches((bytes,bytes32,uint64,uint64)[] batches, address l2Coinbase) returns() -func (_Polygonzkevm *PolygonzkevmSession) SequenceBatches(batches []PolygonZkEVMBatchData, l2Coinbase common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SequenceBatches(&_Polygonzkevm.TransactOpts, batches, l2Coinbase) -} - -// SequenceBatches is a paid mutator transaction binding the contract method 0x5e9145c9. -// -// Solidity: function sequenceBatches((bytes,bytes32,uint64,uint64)[] batches, address l2Coinbase) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SequenceBatches(batches []PolygonZkEVMBatchData, l2Coinbase common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SequenceBatches(&_Polygonzkevm.TransactOpts, batches, l2Coinbase) -} - -// SequenceForceBatches is a paid mutator transaction binding the contract method 0xd8d1091b. -// -// Solidity: function sequenceForceBatches((bytes,bytes32,uint64)[] batches) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SequenceForceBatches(opts *bind.TransactOpts, batches []PolygonZkEVMForcedBatchData) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "sequenceForceBatches", batches) -} - -// SequenceForceBatches is a paid mutator transaction binding the contract method 0xd8d1091b. -// -// Solidity: function sequenceForceBatches((bytes,bytes32,uint64)[] batches) returns() -func (_Polygonzkevm *PolygonzkevmSession) SequenceForceBatches(batches []PolygonZkEVMForcedBatchData) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SequenceForceBatches(&_Polygonzkevm.TransactOpts, batches) -} - -// SequenceForceBatches is a paid mutator transaction binding the contract method 0xd8d1091b. -// -// Solidity: function sequenceForceBatches((bytes,bytes32,uint64)[] batches) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SequenceForceBatches(batches []PolygonZkEVMForcedBatchData) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SequenceForceBatches(&_Polygonzkevm.TransactOpts, batches) -} - -// SetForceBatchTimeout is a paid mutator transaction binding the contract method 0x4e487706. -// -// Solidity: function setForceBatchTimeout(uint64 newforceBatchTimeout) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetForceBatchTimeout(opts *bind.TransactOpts, newforceBatchTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setForceBatchTimeout", newforceBatchTimeout) -} - -// SetForceBatchTimeout is a paid mutator transaction binding the contract method 0x4e487706. -// -// Solidity: function setForceBatchTimeout(uint64 newforceBatchTimeout) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetForceBatchTimeout(newforceBatchTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetForceBatchTimeout(&_Polygonzkevm.TransactOpts, newforceBatchTimeout) -} - -// SetForceBatchTimeout is a paid mutator transaction binding the contract method 0x4e487706. -// -// Solidity: function setForceBatchTimeout(uint64 newforceBatchTimeout) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetForceBatchTimeout(newforceBatchTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetForceBatchTimeout(&_Polygonzkevm.TransactOpts, newforceBatchTimeout) -} - -// SetMultiplierBatchFee is a paid mutator transaction binding the contract method 0x1816b7e5. -// -// Solidity: function setMultiplierBatchFee(uint16 newMultiplierBatchFee) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetMultiplierBatchFee(opts *bind.TransactOpts, newMultiplierBatchFee uint16) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setMultiplierBatchFee", newMultiplierBatchFee) -} - -// SetMultiplierBatchFee is a paid mutator transaction binding the contract method 0x1816b7e5. -// -// Solidity: function setMultiplierBatchFee(uint16 newMultiplierBatchFee) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetMultiplierBatchFee(newMultiplierBatchFee uint16) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetMultiplierBatchFee(&_Polygonzkevm.TransactOpts, newMultiplierBatchFee) -} - -// SetMultiplierBatchFee is a paid mutator transaction binding the contract method 0x1816b7e5. -// -// Solidity: function setMultiplierBatchFee(uint16 newMultiplierBatchFee) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetMultiplierBatchFee(newMultiplierBatchFee uint16) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetMultiplierBatchFee(&_Polygonzkevm.TransactOpts, newMultiplierBatchFee) -} - -// SetPendingStateTimeout is a paid mutator transaction binding the contract method 0x9c9f3dfe. -// -// Solidity: function setPendingStateTimeout(uint64 newPendingStateTimeout) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetPendingStateTimeout(opts *bind.TransactOpts, newPendingStateTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setPendingStateTimeout", newPendingStateTimeout) -} - -// SetPendingStateTimeout is a paid mutator transaction binding the contract method 0x9c9f3dfe. -// -// Solidity: function setPendingStateTimeout(uint64 newPendingStateTimeout) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetPendingStateTimeout(newPendingStateTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetPendingStateTimeout(&_Polygonzkevm.TransactOpts, newPendingStateTimeout) -} - -// SetPendingStateTimeout is a paid mutator transaction binding the contract method 0x9c9f3dfe. -// -// Solidity: function setPendingStateTimeout(uint64 newPendingStateTimeout) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetPendingStateTimeout(newPendingStateTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetPendingStateTimeout(&_Polygonzkevm.TransactOpts, newPendingStateTimeout) -} - -// SetTrustedAggregator is a paid mutator transaction binding the contract method 0xf14916d6. -// -// Solidity: function setTrustedAggregator(address newTrustedAggregator) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetTrustedAggregator(opts *bind.TransactOpts, newTrustedAggregator common.Address) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setTrustedAggregator", newTrustedAggregator) -} - -// SetTrustedAggregator is a paid mutator transaction binding the contract method 0xf14916d6. -// -// Solidity: function setTrustedAggregator(address newTrustedAggregator) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetTrustedAggregator(newTrustedAggregator common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedAggregator(&_Polygonzkevm.TransactOpts, newTrustedAggregator) -} - -// SetTrustedAggregator is a paid mutator transaction binding the contract method 0xf14916d6. -// -// Solidity: function setTrustedAggregator(address newTrustedAggregator) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetTrustedAggregator(newTrustedAggregator common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedAggregator(&_Polygonzkevm.TransactOpts, newTrustedAggregator) -} - -// SetTrustedAggregatorTimeout is a paid mutator transaction binding the contract method 0x394218e9. -// -// Solidity: function setTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetTrustedAggregatorTimeout(opts *bind.TransactOpts, newTrustedAggregatorTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setTrustedAggregatorTimeout", newTrustedAggregatorTimeout) -} - -// SetTrustedAggregatorTimeout is a paid mutator transaction binding the contract method 0x394218e9. -// -// Solidity: function setTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetTrustedAggregatorTimeout(newTrustedAggregatorTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedAggregatorTimeout(&_Polygonzkevm.TransactOpts, newTrustedAggregatorTimeout) -} - -// SetTrustedAggregatorTimeout is a paid mutator transaction binding the contract method 0x394218e9. -// -// Solidity: function setTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetTrustedAggregatorTimeout(newTrustedAggregatorTimeout uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedAggregatorTimeout(&_Polygonzkevm.TransactOpts, newTrustedAggregatorTimeout) -} - -// SetTrustedSequencer is a paid mutator transaction binding the contract method 0x6ff512cc. -// -// Solidity: function setTrustedSequencer(address newTrustedSequencer) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetTrustedSequencer(opts *bind.TransactOpts, newTrustedSequencer common.Address) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setTrustedSequencer", newTrustedSequencer) -} - -// SetTrustedSequencer is a paid mutator transaction binding the contract method 0x6ff512cc. -// -// Solidity: function setTrustedSequencer(address newTrustedSequencer) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetTrustedSequencer(newTrustedSequencer common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedSequencer(&_Polygonzkevm.TransactOpts, newTrustedSequencer) -} - -// SetTrustedSequencer is a paid mutator transaction binding the contract method 0x6ff512cc. -// -// Solidity: function setTrustedSequencer(address newTrustedSequencer) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetTrustedSequencer(newTrustedSequencer common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedSequencer(&_Polygonzkevm.TransactOpts, newTrustedSequencer) -} - -// SetTrustedSequencerURL is a paid mutator transaction binding the contract method 0xc89e42df. -// -// Solidity: function setTrustedSequencerURL(string newTrustedSequencerURL) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetTrustedSequencerURL(opts *bind.TransactOpts, newTrustedSequencerURL string) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setTrustedSequencerURL", newTrustedSequencerURL) -} - -// SetTrustedSequencerURL is a paid mutator transaction binding the contract method 0xc89e42df. -// -// Solidity: function setTrustedSequencerURL(string newTrustedSequencerURL) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetTrustedSequencerURL(newTrustedSequencerURL string) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedSequencerURL(&_Polygonzkevm.TransactOpts, newTrustedSequencerURL) -} - -// SetTrustedSequencerURL is a paid mutator transaction binding the contract method 0xc89e42df. -// -// Solidity: function setTrustedSequencerURL(string newTrustedSequencerURL) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetTrustedSequencerURL(newTrustedSequencerURL string) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetTrustedSequencerURL(&_Polygonzkevm.TransactOpts, newTrustedSequencerURL) -} - -// SetVerifyBatchTimeTarget is a paid mutator transaction binding the contract method 0xa066215c. -// -// Solidity: function setVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) SetVerifyBatchTimeTarget(opts *bind.TransactOpts, newVerifyBatchTimeTarget uint64) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "setVerifyBatchTimeTarget", newVerifyBatchTimeTarget) -} - -// SetVerifyBatchTimeTarget is a paid mutator transaction binding the contract method 0xa066215c. -// -// Solidity: function setVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) returns() -func (_Polygonzkevm *PolygonzkevmSession) SetVerifyBatchTimeTarget(newVerifyBatchTimeTarget uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetVerifyBatchTimeTarget(&_Polygonzkevm.TransactOpts, newVerifyBatchTimeTarget) -} - -// SetVerifyBatchTimeTarget is a paid mutator transaction binding the contract method 0xa066215c. -// -// Solidity: function setVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) SetVerifyBatchTimeTarget(newVerifyBatchTimeTarget uint64) (*types.Transaction, error) { - return _Polygonzkevm.Contract.SetVerifyBatchTimeTarget(&_Polygonzkevm.TransactOpts, newVerifyBatchTimeTarget) -} - -// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. -// -// Solidity: function transferAdminRole(address newPendingAdmin) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) TransferAdminRole(opts *bind.TransactOpts, newPendingAdmin common.Address) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "transferAdminRole", newPendingAdmin) -} - -// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. -// -// Solidity: function transferAdminRole(address newPendingAdmin) returns() -func (_Polygonzkevm *PolygonzkevmSession) TransferAdminRole(newPendingAdmin common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.TransferAdminRole(&_Polygonzkevm.TransactOpts, newPendingAdmin) -} - -// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. -// -// Solidity: function transferAdminRole(address newPendingAdmin) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) TransferAdminRole(newPendingAdmin common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.TransferAdminRole(&_Polygonzkevm.TransactOpts, newPendingAdmin) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Polygonzkevm *PolygonzkevmSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.TransferOwnership(&_Polygonzkevm.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _Polygonzkevm.Contract.TransferOwnership(&_Polygonzkevm.TransactOpts, newOwner) -} - -// VerifyBatches is a paid mutator transaction binding the contract method 0x4fd70464. -// -// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) VerifyBatches(opts *bind.TransactOpts, pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "verifyBatches", pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) -} - -// VerifyBatches is a paid mutator transaction binding the contract method 0x4fd70464. -// -// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() -func (_Polygonzkevm *PolygonzkevmSession) VerifyBatches(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.VerifyBatches(&_Polygonzkevm.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) -} - -// VerifyBatches is a paid mutator transaction binding the contract method 0x4fd70464. -// -// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) VerifyBatches(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.VerifyBatches(&_Polygonzkevm.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) -} - -// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0xa50a164b. -// -// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactor) VerifyBatchesTrustedAggregator(opts *bind.TransactOpts, pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { - return _Polygonzkevm.contract.Transact(opts, "verifyBatchesTrustedAggregator", pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) -} - -// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0xa50a164b. -// -// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() -func (_Polygonzkevm *PolygonzkevmSession) VerifyBatchesTrustedAggregator(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.VerifyBatchesTrustedAggregator(&_Polygonzkevm.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) -} - -// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0xa50a164b. -// -// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() -func (_Polygonzkevm *PolygonzkevmTransactorSession) VerifyBatchesTrustedAggregator(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { - return _Polygonzkevm.Contract.VerifyBatchesTrustedAggregator(&_Polygonzkevm.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) -} - -// PolygonzkevmAcceptAdminRoleIterator is returned from FilterAcceptAdminRole and is used to iterate over the raw logs and unpacked data for AcceptAdminRole events raised by the Polygonzkevm contract. -type PolygonzkevmAcceptAdminRoleIterator struct { - Event *PolygonzkevmAcceptAdminRole // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmAcceptAdminRoleIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmAcceptAdminRole) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmAcceptAdminRole) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmAcceptAdminRoleIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmAcceptAdminRoleIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmAcceptAdminRole represents a AcceptAdminRole event raised by the Polygonzkevm contract. -type PolygonzkevmAcceptAdminRole struct { - NewAdmin common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAcceptAdminRole is a free log retrieval operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. -// -// Solidity: event AcceptAdminRole(address newAdmin) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterAcceptAdminRole(opts *bind.FilterOpts) (*PolygonzkevmAcceptAdminRoleIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "AcceptAdminRole") - if err != nil { - return nil, err - } - return &PolygonzkevmAcceptAdminRoleIterator{contract: _Polygonzkevm.contract, event: "AcceptAdminRole", logs: logs, sub: sub}, nil -} - -// WatchAcceptAdminRole is a free log subscription operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. -// -// Solidity: event AcceptAdminRole(address newAdmin) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchAcceptAdminRole(opts *bind.WatchOpts, sink chan<- *PolygonzkevmAcceptAdminRole) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "AcceptAdminRole") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmAcceptAdminRole) - if err := _Polygonzkevm.contract.UnpackLog(event, "AcceptAdminRole", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseAcceptAdminRole is a log parse operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. -// -// Solidity: event AcceptAdminRole(address newAdmin) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseAcceptAdminRole(log types.Log) (*PolygonzkevmAcceptAdminRole, error) { - event := new(PolygonzkevmAcceptAdminRole) - if err := _Polygonzkevm.contract.UnpackLog(event, "AcceptAdminRole", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmActivateForceBatchesIterator is returned from FilterActivateForceBatches and is used to iterate over the raw logs and unpacked data for ActivateForceBatches events raised by the Polygonzkevm contract. -type PolygonzkevmActivateForceBatchesIterator struct { - Event *PolygonzkevmActivateForceBatches // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmActivateForceBatchesIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmActivateForceBatches) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmActivateForceBatches) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmActivateForceBatchesIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmActivateForceBatchesIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmActivateForceBatches represents a ActivateForceBatches event raised by the Polygonzkevm contract. -type PolygonzkevmActivateForceBatches struct { - Raw types.Log // Blockchain specific contextual infos -} - -// FilterActivateForceBatches is a free log retrieval operation binding the contract event 0x854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f. -// -// Solidity: event ActivateForceBatches() -func (_Polygonzkevm *PolygonzkevmFilterer) FilterActivateForceBatches(opts *bind.FilterOpts) (*PolygonzkevmActivateForceBatchesIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "ActivateForceBatches") - if err != nil { - return nil, err - } - return &PolygonzkevmActivateForceBatchesIterator{contract: _Polygonzkevm.contract, event: "ActivateForceBatches", logs: logs, sub: sub}, nil -} - -// WatchActivateForceBatches is a free log subscription operation binding the contract event 0x854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f. -// -// Solidity: event ActivateForceBatches() -func (_Polygonzkevm *PolygonzkevmFilterer) WatchActivateForceBatches(opts *bind.WatchOpts, sink chan<- *PolygonzkevmActivateForceBatches) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "ActivateForceBatches") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmActivateForceBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "ActivateForceBatches", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseActivateForceBatches is a log parse operation binding the contract event 0x854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f. -// -// Solidity: event ActivateForceBatches() -func (_Polygonzkevm *PolygonzkevmFilterer) ParseActivateForceBatches(log types.Log) (*PolygonzkevmActivateForceBatches, error) { - event := new(PolygonzkevmActivateForceBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "ActivateForceBatches", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmConsolidatePendingStateIterator is returned from FilterConsolidatePendingState and is used to iterate over the raw logs and unpacked data for ConsolidatePendingState events raised by the Polygonzkevm contract. -type PolygonzkevmConsolidatePendingStateIterator struct { - Event *PolygonzkevmConsolidatePendingState // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmConsolidatePendingStateIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmConsolidatePendingState) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmConsolidatePendingState) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmConsolidatePendingStateIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmConsolidatePendingStateIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmConsolidatePendingState represents a ConsolidatePendingState event raised by the Polygonzkevm contract. -type PolygonzkevmConsolidatePendingState struct { - NumBatch uint64 - StateRoot [32]byte - PendingStateNum uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterConsolidatePendingState is a free log retrieval operation binding the contract event 0x328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e. -// -// Solidity: event ConsolidatePendingState(uint64 indexed numBatch, bytes32 stateRoot, uint64 indexed pendingStateNum) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterConsolidatePendingState(opts *bind.FilterOpts, numBatch []uint64, pendingStateNum []uint64) (*PolygonzkevmConsolidatePendingStateIterator, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var pendingStateNumRule []interface{} - for _, pendingStateNumItem := range pendingStateNum { - pendingStateNumRule = append(pendingStateNumRule, pendingStateNumItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "ConsolidatePendingState", numBatchRule, pendingStateNumRule) - if err != nil { - return nil, err - } - return &PolygonzkevmConsolidatePendingStateIterator{contract: _Polygonzkevm.contract, event: "ConsolidatePendingState", logs: logs, sub: sub}, nil -} - -// WatchConsolidatePendingState is a free log subscription operation binding the contract event 0x328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e. -// -// Solidity: event ConsolidatePendingState(uint64 indexed numBatch, bytes32 stateRoot, uint64 indexed pendingStateNum) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchConsolidatePendingState(opts *bind.WatchOpts, sink chan<- *PolygonzkevmConsolidatePendingState, numBatch []uint64, pendingStateNum []uint64) (event.Subscription, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var pendingStateNumRule []interface{} - for _, pendingStateNumItem := range pendingStateNum { - pendingStateNumRule = append(pendingStateNumRule, pendingStateNumItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "ConsolidatePendingState", numBatchRule, pendingStateNumRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmConsolidatePendingState) - if err := _Polygonzkevm.contract.UnpackLog(event, "ConsolidatePendingState", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseConsolidatePendingState is a log parse operation binding the contract event 0x328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e. -// -// Solidity: event ConsolidatePendingState(uint64 indexed numBatch, bytes32 stateRoot, uint64 indexed pendingStateNum) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseConsolidatePendingState(log types.Log) (*PolygonzkevmConsolidatePendingState, error) { - event := new(PolygonzkevmConsolidatePendingState) - if err := _Polygonzkevm.contract.UnpackLog(event, "ConsolidatePendingState", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmEmergencyStateActivatedIterator is returned from FilterEmergencyStateActivated and is used to iterate over the raw logs and unpacked data for EmergencyStateActivated events raised by the Polygonzkevm contract. -type PolygonzkevmEmergencyStateActivatedIterator struct { - Event *PolygonzkevmEmergencyStateActivated // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmEmergencyStateActivatedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmEmergencyStateActivated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmEmergencyStateActivated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmEmergencyStateActivatedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmEmergencyStateActivatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmEmergencyStateActivated represents a EmergencyStateActivated event raised by the Polygonzkevm contract. -type PolygonzkevmEmergencyStateActivated struct { - Raw types.Log // Blockchain specific contextual infos -} - -// FilterEmergencyStateActivated is a free log retrieval operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. -// -// Solidity: event EmergencyStateActivated() -func (_Polygonzkevm *PolygonzkevmFilterer) FilterEmergencyStateActivated(opts *bind.FilterOpts) (*PolygonzkevmEmergencyStateActivatedIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "EmergencyStateActivated") - if err != nil { - return nil, err - } - return &PolygonzkevmEmergencyStateActivatedIterator{contract: _Polygonzkevm.contract, event: "EmergencyStateActivated", logs: logs, sub: sub}, nil -} - -// WatchEmergencyStateActivated is a free log subscription operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. -// -// Solidity: event EmergencyStateActivated() -func (_Polygonzkevm *PolygonzkevmFilterer) WatchEmergencyStateActivated(opts *bind.WatchOpts, sink chan<- *PolygonzkevmEmergencyStateActivated) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "EmergencyStateActivated") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmEmergencyStateActivated) - if err := _Polygonzkevm.contract.UnpackLog(event, "EmergencyStateActivated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseEmergencyStateActivated is a log parse operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. -// -// Solidity: event EmergencyStateActivated() -func (_Polygonzkevm *PolygonzkevmFilterer) ParseEmergencyStateActivated(log types.Log) (*PolygonzkevmEmergencyStateActivated, error) { - event := new(PolygonzkevmEmergencyStateActivated) - if err := _Polygonzkevm.contract.UnpackLog(event, "EmergencyStateActivated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmEmergencyStateDeactivatedIterator is returned from FilterEmergencyStateDeactivated and is used to iterate over the raw logs and unpacked data for EmergencyStateDeactivated events raised by the Polygonzkevm contract. -type PolygonzkevmEmergencyStateDeactivatedIterator struct { - Event *PolygonzkevmEmergencyStateDeactivated // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmEmergencyStateDeactivatedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmEmergencyStateDeactivated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmEmergencyStateDeactivated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmEmergencyStateDeactivatedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmEmergencyStateDeactivatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmEmergencyStateDeactivated represents a EmergencyStateDeactivated event raised by the Polygonzkevm contract. -type PolygonzkevmEmergencyStateDeactivated struct { - Raw types.Log // Blockchain specific contextual infos -} - -// FilterEmergencyStateDeactivated is a free log retrieval operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. -// -// Solidity: event EmergencyStateDeactivated() -func (_Polygonzkevm *PolygonzkevmFilterer) FilterEmergencyStateDeactivated(opts *bind.FilterOpts) (*PolygonzkevmEmergencyStateDeactivatedIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "EmergencyStateDeactivated") - if err != nil { - return nil, err - } - return &PolygonzkevmEmergencyStateDeactivatedIterator{contract: _Polygonzkevm.contract, event: "EmergencyStateDeactivated", logs: logs, sub: sub}, nil -} - -// WatchEmergencyStateDeactivated is a free log subscription operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. -// -// Solidity: event EmergencyStateDeactivated() -func (_Polygonzkevm *PolygonzkevmFilterer) WatchEmergencyStateDeactivated(opts *bind.WatchOpts, sink chan<- *PolygonzkevmEmergencyStateDeactivated) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "EmergencyStateDeactivated") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmEmergencyStateDeactivated) - if err := _Polygonzkevm.contract.UnpackLog(event, "EmergencyStateDeactivated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseEmergencyStateDeactivated is a log parse operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. -// -// Solidity: event EmergencyStateDeactivated() -func (_Polygonzkevm *PolygonzkevmFilterer) ParseEmergencyStateDeactivated(log types.Log) (*PolygonzkevmEmergencyStateDeactivated, error) { - event := new(PolygonzkevmEmergencyStateDeactivated) - if err := _Polygonzkevm.contract.UnpackLog(event, "EmergencyStateDeactivated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmForceBatchIterator is returned from FilterForceBatch and is used to iterate over the raw logs and unpacked data for ForceBatch events raised by the Polygonzkevm contract. -type PolygonzkevmForceBatchIterator struct { - Event *PolygonzkevmForceBatch // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmForceBatchIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmForceBatch) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmForceBatch) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmForceBatchIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmForceBatchIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmForceBatch represents a ForceBatch event raised by the Polygonzkevm contract. -type PolygonzkevmForceBatch struct { - ForceBatchNum uint64 - LastGlobalExitRoot [32]byte - Sequencer common.Address - Transactions []byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterForceBatch is a free log retrieval operation binding the contract event 0xf94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc931. -// -// Solidity: event ForceBatch(uint64 indexed forceBatchNum, bytes32 lastGlobalExitRoot, address sequencer, bytes transactions) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterForceBatch(opts *bind.FilterOpts, forceBatchNum []uint64) (*PolygonzkevmForceBatchIterator, error) { - - var forceBatchNumRule []interface{} - for _, forceBatchNumItem := range forceBatchNum { - forceBatchNumRule = append(forceBatchNumRule, forceBatchNumItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "ForceBatch", forceBatchNumRule) - if err != nil { - return nil, err - } - return &PolygonzkevmForceBatchIterator{contract: _Polygonzkevm.contract, event: "ForceBatch", logs: logs, sub: sub}, nil -} - -// WatchForceBatch is a free log subscription operation binding the contract event 0xf94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc931. -// -// Solidity: event ForceBatch(uint64 indexed forceBatchNum, bytes32 lastGlobalExitRoot, address sequencer, bytes transactions) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchForceBatch(opts *bind.WatchOpts, sink chan<- *PolygonzkevmForceBatch, forceBatchNum []uint64) (event.Subscription, error) { - - var forceBatchNumRule []interface{} - for _, forceBatchNumItem := range forceBatchNum { - forceBatchNumRule = append(forceBatchNumRule, forceBatchNumItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "ForceBatch", forceBatchNumRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmForceBatch) - if err := _Polygonzkevm.contract.UnpackLog(event, "ForceBatch", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseForceBatch is a log parse operation binding the contract event 0xf94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc931. -// -// Solidity: event ForceBatch(uint64 indexed forceBatchNum, bytes32 lastGlobalExitRoot, address sequencer, bytes transactions) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseForceBatch(log types.Log) (*PolygonzkevmForceBatch, error) { - event := new(PolygonzkevmForceBatch) - if err := _Polygonzkevm.contract.UnpackLog(event, "ForceBatch", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Polygonzkevm contract. -type PolygonzkevmInitializedIterator struct { - Event *PolygonzkevmInitialized // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmInitializedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmInitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmInitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmInitialized represents a Initialized event raised by the Polygonzkevm contract. -type PolygonzkevmInitialized struct { - Version uint8 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterInitialized(opts *bind.FilterOpts) (*PolygonzkevmInitializedIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return &PolygonzkevmInitializedIterator{contract: _Polygonzkevm.contract, event: "Initialized", logs: logs, sub: sub}, nil -} - -// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *PolygonzkevmInitialized) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmInitialized) - if err := _Polygonzkevm.contract.UnpackLog(event, "Initialized", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseInitialized(log types.Log) (*PolygonzkevmInitialized, error) { - event := new(PolygonzkevmInitialized) - if err := _Polygonzkevm.contract.UnpackLog(event, "Initialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmOverridePendingStateIterator is returned from FilterOverridePendingState and is used to iterate over the raw logs and unpacked data for OverridePendingState events raised by the Polygonzkevm contract. -type PolygonzkevmOverridePendingStateIterator struct { - Event *PolygonzkevmOverridePendingState // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmOverridePendingStateIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmOverridePendingState) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmOverridePendingState) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmOverridePendingStateIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmOverridePendingStateIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmOverridePendingState represents a OverridePendingState event raised by the Polygonzkevm contract. -type PolygonzkevmOverridePendingState struct { - NumBatch uint64 - StateRoot [32]byte - Aggregator common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOverridePendingState is a free log retrieval operation binding the contract event 0xcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf72. -// -// Solidity: event OverridePendingState(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterOverridePendingState(opts *bind.FilterOpts, numBatch []uint64, aggregator []common.Address) (*PolygonzkevmOverridePendingStateIterator, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var aggregatorRule []interface{} - for _, aggregatorItem := range aggregator { - aggregatorRule = append(aggregatorRule, aggregatorItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "OverridePendingState", numBatchRule, aggregatorRule) - if err != nil { - return nil, err - } - return &PolygonzkevmOverridePendingStateIterator{contract: _Polygonzkevm.contract, event: "OverridePendingState", logs: logs, sub: sub}, nil -} - -// WatchOverridePendingState is a free log subscription operation binding the contract event 0xcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf72. -// -// Solidity: event OverridePendingState(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchOverridePendingState(opts *bind.WatchOpts, sink chan<- *PolygonzkevmOverridePendingState, numBatch []uint64, aggregator []common.Address) (event.Subscription, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var aggregatorRule []interface{} - for _, aggregatorItem := range aggregator { - aggregatorRule = append(aggregatorRule, aggregatorItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "OverridePendingState", numBatchRule, aggregatorRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmOverridePendingState) - if err := _Polygonzkevm.contract.UnpackLog(event, "OverridePendingState", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseOverridePendingState is a log parse operation binding the contract event 0xcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf72. -// -// Solidity: event OverridePendingState(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseOverridePendingState(log types.Log) (*PolygonzkevmOverridePendingState, error) { - event := new(PolygonzkevmOverridePendingState) - if err := _Polygonzkevm.contract.UnpackLog(event, "OverridePendingState", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Polygonzkevm contract. -type PolygonzkevmOwnershipTransferredIterator struct { - Event *PolygonzkevmOwnershipTransferred // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmOwnershipTransferredIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmOwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmOwnershipTransferred represents a OwnershipTransferred event raised by the Polygonzkevm contract. -type PolygonzkevmOwnershipTransferred struct { - PreviousOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*PolygonzkevmOwnershipTransferredIterator, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &PolygonzkevmOwnershipTransferredIterator{contract: _Polygonzkevm.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *PolygonzkevmOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var previousOwnerRule []interface{} - for _, previousOwnerItem := range previousOwner { - previousOwnerRule = append(previousOwnerRule, previousOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmOwnershipTransferred) - if err := _Polygonzkevm.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseOwnershipTransferred(log types.Log) (*PolygonzkevmOwnershipTransferred, error) { - event := new(PolygonzkevmOwnershipTransferred) - if err := _Polygonzkevm.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmProveNonDeterministicPendingStateIterator is returned from FilterProveNonDeterministicPendingState and is used to iterate over the raw logs and unpacked data for ProveNonDeterministicPendingState events raised by the Polygonzkevm contract. -type PolygonzkevmProveNonDeterministicPendingStateIterator struct { - Event *PolygonzkevmProveNonDeterministicPendingState // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmProveNonDeterministicPendingStateIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmProveNonDeterministicPendingState) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmProveNonDeterministicPendingState) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmProveNonDeterministicPendingStateIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmProveNonDeterministicPendingStateIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmProveNonDeterministicPendingState represents a ProveNonDeterministicPendingState event raised by the Polygonzkevm contract. -type PolygonzkevmProveNonDeterministicPendingState struct { - StoredStateRoot [32]byte - ProvedStateRoot [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterProveNonDeterministicPendingState is a free log retrieval operation binding the contract event 0x1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010. -// -// Solidity: event ProveNonDeterministicPendingState(bytes32 storedStateRoot, bytes32 provedStateRoot) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterProveNonDeterministicPendingState(opts *bind.FilterOpts) (*PolygonzkevmProveNonDeterministicPendingStateIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "ProveNonDeterministicPendingState") - if err != nil { - return nil, err - } - return &PolygonzkevmProveNonDeterministicPendingStateIterator{contract: _Polygonzkevm.contract, event: "ProveNonDeterministicPendingState", logs: logs, sub: sub}, nil -} - -// WatchProveNonDeterministicPendingState is a free log subscription operation binding the contract event 0x1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010. -// -// Solidity: event ProveNonDeterministicPendingState(bytes32 storedStateRoot, bytes32 provedStateRoot) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchProveNonDeterministicPendingState(opts *bind.WatchOpts, sink chan<- *PolygonzkevmProveNonDeterministicPendingState) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "ProveNonDeterministicPendingState") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmProveNonDeterministicPendingState) - if err := _Polygonzkevm.contract.UnpackLog(event, "ProveNonDeterministicPendingState", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseProveNonDeterministicPendingState is a log parse operation binding the contract event 0x1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010. -// -// Solidity: event ProveNonDeterministicPendingState(bytes32 storedStateRoot, bytes32 provedStateRoot) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseProveNonDeterministicPendingState(log types.Log) (*PolygonzkevmProveNonDeterministicPendingState, error) { - event := new(PolygonzkevmProveNonDeterministicPendingState) - if err := _Polygonzkevm.contract.UnpackLog(event, "ProveNonDeterministicPendingState", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSequenceBatchesIterator is returned from FilterSequenceBatches and is used to iterate over the raw logs and unpacked data for SequenceBatches events raised by the Polygonzkevm contract. -type PolygonzkevmSequenceBatchesIterator struct { - Event *PolygonzkevmSequenceBatches // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmSequenceBatchesIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSequenceBatches) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSequenceBatches) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmSequenceBatchesIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSequenceBatchesIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSequenceBatches represents a SequenceBatches event raised by the Polygonzkevm contract. -type PolygonzkevmSequenceBatches struct { - NumBatch uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSequenceBatches is a free log retrieval operation binding the contract event 0x303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce. -// -// Solidity: event SequenceBatches(uint64 indexed numBatch) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSequenceBatches(opts *bind.FilterOpts, numBatch []uint64) (*PolygonzkevmSequenceBatchesIterator, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SequenceBatches", numBatchRule) - if err != nil { - return nil, err - } - return &PolygonzkevmSequenceBatchesIterator{contract: _Polygonzkevm.contract, event: "SequenceBatches", logs: logs, sub: sub}, nil -} - -// WatchSequenceBatches is a free log subscription operation binding the contract event 0x303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce. -// -// Solidity: event SequenceBatches(uint64 indexed numBatch) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSequenceBatches(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSequenceBatches, numBatch []uint64) (event.Subscription, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SequenceBatches", numBatchRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmSequenceBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "SequenceBatches", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseSequenceBatches is a log parse operation binding the contract event 0x303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce. -// -// Solidity: event SequenceBatches(uint64 indexed numBatch) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSequenceBatches(log types.Log) (*PolygonzkevmSequenceBatches, error) { - event := new(PolygonzkevmSequenceBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "SequenceBatches", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSequenceForceBatchesIterator is returned from FilterSequenceForceBatches and is used to iterate over the raw logs and unpacked data for SequenceForceBatches events raised by the Polygonzkevm contract. -type PolygonzkevmSequenceForceBatchesIterator struct { - Event *PolygonzkevmSequenceForceBatches // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmSequenceForceBatchesIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSequenceForceBatches) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSequenceForceBatches) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmSequenceForceBatchesIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSequenceForceBatchesIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSequenceForceBatches represents a SequenceForceBatches event raised by the Polygonzkevm contract. -type PolygonzkevmSequenceForceBatches struct { - NumBatch uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSequenceForceBatches is a free log retrieval operation binding the contract event 0x648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a4. -// -// Solidity: event SequenceForceBatches(uint64 indexed numBatch) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSequenceForceBatches(opts *bind.FilterOpts, numBatch []uint64) (*PolygonzkevmSequenceForceBatchesIterator, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SequenceForceBatches", numBatchRule) - if err != nil { - return nil, err - } - return &PolygonzkevmSequenceForceBatchesIterator{contract: _Polygonzkevm.contract, event: "SequenceForceBatches", logs: logs, sub: sub}, nil -} - -// WatchSequenceForceBatches is a free log subscription operation binding the contract event 0x648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a4. -// -// Solidity: event SequenceForceBatches(uint64 indexed numBatch) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSequenceForceBatches(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSequenceForceBatches, numBatch []uint64) (event.Subscription, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SequenceForceBatches", numBatchRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmSequenceForceBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "SequenceForceBatches", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseSequenceForceBatches is a log parse operation binding the contract event 0x648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a4. -// -// Solidity: event SequenceForceBatches(uint64 indexed numBatch) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSequenceForceBatches(log types.Log) (*PolygonzkevmSequenceForceBatches, error) { - event := new(PolygonzkevmSequenceForceBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "SequenceForceBatches", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetForceBatchTimeoutIterator is returned from FilterSetForceBatchTimeout and is used to iterate over the raw logs and unpacked data for SetForceBatchTimeout events raised by the Polygonzkevm contract. -type PolygonzkevmSetForceBatchTimeoutIterator struct { - Event *PolygonzkevmSetForceBatchTimeout // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmSetForceBatchTimeoutIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetForceBatchTimeout) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetForceBatchTimeout) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmSetForceBatchTimeoutIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetForceBatchTimeoutIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetForceBatchTimeout represents a SetForceBatchTimeout event raised by the Polygonzkevm contract. -type PolygonzkevmSetForceBatchTimeout struct { - NewforceBatchTimeout uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetForceBatchTimeout is a free log retrieval operation binding the contract event 0xa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b. -// -// Solidity: event SetForceBatchTimeout(uint64 newforceBatchTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetForceBatchTimeout(opts *bind.FilterOpts) (*PolygonzkevmSetForceBatchTimeoutIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetForceBatchTimeout") - if err != nil { - return nil, err - } - return &PolygonzkevmSetForceBatchTimeoutIterator{contract: _Polygonzkevm.contract, event: "SetForceBatchTimeout", logs: logs, sub: sub}, nil -} - -// WatchSetForceBatchTimeout is a free log subscription operation binding the contract event 0xa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b. -// -// Solidity: event SetForceBatchTimeout(uint64 newforceBatchTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetForceBatchTimeout(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetForceBatchTimeout) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetForceBatchTimeout") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmSetForceBatchTimeout) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetForceBatchTimeout", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseSetForceBatchTimeout is a log parse operation binding the contract event 0xa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b. -// -// Solidity: event SetForceBatchTimeout(uint64 newforceBatchTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetForceBatchTimeout(log types.Log) (*PolygonzkevmSetForceBatchTimeout, error) { - event := new(PolygonzkevmSetForceBatchTimeout) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetForceBatchTimeout", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetMultiplierBatchFeeIterator is returned from FilterSetMultiplierBatchFee and is used to iterate over the raw logs and unpacked data for SetMultiplierBatchFee events raised by the Polygonzkevm contract. -type PolygonzkevmSetMultiplierBatchFeeIterator struct { - Event *PolygonzkevmSetMultiplierBatchFee // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmSetMultiplierBatchFeeIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetMultiplierBatchFee) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetMultiplierBatchFee) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmSetMultiplierBatchFeeIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetMultiplierBatchFeeIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetMultiplierBatchFee represents a SetMultiplierBatchFee event raised by the Polygonzkevm contract. -type PolygonzkevmSetMultiplierBatchFee struct { - NewMultiplierBatchFee uint16 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetMultiplierBatchFee is a free log retrieval operation binding the contract event 0x7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5. -// -// Solidity: event SetMultiplierBatchFee(uint16 newMultiplierBatchFee) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetMultiplierBatchFee(opts *bind.FilterOpts) (*PolygonzkevmSetMultiplierBatchFeeIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetMultiplierBatchFee") - if err != nil { - return nil, err - } - return &PolygonzkevmSetMultiplierBatchFeeIterator{contract: _Polygonzkevm.contract, event: "SetMultiplierBatchFee", logs: logs, sub: sub}, nil -} - -// WatchSetMultiplierBatchFee is a free log subscription operation binding the contract event 0x7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5. -// -// Solidity: event SetMultiplierBatchFee(uint16 newMultiplierBatchFee) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetMultiplierBatchFee(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetMultiplierBatchFee) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetMultiplierBatchFee") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmSetMultiplierBatchFee) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetMultiplierBatchFee", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseSetMultiplierBatchFee is a log parse operation binding the contract event 0x7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5. -// -// Solidity: event SetMultiplierBatchFee(uint16 newMultiplierBatchFee) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetMultiplierBatchFee(log types.Log) (*PolygonzkevmSetMultiplierBatchFee, error) { - event := new(PolygonzkevmSetMultiplierBatchFee) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetMultiplierBatchFee", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetPendingStateTimeoutIterator is returned from FilterSetPendingStateTimeout and is used to iterate over the raw logs and unpacked data for SetPendingStateTimeout events raised by the Polygonzkevm contract. -type PolygonzkevmSetPendingStateTimeoutIterator struct { - Event *PolygonzkevmSetPendingStateTimeout // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmSetPendingStateTimeoutIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetPendingStateTimeout) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetPendingStateTimeout) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmSetPendingStateTimeoutIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetPendingStateTimeoutIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetPendingStateTimeout represents a SetPendingStateTimeout event raised by the Polygonzkevm contract. -type PolygonzkevmSetPendingStateTimeout struct { - NewPendingStateTimeout uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetPendingStateTimeout is a free log retrieval operation binding the contract event 0xc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c75. -// -// Solidity: event SetPendingStateTimeout(uint64 newPendingStateTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetPendingStateTimeout(opts *bind.FilterOpts) (*PolygonzkevmSetPendingStateTimeoutIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetPendingStateTimeout") - if err != nil { - return nil, err - } - return &PolygonzkevmSetPendingStateTimeoutIterator{contract: _Polygonzkevm.contract, event: "SetPendingStateTimeout", logs: logs, sub: sub}, nil -} - -// WatchSetPendingStateTimeout is a free log subscription operation binding the contract event 0xc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c75. -// -// Solidity: event SetPendingStateTimeout(uint64 newPendingStateTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetPendingStateTimeout(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetPendingStateTimeout) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetPendingStateTimeout") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmSetPendingStateTimeout) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetPendingStateTimeout", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseSetPendingStateTimeout is a log parse operation binding the contract event 0xc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c75. -// -// Solidity: event SetPendingStateTimeout(uint64 newPendingStateTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetPendingStateTimeout(log types.Log) (*PolygonzkevmSetPendingStateTimeout, error) { - event := new(PolygonzkevmSetPendingStateTimeout) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetPendingStateTimeout", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetTrustedAggregatorIterator is returned from FilterSetTrustedAggregator and is used to iterate over the raw logs and unpacked data for SetTrustedAggregator events raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedAggregatorIterator struct { - Event *PolygonzkevmSetTrustedAggregator // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmSetTrustedAggregatorIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetTrustedAggregator) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetTrustedAggregator) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmSetTrustedAggregatorIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetTrustedAggregatorIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetTrustedAggregator represents a SetTrustedAggregator event raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedAggregator struct { - NewTrustedAggregator common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetTrustedAggregator is a free log retrieval operation binding the contract event 0x61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca. -// -// Solidity: event SetTrustedAggregator(address newTrustedAggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetTrustedAggregator(opts *bind.FilterOpts) (*PolygonzkevmSetTrustedAggregatorIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetTrustedAggregator") - if err != nil { - return nil, err - } - return &PolygonzkevmSetTrustedAggregatorIterator{contract: _Polygonzkevm.contract, event: "SetTrustedAggregator", logs: logs, sub: sub}, nil -} - -// WatchSetTrustedAggregator is a free log subscription operation binding the contract event 0x61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca. -// -// Solidity: event SetTrustedAggregator(address newTrustedAggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetTrustedAggregator(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetTrustedAggregator) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetTrustedAggregator") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmSetTrustedAggregator) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedAggregator", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseSetTrustedAggregator is a log parse operation binding the contract event 0x61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca. -// -// Solidity: event SetTrustedAggregator(address newTrustedAggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetTrustedAggregator(log types.Log) (*PolygonzkevmSetTrustedAggregator, error) { - event := new(PolygonzkevmSetTrustedAggregator) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedAggregator", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetTrustedAggregatorTimeoutIterator is returned from FilterSetTrustedAggregatorTimeout and is used to iterate over the raw logs and unpacked data for SetTrustedAggregatorTimeout events raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedAggregatorTimeoutIterator struct { - Event *PolygonzkevmSetTrustedAggregatorTimeout // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmSetTrustedAggregatorTimeoutIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetTrustedAggregatorTimeout) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetTrustedAggregatorTimeout) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmSetTrustedAggregatorTimeoutIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetTrustedAggregatorTimeoutIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetTrustedAggregatorTimeout represents a SetTrustedAggregatorTimeout event raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedAggregatorTimeout struct { - NewTrustedAggregatorTimeout uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetTrustedAggregatorTimeout is a free log retrieval operation binding the contract event 0x1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a1. -// -// Solidity: event SetTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetTrustedAggregatorTimeout(opts *bind.FilterOpts) (*PolygonzkevmSetTrustedAggregatorTimeoutIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetTrustedAggregatorTimeout") - if err != nil { - return nil, err - } - return &PolygonzkevmSetTrustedAggregatorTimeoutIterator{contract: _Polygonzkevm.contract, event: "SetTrustedAggregatorTimeout", logs: logs, sub: sub}, nil -} - -// WatchSetTrustedAggregatorTimeout is a free log subscription operation binding the contract event 0x1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a1. -// -// Solidity: event SetTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetTrustedAggregatorTimeout(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetTrustedAggregatorTimeout) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetTrustedAggregatorTimeout") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmSetTrustedAggregatorTimeout) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedAggregatorTimeout", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseSetTrustedAggregatorTimeout is a log parse operation binding the contract event 0x1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a1. -// -// Solidity: event SetTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetTrustedAggregatorTimeout(log types.Log) (*PolygonzkevmSetTrustedAggregatorTimeout, error) { - event := new(PolygonzkevmSetTrustedAggregatorTimeout) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedAggregatorTimeout", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetTrustedSequencerIterator is returned from FilterSetTrustedSequencer and is used to iterate over the raw logs and unpacked data for SetTrustedSequencer events raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedSequencerIterator struct { - Event *PolygonzkevmSetTrustedSequencer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmSetTrustedSequencerIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetTrustedSequencer) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetTrustedSequencer) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmSetTrustedSequencerIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetTrustedSequencerIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetTrustedSequencer represents a SetTrustedSequencer event raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedSequencer struct { - NewTrustedSequencer common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetTrustedSequencer is a free log retrieval operation binding the contract event 0xf54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc0. -// -// Solidity: event SetTrustedSequencer(address newTrustedSequencer) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetTrustedSequencer(opts *bind.FilterOpts) (*PolygonzkevmSetTrustedSequencerIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetTrustedSequencer") - if err != nil { - return nil, err - } - return &PolygonzkevmSetTrustedSequencerIterator{contract: _Polygonzkevm.contract, event: "SetTrustedSequencer", logs: logs, sub: sub}, nil -} - -// WatchSetTrustedSequencer is a free log subscription operation binding the contract event 0xf54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc0. -// -// Solidity: event SetTrustedSequencer(address newTrustedSequencer) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetTrustedSequencer(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetTrustedSequencer) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetTrustedSequencer") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmSetTrustedSequencer) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedSequencer", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseSetTrustedSequencer is a log parse operation binding the contract event 0xf54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc0. -// -// Solidity: event SetTrustedSequencer(address newTrustedSequencer) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetTrustedSequencer(log types.Log) (*PolygonzkevmSetTrustedSequencer, error) { - event := new(PolygonzkevmSetTrustedSequencer) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedSequencer", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetTrustedSequencerURLIterator is returned from FilterSetTrustedSequencerURL and is used to iterate over the raw logs and unpacked data for SetTrustedSequencerURL events raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedSequencerURLIterator struct { - Event *PolygonzkevmSetTrustedSequencerURL // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmSetTrustedSequencerURLIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetTrustedSequencerURL) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetTrustedSequencerURL) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmSetTrustedSequencerURLIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetTrustedSequencerURLIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetTrustedSequencerURL represents a SetTrustedSequencerURL event raised by the Polygonzkevm contract. -type PolygonzkevmSetTrustedSequencerURL struct { - NewTrustedSequencerURL string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetTrustedSequencerURL is a free log retrieval operation binding the contract event 0x6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b20. -// -// Solidity: event SetTrustedSequencerURL(string newTrustedSequencerURL) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetTrustedSequencerURL(opts *bind.FilterOpts) (*PolygonzkevmSetTrustedSequencerURLIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetTrustedSequencerURL") - if err != nil { - return nil, err - } - return &PolygonzkevmSetTrustedSequencerURLIterator{contract: _Polygonzkevm.contract, event: "SetTrustedSequencerURL", logs: logs, sub: sub}, nil -} - -// WatchSetTrustedSequencerURL is a free log subscription operation binding the contract event 0x6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b20. -// -// Solidity: event SetTrustedSequencerURL(string newTrustedSequencerURL) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetTrustedSequencerURL(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetTrustedSequencerURL) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetTrustedSequencerURL") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmSetTrustedSequencerURL) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedSequencerURL", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseSetTrustedSequencerURL is a log parse operation binding the contract event 0x6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b20. -// -// Solidity: event SetTrustedSequencerURL(string newTrustedSequencerURL) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetTrustedSequencerURL(log types.Log) (*PolygonzkevmSetTrustedSequencerURL, error) { - event := new(PolygonzkevmSetTrustedSequencerURL) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetTrustedSequencerURL", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmSetVerifyBatchTimeTargetIterator is returned from FilterSetVerifyBatchTimeTarget and is used to iterate over the raw logs and unpacked data for SetVerifyBatchTimeTarget events raised by the Polygonzkevm contract. -type PolygonzkevmSetVerifyBatchTimeTargetIterator struct { - Event *PolygonzkevmSetVerifyBatchTimeTarget // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmSetVerifyBatchTimeTargetIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetVerifyBatchTimeTarget) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmSetVerifyBatchTimeTarget) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmSetVerifyBatchTimeTargetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmSetVerifyBatchTimeTargetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmSetVerifyBatchTimeTarget represents a SetVerifyBatchTimeTarget event raised by the Polygonzkevm contract. -type PolygonzkevmSetVerifyBatchTimeTarget struct { - NewVerifyBatchTimeTarget uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterSetVerifyBatchTimeTarget is a free log retrieval operation binding the contract event 0x1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c28. -// -// Solidity: event SetVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterSetVerifyBatchTimeTarget(opts *bind.FilterOpts) (*PolygonzkevmSetVerifyBatchTimeTargetIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "SetVerifyBatchTimeTarget") - if err != nil { - return nil, err - } - return &PolygonzkevmSetVerifyBatchTimeTargetIterator{contract: _Polygonzkevm.contract, event: "SetVerifyBatchTimeTarget", logs: logs, sub: sub}, nil -} - -// WatchSetVerifyBatchTimeTarget is a free log subscription operation binding the contract event 0x1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c28. -// -// Solidity: event SetVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchSetVerifyBatchTimeTarget(opts *bind.WatchOpts, sink chan<- *PolygonzkevmSetVerifyBatchTimeTarget) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "SetVerifyBatchTimeTarget") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmSetVerifyBatchTimeTarget) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetVerifyBatchTimeTarget", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseSetVerifyBatchTimeTarget is a log parse operation binding the contract event 0x1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c28. -// -// Solidity: event SetVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseSetVerifyBatchTimeTarget(log types.Log) (*PolygonzkevmSetVerifyBatchTimeTarget, error) { - event := new(PolygonzkevmSetVerifyBatchTimeTarget) - if err := _Polygonzkevm.contract.UnpackLog(event, "SetVerifyBatchTimeTarget", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmTransferAdminRoleIterator is returned from FilterTransferAdminRole and is used to iterate over the raw logs and unpacked data for TransferAdminRole events raised by the Polygonzkevm contract. -type PolygonzkevmTransferAdminRoleIterator struct { - Event *PolygonzkevmTransferAdminRole // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmTransferAdminRoleIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmTransferAdminRole) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmTransferAdminRole) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmTransferAdminRoleIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmTransferAdminRoleIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmTransferAdminRole represents a TransferAdminRole event raised by the Polygonzkevm contract. -type PolygonzkevmTransferAdminRole struct { - NewPendingAdmin common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransferAdminRole is a free log retrieval operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. -// -// Solidity: event TransferAdminRole(address newPendingAdmin) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterTransferAdminRole(opts *bind.FilterOpts) (*PolygonzkevmTransferAdminRoleIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "TransferAdminRole") - if err != nil { - return nil, err - } - return &PolygonzkevmTransferAdminRoleIterator{contract: _Polygonzkevm.contract, event: "TransferAdminRole", logs: logs, sub: sub}, nil -} - -// WatchTransferAdminRole is a free log subscription operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. -// -// Solidity: event TransferAdminRole(address newPendingAdmin) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchTransferAdminRole(opts *bind.WatchOpts, sink chan<- *PolygonzkevmTransferAdminRole) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "TransferAdminRole") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmTransferAdminRole) - if err := _Polygonzkevm.contract.UnpackLog(event, "TransferAdminRole", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseTransferAdminRole is a log parse operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. -// -// Solidity: event TransferAdminRole(address newPendingAdmin) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseTransferAdminRole(log types.Log) (*PolygonzkevmTransferAdminRole, error) { - event := new(PolygonzkevmTransferAdminRole) - if err := _Polygonzkevm.contract.UnpackLog(event, "TransferAdminRole", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmUpdateZkEVMVersionIterator is returned from FilterUpdateZkEVMVersion and is used to iterate over the raw logs and unpacked data for UpdateZkEVMVersion events raised by the Polygonzkevm contract. -type PolygonzkevmUpdateZkEVMVersionIterator struct { - Event *PolygonzkevmUpdateZkEVMVersion // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmUpdateZkEVMVersionIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmUpdateZkEVMVersion) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmUpdateZkEVMVersion) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmUpdateZkEVMVersionIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmUpdateZkEVMVersionIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmUpdateZkEVMVersion represents a UpdateZkEVMVersion event raised by the Polygonzkevm contract. -type PolygonzkevmUpdateZkEVMVersion struct { - NumBatch uint64 - ForkID uint64 - Version string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUpdateZkEVMVersion is a free log retrieval operation binding the contract event 0xed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd6. -// -// Solidity: event UpdateZkEVMVersion(uint64 numBatch, uint64 forkID, string version) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterUpdateZkEVMVersion(opts *bind.FilterOpts) (*PolygonzkevmUpdateZkEVMVersionIterator, error) { - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "UpdateZkEVMVersion") - if err != nil { - return nil, err - } - return &PolygonzkevmUpdateZkEVMVersionIterator{contract: _Polygonzkevm.contract, event: "UpdateZkEVMVersion", logs: logs, sub: sub}, nil -} - -// WatchUpdateZkEVMVersion is a free log subscription operation binding the contract event 0xed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd6. -// -// Solidity: event UpdateZkEVMVersion(uint64 numBatch, uint64 forkID, string version) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchUpdateZkEVMVersion(opts *bind.WatchOpts, sink chan<- *PolygonzkevmUpdateZkEVMVersion) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "UpdateZkEVMVersion") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmUpdateZkEVMVersion) - if err := _Polygonzkevm.contract.UnpackLog(event, "UpdateZkEVMVersion", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseUpdateZkEVMVersion is a log parse operation binding the contract event 0xed7be53c9f1a96a481223b15568a5b1a475e01a74b347d6ca187c8bf0c078cd6. -// -// Solidity: event UpdateZkEVMVersion(uint64 numBatch, uint64 forkID, string version) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseUpdateZkEVMVersion(log types.Log) (*PolygonzkevmUpdateZkEVMVersion, error) { - event := new(PolygonzkevmUpdateZkEVMVersion) - if err := _Polygonzkevm.contract.UnpackLog(event, "UpdateZkEVMVersion", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmVerifyBatchesIterator is returned from FilterVerifyBatches and is used to iterate over the raw logs and unpacked data for VerifyBatches events raised by the Polygonzkevm contract. -type PolygonzkevmVerifyBatchesIterator struct { - Event *PolygonzkevmVerifyBatches // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmVerifyBatchesIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmVerifyBatches) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmVerifyBatches) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmVerifyBatchesIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmVerifyBatchesIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmVerifyBatches represents a VerifyBatches event raised by the Polygonzkevm contract. -type PolygonzkevmVerifyBatches struct { - NumBatch uint64 - StateRoot [32]byte - Aggregator common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVerifyBatches is a free log retrieval operation binding the contract event 0x9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966. -// -// Solidity: event VerifyBatches(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterVerifyBatches(opts *bind.FilterOpts, numBatch []uint64, aggregator []common.Address) (*PolygonzkevmVerifyBatchesIterator, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var aggregatorRule []interface{} - for _, aggregatorItem := range aggregator { - aggregatorRule = append(aggregatorRule, aggregatorItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "VerifyBatches", numBatchRule, aggregatorRule) - if err != nil { - return nil, err - } - return &PolygonzkevmVerifyBatchesIterator{contract: _Polygonzkevm.contract, event: "VerifyBatches", logs: logs, sub: sub}, nil -} - -// WatchVerifyBatches is a free log subscription operation binding the contract event 0x9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966. -// -// Solidity: event VerifyBatches(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchVerifyBatches(opts *bind.WatchOpts, sink chan<- *PolygonzkevmVerifyBatches, numBatch []uint64, aggregator []common.Address) (event.Subscription, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var aggregatorRule []interface{} - for _, aggregatorItem := range aggregator { - aggregatorRule = append(aggregatorRule, aggregatorItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "VerifyBatches", numBatchRule, aggregatorRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmVerifyBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "VerifyBatches", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseVerifyBatches is a log parse operation binding the contract event 0x9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966. -// -// Solidity: event VerifyBatches(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseVerifyBatches(log types.Log) (*PolygonzkevmVerifyBatches, error) { - event := new(PolygonzkevmVerifyBatches) - if err := _Polygonzkevm.contract.UnpackLog(event, "VerifyBatches", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmVerifyBatchesTrustedAggregatorIterator is returned from FilterVerifyBatchesTrustedAggregator and is used to iterate over the raw logs and unpacked data for VerifyBatchesTrustedAggregator events raised by the Polygonzkevm contract. -type PolygonzkevmVerifyBatchesTrustedAggregatorIterator struct { - Event *PolygonzkevmVerifyBatchesTrustedAggregator // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmVerifyBatchesTrustedAggregatorIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmVerifyBatchesTrustedAggregator) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmVerifyBatchesTrustedAggregator) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmVerifyBatchesTrustedAggregatorIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmVerifyBatchesTrustedAggregatorIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmVerifyBatchesTrustedAggregator represents a VerifyBatchesTrustedAggregator event raised by the Polygonzkevm contract. -type PolygonzkevmVerifyBatchesTrustedAggregator struct { - NumBatch uint64 - StateRoot [32]byte - Aggregator common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterVerifyBatchesTrustedAggregator is a free log retrieval operation binding the contract event 0xcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe. -// -// Solidity: event VerifyBatchesTrustedAggregator(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) FilterVerifyBatchesTrustedAggregator(opts *bind.FilterOpts, numBatch []uint64, aggregator []common.Address) (*PolygonzkevmVerifyBatchesTrustedAggregatorIterator, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var aggregatorRule []interface{} - for _, aggregatorItem := range aggregator { - aggregatorRule = append(aggregatorRule, aggregatorItem) - } - - logs, sub, err := _Polygonzkevm.contract.FilterLogs(opts, "VerifyBatchesTrustedAggregator", numBatchRule, aggregatorRule) - if err != nil { - return nil, err - } - return &PolygonzkevmVerifyBatchesTrustedAggregatorIterator{contract: _Polygonzkevm.contract, event: "VerifyBatchesTrustedAggregator", logs: logs, sub: sub}, nil -} - -// WatchVerifyBatchesTrustedAggregator is a free log subscription operation binding the contract event 0xcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe. -// -// Solidity: event VerifyBatchesTrustedAggregator(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) WatchVerifyBatchesTrustedAggregator(opts *bind.WatchOpts, sink chan<- *PolygonzkevmVerifyBatchesTrustedAggregator, numBatch []uint64, aggregator []common.Address) (event.Subscription, error) { - - var numBatchRule []interface{} - for _, numBatchItem := range numBatch { - numBatchRule = append(numBatchRule, numBatchItem) - } - - var aggregatorRule []interface{} - for _, aggregatorItem := range aggregator { - aggregatorRule = append(aggregatorRule, aggregatorItem) - } - - logs, sub, err := _Polygonzkevm.contract.WatchLogs(opts, "VerifyBatchesTrustedAggregator", numBatchRule, aggregatorRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmVerifyBatchesTrustedAggregator) - if err := _Polygonzkevm.contract.UnpackLog(event, "VerifyBatchesTrustedAggregator", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseVerifyBatchesTrustedAggregator is a log parse operation binding the contract event 0xcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe. -// -// Solidity: event VerifyBatchesTrustedAggregator(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) -func (_Polygonzkevm *PolygonzkevmFilterer) ParseVerifyBatchesTrustedAggregator(log types.Log) (*PolygonzkevmVerifyBatchesTrustedAggregator, error) { - event := new(PolygonzkevmVerifyBatchesTrustedAggregator) - if err := _Polygonzkevm.contract.UnpackLog(event, "VerifyBatchesTrustedAggregator", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/etherman/smartcontracts/polygonzkevmbridge/polygonzkevmbridge.go b/etherman/smartcontracts/polygonzkevmbridge/polygonzkevmbridge.go deleted file mode 100644 index 51927880..00000000 --- a/etherman/smartcontracts/polygonzkevmbridge/polygonzkevmbridge.go +++ /dev/null @@ -1,1666 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package polygonzkevmbridge - -import ( - "errors" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -// PolygonzkevmbridgeMetaData contains all meta data concerning the Polygonzkevmbridge contract. -var PolygonzkevmbridgeMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"AlreadyClaimed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AmountDoesNotMatchMsgValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DestinationNetworkInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EtherTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GlobalExitRootInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSmtProof\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MerkleTreeFull\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MessageFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MsgValueNotZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotValidAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotValidOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotValidSignature\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotValidSpender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyEmergencyState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyNotEmergencyState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPolygonZkEVM\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"leafType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"originAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"destinationNetwork\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"depositCount\",\"type\":\"uint32\"}],\"name\":\"BridgeEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"index\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"originAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ClaimEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyStateActivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyStateDeactivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"originTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"wrappedTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"name\":\"NewWrappedToken\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"activateEmergencyState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"destinationNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"forceUpdateGlobalExitRoot\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"permitData\",\"type\":\"bytes\"}],\"name\":\"bridgeAsset\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"destinationNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"forceUpdateGlobalExitRoot\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"name\":\"bridgeMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[32]\",\"name\":\"smtProof\",\"type\":\"bytes32[32]\"},{\"internalType\":\"uint32\",\"name\":\"index\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"mainnetExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rollupExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"originTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"destinationNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"name\":\"claimAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[32]\",\"name\":\"smtProof\",\"type\":\"bytes32[32]\"},{\"internalType\":\"uint32\",\"name\":\"index\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"mainnetExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rollupExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"originAddress\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"destinationNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"name\":\"claimMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimedBitMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deactivateEmergencyState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDepositRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"leafType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"originAddress\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"destinationNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"metadataHash\",\"type\":\"bytes32\"}],\"name\":\"getLeafValue\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"originTokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenWrappedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"globalExitRootManager\",\"outputs\":[{\"internalType\":\"contractIBasePolygonZkEVMGlobalExitRoot\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_networkID\",\"type\":\"uint32\"},{\"internalType\":\"contractIBasePolygonZkEVMGlobalExitRoot\",\"name\":\"_globalExitRootManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_polygonZkEVMaddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"isClaimed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isEmergencyState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastUpdatedDepositCount\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"networkID\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"polygonZkEVMaddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"originTokenAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"name\":\"precalculatedWrapperAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"tokenInfoToWrappedToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateGlobalExitRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"leafHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[32]\",\"name\":\"smtProof\",\"type\":\"bytes32[32]\"},{\"internalType\":\"uint32\",\"name\":\"index\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"verifyMerkleProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"wrappedTokenToTokenInfo\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"originTokenAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b50614e0e806100206000396000f3fe6080604052600436106200019f5760003560e01c8063647c576c11620000e7578063be5831c71162000089578063dbc169761162000060578063dbc169761462000506578063ee25560b146200051e578063fb570834146200054f57600080fd5b8063be5831c7146200049e578063cd58657914620004c4578063d02103ca14620004db57600080fd5b80639e34070f11620000be5780639e34070f14620003fa578063aaa13cc2146200043f578063bab161bf146200046457600080fd5b8063647c576c146200038357806379e2cf9714620003a857806381b1c17414620003c057600080fd5b80632d2c9d94116200015157806334ac9cf2116200012857806334ac9cf214620003245780633ae0504714620003465780633e197043146200035e57600080fd5b80632d2c9d9414620002695780632dfdf0b5146200028e578063318aee3d14620002b557600080fd5b806322e95f2c116200018657806322e95f2c14620001ef578063240ff378146200022d5780632cffd02e146200024457600080fd5b806315064c9614620001a45780632072f6c514620001d5575b600080fd5b348015620001b157600080fd5b50606854620001c09060ff1681565b60405190151581526020015b60405180910390f35b348015620001e257600080fd5b50620001ed62000574565b005b348015620001fc57600080fd5b50620002146200020e36600462002938565b620005ac565b6040516001600160a01b039091168152602001620001cc565b620001ed6200023e366004620029cf565b62000617565b3480156200025157600080fd5b50620001ed6200026336600462002a66565b6200073e565b3480156200027657600080fd5b50620001ed6200028836600462002a66565b62000b98565b3480156200029b57600080fd5b50620002a660535481565b604051908152602001620001cc565b348015620002c257600080fd5b50620002ff620002d436600462002b4c565b606b6020526000908152604090205463ffffffff81169064010000000090046001600160a01b031682565b6040805163ffffffff90931683526001600160a01b03909116602083015201620001cc565b3480156200033157600080fd5b50606c5462000214906001600160a01b031681565b3480156200035357600080fd5b50620002a662000d36565b3480156200036b57600080fd5b50620002a66200037d36600462002b7c565b62000e1c565b3480156200039057600080fd5b50620001ed620003a236600462002c06565b62000ec6565b348015620003b557600080fd5b50620001ed62001096565b348015620003cd57600080fd5b5062000214620003df36600462002c56565b606a602052600090815260409020546001600160a01b031681565b3480156200040757600080fd5b50620001c06200041936600462002c56565b600881901c600090815260696020526040902054600160ff9092169190911b9081161490565b3480156200044c57600080fd5b50620002146200045e36600462002c70565b620010ba565b3480156200047157600080fd5b506068546200048890610100900463ffffffff1681565b60405163ffffffff9091168152602001620001cc565b348015620004ab57600080fd5b506068546200048890600160c81b900463ffffffff1681565b620001ed620004d536600462002d24565b6200120e565b348015620004e857600080fd5b5060685462000214906501000000000090046001600160a01b031681565b3480156200051357600080fd5b50620001ed620015f1565b3480156200052b57600080fd5b50620002a66200053d36600462002c56565b60696020526000908152604090205481565b3480156200055c57600080fd5b50620001c06200056e36600462002dc6565b62001627565b606c546001600160a01b03163314620005a05760405163e2e8106b60e01b815260040160405180910390fd5b620005aa6200170e565b565b6040805160e084901b6001600160e01b031916602080830191909152606084901b6bffffffffffffffffffffffff1916602483015282516018818403018152603890920183528151918101919091206000908152606a90915220546001600160a01b03165b92915050565b60685460ff16156200063c57604051630bc011ff60e21b815260040160405180910390fd5b60685463ffffffff868116610100909204161480620006625750600263ffffffff861610155b1562000681576040516302caf51760e11b815260040160405180910390fd5b7f501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b6001606860019054906101000a900463ffffffff16338888348888605354604051620006d79998979695949392919062002e3c565b60405180910390a162000726620007206001606860019054906101000a900463ffffffff163389893489896040516200071292919062002eaa565b604051809103902062000e1c565b6200176b565b821562000737576200073762001882565b5050505050565b60685460ff16156200076357604051630bc011ff60e21b815260040160405180910390fd5b6200077a8b8b8b8b8b8b8b8b8b8b8b600062001934565b6001600160a01b0386166200083c57604080516000808252602082019092526001600160a01b038616908590604051620007b5919062002ef6565b60006040518083038185875af1925050503d8060008114620007f4576040519150601f19603f3d011682016040523d82523d6000602084013e620007f9565b606091505b505090508062000835576040517f6747a28800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5062000b2d565b60685463ffffffff61010090910481169088160362000871576200086b6001600160a01b038716858562001aff565b62000b2d565b6040516001600160e01b031960e089901b1660208201526bffffffffffffffffffffffff19606088901b16602482015260009060380160408051601f1981840301815291815281516020928301206000818152606a9093529120549091506001600160a01b03168062000ac55760008080620008f08688018862002fcf565b9250925092506000858484846040516200090a90620028fc565b620009189392919062003073565b8190604051809103906000f590508015801562000939573d6000803e3d6000fd5b506040516340c10f1960e01b81526001600160a01b038c81166004830152602482018c9052919250908216906340c10f1990604401600060405180830381600087803b1580156200098957600080fd5b505af11580156200099e573d6000803e3d6000fd5b5050505080606a600088815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060405180604001604052808e63ffffffff1681526020018d6001600160a01b0316815250606b6000836001600160a01b03166001600160a01b0316815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154816001600160a01b0302191690836001600160a01b031602179055509050507f490e59a1701b938786ac72570a1efeac994a3dbe96e2e883e19e902ace6e6a398d8d838b8b60405162000ab3959493929190620030b0565b60405180910390a15050505062000b2a565b6040516340c10f1960e01b81526001600160a01b038781166004830152602482018790528216906340c10f1990604401600060405180830381600087803b15801562000b1057600080fd5b505af115801562000b25573d6000803e3d6000fd5b505050505b50505b6040805163ffffffff8c81168252891660208201526001600160a01b0388811682840152861660608201526080810185905290517f25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe275459839181900360a00190a15050505050505050505050565b60685460ff161562000bbd57604051630bc011ff60e21b815260040160405180910390fd5b62000bd48b8b8b8b8b8b8b8b8b8b8b600162001934565b6000846001600160a01b031684888a868660405160240162000bfa9493929190620030eb565b60408051601f198184030181529181526020820180516001600160e01b03167f1806b5f2000000000000000000000000000000000000000000000000000000001790525162000c4a919062002ef6565b60006040518083038185875af1925050503d806000811462000c89576040519150601f19603f3d011682016040523d82523d6000602084013e62000c8e565b606091505b505090508062000cca576040517f37e391c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805163ffffffff8d811682528a1660208201526001600160a01b0389811682840152871660608201526080810186905290517f25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe275459839181900360a00190a1505050505050505050505050565b605354600090819081805b602081101562000e13578083901c60011660010362000da4576033816020811062000d705762000d7062003126565b0154604080516020810192909252810185905260600160405160208183030381529060405280519060200120935062000dd1565b60408051602081018690529081018390526060016040516020818303038152906040528051906020012093505b6040805160208101849052908101839052606001604051602081830303815290604052805190602001209150808062000e0a9062003152565b91505062000d41565b50919392505050565b6040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201526001600160e01b031960e088811b821660218401526bffffffffffffffffffffffff19606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b600054610100900460ff161580801562000ee75750600054600160ff909116105b8062000f035750303b15801562000f03575060005460ff166001145b62000f7b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000805460ff19166001179055801562000f9f576000805461ff0019166101001790555b606880547fffffffffffffff000000000000000000000000000000000000000000000000ff1661010063ffffffff8716027fffffffffffffff0000000000000000000000000000000000000000ffffffffff1617650100000000006001600160a01b038681169190910291909117909155606c80547fffffffffffffffffffffffff0000000000000000000000000000000000000000169184169190911790556200104962001b7d565b801562001090576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b605354606854600160c81b900463ffffffff161015620005aa57620005aa62001882565b6040516001600160e01b031960e089901b1660208201526bffffffffffffffffffffffff19606088901b1660248201526000908190603801604051602081830303815290604052805190602001209050600060ff60f81b3083604051806020016200112590620028fc565b601f1982820381018352601f90910116604081905262001152908d908d908d908d908d906020016200316e565b60408051601f1981840301815290829052620011729291602001620031af565b60405160208183030381529060405280519060200120604051602001620011e894939291907fff0000000000000000000000000000000000000000000000000000000000000094909416845260609290921b6bffffffffffffffffffffffff191660018401526015830152603582015260550190565b60408051808303601f1901815291905280516020909101209a9950505050505050505050565b60685460ff16156200123357604051630bc011ff60e21b815260040160405180910390fd5b6200123d62001bf4565b60685463ffffffff888116610100909204161480620012635750600263ffffffff881610155b1562001282576040516302caf51760e11b815260040160405180910390fd5b6000806060876001600160a01b038816620012db57883414620012d1576040517fb89240f500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000925062001562565b341562001314576040517f798ee6f100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038089166000908152606b602090815260409182902082518084019093525463ffffffff8116835264010000000090049092169181018290529015620013ea576040517f9dc29fac000000000000000000000000000000000000000000000000000000008152336004820152602481018b90526001600160a01b038a1690639dc29fac90604401600060405180830381600087803b158015620013bd57600080fd5b505af1158015620013d2573d6000803e3d6000fd5b50505050806020015194508060000151935062001560565b8515620013ff57620013ff898b898962001c4f565b6040516370a0823160e01b81523060048201526000906001600160a01b038b16906370a0823190602401602060405180830381865afa15801562001447573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200146d9190620031e2565b9050620014866001600160a01b038b1633308e62002015565b6040516370a0823160e01b81523060048201526000906001600160a01b038c16906370a0823190602401602060405180830381865afa158015620014ce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620014f49190620031e2565b9050620015028282620031fc565b6068548c9850610100900463ffffffff1696509350620015228762002068565b6200152d8c62002166565b620015388d62002251565b6040516020016200154c9392919062003073565b604051602081830303815290604052945050505b505b7f501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b600084868e8e8688605354604051620015a498979695949392919062003212565b60405180910390a1620015c962000720600085878f8f87898051906020012062000e1c565b8615620015da57620015da62001882565b50505050620015e860018055565b50505050505050565b606c546001600160a01b031633146200161d5760405163e2e8106b60e01b815260040160405180910390fd5b620005aa62002331565b600084815b60208110156200170257600163ffffffff8616821c811690036200169e578581602081106200165f576200165f62003126565b60200201358260405160200162001680929190918252602082015260400190565b604051602081830303815290604052805190602001209150620016ed565b81868260208110620016b457620016b462003126565b6020020135604051602001620016d4929190918252602082015260400190565b6040516020818303038152906040528051906020012091505b80620016f98162003152565b9150506200162c565b50909114949350505050565b60685460ff16156200173357604051630bc011ff60e21b815260040160405180910390fd5b6068805460ff191660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b8060016200177c602060026200337b565b620017889190620031fc565b60535410620017c3576040517fef5ccf6600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000605360008154620017d69062003152565b9182905550905060005b602081101562001872578082901c6001166001036200181857826033826020811062001810576200181062003126565b015550505050565b603381602081106200182e576200182e62003126565b015460408051602081019290925281018490526060016040516020818303038152906040528051906020012092508080620018699062003152565b915050620017e0565b506200187d62003389565b505050565b6053546068805463ffffffff909216600160c81b027fffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffffff90921691909117908190556001600160a01b0365010000000000909104166333d6247d620018e562000d36565b6040518263ffffffff1660e01b81526004016200190491815260200190565b600060405180830381600087803b1580156200191f57600080fd5b505af115801562001090573d6000803e3d6000fd5b620019458b63ffffffff16620023a3565b6068546040805160208082018e90528183018d9052825180830384018152606083019384905280519101207f257b36320000000000000000000000000000000000000000000000000000000090925260648101919091526000916501000000000090046001600160a01b03169063257b3632906084016020604051808303816000875af1158015620019db573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a019190620031e2565b90508060000362001a3d576040517e2f6fad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60685463ffffffff888116610100909204161462001a6e576040516302caf51760e11b815260040160405180910390fd5b606854600090610100900463ffffffff1662001a8c57508962001a8f565b508a5b62001ab862001aaf848c8c8c8c8c8c8c6040516200071292919062002eaa565b8f8f8462001627565b62001aef576040517fe0417cec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050505050565b6040516001600160a01b0383166024820152604481018290526200187d9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915262002408565b600054610100900460ff1662001bea5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840162000f72565b620005aa620024f4565b60026001540362001c485760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640162000f72565b6002600155565b600062001c6060048284866200339f565b62001c6b91620033cb565b90507f2afa5331000000000000000000000000000000000000000000000000000000006001600160e01b031982160162001e5757600080808080808062001cb6896004818d6200339f565b81019062001cc59190620033fc565b9650965096509650965096509650336001600160a01b0316876001600160a01b03161462001d065760405163912ecce760e01b815260040160405180910390fd5b6001600160a01b038616301462001d305760405163750643af60e01b815260040160405180910390fd5b8a851462001d6a576040517f03fffc4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516001600160a01b0389811660248301528881166044830152606482018890526084820187905260ff861660a483015260c4820185905260e48083018590528351808403909101815261010490920183526020820180516001600160e01b03167fd505accf000000000000000000000000000000000000000000000000000000001790529151918e169162001e03919062002ef6565b6000604051808303816000865af19150503d806000811462001e42576040519150601f19603f3d011682016040523d82523d6000602084013e62001e47565b606091505b5050505050505050505062000737565b6001600160e01b031981166323f2ebc360e21b1462001ea2576040517fe282c0ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008080808080808062001eba8a6004818e6200339f565b81019062001ec9919062003457565b97509750975097509750975097509750336001600160a01b0316886001600160a01b03161462001f0c5760405163912ecce760e01b815260040160405180910390fd5b6001600160a01b038716301462001f365760405163750643af60e01b815260040160405180910390fd5b604080516001600160a01b038a811660248301528981166044830152606482018990526084820188905286151560a483015260ff861660c483015260e482018590526101048083018590528351808403909101815261012490920183526020820180516001600160e01b03166323f2ebc360e21b1790529151918f169162001fbf919062002ef6565b6000604051808303816000865af19150503d806000811462001ffe576040519150601f19603f3d011682016040523d82523d6000602084013e62002003565b606091505b50505050505050505050505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052620010909085907f23b872dd000000000000000000000000000000000000000000000000000000009060840162001b45565b60408051600481526024810182526020810180516001600160e01b03167f06fdde0300000000000000000000000000000000000000000000000000000000179052905160609160009182916001600160a01b03861691620020ca919062002ef6565b600060405180830381855afa9150503d806000811462002107576040519150601f19603f3d011682016040523d82523d6000602084013e6200210c565b606091505b50915091508162002153576040518060400160405280600781526020017f4e4f5f4e414d45000000000000000000000000000000000000000000000000008152506200215e565b6200215e8162002561565b949350505050565b60408051600481526024810182526020810180516001600160e01b03167f95d89b4100000000000000000000000000000000000000000000000000000000179052905160609160009182916001600160a01b03861691620021c8919062002ef6565b600060405180830381855afa9150503d806000811462002205576040519150601f19603f3d011682016040523d82523d6000602084013e6200220a565b606091505b50915091508162002153576040518060400160405280600981526020017f4e4f5f53594d424f4c00000000000000000000000000000000000000000000008152506200215e565b60408051600481526024810182526020810180516001600160e01b03167f313ce567000000000000000000000000000000000000000000000000000000001790529051600091829182916001600160a01b03861691620022b2919062002ef6565b600060405180830381855afa9150503d8060008114620022ef576040519150601f19603f3d011682016040523d82523d6000602084013e620022f4565b606091505b509150915081801562002308575080516020145b620023155760126200215e565b808060200190518101906200215e9190620034e3565b60018055565b60685460ff166200236e576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6068805460ff191690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b600881901c60008181526069602052604081208054600160ff861690811b9182189283905592909190818316900362000737576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006200245f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316620027519092919063ffffffff16565b8051909150156200187d578080602001905181019062002480919062003503565b6200187d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840162000f72565b600054610100900460ff166200232b5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840162000f72565b6060604082511062002583578180602001905181019062000611919062003523565b8151602003620027135760005b602081108015620025db5750828181518110620025b157620025b162003126565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b15620025f65780620025ed8162003152565b91505062002590565b806000036200263a57505060408051808201909152601281527f4e4f545f56414c49445f454e434f44494e4700000000000000000000000000006020820152919050565b60008167ffffffffffffffff81111562002658576200265862002eba565b6040519080825280601f01601f19166020018201604052801562002683576020820181803683370190505b50905060005b828110156200270b57848181518110620026a757620026a762003126565b602001015160f81c60f81b828281518110620026c757620026c762003126565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080620027028162003152565b91505062002689565b509392505050565b505060408051808201909152601281527f4e4f545f56414c49445f454e434f44494e470000000000000000000000000000602082015290565b919050565b60606200276284846000856200276c565b90505b9392505050565b606082471015620027e65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840162000f72565b6001600160a01b0385163b6200283f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000f72565b600080866001600160a01b031685876040516200285d919062002ef6565b60006040518083038185875af1925050503d80600081146200289c576040519150601f19603f3d011682016040523d82523d6000602084013e620028a1565b606091505b5091509150620028b3828286620028be565b979650505050505050565b60608315620028cf57508162002765565b825115620028e05782518084602001fd5b8160405162461bcd60e51b815260040162000f729190620035a3565b61182080620035b983390190565b803563ffffffff811681146200274c57600080fd5b6001600160a01b03811681146200293557600080fd5b50565b600080604083850312156200294c57600080fd5b62002957836200290a565b9150602083013562002969816200291f565b809150509250929050565b80151581146200293557600080fd5b60008083601f8401126200299657600080fd5b50813567ffffffffffffffff811115620029af57600080fd5b602083019150836020828501011115620029c857600080fd5b9250929050565b600080600080600060808688031215620029e857600080fd5b620029f3866200290a565b9450602086013562002a05816200291f565b9350604086013562002a178162002974565b9250606086013567ffffffffffffffff81111562002a3457600080fd5b62002a428882890162002983565b969995985093965092949392505050565b8061040081018310156200061157600080fd5b60008060008060008060008060008060006105208c8e03121562002a8957600080fd5b62002a958d8d62002a53565b9a5062002aa66104008d016200290a565b99506104208c013598506104408c0135975062002ac76104608d016200290a565b96506104808c013562002ada816200291f565b955062002aeb6104a08d016200290a565b94506104c08c013562002afe816200291f565b93506104e08c013592506105008c013567ffffffffffffffff81111562002b2457600080fd5b62002b328e828f0162002983565b915080935050809150509295989b509295989b9093969950565b60006020828403121562002b5f57600080fd5b813562002765816200291f565b60ff811681146200293557600080fd5b600080600080600080600060e0888a03121562002b9857600080fd5b873562002ba58162002b6c565b965062002bb5602089016200290a565b9550604088013562002bc7816200291f565b945062002bd7606089016200290a565b9350608088013562002be9816200291f565b9699959850939692959460a0840135945060c09093013592915050565b60008060006060848603121562002c1c57600080fd5b62002c27846200290a565b9250602084013562002c39816200291f565b9150604084013562002c4b816200291f565b809150509250925092565b60006020828403121562002c6957600080fd5b5035919050565b600080600080600080600060a0888a03121562002c8c57600080fd5b62002c97886200290a565b9650602088013562002ca9816200291f565b9550604088013567ffffffffffffffff8082111562002cc757600080fd5b62002cd58b838c0162002983565b909750955060608a013591508082111562002cef57600080fd5b5062002cfe8a828b0162002983565b909450925050608088013562002d148162002b6c565b8091505092959891949750929550565b600080600080600080600060c0888a03121562002d4057600080fd5b62002d4b886200290a565b9650602088013562002d5d816200291f565b955060408801359450606088013562002d76816200291f565b9350608088013562002d888162002974565b925060a088013567ffffffffffffffff81111562002da557600080fd5b62002db38a828b0162002983565b989b979a50959850939692959293505050565b600080600080610460858703121562002dde57600080fd5b8435935062002df1866020870162002a53565b925062002e0261042086016200290a565b939692955092936104400135925050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600061010060ff8c16835263ffffffff808c1660208501526001600160a01b03808c166040860152818b166060860152808a166080860152508760a08501528160c085015262002e90828501878962002e13565b925080851660e085015250509a9950505050505050505050565b8183823760009101908152919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562002eed57818101518382015260200162002ed3565b50506000910152565b6000825162002f0a81846020870162002ed0565b9190910192915050565b604051601f8201601f1916810167ffffffffffffffff8111828210171562002f405762002f4062002eba565b604052919050565b600067ffffffffffffffff82111562002f655762002f6562002eba565b50601f01601f191660200190565b600082601f83011262002f8557600080fd5b813562002f9c62002f968262002f48565b62002f14565b81815284602083860101111562002fb257600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121562002fe557600080fd5b833567ffffffffffffffff8082111562002ffe57600080fd5b6200300c8783880162002f73565b945060208601359150808211156200302357600080fd5b50620030328682870162002f73565b925050604084013562002c4b8162002b6c565b600081518084526200305f81602086016020860162002ed0565b601f01601f19169290920160200192915050565b60608152600062003088606083018662003045565b82810360208401526200309c818662003045565b91505060ff83166040830152949350505050565b63ffffffff8616815260006001600160a01b03808716602084015280861660408401525060806060830152620028b360808301848662002e13565b6001600160a01b038516815263ffffffff841660208201526060604082015260006200311c60608301848662002e13565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016200316757620031676200313c565b5060010190565b6060815260006200318460608301878962002e13565b82810360208401526200319981868862002e13565b91505060ff831660408301529695505050505050565b60008351620031c381846020880162002ed0565b835190830190620031d981836020880162002ed0565b01949350505050565b600060208284031215620031f557600080fd5b5051919050565b818103818111156200061157620006116200313c565b600061010060ff8b16835263ffffffff808b1660208501526001600160a01b03808b166040860152818a1660608601528089166080860152508660a08501528160c0850152620032658285018762003045565b925080851660e085015250509998505050505050505050565b600181815b80851115620032bf578160001904821115620032a357620032a36200313c565b80851615620032b157918102915b93841c939080029062003283565b509250929050565b600082620032d85750600162000611565b81620032e75750600062000611565b81600181146200330057600281146200330b576200332b565b600191505062000611565b60ff8411156200331f576200331f6200313c565b50506001821b62000611565b5060208310610133831016604e8410600b841016171562003350575081810a62000611565b6200335c83836200327e565b80600019048211156200337357620033736200313c565b029392505050565b6000620027658383620032c7565b634e487b7160e01b600052600160045260246000fd5b60008085851115620033b057600080fd5b83861115620033be57600080fd5b5050820193919092039150565b6001600160e01b03198135818116916004851015620033f45780818660040360031b1b83161692505b505092915050565b600080600080600080600060e0888a0312156200341857600080fd5b873562003425816200291f565b9650602088013562003437816200291f565b95506040880135945060608801359350608088013562002be98162002b6c565b600080600080600080600080610100898b0312156200347557600080fd5b883562003482816200291f565b9750602089013562003494816200291f565b965060408901359550606089013594506080890135620034b48162002974565b935060a0890135620034c68162002b6c565b979a969950949793969295929450505060c08201359160e0013590565b600060208284031215620034f657600080fd5b8151620027658162002b6c565b6000602082840312156200351657600080fd5b8151620027658162002974565b6000602082840312156200353657600080fd5b815167ffffffffffffffff8111156200354e57600080fd5b8201601f810184136200356057600080fd5b80516200357162002f968262002f48565b8181528560208385010111156200358757600080fd5b6200359a82602083016020860162002ed0565b95945050505050565b6020815260006200276560208301846200304556fe6101006040523480156200001257600080fd5b50604051620018203803806200182083398101604081905262000035916200028d565b82826003620000458382620003a1565b506004620000548282620003a1565b50503360c0525060ff811660e052466080819052620000739062000080565b60a052506200046d915050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620000ad6200012e565b805160209182012060408051808201825260018152603160f81b90840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b6060600380546200013f9062000312565b80601f01602080910402602001604051908101604052809291908181526020018280546200016d9062000312565b8015620001be5780601f106200019257610100808354040283529160200191620001be565b820191906000526020600020905b815481529060010190602001808311620001a057829003601f168201915b5050505050905090565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001f057600080fd5b81516001600160401b03808211156200020d576200020d620001c8565b604051601f8301601f19908116603f01168101908282118183101715620002385762000238620001c8565b816040528381526020925086838588010111156200025557600080fd5b600091505b838210156200027957858201830151818301840152908201906200025a565b600093810190920192909252949350505050565b600080600060608486031215620002a357600080fd5b83516001600160401b0380821115620002bb57600080fd5b620002c987838801620001de565b94506020860151915080821115620002e057600080fd5b50620002ef86828701620001de565b925050604084015160ff811681146200030757600080fd5b809150509250925092565b600181811c908216806200032757607f821691505b6020821081036200034857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200039c57600081815260208120601f850160051c81016020861015620003775750805b601f850160051c820191505b81811015620003985782815560010162000383565b5050505b505050565b81516001600160401b03811115620003bd57620003bd620001c8565b620003d581620003ce845462000312565b846200034e565b602080601f8311600181146200040d5760008415620003f45750858301515b600019600386901b1c1916600185901b17855562000398565b600085815260208120601f198616915b828110156200043e578886015182559484019460019091019084016200041d565b50858210156200045d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e051611364620004bc60003960006102370152600081816102fa015281816105630152610623015260006104f701526000818161035f01526104c101526113646000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806370a08231116100d8578063a457c2d71161008c578063d505accf11610066578063d505accf14610381578063dd62ed3e14610394578063ffa1ad74146103cd57600080fd5b8063a457c2d714610334578063a9059cbb14610347578063cd0d00961461035a57600080fd5b806395d89b41116100bd57806395d89b41146102da5780639dc29fac146102e2578063a3c573eb146102f557600080fd5b806370a08231146102915780637ecebe00146102ba57600080fd5b806330adf81f1161012f5780633644e515116101145780633644e51514610261578063395093511461026957806340c10f191461027c57600080fd5b806330adf81f14610209578063313ce5671461023057600080fd5b806318160ddd1161016057806318160ddd146101bd57806320606b70146101cf57806323b872dd146101f657600080fd5b806306fdde031461017c578063095ea7b31461019a575b600080fd5b6101846103ed565b6040516101919190611107565b60405180910390f35b6101ad6101a8366004611171565b61047f565b6040519015158152602001610191565b6002545b604051908152602001610191565b6101c17f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6101ad61020436600461119b565b610499565b6101c17f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610191565b6101c16104bd565b6101ad610277366004611171565b610519565b61028f61028a366004611171565b610558565b005b6101c161029f3660046111d7565b6001600160a01b031660009081526020819052604090205490565b6101c16102c83660046111d7565b60056020526000908152604090205481565b610184610609565b61028f6102f0366004611171565b610618565b61031c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610191565b6101ad610342366004611171565b6106c0565b6101ad610355366004611171565b61076a565b6101c17f000000000000000000000000000000000000000000000000000000000000000081565b61028f61038f3660046111f9565b610778565b6101c16103a236600461126c565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610184604051806040016040528060018152602001603160f81b81525081565b6060600380546103fc9061129f565b80601f01602080910402602001604051908101604052809291908181526020018280546104289061129f565b80156104755780601f1061044a57610100808354040283529160200191610475565b820191906000526020600020905b81548152906001019060200180831161045857829003601f168201915b5050505050905090565b60003361048d8185856109fd565b60019150505b92915050565b6000336104a7858285610b56565b6104b2858585610be8565b506001949350505050565b60007f000000000000000000000000000000000000000000000000000000000000000046146104f4576104ef46610dff565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061048d90829086906105539087906112ef565b6109fd565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105fb5760405162461bcd60e51b815260206004820152603060248201527f546f6b656e577261707065643a3a6f6e6c794272696467653a204e6f7420506f60448201527f6c79676f6e5a6b45564d4272696467650000000000000000000000000000000060648201526084015b60405180910390fd5b6106058282610eab565b5050565b6060600480546103fc9061129f565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106b65760405162461bcd60e51b815260206004820152603060248201527f546f6b656e577261707065643a3a6f6e6c794272696467653a204e6f7420506f60448201527f6c79676f6e5a6b45564d4272696467650000000000000000000000000000000060648201526084016105f2565b6106058282610f8a565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091908381101561075d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016105f2565b6104b282868684036109fd565b60003361048d818585610be8565b834211156107ed5760405162461bcd60e51b8152602060048201526024808201527f546f6b656e577261707065643a3a7065726d69743a204578706972656420706560448201527f726d69740000000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b038716600090815260056020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918a918a918a91908661083a83611302565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006108986104bd565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101919091526042810183905260620160408051601f198184030181528282528051602091820120600080855291840180845281905260ff89169284019290925260608301879052608083018690529092509060019060a0016020604051602081039080840390855afa15801561093e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906109745750896001600160a01b0316816001600160a01b0316145b6109e65760405162461bcd60e51b815260206004820152602760248201527f546f6b656e577261707065643a3a7065726d69743a20496e76616c696420736960448201527f676e61747572650000000000000000000000000000000000000000000000000060648201526084016105f2565b6109f18a8a8a6109fd565b50505050505050505050565b6001600160a01b038316610a785760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b038216610af45760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610be25781811015610bd55760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105f2565b610be284848484036109fd565b50505050565b6001600160a01b038316610c645760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b038216610ce05760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b03831660009081526020819052604090205481811015610d6f5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610da69084906112ef565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610df291815260200190565b60405180910390a3610be2565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f610e2a6103ed565b805160209182012060408051808201825260018152603160f81b90840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b6001600160a01b038216610f015760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105f2565b8060026000828254610f1391906112ef565b90915550506001600160a01b03821660009081526020819052604081208054839290610f409084906112ef565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0382166110065760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b038216600090815260208190526040902054818110156110955760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016105f2565b6001600160a01b03831660009081526020819052604081208383039055600280548492906110c490849061131b565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610b49565b600060208083528351808285015260005b8181101561113457858101830151858201604001528201611118565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461116c57600080fd5b919050565b6000806040838503121561118457600080fd5b61118d83611155565b946020939093013593505050565b6000806000606084860312156111b057600080fd5b6111b984611155565b92506111c760208501611155565b9150604084013590509250925092565b6000602082840312156111e957600080fd5b6111f282611155565b9392505050565b600080600080600080600060e0888a03121561121457600080fd5b61121d88611155565b965061122b60208901611155565b95506040880135945060608801359350608088013560ff8116811461124f57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561127f57600080fd5b61128883611155565b915061129660208401611155565b90509250929050565b600181811c908216806112b357607f821691505b6020821081036112d357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610493576104936112d9565b600060018201611314576113146112d9565b5060010190565b81810381811115610493576104936112d956fea264697066735822122096b785fb92e9d4372a52fbc641ca1490dd9eca1990f97279973ebfb2e360d35264736f6c63430008110033a26469706673582212203e56a8c8e90f8393064aa68599de6b13ecf8da3fea75bef5ecea9d2366baca9264736f6c63430008110033", -} - -// PolygonzkevmbridgeABI is the input ABI used to generate the binding from. -// Deprecated: Use PolygonzkevmbridgeMetaData.ABI instead. -var PolygonzkevmbridgeABI = PolygonzkevmbridgeMetaData.ABI - -// PolygonzkevmbridgeBin is the compiled bytecode used for deploying new contracts. -// Deprecated: Use PolygonzkevmbridgeMetaData.Bin instead. -var PolygonzkevmbridgeBin = PolygonzkevmbridgeMetaData.Bin - -// DeployPolygonzkevmbridge deploys a new Ethereum contract, binding an instance of Polygonzkevmbridge to it. -func DeployPolygonzkevmbridge(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Polygonzkevmbridge, error) { - parsed, err := PolygonzkevmbridgeMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(PolygonzkevmbridgeBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Polygonzkevmbridge{PolygonzkevmbridgeCaller: PolygonzkevmbridgeCaller{contract: contract}, PolygonzkevmbridgeTransactor: PolygonzkevmbridgeTransactor{contract: contract}, PolygonzkevmbridgeFilterer: PolygonzkevmbridgeFilterer{contract: contract}}, nil -} - -// Polygonzkevmbridge is an auto generated Go binding around an Ethereum contract. -type Polygonzkevmbridge struct { - PolygonzkevmbridgeCaller // Read-only binding to the contract - PolygonzkevmbridgeTransactor // Write-only binding to the contract - PolygonzkevmbridgeFilterer // Log filterer for contract events -} - -// PolygonzkevmbridgeCaller is an auto generated read-only Go binding around an Ethereum contract. -type PolygonzkevmbridgeCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PolygonzkevmbridgeTransactor is an auto generated write-only Go binding around an Ethereum contract. -type PolygonzkevmbridgeTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PolygonzkevmbridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type PolygonzkevmbridgeFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PolygonzkevmbridgeSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type PolygonzkevmbridgeSession struct { - Contract *Polygonzkevmbridge // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// PolygonzkevmbridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type PolygonzkevmbridgeCallerSession struct { - Contract *PolygonzkevmbridgeCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// PolygonzkevmbridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type PolygonzkevmbridgeTransactorSession struct { - Contract *PolygonzkevmbridgeTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// PolygonzkevmbridgeRaw is an auto generated low-level Go binding around an Ethereum contract. -type PolygonzkevmbridgeRaw struct { - Contract *Polygonzkevmbridge // Generic contract binding to access the raw methods on -} - -// PolygonzkevmbridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type PolygonzkevmbridgeCallerRaw struct { - Contract *PolygonzkevmbridgeCaller // Generic read-only contract binding to access the raw methods on -} - -// PolygonzkevmbridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type PolygonzkevmbridgeTransactorRaw struct { - Contract *PolygonzkevmbridgeTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewPolygonzkevmbridge creates a new instance of Polygonzkevmbridge, bound to a specific deployed contract. -func NewPolygonzkevmbridge(address common.Address, backend bind.ContractBackend) (*Polygonzkevmbridge, error) { - contract, err := bindPolygonzkevmbridge(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Polygonzkevmbridge{PolygonzkevmbridgeCaller: PolygonzkevmbridgeCaller{contract: contract}, PolygonzkevmbridgeTransactor: PolygonzkevmbridgeTransactor{contract: contract}, PolygonzkevmbridgeFilterer: PolygonzkevmbridgeFilterer{contract: contract}}, nil -} - -// NewPolygonzkevmbridgeCaller creates a new read-only instance of Polygonzkevmbridge, bound to a specific deployed contract. -func NewPolygonzkevmbridgeCaller(address common.Address, caller bind.ContractCaller) (*PolygonzkevmbridgeCaller, error) { - contract, err := bindPolygonzkevmbridge(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &PolygonzkevmbridgeCaller{contract: contract}, nil -} - -// NewPolygonzkevmbridgeTransactor creates a new write-only instance of Polygonzkevmbridge, bound to a specific deployed contract. -func NewPolygonzkevmbridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*PolygonzkevmbridgeTransactor, error) { - contract, err := bindPolygonzkevmbridge(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &PolygonzkevmbridgeTransactor{contract: contract}, nil -} - -// NewPolygonzkevmbridgeFilterer creates a new log filterer instance of Polygonzkevmbridge, bound to a specific deployed contract. -func NewPolygonzkevmbridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*PolygonzkevmbridgeFilterer, error) { - contract, err := bindPolygonzkevmbridge(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &PolygonzkevmbridgeFilterer{contract: contract}, nil -} - -// bindPolygonzkevmbridge binds a generic wrapper to an already deployed contract. -func bindPolygonzkevmbridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := PolygonzkevmbridgeMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_Polygonzkevmbridge *PolygonzkevmbridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Polygonzkevmbridge.Contract.PolygonzkevmbridgeCaller.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_Polygonzkevmbridge *PolygonzkevmbridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.PolygonzkevmbridgeTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Polygonzkevmbridge *PolygonzkevmbridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.PolygonzkevmbridgeTransactor.contract.Transact(opts, method, params...) -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Polygonzkevmbridge.Contract.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.contract.Transact(opts, method, params...) -} - -// ClaimedBitMap is a free data retrieval call binding the contract method 0xee25560b. -// -// Solidity: function claimedBitMap(uint256 ) view returns(uint256) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) ClaimedBitMap(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "claimedBitMap", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// ClaimedBitMap is a free data retrieval call binding the contract method 0xee25560b. -// -// Solidity: function claimedBitMap(uint256 ) view returns(uint256) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) ClaimedBitMap(arg0 *big.Int) (*big.Int, error) { - return _Polygonzkevmbridge.Contract.ClaimedBitMap(&_Polygonzkevmbridge.CallOpts, arg0) -} - -// ClaimedBitMap is a free data retrieval call binding the contract method 0xee25560b. -// -// Solidity: function claimedBitMap(uint256 ) view returns(uint256) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) ClaimedBitMap(arg0 *big.Int) (*big.Int, error) { - return _Polygonzkevmbridge.Contract.ClaimedBitMap(&_Polygonzkevmbridge.CallOpts, arg0) -} - -// DepositCount is a free data retrieval call binding the contract method 0x2dfdf0b5. -// -// Solidity: function depositCount() view returns(uint256) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) DepositCount(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "depositCount") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// DepositCount is a free data retrieval call binding the contract method 0x2dfdf0b5. -// -// Solidity: function depositCount() view returns(uint256) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) DepositCount() (*big.Int, error) { - return _Polygonzkevmbridge.Contract.DepositCount(&_Polygonzkevmbridge.CallOpts) -} - -// DepositCount is a free data retrieval call binding the contract method 0x2dfdf0b5. -// -// Solidity: function depositCount() view returns(uint256) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) DepositCount() (*big.Int, error) { - return _Polygonzkevmbridge.Contract.DepositCount(&_Polygonzkevmbridge.CallOpts) -} - -// GetDepositRoot is a free data retrieval call binding the contract method 0x3ae05047. -// -// Solidity: function getDepositRoot() view returns(bytes32) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) GetDepositRoot(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "getDepositRoot") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// GetDepositRoot is a free data retrieval call binding the contract method 0x3ae05047. -// -// Solidity: function getDepositRoot() view returns(bytes32) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) GetDepositRoot() ([32]byte, error) { - return _Polygonzkevmbridge.Contract.GetDepositRoot(&_Polygonzkevmbridge.CallOpts) -} - -// GetDepositRoot is a free data retrieval call binding the contract method 0x3ae05047. -// -// Solidity: function getDepositRoot() view returns(bytes32) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) GetDepositRoot() ([32]byte, error) { - return _Polygonzkevmbridge.Contract.GetDepositRoot(&_Polygonzkevmbridge.CallOpts) -} - -// GetLeafValue is a free data retrieval call binding the contract method 0x3e197043. -// -// Solidity: function getLeafValue(uint8 leafType, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes32 metadataHash) pure returns(bytes32) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) GetLeafValue(opts *bind.CallOpts, leafType uint8, originNetwork uint32, originAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadataHash [32]byte) ([32]byte, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "getLeafValue", leafType, originNetwork, originAddress, destinationNetwork, destinationAddress, amount, metadataHash) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// GetLeafValue is a free data retrieval call binding the contract method 0x3e197043. -// -// Solidity: function getLeafValue(uint8 leafType, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes32 metadataHash) pure returns(bytes32) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) GetLeafValue(leafType uint8, originNetwork uint32, originAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadataHash [32]byte) ([32]byte, error) { - return _Polygonzkevmbridge.Contract.GetLeafValue(&_Polygonzkevmbridge.CallOpts, leafType, originNetwork, originAddress, destinationNetwork, destinationAddress, amount, metadataHash) -} - -// GetLeafValue is a free data retrieval call binding the contract method 0x3e197043. -// -// Solidity: function getLeafValue(uint8 leafType, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes32 metadataHash) pure returns(bytes32) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) GetLeafValue(leafType uint8, originNetwork uint32, originAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadataHash [32]byte) ([32]byte, error) { - return _Polygonzkevmbridge.Contract.GetLeafValue(&_Polygonzkevmbridge.CallOpts, leafType, originNetwork, originAddress, destinationNetwork, destinationAddress, amount, metadataHash) -} - -// GetTokenWrappedAddress is a free data retrieval call binding the contract method 0x22e95f2c. -// -// Solidity: function getTokenWrappedAddress(uint32 originNetwork, address originTokenAddress) view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) GetTokenWrappedAddress(opts *bind.CallOpts, originNetwork uint32, originTokenAddress common.Address) (common.Address, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "getTokenWrappedAddress", originNetwork, originTokenAddress) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetTokenWrappedAddress is a free data retrieval call binding the contract method 0x22e95f2c. -// -// Solidity: function getTokenWrappedAddress(uint32 originNetwork, address originTokenAddress) view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) GetTokenWrappedAddress(originNetwork uint32, originTokenAddress common.Address) (common.Address, error) { - return _Polygonzkevmbridge.Contract.GetTokenWrappedAddress(&_Polygonzkevmbridge.CallOpts, originNetwork, originTokenAddress) -} - -// GetTokenWrappedAddress is a free data retrieval call binding the contract method 0x22e95f2c. -// -// Solidity: function getTokenWrappedAddress(uint32 originNetwork, address originTokenAddress) view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) GetTokenWrappedAddress(originNetwork uint32, originTokenAddress common.Address) (common.Address, error) { - return _Polygonzkevmbridge.Contract.GetTokenWrappedAddress(&_Polygonzkevmbridge.CallOpts, originNetwork, originTokenAddress) -} - -// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. -// -// Solidity: function globalExitRootManager() view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) GlobalExitRootManager(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "globalExitRootManager") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. -// -// Solidity: function globalExitRootManager() view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) GlobalExitRootManager() (common.Address, error) { - return _Polygonzkevmbridge.Contract.GlobalExitRootManager(&_Polygonzkevmbridge.CallOpts) -} - -// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. -// -// Solidity: function globalExitRootManager() view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) GlobalExitRootManager() (common.Address, error) { - return _Polygonzkevmbridge.Contract.GlobalExitRootManager(&_Polygonzkevmbridge.CallOpts) -} - -// IsClaimed is a free data retrieval call binding the contract method 0x9e34070f. -// -// Solidity: function isClaimed(uint256 index) view returns(bool) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) IsClaimed(opts *bind.CallOpts, index *big.Int) (bool, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "isClaimed", index) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsClaimed is a free data retrieval call binding the contract method 0x9e34070f. -// -// Solidity: function isClaimed(uint256 index) view returns(bool) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) IsClaimed(index *big.Int) (bool, error) { - return _Polygonzkevmbridge.Contract.IsClaimed(&_Polygonzkevmbridge.CallOpts, index) -} - -// IsClaimed is a free data retrieval call binding the contract method 0x9e34070f. -// -// Solidity: function isClaimed(uint256 index) view returns(bool) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) IsClaimed(index *big.Int) (bool, error) { - return _Polygonzkevmbridge.Contract.IsClaimed(&_Polygonzkevmbridge.CallOpts, index) -} - -// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. -// -// Solidity: function isEmergencyState() view returns(bool) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) IsEmergencyState(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "isEmergencyState") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. -// -// Solidity: function isEmergencyState() view returns(bool) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) IsEmergencyState() (bool, error) { - return _Polygonzkevmbridge.Contract.IsEmergencyState(&_Polygonzkevmbridge.CallOpts) -} - -// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. -// -// Solidity: function isEmergencyState() view returns(bool) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) IsEmergencyState() (bool, error) { - return _Polygonzkevmbridge.Contract.IsEmergencyState(&_Polygonzkevmbridge.CallOpts) -} - -// LastUpdatedDepositCount is a free data retrieval call binding the contract method 0xbe5831c7. -// -// Solidity: function lastUpdatedDepositCount() view returns(uint32) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) LastUpdatedDepositCount(opts *bind.CallOpts) (uint32, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "lastUpdatedDepositCount") - - if err != nil { - return *new(uint32), err - } - - out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) - - return out0, err - -} - -// LastUpdatedDepositCount is a free data retrieval call binding the contract method 0xbe5831c7. -// -// Solidity: function lastUpdatedDepositCount() view returns(uint32) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) LastUpdatedDepositCount() (uint32, error) { - return _Polygonzkevmbridge.Contract.LastUpdatedDepositCount(&_Polygonzkevmbridge.CallOpts) -} - -// LastUpdatedDepositCount is a free data retrieval call binding the contract method 0xbe5831c7. -// -// Solidity: function lastUpdatedDepositCount() view returns(uint32) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) LastUpdatedDepositCount() (uint32, error) { - return _Polygonzkevmbridge.Contract.LastUpdatedDepositCount(&_Polygonzkevmbridge.CallOpts) -} - -// NetworkID is a free data retrieval call binding the contract method 0xbab161bf. -// -// Solidity: function networkID() view returns(uint32) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) NetworkID(opts *bind.CallOpts) (uint32, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "networkID") - - if err != nil { - return *new(uint32), err - } - - out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) - - return out0, err - -} - -// NetworkID is a free data retrieval call binding the contract method 0xbab161bf. -// -// Solidity: function networkID() view returns(uint32) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) NetworkID() (uint32, error) { - return _Polygonzkevmbridge.Contract.NetworkID(&_Polygonzkevmbridge.CallOpts) -} - -// NetworkID is a free data retrieval call binding the contract method 0xbab161bf. -// -// Solidity: function networkID() view returns(uint32) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) NetworkID() (uint32, error) { - return _Polygonzkevmbridge.Contract.NetworkID(&_Polygonzkevmbridge.CallOpts) -} - -// PolygonZkEVMaddress is a free data retrieval call binding the contract method 0x34ac9cf2. -// -// Solidity: function polygonZkEVMaddress() view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) PolygonZkEVMaddress(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "polygonZkEVMaddress") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// PolygonZkEVMaddress is a free data retrieval call binding the contract method 0x34ac9cf2. -// -// Solidity: function polygonZkEVMaddress() view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) PolygonZkEVMaddress() (common.Address, error) { - return _Polygonzkevmbridge.Contract.PolygonZkEVMaddress(&_Polygonzkevmbridge.CallOpts) -} - -// PolygonZkEVMaddress is a free data retrieval call binding the contract method 0x34ac9cf2. -// -// Solidity: function polygonZkEVMaddress() view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) PolygonZkEVMaddress() (common.Address, error) { - return _Polygonzkevmbridge.Contract.PolygonZkEVMaddress(&_Polygonzkevmbridge.CallOpts) -} - -// PrecalculatedWrapperAddress is a free data retrieval call binding the contract method 0xaaa13cc2. -// -// Solidity: function precalculatedWrapperAddress(uint32 originNetwork, address originTokenAddress, string name, string symbol, uint8 decimals) view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) PrecalculatedWrapperAddress(opts *bind.CallOpts, originNetwork uint32, originTokenAddress common.Address, name string, symbol string, decimals uint8) (common.Address, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "precalculatedWrapperAddress", originNetwork, originTokenAddress, name, symbol, decimals) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// PrecalculatedWrapperAddress is a free data retrieval call binding the contract method 0xaaa13cc2. -// -// Solidity: function precalculatedWrapperAddress(uint32 originNetwork, address originTokenAddress, string name, string symbol, uint8 decimals) view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) PrecalculatedWrapperAddress(originNetwork uint32, originTokenAddress common.Address, name string, symbol string, decimals uint8) (common.Address, error) { - return _Polygonzkevmbridge.Contract.PrecalculatedWrapperAddress(&_Polygonzkevmbridge.CallOpts, originNetwork, originTokenAddress, name, symbol, decimals) -} - -// PrecalculatedWrapperAddress is a free data retrieval call binding the contract method 0xaaa13cc2. -// -// Solidity: function precalculatedWrapperAddress(uint32 originNetwork, address originTokenAddress, string name, string symbol, uint8 decimals) view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) PrecalculatedWrapperAddress(originNetwork uint32, originTokenAddress common.Address, name string, symbol string, decimals uint8) (common.Address, error) { - return _Polygonzkevmbridge.Contract.PrecalculatedWrapperAddress(&_Polygonzkevmbridge.CallOpts, originNetwork, originTokenAddress, name, symbol, decimals) -} - -// TokenInfoToWrappedToken is a free data retrieval call binding the contract method 0x81b1c174. -// -// Solidity: function tokenInfoToWrappedToken(bytes32 ) view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) TokenInfoToWrappedToken(opts *bind.CallOpts, arg0 [32]byte) (common.Address, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "tokenInfoToWrappedToken", arg0) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// TokenInfoToWrappedToken is a free data retrieval call binding the contract method 0x81b1c174. -// -// Solidity: function tokenInfoToWrappedToken(bytes32 ) view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) TokenInfoToWrappedToken(arg0 [32]byte) (common.Address, error) { - return _Polygonzkevmbridge.Contract.TokenInfoToWrappedToken(&_Polygonzkevmbridge.CallOpts, arg0) -} - -// TokenInfoToWrappedToken is a free data retrieval call binding the contract method 0x81b1c174. -// -// Solidity: function tokenInfoToWrappedToken(bytes32 ) view returns(address) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) TokenInfoToWrappedToken(arg0 [32]byte) (common.Address, error) { - return _Polygonzkevmbridge.Contract.TokenInfoToWrappedToken(&_Polygonzkevmbridge.CallOpts, arg0) -} - -// VerifyMerkleProof is a free data retrieval call binding the contract method 0xfb570834. -// -// Solidity: function verifyMerkleProof(bytes32 leafHash, bytes32[32] smtProof, uint32 index, bytes32 root) pure returns(bool) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) VerifyMerkleProof(opts *bind.CallOpts, leafHash [32]byte, smtProof [32][32]byte, index uint32, root [32]byte) (bool, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "verifyMerkleProof", leafHash, smtProof, index, root) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// VerifyMerkleProof is a free data retrieval call binding the contract method 0xfb570834. -// -// Solidity: function verifyMerkleProof(bytes32 leafHash, bytes32[32] smtProof, uint32 index, bytes32 root) pure returns(bool) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) VerifyMerkleProof(leafHash [32]byte, smtProof [32][32]byte, index uint32, root [32]byte) (bool, error) { - return _Polygonzkevmbridge.Contract.VerifyMerkleProof(&_Polygonzkevmbridge.CallOpts, leafHash, smtProof, index, root) -} - -// VerifyMerkleProof is a free data retrieval call binding the contract method 0xfb570834. -// -// Solidity: function verifyMerkleProof(bytes32 leafHash, bytes32[32] smtProof, uint32 index, bytes32 root) pure returns(bool) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) VerifyMerkleProof(leafHash [32]byte, smtProof [32][32]byte, index uint32, root [32]byte) (bool, error) { - return _Polygonzkevmbridge.Contract.VerifyMerkleProof(&_Polygonzkevmbridge.CallOpts, leafHash, smtProof, index, root) -} - -// WrappedTokenToTokenInfo is a free data retrieval call binding the contract method 0x318aee3d. -// -// Solidity: function wrappedTokenToTokenInfo(address ) view returns(uint32 originNetwork, address originTokenAddress) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCaller) WrappedTokenToTokenInfo(opts *bind.CallOpts, arg0 common.Address) (struct { - OriginNetwork uint32 - OriginTokenAddress common.Address -}, error) { - var out []interface{} - err := _Polygonzkevmbridge.contract.Call(opts, &out, "wrappedTokenToTokenInfo", arg0) - - outstruct := new(struct { - OriginNetwork uint32 - OriginTokenAddress common.Address - }) - if err != nil { - return *outstruct, err - } - - outstruct.OriginNetwork = *abi.ConvertType(out[0], new(uint32)).(*uint32) - outstruct.OriginTokenAddress = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) - - return *outstruct, err - -} - -// WrappedTokenToTokenInfo is a free data retrieval call binding the contract method 0x318aee3d. -// -// Solidity: function wrappedTokenToTokenInfo(address ) view returns(uint32 originNetwork, address originTokenAddress) -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) WrappedTokenToTokenInfo(arg0 common.Address) (struct { - OriginNetwork uint32 - OriginTokenAddress common.Address -}, error) { - return _Polygonzkevmbridge.Contract.WrappedTokenToTokenInfo(&_Polygonzkevmbridge.CallOpts, arg0) -} - -// WrappedTokenToTokenInfo is a free data retrieval call binding the contract method 0x318aee3d. -// -// Solidity: function wrappedTokenToTokenInfo(address ) view returns(uint32 originNetwork, address originTokenAddress) -func (_Polygonzkevmbridge *PolygonzkevmbridgeCallerSession) WrappedTokenToTokenInfo(arg0 common.Address) (struct { - OriginNetwork uint32 - OriginTokenAddress common.Address -}, error) { - return _Polygonzkevmbridge.Contract.WrappedTokenToTokenInfo(&_Polygonzkevmbridge.CallOpts, arg0) -} - -// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x2072f6c5. -// -// Solidity: function activateEmergencyState() returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactor) ActivateEmergencyState(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevmbridge.contract.Transact(opts, "activateEmergencyState") -} - -// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x2072f6c5. -// -// Solidity: function activateEmergencyState() returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) ActivateEmergencyState() (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.ActivateEmergencyState(&_Polygonzkevmbridge.TransactOpts) -} - -// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x2072f6c5. -// -// Solidity: function activateEmergencyState() returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactorSession) ActivateEmergencyState() (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.ActivateEmergencyState(&_Polygonzkevmbridge.TransactOpts) -} - -// BridgeAsset is a paid mutator transaction binding the contract method 0xcd586579. -// -// Solidity: function bridgeAsset(uint32 destinationNetwork, address destinationAddress, uint256 amount, address token, bool forceUpdateGlobalExitRoot, bytes permitData) payable returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactor) BridgeAsset(opts *bind.TransactOpts, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, token common.Address, forceUpdateGlobalExitRoot bool, permitData []byte) (*types.Transaction, error) { - return _Polygonzkevmbridge.contract.Transact(opts, "bridgeAsset", destinationNetwork, destinationAddress, amount, token, forceUpdateGlobalExitRoot, permitData) -} - -// BridgeAsset is a paid mutator transaction binding the contract method 0xcd586579. -// -// Solidity: function bridgeAsset(uint32 destinationNetwork, address destinationAddress, uint256 amount, address token, bool forceUpdateGlobalExitRoot, bytes permitData) payable returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) BridgeAsset(destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, token common.Address, forceUpdateGlobalExitRoot bool, permitData []byte) (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.BridgeAsset(&_Polygonzkevmbridge.TransactOpts, destinationNetwork, destinationAddress, amount, token, forceUpdateGlobalExitRoot, permitData) -} - -// BridgeAsset is a paid mutator transaction binding the contract method 0xcd586579. -// -// Solidity: function bridgeAsset(uint32 destinationNetwork, address destinationAddress, uint256 amount, address token, bool forceUpdateGlobalExitRoot, bytes permitData) payable returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactorSession) BridgeAsset(destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, token common.Address, forceUpdateGlobalExitRoot bool, permitData []byte) (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.BridgeAsset(&_Polygonzkevmbridge.TransactOpts, destinationNetwork, destinationAddress, amount, token, forceUpdateGlobalExitRoot, permitData) -} - -// BridgeMessage is a paid mutator transaction binding the contract method 0x240ff378. -// -// Solidity: function bridgeMessage(uint32 destinationNetwork, address destinationAddress, bool forceUpdateGlobalExitRoot, bytes metadata) payable returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactor) BridgeMessage(opts *bind.TransactOpts, destinationNetwork uint32, destinationAddress common.Address, forceUpdateGlobalExitRoot bool, metadata []byte) (*types.Transaction, error) { - return _Polygonzkevmbridge.contract.Transact(opts, "bridgeMessage", destinationNetwork, destinationAddress, forceUpdateGlobalExitRoot, metadata) -} - -// BridgeMessage is a paid mutator transaction binding the contract method 0x240ff378. -// -// Solidity: function bridgeMessage(uint32 destinationNetwork, address destinationAddress, bool forceUpdateGlobalExitRoot, bytes metadata) payable returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) BridgeMessage(destinationNetwork uint32, destinationAddress common.Address, forceUpdateGlobalExitRoot bool, metadata []byte) (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.BridgeMessage(&_Polygonzkevmbridge.TransactOpts, destinationNetwork, destinationAddress, forceUpdateGlobalExitRoot, metadata) -} - -// BridgeMessage is a paid mutator transaction binding the contract method 0x240ff378. -// -// Solidity: function bridgeMessage(uint32 destinationNetwork, address destinationAddress, bool forceUpdateGlobalExitRoot, bytes metadata) payable returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactorSession) BridgeMessage(destinationNetwork uint32, destinationAddress common.Address, forceUpdateGlobalExitRoot bool, metadata []byte) (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.BridgeMessage(&_Polygonzkevmbridge.TransactOpts, destinationNetwork, destinationAddress, forceUpdateGlobalExitRoot, metadata) -} - -// ClaimAsset is a paid mutator transaction binding the contract method 0x2cffd02e. -// -// Solidity: function claimAsset(bytes32[32] smtProof, uint32 index, bytes32 mainnetExitRoot, bytes32 rollupExitRoot, uint32 originNetwork, address originTokenAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata) returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactor) ClaimAsset(opts *bind.TransactOpts, smtProof [32][32]byte, index uint32, mainnetExitRoot [32]byte, rollupExitRoot [32]byte, originNetwork uint32, originTokenAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadata []byte) (*types.Transaction, error) { - return _Polygonzkevmbridge.contract.Transact(opts, "claimAsset", smtProof, index, mainnetExitRoot, rollupExitRoot, originNetwork, originTokenAddress, destinationNetwork, destinationAddress, amount, metadata) -} - -// ClaimAsset is a paid mutator transaction binding the contract method 0x2cffd02e. -// -// Solidity: function claimAsset(bytes32[32] smtProof, uint32 index, bytes32 mainnetExitRoot, bytes32 rollupExitRoot, uint32 originNetwork, address originTokenAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata) returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) ClaimAsset(smtProof [32][32]byte, index uint32, mainnetExitRoot [32]byte, rollupExitRoot [32]byte, originNetwork uint32, originTokenAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadata []byte) (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.ClaimAsset(&_Polygonzkevmbridge.TransactOpts, smtProof, index, mainnetExitRoot, rollupExitRoot, originNetwork, originTokenAddress, destinationNetwork, destinationAddress, amount, metadata) -} - -// ClaimAsset is a paid mutator transaction binding the contract method 0x2cffd02e. -// -// Solidity: function claimAsset(bytes32[32] smtProof, uint32 index, bytes32 mainnetExitRoot, bytes32 rollupExitRoot, uint32 originNetwork, address originTokenAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata) returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactorSession) ClaimAsset(smtProof [32][32]byte, index uint32, mainnetExitRoot [32]byte, rollupExitRoot [32]byte, originNetwork uint32, originTokenAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadata []byte) (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.ClaimAsset(&_Polygonzkevmbridge.TransactOpts, smtProof, index, mainnetExitRoot, rollupExitRoot, originNetwork, originTokenAddress, destinationNetwork, destinationAddress, amount, metadata) -} - -// ClaimMessage is a paid mutator transaction binding the contract method 0x2d2c9d94. -// -// Solidity: function claimMessage(bytes32[32] smtProof, uint32 index, bytes32 mainnetExitRoot, bytes32 rollupExitRoot, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata) returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactor) ClaimMessage(opts *bind.TransactOpts, smtProof [32][32]byte, index uint32, mainnetExitRoot [32]byte, rollupExitRoot [32]byte, originNetwork uint32, originAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadata []byte) (*types.Transaction, error) { - return _Polygonzkevmbridge.contract.Transact(opts, "claimMessage", smtProof, index, mainnetExitRoot, rollupExitRoot, originNetwork, originAddress, destinationNetwork, destinationAddress, amount, metadata) -} - -// ClaimMessage is a paid mutator transaction binding the contract method 0x2d2c9d94. -// -// Solidity: function claimMessage(bytes32[32] smtProof, uint32 index, bytes32 mainnetExitRoot, bytes32 rollupExitRoot, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata) returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) ClaimMessage(smtProof [32][32]byte, index uint32, mainnetExitRoot [32]byte, rollupExitRoot [32]byte, originNetwork uint32, originAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadata []byte) (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.ClaimMessage(&_Polygonzkevmbridge.TransactOpts, smtProof, index, mainnetExitRoot, rollupExitRoot, originNetwork, originAddress, destinationNetwork, destinationAddress, amount, metadata) -} - -// ClaimMessage is a paid mutator transaction binding the contract method 0x2d2c9d94. -// -// Solidity: function claimMessage(bytes32[32] smtProof, uint32 index, bytes32 mainnetExitRoot, bytes32 rollupExitRoot, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata) returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactorSession) ClaimMessage(smtProof [32][32]byte, index uint32, mainnetExitRoot [32]byte, rollupExitRoot [32]byte, originNetwork uint32, originAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadata []byte) (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.ClaimMessage(&_Polygonzkevmbridge.TransactOpts, smtProof, index, mainnetExitRoot, rollupExitRoot, originNetwork, originAddress, destinationNetwork, destinationAddress, amount, metadata) -} - -// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. -// -// Solidity: function deactivateEmergencyState() returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactor) DeactivateEmergencyState(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevmbridge.contract.Transact(opts, "deactivateEmergencyState") -} - -// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. -// -// Solidity: function deactivateEmergencyState() returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) DeactivateEmergencyState() (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.DeactivateEmergencyState(&_Polygonzkevmbridge.TransactOpts) -} - -// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. -// -// Solidity: function deactivateEmergencyState() returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactorSession) DeactivateEmergencyState() (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.DeactivateEmergencyState(&_Polygonzkevmbridge.TransactOpts) -} - -// Initialize is a paid mutator transaction binding the contract method 0x647c576c. -// -// Solidity: function initialize(uint32 _networkID, address _globalExitRootManager, address _polygonZkEVMaddress) returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactor) Initialize(opts *bind.TransactOpts, _networkID uint32, _globalExitRootManager common.Address, _polygonZkEVMaddress common.Address) (*types.Transaction, error) { - return _Polygonzkevmbridge.contract.Transact(opts, "initialize", _networkID, _globalExitRootManager, _polygonZkEVMaddress) -} - -// Initialize is a paid mutator transaction binding the contract method 0x647c576c. -// -// Solidity: function initialize(uint32 _networkID, address _globalExitRootManager, address _polygonZkEVMaddress) returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) Initialize(_networkID uint32, _globalExitRootManager common.Address, _polygonZkEVMaddress common.Address) (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.Initialize(&_Polygonzkevmbridge.TransactOpts, _networkID, _globalExitRootManager, _polygonZkEVMaddress) -} - -// Initialize is a paid mutator transaction binding the contract method 0x647c576c. -// -// Solidity: function initialize(uint32 _networkID, address _globalExitRootManager, address _polygonZkEVMaddress) returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactorSession) Initialize(_networkID uint32, _globalExitRootManager common.Address, _polygonZkEVMaddress common.Address) (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.Initialize(&_Polygonzkevmbridge.TransactOpts, _networkID, _globalExitRootManager, _polygonZkEVMaddress) -} - -// UpdateGlobalExitRoot is a paid mutator transaction binding the contract method 0x79e2cf97. -// -// Solidity: function updateGlobalExitRoot() returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactor) UpdateGlobalExitRoot(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevmbridge.contract.Transact(opts, "updateGlobalExitRoot") -} - -// UpdateGlobalExitRoot is a paid mutator transaction binding the contract method 0x79e2cf97. -// -// Solidity: function updateGlobalExitRoot() returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeSession) UpdateGlobalExitRoot() (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.UpdateGlobalExitRoot(&_Polygonzkevmbridge.TransactOpts) -} - -// UpdateGlobalExitRoot is a paid mutator transaction binding the contract method 0x79e2cf97. -// -// Solidity: function updateGlobalExitRoot() returns() -func (_Polygonzkevmbridge *PolygonzkevmbridgeTransactorSession) UpdateGlobalExitRoot() (*types.Transaction, error) { - return _Polygonzkevmbridge.Contract.UpdateGlobalExitRoot(&_Polygonzkevmbridge.TransactOpts) -} - -// PolygonzkevmbridgeBridgeEventIterator is returned from FilterBridgeEvent and is used to iterate over the raw logs and unpacked data for BridgeEvent events raised by the Polygonzkevmbridge contract. -type PolygonzkevmbridgeBridgeEventIterator struct { - Event *PolygonzkevmbridgeBridgeEvent // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmbridgeBridgeEventIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmbridgeBridgeEvent) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmbridgeBridgeEvent) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmbridgeBridgeEventIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmbridgeBridgeEventIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmbridgeBridgeEvent represents a BridgeEvent event raised by the Polygonzkevmbridge contract. -type PolygonzkevmbridgeBridgeEvent struct { - LeafType uint8 - OriginNetwork uint32 - OriginAddress common.Address - DestinationNetwork uint32 - DestinationAddress common.Address - Amount *big.Int - Metadata []byte - DepositCount uint32 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBridgeEvent is a free log retrieval operation binding the contract event 0x501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b. -// -// Solidity: event BridgeEvent(uint8 leafType, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata, uint32 depositCount) -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) FilterBridgeEvent(opts *bind.FilterOpts) (*PolygonzkevmbridgeBridgeEventIterator, error) { - - logs, sub, err := _Polygonzkevmbridge.contract.FilterLogs(opts, "BridgeEvent") - if err != nil { - return nil, err - } - return &PolygonzkevmbridgeBridgeEventIterator{contract: _Polygonzkevmbridge.contract, event: "BridgeEvent", logs: logs, sub: sub}, nil -} - -// WatchBridgeEvent is a free log subscription operation binding the contract event 0x501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b. -// -// Solidity: event BridgeEvent(uint8 leafType, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata, uint32 depositCount) -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) WatchBridgeEvent(opts *bind.WatchOpts, sink chan<- *PolygonzkevmbridgeBridgeEvent) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevmbridge.contract.WatchLogs(opts, "BridgeEvent") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmbridgeBridgeEvent) - if err := _Polygonzkevmbridge.contract.UnpackLog(event, "BridgeEvent", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseBridgeEvent is a log parse operation binding the contract event 0x501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b. -// -// Solidity: event BridgeEvent(uint8 leafType, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata, uint32 depositCount) -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) ParseBridgeEvent(log types.Log) (*PolygonzkevmbridgeBridgeEvent, error) { - event := new(PolygonzkevmbridgeBridgeEvent) - if err := _Polygonzkevmbridge.contract.UnpackLog(event, "BridgeEvent", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmbridgeClaimEventIterator is returned from FilterClaimEvent and is used to iterate over the raw logs and unpacked data for ClaimEvent events raised by the Polygonzkevmbridge contract. -type PolygonzkevmbridgeClaimEventIterator struct { - Event *PolygonzkevmbridgeClaimEvent // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmbridgeClaimEventIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmbridgeClaimEvent) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmbridgeClaimEvent) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmbridgeClaimEventIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmbridgeClaimEventIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmbridgeClaimEvent represents a ClaimEvent event raised by the Polygonzkevmbridge contract. -type PolygonzkevmbridgeClaimEvent struct { - Index uint32 - OriginNetwork uint32 - OriginAddress common.Address - DestinationAddress common.Address - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterClaimEvent is a free log retrieval operation binding the contract event 0x25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe27545983. -// -// Solidity: event ClaimEvent(uint32 index, uint32 originNetwork, address originAddress, address destinationAddress, uint256 amount) -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) FilterClaimEvent(opts *bind.FilterOpts) (*PolygonzkevmbridgeClaimEventIterator, error) { - - logs, sub, err := _Polygonzkevmbridge.contract.FilterLogs(opts, "ClaimEvent") - if err != nil { - return nil, err - } - return &PolygonzkevmbridgeClaimEventIterator{contract: _Polygonzkevmbridge.contract, event: "ClaimEvent", logs: logs, sub: sub}, nil -} - -// WatchClaimEvent is a free log subscription operation binding the contract event 0x25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe27545983. -// -// Solidity: event ClaimEvent(uint32 index, uint32 originNetwork, address originAddress, address destinationAddress, uint256 amount) -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) WatchClaimEvent(opts *bind.WatchOpts, sink chan<- *PolygonzkevmbridgeClaimEvent) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevmbridge.contract.WatchLogs(opts, "ClaimEvent") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmbridgeClaimEvent) - if err := _Polygonzkevmbridge.contract.UnpackLog(event, "ClaimEvent", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseClaimEvent is a log parse operation binding the contract event 0x25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe27545983. -// -// Solidity: event ClaimEvent(uint32 index, uint32 originNetwork, address originAddress, address destinationAddress, uint256 amount) -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) ParseClaimEvent(log types.Log) (*PolygonzkevmbridgeClaimEvent, error) { - event := new(PolygonzkevmbridgeClaimEvent) - if err := _Polygonzkevmbridge.contract.UnpackLog(event, "ClaimEvent", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmbridgeEmergencyStateActivatedIterator is returned from FilterEmergencyStateActivated and is used to iterate over the raw logs and unpacked data for EmergencyStateActivated events raised by the Polygonzkevmbridge contract. -type PolygonzkevmbridgeEmergencyStateActivatedIterator struct { - Event *PolygonzkevmbridgeEmergencyStateActivated // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmbridgeEmergencyStateActivatedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmbridgeEmergencyStateActivated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmbridgeEmergencyStateActivated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmbridgeEmergencyStateActivatedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmbridgeEmergencyStateActivatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmbridgeEmergencyStateActivated represents a EmergencyStateActivated event raised by the Polygonzkevmbridge contract. -type PolygonzkevmbridgeEmergencyStateActivated struct { - Raw types.Log // Blockchain specific contextual infos -} - -// FilterEmergencyStateActivated is a free log retrieval operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. -// -// Solidity: event EmergencyStateActivated() -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) FilterEmergencyStateActivated(opts *bind.FilterOpts) (*PolygonzkevmbridgeEmergencyStateActivatedIterator, error) { - - logs, sub, err := _Polygonzkevmbridge.contract.FilterLogs(opts, "EmergencyStateActivated") - if err != nil { - return nil, err - } - return &PolygonzkevmbridgeEmergencyStateActivatedIterator{contract: _Polygonzkevmbridge.contract, event: "EmergencyStateActivated", logs: logs, sub: sub}, nil -} - -// WatchEmergencyStateActivated is a free log subscription operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. -// -// Solidity: event EmergencyStateActivated() -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) WatchEmergencyStateActivated(opts *bind.WatchOpts, sink chan<- *PolygonzkevmbridgeEmergencyStateActivated) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevmbridge.contract.WatchLogs(opts, "EmergencyStateActivated") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmbridgeEmergencyStateActivated) - if err := _Polygonzkevmbridge.contract.UnpackLog(event, "EmergencyStateActivated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseEmergencyStateActivated is a log parse operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. -// -// Solidity: event EmergencyStateActivated() -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) ParseEmergencyStateActivated(log types.Log) (*PolygonzkevmbridgeEmergencyStateActivated, error) { - event := new(PolygonzkevmbridgeEmergencyStateActivated) - if err := _Polygonzkevmbridge.contract.UnpackLog(event, "EmergencyStateActivated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmbridgeEmergencyStateDeactivatedIterator is returned from FilterEmergencyStateDeactivated and is used to iterate over the raw logs and unpacked data for EmergencyStateDeactivated events raised by the Polygonzkevmbridge contract. -type PolygonzkevmbridgeEmergencyStateDeactivatedIterator struct { - Event *PolygonzkevmbridgeEmergencyStateDeactivated // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmbridgeEmergencyStateDeactivatedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmbridgeEmergencyStateDeactivated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmbridgeEmergencyStateDeactivated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmbridgeEmergencyStateDeactivatedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmbridgeEmergencyStateDeactivatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmbridgeEmergencyStateDeactivated represents a EmergencyStateDeactivated event raised by the Polygonzkevmbridge contract. -type PolygonzkevmbridgeEmergencyStateDeactivated struct { - Raw types.Log // Blockchain specific contextual infos -} - -// FilterEmergencyStateDeactivated is a free log retrieval operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. -// -// Solidity: event EmergencyStateDeactivated() -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) FilterEmergencyStateDeactivated(opts *bind.FilterOpts) (*PolygonzkevmbridgeEmergencyStateDeactivatedIterator, error) { - - logs, sub, err := _Polygonzkevmbridge.contract.FilterLogs(opts, "EmergencyStateDeactivated") - if err != nil { - return nil, err - } - return &PolygonzkevmbridgeEmergencyStateDeactivatedIterator{contract: _Polygonzkevmbridge.contract, event: "EmergencyStateDeactivated", logs: logs, sub: sub}, nil -} - -// WatchEmergencyStateDeactivated is a free log subscription operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. -// -// Solidity: event EmergencyStateDeactivated() -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) WatchEmergencyStateDeactivated(opts *bind.WatchOpts, sink chan<- *PolygonzkevmbridgeEmergencyStateDeactivated) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevmbridge.contract.WatchLogs(opts, "EmergencyStateDeactivated") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmbridgeEmergencyStateDeactivated) - if err := _Polygonzkevmbridge.contract.UnpackLog(event, "EmergencyStateDeactivated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseEmergencyStateDeactivated is a log parse operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. -// -// Solidity: event EmergencyStateDeactivated() -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) ParseEmergencyStateDeactivated(log types.Log) (*PolygonzkevmbridgeEmergencyStateDeactivated, error) { - event := new(PolygonzkevmbridgeEmergencyStateDeactivated) - if err := _Polygonzkevmbridge.contract.UnpackLog(event, "EmergencyStateDeactivated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmbridgeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Polygonzkevmbridge contract. -type PolygonzkevmbridgeInitializedIterator struct { - Event *PolygonzkevmbridgeInitialized // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmbridgeInitializedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmbridgeInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmbridgeInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmbridgeInitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmbridgeInitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmbridgeInitialized represents a Initialized event raised by the Polygonzkevmbridge contract. -type PolygonzkevmbridgeInitialized struct { - Version uint8 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) FilterInitialized(opts *bind.FilterOpts) (*PolygonzkevmbridgeInitializedIterator, error) { - - logs, sub, err := _Polygonzkevmbridge.contract.FilterLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return &PolygonzkevmbridgeInitializedIterator{contract: _Polygonzkevmbridge.contract, event: "Initialized", logs: logs, sub: sub}, nil -} - -// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *PolygonzkevmbridgeInitialized) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevmbridge.contract.WatchLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmbridgeInitialized) - if err := _Polygonzkevmbridge.contract.UnpackLog(event, "Initialized", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. -// -// Solidity: event Initialized(uint8 version) -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) ParseInitialized(log types.Log) (*PolygonzkevmbridgeInitialized, error) { - event := new(PolygonzkevmbridgeInitialized) - if err := _Polygonzkevmbridge.contract.UnpackLog(event, "Initialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// PolygonzkevmbridgeNewWrappedTokenIterator is returned from FilterNewWrappedToken and is used to iterate over the raw logs and unpacked data for NewWrappedToken events raised by the Polygonzkevmbridge contract. -type PolygonzkevmbridgeNewWrappedTokenIterator struct { - Event *PolygonzkevmbridgeNewWrappedToken // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmbridgeNewWrappedTokenIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmbridgeNewWrappedToken) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmbridgeNewWrappedToken) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmbridgeNewWrappedTokenIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmbridgeNewWrappedTokenIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmbridgeNewWrappedToken represents a NewWrappedToken event raised by the Polygonzkevmbridge contract. -type PolygonzkevmbridgeNewWrappedToken struct { - OriginNetwork uint32 - OriginTokenAddress common.Address - WrappedTokenAddress common.Address - Metadata []byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterNewWrappedToken is a free log retrieval operation binding the contract event 0x490e59a1701b938786ac72570a1efeac994a3dbe96e2e883e19e902ace6e6a39. -// -// Solidity: event NewWrappedToken(uint32 originNetwork, address originTokenAddress, address wrappedTokenAddress, bytes metadata) -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) FilterNewWrappedToken(opts *bind.FilterOpts) (*PolygonzkevmbridgeNewWrappedTokenIterator, error) { - - logs, sub, err := _Polygonzkevmbridge.contract.FilterLogs(opts, "NewWrappedToken") - if err != nil { - return nil, err - } - return &PolygonzkevmbridgeNewWrappedTokenIterator{contract: _Polygonzkevmbridge.contract, event: "NewWrappedToken", logs: logs, sub: sub}, nil -} - -// WatchNewWrappedToken is a free log subscription operation binding the contract event 0x490e59a1701b938786ac72570a1efeac994a3dbe96e2e883e19e902ace6e6a39. -// -// Solidity: event NewWrappedToken(uint32 originNetwork, address originTokenAddress, address wrappedTokenAddress, bytes metadata) -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) WatchNewWrappedToken(opts *bind.WatchOpts, sink chan<- *PolygonzkevmbridgeNewWrappedToken) (event.Subscription, error) { - - logs, sub, err := _Polygonzkevmbridge.contract.WatchLogs(opts, "NewWrappedToken") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmbridgeNewWrappedToken) - if err := _Polygonzkevmbridge.contract.UnpackLog(event, "NewWrappedToken", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseNewWrappedToken is a log parse operation binding the contract event 0x490e59a1701b938786ac72570a1efeac994a3dbe96e2e883e19e902ace6e6a39. -// -// Solidity: event NewWrappedToken(uint32 originNetwork, address originTokenAddress, address wrappedTokenAddress, bytes metadata) -func (_Polygonzkevmbridge *PolygonzkevmbridgeFilterer) ParseNewWrappedToken(log types.Log) (*PolygonzkevmbridgeNewWrappedToken, error) { - event := new(PolygonzkevmbridgeNewWrappedToken) - if err := _Polygonzkevmbridge.contract.UnpackLog(event, "NewWrappedToken", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/etherman/smartcontracts/polygonzkevmglobalexitroot/polygonzkevmglobalexitroot.go b/etherman/smartcontracts/polygonzkevmglobalexitroot/polygonzkevmglobalexitroot.go deleted file mode 100644 index 19b37e2c..00000000 --- a/etherman/smartcontracts/polygonzkevmglobalexitroot/polygonzkevmglobalexitroot.go +++ /dev/null @@ -1,563 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package polygonzkevmglobalexitroot - -import ( - "errors" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -// PolygonzkevmglobalexitrootMetaData contains all meta data concerning the Polygonzkevmglobalexitroot contract. -var PolygonzkevmglobalexitrootMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rollupAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridgeAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"OnlyAllowedContracts\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"mainnetExitRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rollupExitRoot\",\"type\":\"bytes32\"}],\"name\":\"UpdateGlobalExitRoot\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastGlobalExitRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"globalExitRootMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastMainnetExitRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRollupExitRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"newRoot\",\"type\":\"bytes32\"}],\"name\":\"updateExitRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60c060405234801561001057600080fd5b506040516103f83803806103f883398101604081905261002f91610062565b6001600160a01b0391821660a05216608052610095565b80516001600160a01b038116811461005d57600080fd5b919050565b6000806040838503121561007557600080fd5b61007e83610046565b915061008c60208401610046565b90509250929050565b60805160a0516103316100c76000396000818160e901526101bd015260008181610135015261017401526103316000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806333d6247d1161005b57806333d6247d146100c75780633ed691ef146100dc5780635ec6a8df146100e4578063a3c573eb1461013057600080fd5b806301fd904414610082578063257b36321461009e578063319cf735146100be575b600080fd5b61008b60005481565b6040519081526020015b60405180910390f35b61008b6100ac3660046102e2565b60026020526000908152604090205481565b61008b60015481565b6100da6100d53660046102e2565b610157565b005b61008b6102a6565b61010b7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610095565b61010b7f000000000000000000000000000000000000000000000000000000000000000081565b60005460015473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036101a65750600182905581610222565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036101f0576000839055829150610222565b6040517fb49365dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051602080820184905281830185905282518083038401815260609092019092528051910120600090600081815260026020526040812054919250036102a05760008181526002602052604080822042905551849184917f61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce39190a35b50505050565b60006102dd600154600054604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b905090565b6000602082840312156102f457600080fd5b503591905056fea26469706673582212209f4342d0e9635341e8c77469d3bc7ae71f0dddc6e79aebfb62c8bb1ad4fe68d664736f6c63430008110033", -} - -// PolygonzkevmglobalexitrootABI is the input ABI used to generate the binding from. -// Deprecated: Use PolygonzkevmglobalexitrootMetaData.ABI instead. -var PolygonzkevmglobalexitrootABI = PolygonzkevmglobalexitrootMetaData.ABI - -// PolygonzkevmglobalexitrootBin is the compiled bytecode used for deploying new contracts. -// Deprecated: Use PolygonzkevmglobalexitrootMetaData.Bin instead. -var PolygonzkevmglobalexitrootBin = PolygonzkevmglobalexitrootMetaData.Bin - -// DeployPolygonzkevmglobalexitroot deploys a new Ethereum contract, binding an instance of Polygonzkevmglobalexitroot to it. -func DeployPolygonzkevmglobalexitroot(auth *bind.TransactOpts, backend bind.ContractBackend, _rollupAddress common.Address, _bridgeAddress common.Address) (common.Address, *types.Transaction, *Polygonzkevmglobalexitroot, error) { - parsed, err := PolygonzkevmglobalexitrootMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(PolygonzkevmglobalexitrootBin), backend, _rollupAddress, _bridgeAddress) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Polygonzkevmglobalexitroot{PolygonzkevmglobalexitrootCaller: PolygonzkevmglobalexitrootCaller{contract: contract}, PolygonzkevmglobalexitrootTransactor: PolygonzkevmglobalexitrootTransactor{contract: contract}, PolygonzkevmglobalexitrootFilterer: PolygonzkevmglobalexitrootFilterer{contract: contract}}, nil -} - -// Polygonzkevmglobalexitroot is an auto generated Go binding around an Ethereum contract. -type Polygonzkevmglobalexitroot struct { - PolygonzkevmglobalexitrootCaller // Read-only binding to the contract - PolygonzkevmglobalexitrootTransactor // Write-only binding to the contract - PolygonzkevmglobalexitrootFilterer // Log filterer for contract events -} - -// PolygonzkevmglobalexitrootCaller is an auto generated read-only Go binding around an Ethereum contract. -type PolygonzkevmglobalexitrootCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PolygonzkevmglobalexitrootTransactor is an auto generated write-only Go binding around an Ethereum contract. -type PolygonzkevmglobalexitrootTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PolygonzkevmglobalexitrootFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type PolygonzkevmglobalexitrootFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// PolygonzkevmglobalexitrootSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type PolygonzkevmglobalexitrootSession struct { - Contract *Polygonzkevmglobalexitroot // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// PolygonzkevmglobalexitrootCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type PolygonzkevmglobalexitrootCallerSession struct { - Contract *PolygonzkevmglobalexitrootCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// PolygonzkevmglobalexitrootTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type PolygonzkevmglobalexitrootTransactorSession struct { - Contract *PolygonzkevmglobalexitrootTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// PolygonzkevmglobalexitrootRaw is an auto generated low-level Go binding around an Ethereum contract. -type PolygonzkevmglobalexitrootRaw struct { - Contract *Polygonzkevmglobalexitroot // Generic contract binding to access the raw methods on -} - -// PolygonzkevmglobalexitrootCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type PolygonzkevmglobalexitrootCallerRaw struct { - Contract *PolygonzkevmglobalexitrootCaller // Generic read-only contract binding to access the raw methods on -} - -// PolygonzkevmglobalexitrootTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type PolygonzkevmglobalexitrootTransactorRaw struct { - Contract *PolygonzkevmglobalexitrootTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewPolygonzkevmglobalexitroot creates a new instance of Polygonzkevmglobalexitroot, bound to a specific deployed contract. -func NewPolygonzkevmglobalexitroot(address common.Address, backend bind.ContractBackend) (*Polygonzkevmglobalexitroot, error) { - contract, err := bindPolygonzkevmglobalexitroot(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Polygonzkevmglobalexitroot{PolygonzkevmglobalexitrootCaller: PolygonzkevmglobalexitrootCaller{contract: contract}, PolygonzkevmglobalexitrootTransactor: PolygonzkevmglobalexitrootTransactor{contract: contract}, PolygonzkevmglobalexitrootFilterer: PolygonzkevmglobalexitrootFilterer{contract: contract}}, nil -} - -// NewPolygonzkevmglobalexitrootCaller creates a new read-only instance of Polygonzkevmglobalexitroot, bound to a specific deployed contract. -func NewPolygonzkevmglobalexitrootCaller(address common.Address, caller bind.ContractCaller) (*PolygonzkevmglobalexitrootCaller, error) { - contract, err := bindPolygonzkevmglobalexitroot(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &PolygonzkevmglobalexitrootCaller{contract: contract}, nil -} - -// NewPolygonzkevmglobalexitrootTransactor creates a new write-only instance of Polygonzkevmglobalexitroot, bound to a specific deployed contract. -func NewPolygonzkevmglobalexitrootTransactor(address common.Address, transactor bind.ContractTransactor) (*PolygonzkevmglobalexitrootTransactor, error) { - contract, err := bindPolygonzkevmglobalexitroot(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &PolygonzkevmglobalexitrootTransactor{contract: contract}, nil -} - -// NewPolygonzkevmglobalexitrootFilterer creates a new log filterer instance of Polygonzkevmglobalexitroot, bound to a specific deployed contract. -func NewPolygonzkevmglobalexitrootFilterer(address common.Address, filterer bind.ContractFilterer) (*PolygonzkevmglobalexitrootFilterer, error) { - contract, err := bindPolygonzkevmglobalexitroot(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &PolygonzkevmglobalexitrootFilterer{contract: contract}, nil -} - -// bindPolygonzkevmglobalexitroot binds a generic wrapper to an already deployed contract. -func bindPolygonzkevmglobalexitroot(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := PolygonzkevmglobalexitrootMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Polygonzkevmglobalexitroot.Contract.PolygonzkevmglobalexitrootCaller.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevmglobalexitroot.Contract.PolygonzkevmglobalexitrootTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Polygonzkevmglobalexitroot.Contract.PolygonzkevmglobalexitrootTransactor.contract.Transact(opts, method, params...) -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Polygonzkevmglobalexitroot.Contract.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Polygonzkevmglobalexitroot.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Polygonzkevmglobalexitroot.Contract.contract.Transact(opts, method, params...) -} - -// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. -// -// Solidity: function bridgeAddress() view returns(address) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootCaller) BridgeAddress(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevmglobalexitroot.contract.Call(opts, &out, "bridgeAddress") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. -// -// Solidity: function bridgeAddress() view returns(address) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootSession) BridgeAddress() (common.Address, error) { - return _Polygonzkevmglobalexitroot.Contract.BridgeAddress(&_Polygonzkevmglobalexitroot.CallOpts) -} - -// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. -// -// Solidity: function bridgeAddress() view returns(address) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootCallerSession) BridgeAddress() (common.Address, error) { - return _Polygonzkevmglobalexitroot.Contract.BridgeAddress(&_Polygonzkevmglobalexitroot.CallOpts) -} - -// GetLastGlobalExitRoot is a free data retrieval call binding the contract method 0x3ed691ef. -// -// Solidity: function getLastGlobalExitRoot() view returns(bytes32) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootCaller) GetLastGlobalExitRoot(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _Polygonzkevmglobalexitroot.contract.Call(opts, &out, "getLastGlobalExitRoot") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// GetLastGlobalExitRoot is a free data retrieval call binding the contract method 0x3ed691ef. -// -// Solidity: function getLastGlobalExitRoot() view returns(bytes32) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootSession) GetLastGlobalExitRoot() ([32]byte, error) { - return _Polygonzkevmglobalexitroot.Contract.GetLastGlobalExitRoot(&_Polygonzkevmglobalexitroot.CallOpts) -} - -// GetLastGlobalExitRoot is a free data retrieval call binding the contract method 0x3ed691ef. -// -// Solidity: function getLastGlobalExitRoot() view returns(bytes32) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootCallerSession) GetLastGlobalExitRoot() ([32]byte, error) { - return _Polygonzkevmglobalexitroot.Contract.GetLastGlobalExitRoot(&_Polygonzkevmglobalexitroot.CallOpts) -} - -// GlobalExitRootMap is a free data retrieval call binding the contract method 0x257b3632. -// -// Solidity: function globalExitRootMap(bytes32 ) view returns(uint256) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootCaller) GlobalExitRootMap(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { - var out []interface{} - err := _Polygonzkevmglobalexitroot.contract.Call(opts, &out, "globalExitRootMap", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GlobalExitRootMap is a free data retrieval call binding the contract method 0x257b3632. -// -// Solidity: function globalExitRootMap(bytes32 ) view returns(uint256) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootSession) GlobalExitRootMap(arg0 [32]byte) (*big.Int, error) { - return _Polygonzkevmglobalexitroot.Contract.GlobalExitRootMap(&_Polygonzkevmglobalexitroot.CallOpts, arg0) -} - -// GlobalExitRootMap is a free data retrieval call binding the contract method 0x257b3632. -// -// Solidity: function globalExitRootMap(bytes32 ) view returns(uint256) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootCallerSession) GlobalExitRootMap(arg0 [32]byte) (*big.Int, error) { - return _Polygonzkevmglobalexitroot.Contract.GlobalExitRootMap(&_Polygonzkevmglobalexitroot.CallOpts, arg0) -} - -// LastMainnetExitRoot is a free data retrieval call binding the contract method 0x319cf735. -// -// Solidity: function lastMainnetExitRoot() view returns(bytes32) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootCaller) LastMainnetExitRoot(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _Polygonzkevmglobalexitroot.contract.Call(opts, &out, "lastMainnetExitRoot") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// LastMainnetExitRoot is a free data retrieval call binding the contract method 0x319cf735. -// -// Solidity: function lastMainnetExitRoot() view returns(bytes32) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootSession) LastMainnetExitRoot() ([32]byte, error) { - return _Polygonzkevmglobalexitroot.Contract.LastMainnetExitRoot(&_Polygonzkevmglobalexitroot.CallOpts) -} - -// LastMainnetExitRoot is a free data retrieval call binding the contract method 0x319cf735. -// -// Solidity: function lastMainnetExitRoot() view returns(bytes32) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootCallerSession) LastMainnetExitRoot() ([32]byte, error) { - return _Polygonzkevmglobalexitroot.Contract.LastMainnetExitRoot(&_Polygonzkevmglobalexitroot.CallOpts) -} - -// LastRollupExitRoot is a free data retrieval call binding the contract method 0x01fd9044. -// -// Solidity: function lastRollupExitRoot() view returns(bytes32) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootCaller) LastRollupExitRoot(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _Polygonzkevmglobalexitroot.contract.Call(opts, &out, "lastRollupExitRoot") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// LastRollupExitRoot is a free data retrieval call binding the contract method 0x01fd9044. -// -// Solidity: function lastRollupExitRoot() view returns(bytes32) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootSession) LastRollupExitRoot() ([32]byte, error) { - return _Polygonzkevmglobalexitroot.Contract.LastRollupExitRoot(&_Polygonzkevmglobalexitroot.CallOpts) -} - -// LastRollupExitRoot is a free data retrieval call binding the contract method 0x01fd9044. -// -// Solidity: function lastRollupExitRoot() view returns(bytes32) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootCallerSession) LastRollupExitRoot() ([32]byte, error) { - return _Polygonzkevmglobalexitroot.Contract.LastRollupExitRoot(&_Polygonzkevmglobalexitroot.CallOpts) -} - -// RollupAddress is a free data retrieval call binding the contract method 0x5ec6a8df. -// -// Solidity: function rollupAddress() view returns(address) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootCaller) RollupAddress(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Polygonzkevmglobalexitroot.contract.Call(opts, &out, "rollupAddress") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// RollupAddress is a free data retrieval call binding the contract method 0x5ec6a8df. -// -// Solidity: function rollupAddress() view returns(address) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootSession) RollupAddress() (common.Address, error) { - return _Polygonzkevmglobalexitroot.Contract.RollupAddress(&_Polygonzkevmglobalexitroot.CallOpts) -} - -// RollupAddress is a free data retrieval call binding the contract method 0x5ec6a8df. -// -// Solidity: function rollupAddress() view returns(address) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootCallerSession) RollupAddress() (common.Address, error) { - return _Polygonzkevmglobalexitroot.Contract.RollupAddress(&_Polygonzkevmglobalexitroot.CallOpts) -} - -// UpdateExitRoot is a paid mutator transaction binding the contract method 0x33d6247d. -// -// Solidity: function updateExitRoot(bytes32 newRoot) returns() -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootTransactor) UpdateExitRoot(opts *bind.TransactOpts, newRoot [32]byte) (*types.Transaction, error) { - return _Polygonzkevmglobalexitroot.contract.Transact(opts, "updateExitRoot", newRoot) -} - -// UpdateExitRoot is a paid mutator transaction binding the contract method 0x33d6247d. -// -// Solidity: function updateExitRoot(bytes32 newRoot) returns() -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootSession) UpdateExitRoot(newRoot [32]byte) (*types.Transaction, error) { - return _Polygonzkevmglobalexitroot.Contract.UpdateExitRoot(&_Polygonzkevmglobalexitroot.TransactOpts, newRoot) -} - -// UpdateExitRoot is a paid mutator transaction binding the contract method 0x33d6247d. -// -// Solidity: function updateExitRoot(bytes32 newRoot) returns() -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootTransactorSession) UpdateExitRoot(newRoot [32]byte) (*types.Transaction, error) { - return _Polygonzkevmglobalexitroot.Contract.UpdateExitRoot(&_Polygonzkevmglobalexitroot.TransactOpts, newRoot) -} - -// PolygonzkevmglobalexitrootUpdateGlobalExitRootIterator is returned from FilterUpdateGlobalExitRoot and is used to iterate over the raw logs and unpacked data for UpdateGlobalExitRoot events raised by the Polygonzkevmglobalexitroot contract. -type PolygonzkevmglobalexitrootUpdateGlobalExitRootIterator struct { - Event *PolygonzkevmglobalexitrootUpdateGlobalExitRoot // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *PolygonzkevmglobalexitrootUpdateGlobalExitRootIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmglobalexitrootUpdateGlobalExitRoot) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(PolygonzkevmglobalexitrootUpdateGlobalExitRoot) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *PolygonzkevmglobalexitrootUpdateGlobalExitRootIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *PolygonzkevmglobalexitrootUpdateGlobalExitRootIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// PolygonzkevmglobalexitrootUpdateGlobalExitRoot represents a UpdateGlobalExitRoot event raised by the Polygonzkevmglobalexitroot contract. -type PolygonzkevmglobalexitrootUpdateGlobalExitRoot struct { - MainnetExitRoot [32]byte - RollupExitRoot [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUpdateGlobalExitRoot is a free log retrieval operation binding the contract event 0x61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce3. -// -// Solidity: event UpdateGlobalExitRoot(bytes32 indexed mainnetExitRoot, bytes32 indexed rollupExitRoot) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootFilterer) FilterUpdateGlobalExitRoot(opts *bind.FilterOpts, mainnetExitRoot [][32]byte, rollupExitRoot [][32]byte) (*PolygonzkevmglobalexitrootUpdateGlobalExitRootIterator, error) { - - var mainnetExitRootRule []interface{} - for _, mainnetExitRootItem := range mainnetExitRoot { - mainnetExitRootRule = append(mainnetExitRootRule, mainnetExitRootItem) - } - var rollupExitRootRule []interface{} - for _, rollupExitRootItem := range rollupExitRoot { - rollupExitRootRule = append(rollupExitRootRule, rollupExitRootItem) - } - - logs, sub, err := _Polygonzkevmglobalexitroot.contract.FilterLogs(opts, "UpdateGlobalExitRoot", mainnetExitRootRule, rollupExitRootRule) - if err != nil { - return nil, err - } - return &PolygonzkevmglobalexitrootUpdateGlobalExitRootIterator{contract: _Polygonzkevmglobalexitroot.contract, event: "UpdateGlobalExitRoot", logs: logs, sub: sub}, nil -} - -// WatchUpdateGlobalExitRoot is a free log subscription operation binding the contract event 0x61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce3. -// -// Solidity: event UpdateGlobalExitRoot(bytes32 indexed mainnetExitRoot, bytes32 indexed rollupExitRoot) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootFilterer) WatchUpdateGlobalExitRoot(opts *bind.WatchOpts, sink chan<- *PolygonzkevmglobalexitrootUpdateGlobalExitRoot, mainnetExitRoot [][32]byte, rollupExitRoot [][32]byte) (event.Subscription, error) { - - var mainnetExitRootRule []interface{} - for _, mainnetExitRootItem := range mainnetExitRoot { - mainnetExitRootRule = append(mainnetExitRootRule, mainnetExitRootItem) - } - var rollupExitRootRule []interface{} - for _, rollupExitRootItem := range rollupExitRoot { - rollupExitRootRule = append(rollupExitRootRule, rollupExitRootItem) - } - - logs, sub, err := _Polygonzkevmglobalexitroot.contract.WatchLogs(opts, "UpdateGlobalExitRoot", mainnetExitRootRule, rollupExitRootRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(PolygonzkevmglobalexitrootUpdateGlobalExitRoot) - if err := _Polygonzkevmglobalexitroot.contract.UnpackLog(event, "UpdateGlobalExitRoot", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseUpdateGlobalExitRoot is a log parse operation binding the contract event 0x61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce3. -// -// Solidity: event UpdateGlobalExitRoot(bytes32 indexed mainnetExitRoot, bytes32 indexed rollupExitRoot) -func (_Polygonzkevmglobalexitroot *PolygonzkevmglobalexitrootFilterer) ParseUpdateGlobalExitRoot(log types.Log) (*PolygonzkevmglobalexitrootUpdateGlobalExitRoot, error) { - event := new(PolygonzkevmglobalexitrootUpdateGlobalExitRoot) - if err := _Polygonzkevmglobalexitroot.contract.UnpackLog(event, "UpdateGlobalExitRoot", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/etherman/smartcontracts/script.sh b/etherman/smartcontracts/script.sh index 4e4b117f..a1ee3497 100755 --- a/etherman/smartcontracts/script.sh +++ b/etherman/smartcontracts/script.sh @@ -8,8 +8,9 @@ gen() { abigen --bin bin/${package}.bin --abi abi/${package}.abi --pkg=${package} --out=${package}/${package}.go } -gen polygonzkevm -gen polygonzkevmbridge +gen supernets2 +gen supernets2bridge gen matic -gen polygonzkevmglobalexitroot -gen mockverifier \ No newline at end of file +gen mockverifier +gen supernets2globalexitroot +gen supernets2datacommittee \ No newline at end of file diff --git a/etherman/smartcontracts/supernets2/supernets2.go b/etherman/smartcontracts/supernets2/supernets2.go new file mode 100644 index 00000000..a8f31223 --- /dev/null +++ b/etherman/smartcontracts/supernets2/supernets2.go @@ -0,0 +1,5339 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package supernets2 + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// Supernets2BatchData is an auto generated low-level Go binding around an user-defined struct. +type Supernets2BatchData struct { + TransactionsHash [32]byte + GlobalExitRoot [32]byte + Timestamp uint64 + MinForcedTimestamp uint64 +} + +// Supernets2ForcedBatchData is an auto generated low-level Go binding around an user-defined struct. +type Supernets2ForcedBatchData struct { + Transactions []byte + GlobalExitRoot [32]byte + MinForcedTimestamp uint64 +} + +// Supernets2InitializePackedParameters is an auto generated low-level Go binding around an user-defined struct. +type Supernets2InitializePackedParameters struct { + Admin common.Address + TrustedSequencer common.Address + PendingStateTimeout uint64 + TrustedAggregator common.Address + TrustedAggregatorTimeout uint64 +} + +// Supernets2MetaData contains all meta data concerning the Supernets2 contract. +var Supernets2MetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"contractISupernets2GlobalExitRoot\",\"name\":\"_globalExitRootManager\",\"type\":\"address\"},{\"internalType\":\"contractIERC20Upgradeable\",\"name\":\"_matic\",\"type\":\"address\"},{\"internalType\":\"contractIVerifierRollup\",\"name\":\"_rollupVerifier\",\"type\":\"address\"},{\"internalType\":\"contractISupernets2Bridge\",\"name\":\"_bridgeAddress\",\"type\":\"address\"},{\"internalType\":\"contractISupernets2DataCommittee\",\"name\":\"_dataCommitteeAddress\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_chainID\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"_forkID\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"BatchAlreadyVerified\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchNotSequencedOrNotSequenceEnd\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExceedMaxVerifyBatches\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalNumBatchBelowLastVerifiedBatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalNumBatchDoesNotMatchPendingState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FinalPendingStateNumInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchTimeoutNotExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchesAlreadyActive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForceBatchesOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ForcedDataDoesNotMatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GlobalExitRootNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HaltTimeoutNotExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InitNumBatchAboveLastVerifiedBatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InitNumBatchDoesNotMatchPendingState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProof\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRangeBatchTimeTarget\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRangeForceBatchTimeout\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRangeMultiplierBatchFee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewAccInputHashDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewPendingStateTimeoutMustBeLower\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewStateRootNotInsidePrime\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NewTrustedAggregatorTimeoutMustBeLower\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEnoughMaticAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OldAccInputHashDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OldStateRootDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyEmergencyState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyNotEmergencyState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPendingAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyTrustedAggregator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyTrustedSequencer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateNotConsolidable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingStateTimeoutExceedHaltAggregationTimeout\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SequenceZeroBatches\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SequencedTimestampBelowForcedTimestamp\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SequencedTimestampInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StoredRootMustBeDifferentThanNewRoot\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransactionsLengthAboveMax\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TrustedAggregatorTimeoutExceedHaltAggregationTimeout\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TrustedAggregatorTimeoutNotExpired\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AcceptAdminRole\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"ActivateForceBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"}],\"name\":\"ConsolidatePendingState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyStateActivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyStateDeactivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"forceBatchNum\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"lastGlobalExitRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sequencer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"}],\"name\":\"ForceBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aggregator\",\"type\":\"address\"}],\"name\":\"OverridePendingState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"storedStateRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"provedStateRoot\",\"type\":\"bytes32\"}],\"name\":\"ProveNonDeterministicPendingState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"}],\"name\":\"SequenceBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"}],\"name\":\"SequenceForceBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newforceBatchTimeout\",\"type\":\"uint64\"}],\"name\":\"SetForceBatchTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"newMultiplierBatchFee\",\"type\":\"uint16\"}],\"name\":\"SetMultiplierBatchFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newPendingStateTimeout\",\"type\":\"uint64\"}],\"name\":\"SetPendingStateTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newTrustedAggregator\",\"type\":\"address\"}],\"name\":\"SetTrustedAggregator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newTrustedAggregatorTimeout\",\"type\":\"uint64\"}],\"name\":\"SetTrustedAggregatorTimeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newTrustedSequencer\",\"type\":\"address\"}],\"name\":\"SetTrustedSequencer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"newTrustedSequencerURL\",\"type\":\"string\"}],\"name\":\"SetTrustedSequencerURL\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newVerifyBatchTimeTarget\",\"type\":\"uint64\"}],\"name\":\"SetVerifyBatchTimeTarget\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"TransferAdminRole\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"forkID\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"}],\"name\":\"UpdateSupernets2Version\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aggregator\",\"type\":\"address\"}],\"name\":\"VerifyBatches\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"numBatch\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"aggregator\",\"type\":\"address\"}],\"name\":\"VerifyBatchesTrustedAggregator\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptAdminRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"sequencedBatchNum\",\"type\":\"uint64\"}],\"name\":\"activateEmergencyState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"activateForceBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batchFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"batchNumToStateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridgeAddress\",\"outputs\":[{\"internalType\":\"contractISupernets2Bridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"calculateRewardPerBatch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainID\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newStateRoot\",\"type\":\"uint256\"}],\"name\":\"checkStateRootInsidePrime\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"}],\"name\":\"consolidatePendingState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dataCommitteeAddress\",\"outputs\":[{\"internalType\":\"contractISupernets2DataCommittee\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deactivateEmergencyState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"maticAmount\",\"type\":\"uint256\"}],\"name\":\"forceBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"forceBatchTimeout\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"forcedBatches\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"forkID\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getForcedBatchFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"oldStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"}],\"name\":\"getInputSnarkBytes\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastVerifiedBatch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"globalExitRootManager\",\"outputs\":[{\"internalType\":\"contractISupernets2GlobalExitRoot\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"trustedSequencer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"pendingStateTimeout\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"trustedAggregator\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"trustedAggregatorTimeout\",\"type\":\"uint64\"}],\"internalType\":\"structSupernets2.InitializePackedParameters\",\"name\":\"initializePackedParameters\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"genesisRoot\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"_trustedSequencerURL\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_networkName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_version\",\"type\":\"string\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isEmergencyState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isForcedBatchDisallowed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"}],\"name\":\"isPendingStateConsolidable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSequenced\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastForceBatch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastForceBatchSequenced\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPendingState\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPendingStateConsolidated\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastTimestamp\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastVerifiedBatch\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"matic\",\"outputs\":[{\"internalType\":\"contractIERC20Upgradeable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"multiplierBatchFee\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"networkName\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"initPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"overridePendingState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingStateTimeout\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"pendingStateTransitions\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"exitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"initPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalPendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"proveNonDeterministicPendingState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupVerifier\",\"outputs\":[{\"internalType\":\"contractIVerifierRollup\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"transactionsHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"globalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"minForcedTimestamp\",\"type\":\"uint64\"}],\"internalType\":\"structSupernets2.BatchData[]\",\"name\":\"batches\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"l2Coinbase\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signaturesAndAddrs\",\"type\":\"bytes\"}],\"name\":\"sequenceBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"transactions\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"globalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"minForcedTimestamp\",\"type\":\"uint64\"}],\"internalType\":\"structSupernets2.ForcedBatchData[]\",\"name\":\"batches\",\"type\":\"tuple[]\"}],\"name\":\"sequenceForceBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"sequencedBatches\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"accInputHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"sequencedTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"previousLastBatchSequenced\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newforceBatchTimeout\",\"type\":\"uint64\"}],\"name\":\"setForceBatchTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newMultiplierBatchFee\",\"type\":\"uint16\"}],\"name\":\"setMultiplierBatchFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newPendingStateTimeout\",\"type\":\"uint64\"}],\"name\":\"setPendingStateTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTrustedAggregator\",\"type\":\"address\"}],\"name\":\"setTrustedAggregator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newTrustedAggregatorTimeout\",\"type\":\"uint64\"}],\"name\":\"setTrustedAggregatorTimeout\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newTrustedSequencer\",\"type\":\"address\"}],\"name\":\"setTrustedSequencer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newTrustedSequencerURL\",\"type\":\"string\"}],\"name\":\"setTrustedSequencerURL\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"newVerifyBatchTimeTarget\",\"type\":\"uint64\"}],\"name\":\"setVerifyBatchTimeTarget\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"transferAdminRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedAggregator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedAggregatorTimeout\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedSequencer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trustedSequencerURL\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifyBatchTimeTarget\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"verifyBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"pendingStateNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initNumBatch\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"finalNewBatch\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"newLocalExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"newStateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"verifyBatchesTrustedAggregator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6101606040523480156200001257600080fd5b50604051620061cb380380620061cb8339810160408190526200003591620000ac565b6001600160a01b0396871660c05294861660805292851660a05290841660e052909216610100526001600160401b039182166101205216610140526200014f565b6001600160a01b03811681146200008c57600080fd5b50565b80516001600160401b0381168114620000a757600080fd5b919050565b600080600080600080600060e0888a031215620000c857600080fd5b8751620000d58162000076565b6020890151909750620000e88162000076565b6040890151909650620000fb8162000076565b60608901519095506200010e8162000076565b6080890151909450620001218162000076565b92506200013160a089016200008f565b91506200014160c089016200008f565b905092959891949750929550565b60805160a05160c05160e051610100516101205161014051615f9c6200022f600039600081816106b501528181610ed101526130120152600081816108220152610ea70152600081816105c001526116750152600081816107d5015281816118c5015281816136ac015261430801526000818161098e0152818161145001528181611dc20152818161288c0152818161384901528181613aa40152614667015260008181610a4e015281816141f501526149d30152600081816108de01528181611893015281816123e301528181613a780152614ac20152615f9c6000f3fe608060405234801561001057600080fd5b50600436106103c55760003560e01c8063841b24d7116101ff578063c89e42df1161011a578063e7a7ed02116100ad578063f14916d61161007c578063f14916d614610ab0578063f2fde38b14610ac3578063f851a44014610ad6578063f8b823e414610af657600080fd5b8063e7a7ed0214610a19578063e8bf92ed14610a49578063eaeb077b14610a70578063ed6b010414610a8357600080fd5b8063d8d1091b116100e9578063d8d1091b146109c3578063d939b315146109d6578063dbc16976146109fe578063e6ad707e14610a0657600080fd5b8063c89e42df14610947578063cfa8ed471461095a578063d02103ca14610989578063d2e129f9146109b057600080fd5b8063ada8f91911610192578063b6b0b09711610161578063b6b0b097146108d9578063ba58ae3914610900578063c0ed84e014610913578063c754c7ed1461091b57600080fd5b8063ada8f9191461080a578063adc879e91461081d578063afd23cbe14610844578063b4d63f581461087257600080fd5b80639c9f3dfe116101ce5780639c9f3dfe146107aa578063a066215c146107bd578063a3c573eb146107d0578063a50a164b146107f757600080fd5b8063841b24d71461074c5780638c3d73011461077c5780638da5cb5b1461078457806399f5634e146107a257600080fd5b80634a1a89a7116102ef57806360469169116102825780637215541a116102515780637215541a146106895780637fcb36531461069c578063831c7ead146106b0578063837a4738146106d757600080fd5b806360469169146106465780636b8616ce1461064e5780636ff512cc1461066e578063715018a61461068157600080fd5b80634fd70464116102be5780634fd70464146105f55780635392c5e014610608578063542028d5146106365780635ec919581461063e57600080fd5b80634a1a89a7146105885780634a910e6a146105a85780634df61d24146105bb5780634e487706146105e257600080fd5b80632678224711610367578063423fa85611610336578063423fa85614610519578063438a539914610539578063456052671461054c578063458c04771461057457600080fd5b8063267822471461048257806329878983146104c7578063383b3be8146104f3578063394218e91461050657600080fd5b806315064c96116103a357806315064c961461042b5780631816b7e51461044857806319d8ac611461045b578063220d78991461046f57600080fd5b80630808270c146103ca5780630a0d9fbe146103df578063107bf28c14610416575b600080fd5b6103dd6103d836600461535a565b610aff565b005b606f546103f890610100900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b61041e610bb2565b60405161040d9190615461565b606f546104389060ff1681565b604051901515815260200161040d565b6103dd61045636600461547b565b610c40565b6073546103f89067ffffffffffffffff1681565b61041e61047d36600461549f565b610d58565b607b546104a29073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161040d565b6074546104a29068010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b6104386105013660046154ec565b610f2f565b6103dd6105143660046154ec565b610f85565b6073546103f89068010000000000000000900467ffffffffffffffff1681565b6103dd61054736600461552b565b611109565b6073546103f890700100000000000000000000000000000000900467ffffffffffffffff1681565b6079546103f89067ffffffffffffffff1681565b6079546103f89068010000000000000000900467ffffffffffffffff1681565b6103dd6105b63660046154ec565b611986565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd6105f03660046154ec565b611a39565b6103dd6106033660046155dd565b611bbd565b6106286106163660046154ec565b60756020526000908152604090205481565b60405190815260200161040d565b61041e611f53565b6103dd611f60565b610628612060565b61062861065c3660046154ec565b60716020526000908152604090205481565b6103dd61067c366004615666565b612076565b6103dd61214b565b6103dd6106973660046154ec565b61215f565b6074546103f89067ffffffffffffffff1681565b6103f87f000000000000000000000000000000000000000000000000000000000000000081565b6107206106e5366004615681565b60786020526000908152604090208054600182015460029092015467ffffffffffffffff808316936801000000000000000090930416919084565b6040805167ffffffffffffffff958616815294909316602085015291830152606082015260800161040d565b6079546103f8907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b6103dd6122cf565b60335473ffffffffffffffffffffffffffffffffffffffff166104a2565b61062861239b565b6103dd6107b83660046154ec565b6124f4565b6103dd6107cb3660046154ec565b612670565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd6108053660046155dd565b612776565b6103dd610818366004615666565b61293b565b6103f87f000000000000000000000000000000000000000000000000000000000000000081565b606f5461085f906901000000000000000000900461ffff1681565b60405161ffff909116815260200161040d565b6108b36108803660046154ec565b6072602052600090815260409020805460019091015467ffffffffffffffff808216916801000000000000000090041683565b6040805193845267ffffffffffffffff928316602085015291169082015260600161040d565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b61043861090e366004615681565b6129ff565b6103f8612a89565b607b546103f89074010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6103dd61095536600461577d565b612ade565b606f546104a2906b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd6109be3660046157b2565b612b6b565b6103dd6109d1366004615865565b6130b7565b6079546103f890700100000000000000000000000000000000900467ffffffffffffffff1681565b6103dd613659565b6103dd610a1436600461535a565b613732565b6073546103f8907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1681565b6104a27f000000000000000000000000000000000000000000000000000000000000000081565b6103dd610a7e3660046158da565b613942565b607b54610438907c0100000000000000000000000000000000000000000000000000000000900460ff1681565b6103dd610abe366004615666565b613d38565b6103dd610ad1366004615666565b613e0a565b607a546104a29073ffffffffffffffffffffffffffffffffffffffff1681565b61062860705481565b606f5460ff1615610b3c576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b4c8888888888888888613ebe565b67ffffffffffffffff85166000908152607560209081526040918290205482519081529081018590527f1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010910160405180910390a1610ba8614306565b5050505050505050565b60778054610bbf90615926565b80601f0160208091040260200160405190810160405280929190818152602001828054610beb90615926565b8015610c385780601f10610c0d57610100808354040283529160200191610c38565b820191906000526020600020905b815481529060010190602001808311610c1b57829003601f168201915b505050505081565b607a5473ffffffffffffffffffffffffffffffffffffffff163314610c91576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e88161ffff161080610caa57506103ff8161ffff16115b15610ce1576040517f4c2533c800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffff16690100000000000000000061ffff8416908102919091179091556040519081527f7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5906020015b60405180910390a150565b67ffffffffffffffff8086166000818152607260205260408082205493881682529020546060929115801590610d8c575081155b15610dc3576040517f6818c29e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80610dfa576040517f66385b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e03846129ff565b610e39576040517f176b913c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b166020820152603481019690965260548601929092527fffffffffffffffff00000000000000000000000000000000000000000000000060c098891b811660748701527f0000000000000000000000000000000000000000000000000000000000000000891b8116607c8701527f0000000000000000000000000000000000000000000000000000000000000000891b81166084870152608c86019490945260ac85015260cc840194909452509290931b90911660ec830152805180830360d401815260f4909201905290565b60795467ffffffffffffffff82811660009081526078602052604081205490924292610f7392700100000000000000000000000000000000909204811691166159a8565b67ffffffffffffffff16111592915050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314610fd6576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff8216111561101d576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff1661108c5760795467ffffffffffffffff780100000000000000000000000000000000000000000000000090910481169082161061108c576040517f401636df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527f1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a190602001610d4d565b606f5460ff1615611146576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f546b010000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146111a6576040517f11e7be1500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8360008190036111e2576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e881111561121e576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff6801000000000000000082048116600081815260726020526040812054838516949293700100000000000000000000000000000000909304909216919082905b868110156116375760008c8c83818110611286576112866159d0565b90506080020180360381019061129c91906159ff565b606081015190915067ffffffffffffffff161561140d57846112bd81615a70565b955050600081600001518260200151836060015160405160200161131993929190928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff89166000908152607190935291205490915081146113a2576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8087166000908152607160205260408082209190915560608401519084015190821691161015611407576040517f7f7ab87200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061150b565b6020810151158015906114d4575060208101516040517f257b363200000000000000000000000000000000000000000000000000000000815260048101919091527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063257b3632906024016020604051808303816000875af11580156114ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d29190615a97565b155b1561150b576040517f73bd668d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8667ffffffffffffffff16816040015167ffffffffffffffff16108061153e575042816040015167ffffffffffffffff16115b15611575576040517fea82791600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838160000151826020015183604001518e6040516020016116049594939291909485526020850193909352604084019190915260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166060808401919091521b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166068820152607c0190565b6040516020818303038152906040528051906020012093508060400151965050808061162f90615ab0565b91505061126a565b506040517fc7a823e000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063c7a823e0906116ae9085908c908c90600401615b31565b60006040518083038186803b1580156116c657600080fd5b505afa1580156116da573d6000803e3d6000fd5b5050505085846116ea91906159a8565b60735490945067ffffffffffffffff780100000000000000000000000000000000000000000000000090910481169084161115611753576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061175f8285615b54565b6117739067ffffffffffffffff1688615b75565b604080516060810182528581524267ffffffffffffffff908116602080840191825260738054680100000000000000009081900485168688019081528d861660008181526072909552979093209551865592516001909501805492519585167fffffffffffffffffffffffffffffffff000000000000000000000000000000009384161795851684029590951790945583548c841691161793029290921790559091508281169085161461186957607380547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8716021790555b6118bb33308360705461187c9190615b8e565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001692919061438e565b6118c3614470565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166379e2cf976040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561192b57600080fd5b505af115801561193f573d6000803e3d6000fd5b505060405167ffffffffffffffff881692507f303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce9150600090a2505050505050505050505050565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314611a2d57606f5460ff16156119ee576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119f781610f2f565b611a2d576040517f0ce9e4a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611a368161451d565b50565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611a8a576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff82161115611ad1576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16611b3c57607b5467ffffffffffffffff74010000000000000000000000000000000000000000909104811690821610611b3c576040517ff5e37f2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b90602001610d4d565b606f5460ff1615611bfa576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff8681166000908152607260205260409020600101544292611c47927801000000000000000000000000000000000000000000000000909104811691166159a8565b67ffffffffffffffff161115611c89576040517f8a0704d300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e8611c968787615b54565b67ffffffffffffffff161115611cd8576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ce787878787878787614730565b611cf085614ae9565b607954700100000000000000000000000000000000900467ffffffffffffffff16600003611e3857607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff87811691821790925560009081526075602052604090208490556079541615611d9357607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018590527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b158015611e1b57600080fd5b505af1158015611e2f573d6000803e3d6000fd5b50505050611f08565b611e40614470565b6079805467ffffffffffffffff16906000611e5a83615a70565b825467ffffffffffffffff9182166101009390930a92830292820219169190911790915560408051608081018252428316815288831660208083019182528284018a8152606084018a815260795487166000908152607890935294909120925183549251861668010000000000000000027fffffffffffffffffffffffffffffffff000000000000000000000000000000009093169516949094171781559151600183015551600290910155505b604051838152339067ffffffffffffffff8716907f9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966906020015b60405180910390a350505050505050565b60768054610bbf90615926565b607a5473ffffffffffffffffffffffffffffffffffffffff163314611fb1576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b547c0100000000000000000000000000000000000000000000000000000000900460ff1661200d576040517ff6ba91a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690556040517f854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f90600090a1565b600060705460646120719190615b8e565b905090565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146120c7576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fff0000000000000000000000000000000000000000ffffffffffffffffffffff166b01000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527ff54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc090602001610d4d565b612153614cc9565b61215d6000614d4a565b565b60335473ffffffffffffffffffffffffffffffffffffffff1633146122c7576000612188612a89565b90508067ffffffffffffffff168267ffffffffffffffff16116121d7576040517f812a372d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff680100000000000000009091048116908316118061221d575067ffffffffffffffff80831660009081526072602052604090206001015416155b15612254576040517f98c5c01400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80831660009081526072602052604090206001015442916122839162093a8091166159a8565b67ffffffffffffffff1611156122c5576040517fd257555a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b611a36614306565b607b5473ffffffffffffffffffffffffffffffffffffffff163314612320576040517fd1ec4b2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b54607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691821790556040519081527f056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e9060200160405180910390a1565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa15801561242a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061244e9190615a97565b9050600061245a612a89565b60735467ffffffffffffffff6801000000000000000082048116916124b29170010000000000000000000000000000000082048116917801000000000000000000000000000000000000000000000000900416615b54565b6124bc91906159a8565b6124c69190615b54565b67ffffffffffffffff169050806000036124e35760009250505090565b6124ed8183615bd4565b9250505090565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612545576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62093a8067ffffffffffffffff8216111561258c576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff166125f35760795467ffffffffffffffff7001000000000000000000000000000000009091048116908216106125f3576040517f48a05a9000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607980547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c7590602001610d4d565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146126c1576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620151808167ffffffffffffffff161115612708576040517fe067dfe800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff1661010067ffffffffffffffff8416908102919091179091556040519081527f1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c2890602001610d4d565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146127d3576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6127e287878787878787614730565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8781169182179092556000908152607560205260409020849055607954161561285d57607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018590527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156128e557600080fd5b505af11580156128f9573d6000803e3d6000fd5b505060405185815233925067ffffffffffffffff881691507fcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe90602001611f42565b607a5473ffffffffffffffffffffffffffffffffffffffff16331461298c576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce690602001610d4d565b600067ffffffff0000000167ffffffffffffffff8316108015612a37575067ffffffff00000001604083901c67ffffffffffffffff16105b8015612a58575067ffffffff00000001608083901c67ffffffffffffffff16105b8015612a6f575067ffffffff0000000160c083901c105b15612a7c57506001919050565b506000919050565b919050565b60795460009067ffffffffffffffff1615612acd575060795467ffffffffffffffff9081166000908152607860205260409020546801000000000000000090041690565b5060745467ffffffffffffffff1690565b607a5473ffffffffffffffffffffffffffffffffffffffff163314612b2f576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6076612b3b8282615c36565b507f6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b2081604051610d4d9190615461565b600054610100900460ff1615808015612b8b5750600054600160ff909116105b80612ba55750303b158015612ba5575060005460ff166001145b612c36576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015612c9457600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b612ca16020880188615666565b607a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055612cf66040880160208901615666565b606f805473ffffffffffffffffffffffffffffffffffffffff929092166b010000000000000000000000027fff0000000000000000000000000000000000000000ffffffffffffffffffffff909216919091179055612d5b6080880160608901615666565b6074805473ffffffffffffffffffffffffffffffffffffffff9290921668010000000000000000027fffffffff0000000000000000000000000000000000000000ffffffffffffffff9092169190911790556000805260756020527ff9e3fbf150b7a0077118526f473c53cb4734f166167e2c6213e3567dd390b4ad8690556076612de68682615c36565b506077612df38582615c36565b5062093a80612e086060890160408a016154ec565b67ffffffffffffffff161115612e4a576040517fcc96507000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612e5a60608801604089016154ec565b6079805467ffffffffffffffff92909216700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff90921691909117905562093a80612ebc60a0890160808a016154ec565b67ffffffffffffffff161115612efe576040517f1d06e87900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612f0e60a08801608089016154ec565b6079805477ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff939093169290920291909117905567016345785d8a0000607055606f80547fffffffffffffffffffffffffffffffffffffffffff00000000000000000000ff166a03ea000000000000070800179055607b80547fffffff000000000000000000ffffffffffffffffffffffffffffffffffffffff167c0100000000000697800000000000000000000000000000000000000000179055612fed614dc1565b7f13e60734641bd97ab6e444f419277d9983e2c3eab9bb631a578ffa07756b635160007f000000000000000000000000000000000000000000000000000000000000000085856040516130439493929190615d50565b60405180910390a180156130ae57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff1615613114576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff1615613151576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600081900361318d576040517fcb591a5f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103e88111156131c9576040517fb59f753a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff78010000000000000000000000000000000000000000000000008204811691613214918491700100000000000000000000000000000000900416615d88565b111561324c576040517fc630a00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60735467ffffffffffffffff680100000000000000008204811660008181526072602052604081205491937001000000000000000000000000000000009004909216915b848110156134f65760008787838181106132ac576132ac6159d0565b90506020028101906132be9190615d9b565b6132c790615dd9565b9050836132d381615a70565b825180516020918201208185015160408087015190519499509194506000936133359386939101928352602083019190915260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016604082015260480190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012067ffffffffffffffff89166000908152607190935291205490915081146133be576040517fce3d755e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff86166000908152607160205260408120556133e3600189615b75565b84036134525742607b60149054906101000a900467ffffffffffffffff16846040015161341091906159a8565b67ffffffffffffffff161115613452576040517fc44a082100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020838101516040805192830188905282018490526060808301919091524260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016608083015233901b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166088820152609c0160405160208183030381529060405280519060200120945050505080806134ee90615ab0565b915050613290565b5061350184846159a8565b6073805467ffffffffffffffff4281167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009092168217808455604080516060810182528781526020808201958652680100000000000000009384900485168284019081528589166000818152607290935284832093518455965160019390930180549151871686027fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921693871693909317179091558554938916700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff938602939093167fffffffffffffffff00000000000000000000000000000000ffffffffffffffff90941693909317919091179093559151929550917f648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a49190a2505050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff1633146136aa576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663dbc169766040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561371257600080fd5b505af1158015613726573d6000803e3d6000fd5b5050505061215d614e61565b60745468010000000000000000900473ffffffffffffffffffffffffffffffffffffffff16331461378f576040517fbbcbbc0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61379f8888888888888888613ebe565b607480547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8781169182179092556000908152607560205260409020849055607954161561381a57607980547fffffffffffffffffffffffffffffffff000000000000000000000000000000001690555b6040517f33d6247d000000000000000000000000000000000000000000000000000000008152600481018590527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156138a257600080fd5b505af11580156138b6573d6000803e3d6000fd5b50506079805477ffffffffffffffffffffffffffffffffffffffffffffffff167a093a800000000000000000000000000000000000000000000000001790555050604051838152339067ffffffffffffffff8716907fcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf729060200160405180910390a35050505050505050565b607b547c0100000000000000000000000000000000000000000000000000000000900460ff161561399f576040517f24eff8c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f5460ff16156139dc576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006139e6612060565b905081811115613a22576040517f4732fdb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611388831115613a5e576040517fa29a6c7c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613aa073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633308461438e565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633ed691ef6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b319190615a97565b60738054919250780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16906018613b6b83615a70565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550508484604051613ba2929190615e69565b60408051918290038220602083015281018290527fffffffffffffffff0000000000000000000000000000000000000000000000004260c01b166060820152606801604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291815281516020928301206073547801000000000000000000000000000000000000000000000000900467ffffffffffffffff1660009081526071909352912055323303613cd257607354604080518381523360208201526060918101829052600091810191909152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16907ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc9319060800160405180910390a2613d31565b607360189054906101000a900467ffffffffffffffff1667ffffffffffffffff167ff94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc93182338888604051613d289493929190615e79565b60405180910390a25b5050505050565b607a5473ffffffffffffffffffffffffffffffffffffffff163314613d89576040517f4755657900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b607480547fffffffff0000000000000000000000000000000000000000ffffffffffffffff166801000000000000000073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040519081527f61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca90602001610d4d565b613e12614cc9565b73ffffffffffffffffffffffffffffffffffffffff8116613eb5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401612c2d565b611a3681614d4a565b600067ffffffffffffffff891615613f8c5760795467ffffffffffffffff908116908a161115613f1a576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5067ffffffffffffffff8089166000908152607860205260409020600281015481549092898116680100000000000000009092041614613f86576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50614028565b5067ffffffffffffffff861660009081526075602052604090205480613fde576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60745467ffffffffffffffff9081169088161115614028576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60795467ffffffffffffffff908116908916118061405a57508867ffffffffffffffff168867ffffffffffffffff1611155b80614081575060795467ffffffffffffffff68010000000000000000909104811690891611155b156140b8576040517fbfa7079f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff88811660009081526078602052604090205468010000000000000000900481169087161461411b576040517f32a2a77f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061412a8888888589610d58565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160028360405161415f9190615eaf565b602060405180830381855afa15801561417c573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061419f9190615a97565b6141a99190615ec1565b6040805160208101825282815290517f8d8f8a5c00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691638d8f8a5c9161422c9189918991600401615ed5565b602060405180830381865afa158015614249573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061426d9190615f1d565b6142a3576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8a166000908152607860205260409020600201548690036142f9576040517fa47276bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632072f6c56040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561436e57600080fd5b505af1158015614382573d6000803e3d6000fd5b5050505061215d614ef0565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261446a9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614f83565b50505050565b60795467ffffffffffffffff68010000000000000000820481169116111561215d576079546000906144b99068010000000000000000900467ffffffffffffffff1660016159a8565b90506144c481610f2f565b15611a36576079546000906002906144e790849067ffffffffffffffff16615b54565b6144f19190615f3f565b6144fb90836159a8565b905061450681610f2f565b15614518576145148161451d565b5050565b614514825b60795467ffffffffffffffff680100000000000000009091048116908216111580614557575060795467ffffffffffffffff908116908216115b1561458e576040517fd086b70b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff818116600081815260786020908152604080832080546074805468010000000000000000928390049098167fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090981688179055600282015487865260759094529382902092909255607980547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff169390940292909217909255600182015490517f33d6247d00000000000000000000000000000000000000000000000000000000815260048101919091529091907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906333d6247d90602401600060405180830381600087803b1580156146c057600080fd5b505af11580156146d4573d6000803e3d6000fd5b505050508267ffffffffffffffff168167ffffffffffffffff167f328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e846002015460405161472391815260200190565b60405180910390a3505050565b60008061473b612a89565b905067ffffffffffffffff89161561480b5760795467ffffffffffffffff908116908a161115614797576040517fbb14c20500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff808a1660009081526078602052604090206002810154815490945090918a8116680100000000000000009092041614614805576040517f2bd2e3e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506148ac565b67ffffffffffffffff881660009081526075602052604090205491508161485e576040517f4997b98600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168867ffffffffffffffff1611156148ac576040517f1e56e9e200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8067ffffffffffffffff168767ffffffffffffffff16116148f9576040517fb9b18f5700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000614908898989868a610d58565b905060007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000160028360405161493d9190615eaf565b602060405180830381855afa15801561495a573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061497d9190615a97565b6149879190615ec1565b6040805160208101825282815290517f8d8f8a5c00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001691638d8f8a5c91614a0a918a918a91600401615ed5565b602060405180830381865afa158015614a27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a4b9190615f1d565b614a81576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6142f933614a8f858c615b54565b67ffffffffffffffff16614aa161239b565b614aab9190615b8e565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169190615094565b6000614af3612a89565b905081600080614b038484615b54565b606f5467ffffffffffffffff9182169250600091614b279161010090041642615b75565b90505b8467ffffffffffffffff168467ffffffffffffffff1614614bb25767ffffffffffffffff80851660009081526072602052604090206001810154909116821015614b9057600181015468010000000000000000900467ffffffffffffffff169450614bac565b614b9a8686615b54565b67ffffffffffffffff16935050614bb2565b50614b2a565b6000614bbe8484615b75565b905083811015614c1557808403600c8111614bd95780614bdc565b600c5b9050806103e80a81606f60099054906101000a900461ffff1661ffff160a6070540281614c0b57614c0b615ba5565b0460705550614c85565b838103600c8111614c265780614c29565b600c5b90506000816103e80a82606f60099054906101000a900461ffff1661ffff160a670de0b6b3a76400000281614c6057614c60615ba5565b04905080607054670de0b6b3a76400000281614c7e57614c7e615ba5565b0460705550505b683635c9adc5dea000006070541115614caa57683635c9adc5dea000006070556130ae565b633b9aca0060705410156130ae57633b9aca0060705550505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff16331461215d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401612c2d565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16614e58576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401612c2d565b61215d33614d4a565b606f5460ff16614e9d576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b606f5460ff1615614f2d576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b6000614fe5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166150ea9092919063ffffffff16565b80519091501561508f57808060200190518101906150039190615f1d565b61508f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401612c2d565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261508f9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016143e8565b60606150f98484600085615101565b949350505050565b606082471015615193576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401612c2d565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516151bc9190615eaf565b60006040518083038185875af1925050503d80600081146151f9576040519150601f19603f3d011682016040523d82523d6000602084013e6151fe565b606091505b509150915061520f8783838761521a565b979650505050505050565b606083156152b05782516000036152a95773ffffffffffffffffffffffffffffffffffffffff85163b6152a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612c2d565b50816150f9565b6150f983838151156152c55781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c2d9190615461565b803567ffffffffffffffff81168114612a8457600080fd5b60008083601f84011261532357600080fd5b50813567ffffffffffffffff81111561533b57600080fd5b60208301915083602082850101111561535357600080fd5b9250929050565b60008060008060008060008060e0898b03121561537657600080fd5b61537f896152f9565b975061538d60208a016152f9565b965061539b60408a016152f9565b95506153a960608a016152f9565b94506080890135935060a0890135925060c089013567ffffffffffffffff8111156153d357600080fd5b6153df8b828c01615311565b999c989b5096995094979396929594505050565b60005b8381101561540e5781810151838201526020016153f6565b50506000910152565b6000815180845261542f8160208601602086016153f3565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006154746020830184615417565b9392505050565b60006020828403121561548d57600080fd5b813561ffff8116811461547457600080fd5b600080600080600060a086880312156154b757600080fd5b6154c0866152f9565b94506154ce602087016152f9565b94979496505050506040830135926060810135926080909101359150565b6000602082840312156154fe57600080fd5b615474826152f9565b803573ffffffffffffffffffffffffffffffffffffffff81168114612a8457600080fd5b60008060008060006060868803121561554357600080fd5b853567ffffffffffffffff8082111561555b57600080fd5b818801915088601f83011261556f57600080fd5b81358181111561557e57600080fd5b8960208260071b850101111561559357600080fd5b602083019750809650506155a960208901615507565b945060408801359150808211156155bf57600080fd5b506155cc88828901615311565b969995985093965092949392505050565b600080600080600080600060c0888a0312156155f857600080fd5b615601886152f9565b965061560f602089016152f9565b955061561d604089016152f9565b9450606088013593506080880135925060a088013567ffffffffffffffff81111561564757600080fd5b6156538a828b01615311565b989b979a50959850939692959293505050565b60006020828403121561567857600080fd5b61547482615507565b60006020828403121561569357600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff808411156156e4576156e461569a565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561572a5761572a61569a565b8160405280935085815286868601111561574357600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261576e57600080fd5b615474838335602085016156c9565b60006020828403121561578f57600080fd5b813567ffffffffffffffff8111156157a657600080fd5b6150f98482850161575d565b6000806000806000808688036101208112156157cd57600080fd5b60a08112156157db57600080fd5b5086955060a0870135945060c087013567ffffffffffffffff8082111561580157600080fd5b61580d8a838b0161575d565b955060e089013591508082111561582357600080fd5b61582f8a838b0161575d565b945061010089013591508082111561584657600080fd5b5061585389828a01615311565b979a9699509497509295939492505050565b6000806020838503121561587857600080fd5b823567ffffffffffffffff8082111561589057600080fd5b818501915085601f8301126158a457600080fd5b8135818111156158b357600080fd5b8660208260051b85010111156158c857600080fd5b60209290920196919550909350505050565b6000806000604084860312156158ef57600080fd5b833567ffffffffffffffff81111561590657600080fd5b61591286828701615311565b909790965060209590950135949350505050565b600181811c9082168061593a57607f821691505b602082108103615973577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b67ffffffffffffffff8181168382160190808211156159c9576159c9615979565b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060808284031215615a1157600080fd5b6040516080810181811067ffffffffffffffff82111715615a3457615a3461569a565b80604052508235815260208301356020820152615a53604084016152f9565b6040820152615a64606084016152f9565b60608201529392505050565b600067ffffffffffffffff808316818103615a8d57615a8d615979565b6001019392505050565b600060208284031215615aa957600080fd5b5051919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615ae157615ae1615979565b5060010190565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b838152604060208201526000615b4b604083018486615ae8565b95945050505050565b67ffffffffffffffff8281168282160390808211156159c9576159c9615979565b81810381811115615b8857615b88615979565b92915050565b8082028115828204841417615b8857615b88615979565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615be357615be3615ba5565b500490565b601f82111561508f57600081815260208120601f850160051c81016020861015615c0f5750805b601f850160051c820191505b81811015615c2e57828155600101615c1b565b505050505050565b815167ffffffffffffffff811115615c5057615c5061569a565b615c6481615c5e8454615926565b84615be8565b602080601f831160018114615cb75760008415615c815750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555615c2e565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015615d0457888601518255948401946001909101908401615ce5565b5085821015615d4057878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600067ffffffffffffffff808716835280861660208401525060606040830152615d7e606083018486615ae8565b9695505050505050565b80820180821115615b8857615b88615979565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112615dcf57600080fd5b9190910192915050565b600060608236031215615deb57600080fd5b6040516060810167ffffffffffffffff8282108183111715615e0f57615e0f61569a565b816040528435915080821115615e2457600080fd5b50830136601f820112615e3657600080fd5b615e45368235602084016156c9565b82525060208301356020820152615e5e604084016152f9565b604082015292915050565b8183823760009101908152919050565b84815273ffffffffffffffffffffffffffffffffffffffff84166020820152606060408201526000615d7e606083018486615ae8565b60008251615dcf8184602087016153f3565b600082615ed057615ed0615ba5565b500690565b604081526000615ee9604083018587615ae8565b905060208083018460005b6001811015615f1157815183529183019190830190600101615ef4565b50505050949350505050565b600060208284031215615f2f57600080fd5b8151801515811461547457600080fd5b600067ffffffffffffffff80841680615f5a57615f5a615ba5565b9216919091049291505056fea26469706673582212205f6db821da6f759d2be7ce71edb3709e45a5d7fdf189e8a24601801279bb362364736f6c63430008110033", +} + +// Supernets2ABI is the input ABI used to generate the binding from. +// Deprecated: Use Supernets2MetaData.ABI instead. +var Supernets2ABI = Supernets2MetaData.ABI + +// Supernets2Bin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use Supernets2MetaData.Bin instead. +var Supernets2Bin = Supernets2MetaData.Bin + +// DeploySupernets2 deploys a new Ethereum contract, binding an instance of Supernets2 to it. +func DeploySupernets2(auth *bind.TransactOpts, backend bind.ContractBackend, _globalExitRootManager common.Address, _matic common.Address, _rollupVerifier common.Address, _bridgeAddress common.Address, _dataCommitteeAddress common.Address, _chainID uint64, _forkID uint64) (common.Address, *types.Transaction, *Supernets2, error) { + parsed, err := Supernets2MetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(Supernets2Bin), backend, _globalExitRootManager, _matic, _rollupVerifier, _bridgeAddress, _dataCommitteeAddress, _chainID, _forkID) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Supernets2{Supernets2Caller: Supernets2Caller{contract: contract}, Supernets2Transactor: Supernets2Transactor{contract: contract}, Supernets2Filterer: Supernets2Filterer{contract: contract}}, nil +} + +// Supernets2 is an auto generated Go binding around an Ethereum contract. +type Supernets2 struct { + Supernets2Caller // Read-only binding to the contract + Supernets2Transactor // Write-only binding to the contract + Supernets2Filterer // Log filterer for contract events +} + +// Supernets2Caller is an auto generated read-only Go binding around an Ethereum contract. +type Supernets2Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Supernets2Transactor is an auto generated write-only Go binding around an Ethereum contract. +type Supernets2Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Supernets2Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type Supernets2Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Supernets2Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type Supernets2Session struct { + Contract *Supernets2 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// Supernets2CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type Supernets2CallerSession struct { + Contract *Supernets2Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// Supernets2TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type Supernets2TransactorSession struct { + Contract *Supernets2Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// Supernets2Raw is an auto generated low-level Go binding around an Ethereum contract. +type Supernets2Raw struct { + Contract *Supernets2 // Generic contract binding to access the raw methods on +} + +// Supernets2CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type Supernets2CallerRaw struct { + Contract *Supernets2Caller // Generic read-only contract binding to access the raw methods on +} + +// Supernets2TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type Supernets2TransactorRaw struct { + Contract *Supernets2Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewSupernets2 creates a new instance of Supernets2, bound to a specific deployed contract. +func NewSupernets2(address common.Address, backend bind.ContractBackend) (*Supernets2, error) { + contract, err := bindSupernets2(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Supernets2{Supernets2Caller: Supernets2Caller{contract: contract}, Supernets2Transactor: Supernets2Transactor{contract: contract}, Supernets2Filterer: Supernets2Filterer{contract: contract}}, nil +} + +// NewSupernets2Caller creates a new read-only instance of Supernets2, bound to a specific deployed contract. +func NewSupernets2Caller(address common.Address, caller bind.ContractCaller) (*Supernets2Caller, error) { + contract, err := bindSupernets2(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &Supernets2Caller{contract: contract}, nil +} + +// NewSupernets2Transactor creates a new write-only instance of Supernets2, bound to a specific deployed contract. +func NewSupernets2Transactor(address common.Address, transactor bind.ContractTransactor) (*Supernets2Transactor, error) { + contract, err := bindSupernets2(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &Supernets2Transactor{contract: contract}, nil +} + +// NewSupernets2Filterer creates a new log filterer instance of Supernets2, bound to a specific deployed contract. +func NewSupernets2Filterer(address common.Address, filterer bind.ContractFilterer) (*Supernets2Filterer, error) { + contract, err := bindSupernets2(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &Supernets2Filterer{contract: contract}, nil +} + +// bindSupernets2 binds a generic wrapper to an already deployed contract. +func bindSupernets2(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := Supernets2MetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Supernets2 *Supernets2Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Supernets2.Contract.Supernets2Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Supernets2 *Supernets2Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2.Contract.Supernets2Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Supernets2 *Supernets2Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Supernets2.Contract.Supernets2Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Supernets2 *Supernets2CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Supernets2.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Supernets2 *Supernets2TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Supernets2 *Supernets2TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Supernets2.Contract.contract.Transact(opts, method, params...) +} + +// Admin is a free data retrieval call binding the contract method 0xf851a440. +// +// Solidity: function admin() view returns(address) +func (_Supernets2 *Supernets2Caller) Admin(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "admin") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Admin is a free data retrieval call binding the contract method 0xf851a440. +// +// Solidity: function admin() view returns(address) +func (_Supernets2 *Supernets2Session) Admin() (common.Address, error) { + return _Supernets2.Contract.Admin(&_Supernets2.CallOpts) +} + +// Admin is a free data retrieval call binding the contract method 0xf851a440. +// +// Solidity: function admin() view returns(address) +func (_Supernets2 *Supernets2CallerSession) Admin() (common.Address, error) { + return _Supernets2.Contract.Admin(&_Supernets2.CallOpts) +} + +// BatchFee is a free data retrieval call binding the contract method 0xf8b823e4. +// +// Solidity: function batchFee() view returns(uint256) +func (_Supernets2 *Supernets2Caller) BatchFee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "batchFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BatchFee is a free data retrieval call binding the contract method 0xf8b823e4. +// +// Solidity: function batchFee() view returns(uint256) +func (_Supernets2 *Supernets2Session) BatchFee() (*big.Int, error) { + return _Supernets2.Contract.BatchFee(&_Supernets2.CallOpts) +} + +// BatchFee is a free data retrieval call binding the contract method 0xf8b823e4. +// +// Solidity: function batchFee() view returns(uint256) +func (_Supernets2 *Supernets2CallerSession) BatchFee() (*big.Int, error) { + return _Supernets2.Contract.BatchFee(&_Supernets2.CallOpts) +} + +// BatchNumToStateRoot is a free data retrieval call binding the contract method 0x5392c5e0. +// +// Solidity: function batchNumToStateRoot(uint64 ) view returns(bytes32) +func (_Supernets2 *Supernets2Caller) BatchNumToStateRoot(opts *bind.CallOpts, arg0 uint64) ([32]byte, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "batchNumToStateRoot", arg0) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// BatchNumToStateRoot is a free data retrieval call binding the contract method 0x5392c5e0. +// +// Solidity: function batchNumToStateRoot(uint64 ) view returns(bytes32) +func (_Supernets2 *Supernets2Session) BatchNumToStateRoot(arg0 uint64) ([32]byte, error) { + return _Supernets2.Contract.BatchNumToStateRoot(&_Supernets2.CallOpts, arg0) +} + +// BatchNumToStateRoot is a free data retrieval call binding the contract method 0x5392c5e0. +// +// Solidity: function batchNumToStateRoot(uint64 ) view returns(bytes32) +func (_Supernets2 *Supernets2CallerSession) BatchNumToStateRoot(arg0 uint64) ([32]byte, error) { + return _Supernets2.Contract.BatchNumToStateRoot(&_Supernets2.CallOpts, arg0) +} + +// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. +// +// Solidity: function bridgeAddress() view returns(address) +func (_Supernets2 *Supernets2Caller) BridgeAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "bridgeAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. +// +// Solidity: function bridgeAddress() view returns(address) +func (_Supernets2 *Supernets2Session) BridgeAddress() (common.Address, error) { + return _Supernets2.Contract.BridgeAddress(&_Supernets2.CallOpts) +} + +// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. +// +// Solidity: function bridgeAddress() view returns(address) +func (_Supernets2 *Supernets2CallerSession) BridgeAddress() (common.Address, error) { + return _Supernets2.Contract.BridgeAddress(&_Supernets2.CallOpts) +} + +// CalculateRewardPerBatch is a free data retrieval call binding the contract method 0x99f5634e. +// +// Solidity: function calculateRewardPerBatch() view returns(uint256) +func (_Supernets2 *Supernets2Caller) CalculateRewardPerBatch(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "calculateRewardPerBatch") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CalculateRewardPerBatch is a free data retrieval call binding the contract method 0x99f5634e. +// +// Solidity: function calculateRewardPerBatch() view returns(uint256) +func (_Supernets2 *Supernets2Session) CalculateRewardPerBatch() (*big.Int, error) { + return _Supernets2.Contract.CalculateRewardPerBatch(&_Supernets2.CallOpts) +} + +// CalculateRewardPerBatch is a free data retrieval call binding the contract method 0x99f5634e. +// +// Solidity: function calculateRewardPerBatch() view returns(uint256) +func (_Supernets2 *Supernets2CallerSession) CalculateRewardPerBatch() (*big.Int, error) { + return _Supernets2.Contract.CalculateRewardPerBatch(&_Supernets2.CallOpts) +} + +// ChainID is a free data retrieval call binding the contract method 0xadc879e9. +// +// Solidity: function chainID() view returns(uint64) +func (_Supernets2 *Supernets2Caller) ChainID(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "chainID") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// ChainID is a free data retrieval call binding the contract method 0xadc879e9. +// +// Solidity: function chainID() view returns(uint64) +func (_Supernets2 *Supernets2Session) ChainID() (uint64, error) { + return _Supernets2.Contract.ChainID(&_Supernets2.CallOpts) +} + +// ChainID is a free data retrieval call binding the contract method 0xadc879e9. +// +// Solidity: function chainID() view returns(uint64) +func (_Supernets2 *Supernets2CallerSession) ChainID() (uint64, error) { + return _Supernets2.Contract.ChainID(&_Supernets2.CallOpts) +} + +// CheckStateRootInsidePrime is a free data retrieval call binding the contract method 0xba58ae39. +// +// Solidity: function checkStateRootInsidePrime(uint256 newStateRoot) pure returns(bool) +func (_Supernets2 *Supernets2Caller) CheckStateRootInsidePrime(opts *bind.CallOpts, newStateRoot *big.Int) (bool, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "checkStateRootInsidePrime", newStateRoot) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// CheckStateRootInsidePrime is a free data retrieval call binding the contract method 0xba58ae39. +// +// Solidity: function checkStateRootInsidePrime(uint256 newStateRoot) pure returns(bool) +func (_Supernets2 *Supernets2Session) CheckStateRootInsidePrime(newStateRoot *big.Int) (bool, error) { + return _Supernets2.Contract.CheckStateRootInsidePrime(&_Supernets2.CallOpts, newStateRoot) +} + +// CheckStateRootInsidePrime is a free data retrieval call binding the contract method 0xba58ae39. +// +// Solidity: function checkStateRootInsidePrime(uint256 newStateRoot) pure returns(bool) +func (_Supernets2 *Supernets2CallerSession) CheckStateRootInsidePrime(newStateRoot *big.Int) (bool, error) { + return _Supernets2.Contract.CheckStateRootInsidePrime(&_Supernets2.CallOpts, newStateRoot) +} + +// DataCommitteeAddress is a free data retrieval call binding the contract method 0x4df61d24. +// +// Solidity: function dataCommitteeAddress() view returns(address) +func (_Supernets2 *Supernets2Caller) DataCommitteeAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "dataCommitteeAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// DataCommitteeAddress is a free data retrieval call binding the contract method 0x4df61d24. +// +// Solidity: function dataCommitteeAddress() view returns(address) +func (_Supernets2 *Supernets2Session) DataCommitteeAddress() (common.Address, error) { + return _Supernets2.Contract.DataCommitteeAddress(&_Supernets2.CallOpts) +} + +// DataCommitteeAddress is a free data retrieval call binding the contract method 0x4df61d24. +// +// Solidity: function dataCommitteeAddress() view returns(address) +func (_Supernets2 *Supernets2CallerSession) DataCommitteeAddress() (common.Address, error) { + return _Supernets2.Contract.DataCommitteeAddress(&_Supernets2.CallOpts) +} + +// ForceBatchTimeout is a free data retrieval call binding the contract method 0xc754c7ed. +// +// Solidity: function forceBatchTimeout() view returns(uint64) +func (_Supernets2 *Supernets2Caller) ForceBatchTimeout(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "forceBatchTimeout") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// ForceBatchTimeout is a free data retrieval call binding the contract method 0xc754c7ed. +// +// Solidity: function forceBatchTimeout() view returns(uint64) +func (_Supernets2 *Supernets2Session) ForceBatchTimeout() (uint64, error) { + return _Supernets2.Contract.ForceBatchTimeout(&_Supernets2.CallOpts) +} + +// ForceBatchTimeout is a free data retrieval call binding the contract method 0xc754c7ed. +// +// Solidity: function forceBatchTimeout() view returns(uint64) +func (_Supernets2 *Supernets2CallerSession) ForceBatchTimeout() (uint64, error) { + return _Supernets2.Contract.ForceBatchTimeout(&_Supernets2.CallOpts) +} + +// ForcedBatches is a free data retrieval call binding the contract method 0x6b8616ce. +// +// Solidity: function forcedBatches(uint64 ) view returns(bytes32) +func (_Supernets2 *Supernets2Caller) ForcedBatches(opts *bind.CallOpts, arg0 uint64) ([32]byte, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "forcedBatches", arg0) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ForcedBatches is a free data retrieval call binding the contract method 0x6b8616ce. +// +// Solidity: function forcedBatches(uint64 ) view returns(bytes32) +func (_Supernets2 *Supernets2Session) ForcedBatches(arg0 uint64) ([32]byte, error) { + return _Supernets2.Contract.ForcedBatches(&_Supernets2.CallOpts, arg0) +} + +// ForcedBatches is a free data retrieval call binding the contract method 0x6b8616ce. +// +// Solidity: function forcedBatches(uint64 ) view returns(bytes32) +func (_Supernets2 *Supernets2CallerSession) ForcedBatches(arg0 uint64) ([32]byte, error) { + return _Supernets2.Contract.ForcedBatches(&_Supernets2.CallOpts, arg0) +} + +// ForkID is a free data retrieval call binding the contract method 0x831c7ead. +// +// Solidity: function forkID() view returns(uint64) +func (_Supernets2 *Supernets2Caller) ForkID(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "forkID") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// ForkID is a free data retrieval call binding the contract method 0x831c7ead. +// +// Solidity: function forkID() view returns(uint64) +func (_Supernets2 *Supernets2Session) ForkID() (uint64, error) { + return _Supernets2.Contract.ForkID(&_Supernets2.CallOpts) +} + +// ForkID is a free data retrieval call binding the contract method 0x831c7ead. +// +// Solidity: function forkID() view returns(uint64) +func (_Supernets2 *Supernets2CallerSession) ForkID() (uint64, error) { + return _Supernets2.Contract.ForkID(&_Supernets2.CallOpts) +} + +// GetForcedBatchFee is a free data retrieval call binding the contract method 0x60469169. +// +// Solidity: function getForcedBatchFee() view returns(uint256) +func (_Supernets2 *Supernets2Caller) GetForcedBatchFee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "getForcedBatchFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetForcedBatchFee is a free data retrieval call binding the contract method 0x60469169. +// +// Solidity: function getForcedBatchFee() view returns(uint256) +func (_Supernets2 *Supernets2Session) GetForcedBatchFee() (*big.Int, error) { + return _Supernets2.Contract.GetForcedBatchFee(&_Supernets2.CallOpts) +} + +// GetForcedBatchFee is a free data retrieval call binding the contract method 0x60469169. +// +// Solidity: function getForcedBatchFee() view returns(uint256) +func (_Supernets2 *Supernets2CallerSession) GetForcedBatchFee() (*big.Int, error) { + return _Supernets2.Contract.GetForcedBatchFee(&_Supernets2.CallOpts) +} + +// GetInputSnarkBytes is a free data retrieval call binding the contract method 0x220d7899. +// +// Solidity: function getInputSnarkBytes(uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 oldStateRoot, bytes32 newStateRoot) view returns(bytes) +func (_Supernets2 *Supernets2Caller) GetInputSnarkBytes(opts *bind.CallOpts, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, oldStateRoot [32]byte, newStateRoot [32]byte) ([]byte, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "getInputSnarkBytes", initNumBatch, finalNewBatch, newLocalExitRoot, oldStateRoot, newStateRoot) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetInputSnarkBytes is a free data retrieval call binding the contract method 0x220d7899. +// +// Solidity: function getInputSnarkBytes(uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 oldStateRoot, bytes32 newStateRoot) view returns(bytes) +func (_Supernets2 *Supernets2Session) GetInputSnarkBytes(initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, oldStateRoot [32]byte, newStateRoot [32]byte) ([]byte, error) { + return _Supernets2.Contract.GetInputSnarkBytes(&_Supernets2.CallOpts, initNumBatch, finalNewBatch, newLocalExitRoot, oldStateRoot, newStateRoot) +} + +// GetInputSnarkBytes is a free data retrieval call binding the contract method 0x220d7899. +// +// Solidity: function getInputSnarkBytes(uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 oldStateRoot, bytes32 newStateRoot) view returns(bytes) +func (_Supernets2 *Supernets2CallerSession) GetInputSnarkBytes(initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, oldStateRoot [32]byte, newStateRoot [32]byte) ([]byte, error) { + return _Supernets2.Contract.GetInputSnarkBytes(&_Supernets2.CallOpts, initNumBatch, finalNewBatch, newLocalExitRoot, oldStateRoot, newStateRoot) +} + +// GetLastVerifiedBatch is a free data retrieval call binding the contract method 0xc0ed84e0. +// +// Solidity: function getLastVerifiedBatch() view returns(uint64) +func (_Supernets2 *Supernets2Caller) GetLastVerifiedBatch(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "getLastVerifiedBatch") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// GetLastVerifiedBatch is a free data retrieval call binding the contract method 0xc0ed84e0. +// +// Solidity: function getLastVerifiedBatch() view returns(uint64) +func (_Supernets2 *Supernets2Session) GetLastVerifiedBatch() (uint64, error) { + return _Supernets2.Contract.GetLastVerifiedBatch(&_Supernets2.CallOpts) +} + +// GetLastVerifiedBatch is a free data retrieval call binding the contract method 0xc0ed84e0. +// +// Solidity: function getLastVerifiedBatch() view returns(uint64) +func (_Supernets2 *Supernets2CallerSession) GetLastVerifiedBatch() (uint64, error) { + return _Supernets2.Contract.GetLastVerifiedBatch(&_Supernets2.CallOpts) +} + +// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. +// +// Solidity: function globalExitRootManager() view returns(address) +func (_Supernets2 *Supernets2Caller) GlobalExitRootManager(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "globalExitRootManager") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. +// +// Solidity: function globalExitRootManager() view returns(address) +func (_Supernets2 *Supernets2Session) GlobalExitRootManager() (common.Address, error) { + return _Supernets2.Contract.GlobalExitRootManager(&_Supernets2.CallOpts) +} + +// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. +// +// Solidity: function globalExitRootManager() view returns(address) +func (_Supernets2 *Supernets2CallerSession) GlobalExitRootManager() (common.Address, error) { + return _Supernets2.Contract.GlobalExitRootManager(&_Supernets2.CallOpts) +} + +// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. +// +// Solidity: function isEmergencyState() view returns(bool) +func (_Supernets2 *Supernets2Caller) IsEmergencyState(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "isEmergencyState") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. +// +// Solidity: function isEmergencyState() view returns(bool) +func (_Supernets2 *Supernets2Session) IsEmergencyState() (bool, error) { + return _Supernets2.Contract.IsEmergencyState(&_Supernets2.CallOpts) +} + +// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. +// +// Solidity: function isEmergencyState() view returns(bool) +func (_Supernets2 *Supernets2CallerSession) IsEmergencyState() (bool, error) { + return _Supernets2.Contract.IsEmergencyState(&_Supernets2.CallOpts) +} + +// IsForcedBatchDisallowed is a free data retrieval call binding the contract method 0xed6b0104. +// +// Solidity: function isForcedBatchDisallowed() view returns(bool) +func (_Supernets2 *Supernets2Caller) IsForcedBatchDisallowed(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "isForcedBatchDisallowed") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsForcedBatchDisallowed is a free data retrieval call binding the contract method 0xed6b0104. +// +// Solidity: function isForcedBatchDisallowed() view returns(bool) +func (_Supernets2 *Supernets2Session) IsForcedBatchDisallowed() (bool, error) { + return _Supernets2.Contract.IsForcedBatchDisallowed(&_Supernets2.CallOpts) +} + +// IsForcedBatchDisallowed is a free data retrieval call binding the contract method 0xed6b0104. +// +// Solidity: function isForcedBatchDisallowed() view returns(bool) +func (_Supernets2 *Supernets2CallerSession) IsForcedBatchDisallowed() (bool, error) { + return _Supernets2.Contract.IsForcedBatchDisallowed(&_Supernets2.CallOpts) +} + +// IsPendingStateConsolidable is a free data retrieval call binding the contract method 0x383b3be8. +// +// Solidity: function isPendingStateConsolidable(uint64 pendingStateNum) view returns(bool) +func (_Supernets2 *Supernets2Caller) IsPendingStateConsolidable(opts *bind.CallOpts, pendingStateNum uint64) (bool, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "isPendingStateConsolidable", pendingStateNum) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsPendingStateConsolidable is a free data retrieval call binding the contract method 0x383b3be8. +// +// Solidity: function isPendingStateConsolidable(uint64 pendingStateNum) view returns(bool) +func (_Supernets2 *Supernets2Session) IsPendingStateConsolidable(pendingStateNum uint64) (bool, error) { + return _Supernets2.Contract.IsPendingStateConsolidable(&_Supernets2.CallOpts, pendingStateNum) +} + +// IsPendingStateConsolidable is a free data retrieval call binding the contract method 0x383b3be8. +// +// Solidity: function isPendingStateConsolidable(uint64 pendingStateNum) view returns(bool) +func (_Supernets2 *Supernets2CallerSession) IsPendingStateConsolidable(pendingStateNum uint64) (bool, error) { + return _Supernets2.Contract.IsPendingStateConsolidable(&_Supernets2.CallOpts, pendingStateNum) +} + +// LastBatchSequenced is a free data retrieval call binding the contract method 0x423fa856. +// +// Solidity: function lastBatchSequenced() view returns(uint64) +func (_Supernets2 *Supernets2Caller) LastBatchSequenced(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "lastBatchSequenced") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastBatchSequenced is a free data retrieval call binding the contract method 0x423fa856. +// +// Solidity: function lastBatchSequenced() view returns(uint64) +func (_Supernets2 *Supernets2Session) LastBatchSequenced() (uint64, error) { + return _Supernets2.Contract.LastBatchSequenced(&_Supernets2.CallOpts) +} + +// LastBatchSequenced is a free data retrieval call binding the contract method 0x423fa856. +// +// Solidity: function lastBatchSequenced() view returns(uint64) +func (_Supernets2 *Supernets2CallerSession) LastBatchSequenced() (uint64, error) { + return _Supernets2.Contract.LastBatchSequenced(&_Supernets2.CallOpts) +} + +// LastForceBatch is a free data retrieval call binding the contract method 0xe7a7ed02. +// +// Solidity: function lastForceBatch() view returns(uint64) +func (_Supernets2 *Supernets2Caller) LastForceBatch(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "lastForceBatch") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastForceBatch is a free data retrieval call binding the contract method 0xe7a7ed02. +// +// Solidity: function lastForceBatch() view returns(uint64) +func (_Supernets2 *Supernets2Session) LastForceBatch() (uint64, error) { + return _Supernets2.Contract.LastForceBatch(&_Supernets2.CallOpts) +} + +// LastForceBatch is a free data retrieval call binding the contract method 0xe7a7ed02. +// +// Solidity: function lastForceBatch() view returns(uint64) +func (_Supernets2 *Supernets2CallerSession) LastForceBatch() (uint64, error) { + return _Supernets2.Contract.LastForceBatch(&_Supernets2.CallOpts) +} + +// LastForceBatchSequenced is a free data retrieval call binding the contract method 0x45605267. +// +// Solidity: function lastForceBatchSequenced() view returns(uint64) +func (_Supernets2 *Supernets2Caller) LastForceBatchSequenced(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "lastForceBatchSequenced") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastForceBatchSequenced is a free data retrieval call binding the contract method 0x45605267. +// +// Solidity: function lastForceBatchSequenced() view returns(uint64) +func (_Supernets2 *Supernets2Session) LastForceBatchSequenced() (uint64, error) { + return _Supernets2.Contract.LastForceBatchSequenced(&_Supernets2.CallOpts) +} + +// LastForceBatchSequenced is a free data retrieval call binding the contract method 0x45605267. +// +// Solidity: function lastForceBatchSequenced() view returns(uint64) +func (_Supernets2 *Supernets2CallerSession) LastForceBatchSequenced() (uint64, error) { + return _Supernets2.Contract.LastForceBatchSequenced(&_Supernets2.CallOpts) +} + +// LastPendingState is a free data retrieval call binding the contract method 0x458c0477. +// +// Solidity: function lastPendingState() view returns(uint64) +func (_Supernets2 *Supernets2Caller) LastPendingState(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "lastPendingState") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastPendingState is a free data retrieval call binding the contract method 0x458c0477. +// +// Solidity: function lastPendingState() view returns(uint64) +func (_Supernets2 *Supernets2Session) LastPendingState() (uint64, error) { + return _Supernets2.Contract.LastPendingState(&_Supernets2.CallOpts) +} + +// LastPendingState is a free data retrieval call binding the contract method 0x458c0477. +// +// Solidity: function lastPendingState() view returns(uint64) +func (_Supernets2 *Supernets2CallerSession) LastPendingState() (uint64, error) { + return _Supernets2.Contract.LastPendingState(&_Supernets2.CallOpts) +} + +// LastPendingStateConsolidated is a free data retrieval call binding the contract method 0x4a1a89a7. +// +// Solidity: function lastPendingStateConsolidated() view returns(uint64) +func (_Supernets2 *Supernets2Caller) LastPendingStateConsolidated(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "lastPendingStateConsolidated") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastPendingStateConsolidated is a free data retrieval call binding the contract method 0x4a1a89a7. +// +// Solidity: function lastPendingStateConsolidated() view returns(uint64) +func (_Supernets2 *Supernets2Session) LastPendingStateConsolidated() (uint64, error) { + return _Supernets2.Contract.LastPendingStateConsolidated(&_Supernets2.CallOpts) +} + +// LastPendingStateConsolidated is a free data retrieval call binding the contract method 0x4a1a89a7. +// +// Solidity: function lastPendingStateConsolidated() view returns(uint64) +func (_Supernets2 *Supernets2CallerSession) LastPendingStateConsolidated() (uint64, error) { + return _Supernets2.Contract.LastPendingStateConsolidated(&_Supernets2.CallOpts) +} + +// LastTimestamp is a free data retrieval call binding the contract method 0x19d8ac61. +// +// Solidity: function lastTimestamp() view returns(uint64) +func (_Supernets2 *Supernets2Caller) LastTimestamp(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "lastTimestamp") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastTimestamp is a free data retrieval call binding the contract method 0x19d8ac61. +// +// Solidity: function lastTimestamp() view returns(uint64) +func (_Supernets2 *Supernets2Session) LastTimestamp() (uint64, error) { + return _Supernets2.Contract.LastTimestamp(&_Supernets2.CallOpts) +} + +// LastTimestamp is a free data retrieval call binding the contract method 0x19d8ac61. +// +// Solidity: function lastTimestamp() view returns(uint64) +func (_Supernets2 *Supernets2CallerSession) LastTimestamp() (uint64, error) { + return _Supernets2.Contract.LastTimestamp(&_Supernets2.CallOpts) +} + +// LastVerifiedBatch is a free data retrieval call binding the contract method 0x7fcb3653. +// +// Solidity: function lastVerifiedBatch() view returns(uint64) +func (_Supernets2 *Supernets2Caller) LastVerifiedBatch(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "lastVerifiedBatch") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// LastVerifiedBatch is a free data retrieval call binding the contract method 0x7fcb3653. +// +// Solidity: function lastVerifiedBatch() view returns(uint64) +func (_Supernets2 *Supernets2Session) LastVerifiedBatch() (uint64, error) { + return _Supernets2.Contract.LastVerifiedBatch(&_Supernets2.CallOpts) +} + +// LastVerifiedBatch is a free data retrieval call binding the contract method 0x7fcb3653. +// +// Solidity: function lastVerifiedBatch() view returns(uint64) +func (_Supernets2 *Supernets2CallerSession) LastVerifiedBatch() (uint64, error) { + return _Supernets2.Contract.LastVerifiedBatch(&_Supernets2.CallOpts) +} + +// Matic is a free data retrieval call binding the contract method 0xb6b0b097. +// +// Solidity: function matic() view returns(address) +func (_Supernets2 *Supernets2Caller) Matic(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "matic") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Matic is a free data retrieval call binding the contract method 0xb6b0b097. +// +// Solidity: function matic() view returns(address) +func (_Supernets2 *Supernets2Session) Matic() (common.Address, error) { + return _Supernets2.Contract.Matic(&_Supernets2.CallOpts) +} + +// Matic is a free data retrieval call binding the contract method 0xb6b0b097. +// +// Solidity: function matic() view returns(address) +func (_Supernets2 *Supernets2CallerSession) Matic() (common.Address, error) { + return _Supernets2.Contract.Matic(&_Supernets2.CallOpts) +} + +// MultiplierBatchFee is a free data retrieval call binding the contract method 0xafd23cbe. +// +// Solidity: function multiplierBatchFee() view returns(uint16) +func (_Supernets2 *Supernets2Caller) MultiplierBatchFee(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "multiplierBatchFee") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// MultiplierBatchFee is a free data retrieval call binding the contract method 0xafd23cbe. +// +// Solidity: function multiplierBatchFee() view returns(uint16) +func (_Supernets2 *Supernets2Session) MultiplierBatchFee() (uint16, error) { + return _Supernets2.Contract.MultiplierBatchFee(&_Supernets2.CallOpts) +} + +// MultiplierBatchFee is a free data retrieval call binding the contract method 0xafd23cbe. +// +// Solidity: function multiplierBatchFee() view returns(uint16) +func (_Supernets2 *Supernets2CallerSession) MultiplierBatchFee() (uint16, error) { + return _Supernets2.Contract.MultiplierBatchFee(&_Supernets2.CallOpts) +} + +// NetworkName is a free data retrieval call binding the contract method 0x107bf28c. +// +// Solidity: function networkName() view returns(string) +func (_Supernets2 *Supernets2Caller) NetworkName(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "networkName") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// NetworkName is a free data retrieval call binding the contract method 0x107bf28c. +// +// Solidity: function networkName() view returns(string) +func (_Supernets2 *Supernets2Session) NetworkName() (string, error) { + return _Supernets2.Contract.NetworkName(&_Supernets2.CallOpts) +} + +// NetworkName is a free data retrieval call binding the contract method 0x107bf28c. +// +// Solidity: function networkName() view returns(string) +func (_Supernets2 *Supernets2CallerSession) NetworkName() (string, error) { + return _Supernets2.Contract.NetworkName(&_Supernets2.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Supernets2 *Supernets2Caller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Supernets2 *Supernets2Session) Owner() (common.Address, error) { + return _Supernets2.Contract.Owner(&_Supernets2.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Supernets2 *Supernets2CallerSession) Owner() (common.Address, error) { + return _Supernets2.Contract.Owner(&_Supernets2.CallOpts) +} + +// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. +// +// Solidity: function pendingAdmin() view returns(address) +func (_Supernets2 *Supernets2Caller) PendingAdmin(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "pendingAdmin") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. +// +// Solidity: function pendingAdmin() view returns(address) +func (_Supernets2 *Supernets2Session) PendingAdmin() (common.Address, error) { + return _Supernets2.Contract.PendingAdmin(&_Supernets2.CallOpts) +} + +// PendingAdmin is a free data retrieval call binding the contract method 0x26782247. +// +// Solidity: function pendingAdmin() view returns(address) +func (_Supernets2 *Supernets2CallerSession) PendingAdmin() (common.Address, error) { + return _Supernets2.Contract.PendingAdmin(&_Supernets2.CallOpts) +} + +// PendingStateTimeout is a free data retrieval call binding the contract method 0xd939b315. +// +// Solidity: function pendingStateTimeout() view returns(uint64) +func (_Supernets2 *Supernets2Caller) PendingStateTimeout(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "pendingStateTimeout") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// PendingStateTimeout is a free data retrieval call binding the contract method 0xd939b315. +// +// Solidity: function pendingStateTimeout() view returns(uint64) +func (_Supernets2 *Supernets2Session) PendingStateTimeout() (uint64, error) { + return _Supernets2.Contract.PendingStateTimeout(&_Supernets2.CallOpts) +} + +// PendingStateTimeout is a free data retrieval call binding the contract method 0xd939b315. +// +// Solidity: function pendingStateTimeout() view returns(uint64) +func (_Supernets2 *Supernets2CallerSession) PendingStateTimeout() (uint64, error) { + return _Supernets2.Contract.PendingStateTimeout(&_Supernets2.CallOpts) +} + +// PendingStateTransitions is a free data retrieval call binding the contract method 0x837a4738. +// +// Solidity: function pendingStateTransitions(uint256 ) view returns(uint64 timestamp, uint64 lastVerifiedBatch, bytes32 exitRoot, bytes32 stateRoot) +func (_Supernets2 *Supernets2Caller) PendingStateTransitions(opts *bind.CallOpts, arg0 *big.Int) (struct { + Timestamp uint64 + LastVerifiedBatch uint64 + ExitRoot [32]byte + StateRoot [32]byte +}, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "pendingStateTransitions", arg0) + + outstruct := new(struct { + Timestamp uint64 + LastVerifiedBatch uint64 + ExitRoot [32]byte + StateRoot [32]byte + }) + if err != nil { + return *outstruct, err + } + + outstruct.Timestamp = *abi.ConvertType(out[0], new(uint64)).(*uint64) + outstruct.LastVerifiedBatch = *abi.ConvertType(out[1], new(uint64)).(*uint64) + outstruct.ExitRoot = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte) + outstruct.StateRoot = *abi.ConvertType(out[3], new([32]byte)).(*[32]byte) + + return *outstruct, err + +} + +// PendingStateTransitions is a free data retrieval call binding the contract method 0x837a4738. +// +// Solidity: function pendingStateTransitions(uint256 ) view returns(uint64 timestamp, uint64 lastVerifiedBatch, bytes32 exitRoot, bytes32 stateRoot) +func (_Supernets2 *Supernets2Session) PendingStateTransitions(arg0 *big.Int) (struct { + Timestamp uint64 + LastVerifiedBatch uint64 + ExitRoot [32]byte + StateRoot [32]byte +}, error) { + return _Supernets2.Contract.PendingStateTransitions(&_Supernets2.CallOpts, arg0) +} + +// PendingStateTransitions is a free data retrieval call binding the contract method 0x837a4738. +// +// Solidity: function pendingStateTransitions(uint256 ) view returns(uint64 timestamp, uint64 lastVerifiedBatch, bytes32 exitRoot, bytes32 stateRoot) +func (_Supernets2 *Supernets2CallerSession) PendingStateTransitions(arg0 *big.Int) (struct { + Timestamp uint64 + LastVerifiedBatch uint64 + ExitRoot [32]byte + StateRoot [32]byte +}, error) { + return _Supernets2.Contract.PendingStateTransitions(&_Supernets2.CallOpts, arg0) +} + +// RollupVerifier is a free data retrieval call binding the contract method 0xe8bf92ed. +// +// Solidity: function rollupVerifier() view returns(address) +func (_Supernets2 *Supernets2Caller) RollupVerifier(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "rollupVerifier") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// RollupVerifier is a free data retrieval call binding the contract method 0xe8bf92ed. +// +// Solidity: function rollupVerifier() view returns(address) +func (_Supernets2 *Supernets2Session) RollupVerifier() (common.Address, error) { + return _Supernets2.Contract.RollupVerifier(&_Supernets2.CallOpts) +} + +// RollupVerifier is a free data retrieval call binding the contract method 0xe8bf92ed. +// +// Solidity: function rollupVerifier() view returns(address) +func (_Supernets2 *Supernets2CallerSession) RollupVerifier() (common.Address, error) { + return _Supernets2.Contract.RollupVerifier(&_Supernets2.CallOpts) +} + +// SequencedBatches is a free data retrieval call binding the contract method 0xb4d63f58. +// +// Solidity: function sequencedBatches(uint64 ) view returns(bytes32 accInputHash, uint64 sequencedTimestamp, uint64 previousLastBatchSequenced) +func (_Supernets2 *Supernets2Caller) SequencedBatches(opts *bind.CallOpts, arg0 uint64) (struct { + AccInputHash [32]byte + SequencedTimestamp uint64 + PreviousLastBatchSequenced uint64 +}, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "sequencedBatches", arg0) + + outstruct := new(struct { + AccInputHash [32]byte + SequencedTimestamp uint64 + PreviousLastBatchSequenced uint64 + }) + if err != nil { + return *outstruct, err + } + + outstruct.AccInputHash = *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + outstruct.SequencedTimestamp = *abi.ConvertType(out[1], new(uint64)).(*uint64) + outstruct.PreviousLastBatchSequenced = *abi.ConvertType(out[2], new(uint64)).(*uint64) + + return *outstruct, err + +} + +// SequencedBatches is a free data retrieval call binding the contract method 0xb4d63f58. +// +// Solidity: function sequencedBatches(uint64 ) view returns(bytes32 accInputHash, uint64 sequencedTimestamp, uint64 previousLastBatchSequenced) +func (_Supernets2 *Supernets2Session) SequencedBatches(arg0 uint64) (struct { + AccInputHash [32]byte + SequencedTimestamp uint64 + PreviousLastBatchSequenced uint64 +}, error) { + return _Supernets2.Contract.SequencedBatches(&_Supernets2.CallOpts, arg0) +} + +// SequencedBatches is a free data retrieval call binding the contract method 0xb4d63f58. +// +// Solidity: function sequencedBatches(uint64 ) view returns(bytes32 accInputHash, uint64 sequencedTimestamp, uint64 previousLastBatchSequenced) +func (_Supernets2 *Supernets2CallerSession) SequencedBatches(arg0 uint64) (struct { + AccInputHash [32]byte + SequencedTimestamp uint64 + PreviousLastBatchSequenced uint64 +}, error) { + return _Supernets2.Contract.SequencedBatches(&_Supernets2.CallOpts, arg0) +} + +// TrustedAggregator is a free data retrieval call binding the contract method 0x29878983. +// +// Solidity: function trustedAggregator() view returns(address) +func (_Supernets2 *Supernets2Caller) TrustedAggregator(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "trustedAggregator") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TrustedAggregator is a free data retrieval call binding the contract method 0x29878983. +// +// Solidity: function trustedAggregator() view returns(address) +func (_Supernets2 *Supernets2Session) TrustedAggregator() (common.Address, error) { + return _Supernets2.Contract.TrustedAggregator(&_Supernets2.CallOpts) +} + +// TrustedAggregator is a free data retrieval call binding the contract method 0x29878983. +// +// Solidity: function trustedAggregator() view returns(address) +func (_Supernets2 *Supernets2CallerSession) TrustedAggregator() (common.Address, error) { + return _Supernets2.Contract.TrustedAggregator(&_Supernets2.CallOpts) +} + +// TrustedAggregatorTimeout is a free data retrieval call binding the contract method 0x841b24d7. +// +// Solidity: function trustedAggregatorTimeout() view returns(uint64) +func (_Supernets2 *Supernets2Caller) TrustedAggregatorTimeout(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "trustedAggregatorTimeout") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// TrustedAggregatorTimeout is a free data retrieval call binding the contract method 0x841b24d7. +// +// Solidity: function trustedAggregatorTimeout() view returns(uint64) +func (_Supernets2 *Supernets2Session) TrustedAggregatorTimeout() (uint64, error) { + return _Supernets2.Contract.TrustedAggregatorTimeout(&_Supernets2.CallOpts) +} + +// TrustedAggregatorTimeout is a free data retrieval call binding the contract method 0x841b24d7. +// +// Solidity: function trustedAggregatorTimeout() view returns(uint64) +func (_Supernets2 *Supernets2CallerSession) TrustedAggregatorTimeout() (uint64, error) { + return _Supernets2.Contract.TrustedAggregatorTimeout(&_Supernets2.CallOpts) +} + +// TrustedSequencer is a free data retrieval call binding the contract method 0xcfa8ed47. +// +// Solidity: function trustedSequencer() view returns(address) +func (_Supernets2 *Supernets2Caller) TrustedSequencer(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "trustedSequencer") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TrustedSequencer is a free data retrieval call binding the contract method 0xcfa8ed47. +// +// Solidity: function trustedSequencer() view returns(address) +func (_Supernets2 *Supernets2Session) TrustedSequencer() (common.Address, error) { + return _Supernets2.Contract.TrustedSequencer(&_Supernets2.CallOpts) +} + +// TrustedSequencer is a free data retrieval call binding the contract method 0xcfa8ed47. +// +// Solidity: function trustedSequencer() view returns(address) +func (_Supernets2 *Supernets2CallerSession) TrustedSequencer() (common.Address, error) { + return _Supernets2.Contract.TrustedSequencer(&_Supernets2.CallOpts) +} + +// TrustedSequencerURL is a free data retrieval call binding the contract method 0x542028d5. +// +// Solidity: function trustedSequencerURL() view returns(string) +func (_Supernets2 *Supernets2Caller) TrustedSequencerURL(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "trustedSequencerURL") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// TrustedSequencerURL is a free data retrieval call binding the contract method 0x542028d5. +// +// Solidity: function trustedSequencerURL() view returns(string) +func (_Supernets2 *Supernets2Session) TrustedSequencerURL() (string, error) { + return _Supernets2.Contract.TrustedSequencerURL(&_Supernets2.CallOpts) +} + +// TrustedSequencerURL is a free data retrieval call binding the contract method 0x542028d5. +// +// Solidity: function trustedSequencerURL() view returns(string) +func (_Supernets2 *Supernets2CallerSession) TrustedSequencerURL() (string, error) { + return _Supernets2.Contract.TrustedSequencerURL(&_Supernets2.CallOpts) +} + +// VerifyBatchTimeTarget is a free data retrieval call binding the contract method 0x0a0d9fbe. +// +// Solidity: function verifyBatchTimeTarget() view returns(uint64) +func (_Supernets2 *Supernets2Caller) VerifyBatchTimeTarget(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _Supernets2.contract.Call(opts, &out, "verifyBatchTimeTarget") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// VerifyBatchTimeTarget is a free data retrieval call binding the contract method 0x0a0d9fbe. +// +// Solidity: function verifyBatchTimeTarget() view returns(uint64) +func (_Supernets2 *Supernets2Session) VerifyBatchTimeTarget() (uint64, error) { + return _Supernets2.Contract.VerifyBatchTimeTarget(&_Supernets2.CallOpts) +} + +// VerifyBatchTimeTarget is a free data retrieval call binding the contract method 0x0a0d9fbe. +// +// Solidity: function verifyBatchTimeTarget() view returns(uint64) +func (_Supernets2 *Supernets2CallerSession) VerifyBatchTimeTarget() (uint64, error) { + return _Supernets2.Contract.VerifyBatchTimeTarget(&_Supernets2.CallOpts) +} + +// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. +// +// Solidity: function acceptAdminRole() returns() +func (_Supernets2 *Supernets2Transactor) AcceptAdminRole(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "acceptAdminRole") +} + +// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. +// +// Solidity: function acceptAdminRole() returns() +func (_Supernets2 *Supernets2Session) AcceptAdminRole() (*types.Transaction, error) { + return _Supernets2.Contract.AcceptAdminRole(&_Supernets2.TransactOpts) +} + +// AcceptAdminRole is a paid mutator transaction binding the contract method 0x8c3d7301. +// +// Solidity: function acceptAdminRole() returns() +func (_Supernets2 *Supernets2TransactorSession) AcceptAdminRole() (*types.Transaction, error) { + return _Supernets2.Contract.AcceptAdminRole(&_Supernets2.TransactOpts) +} + +// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x7215541a. +// +// Solidity: function activateEmergencyState(uint64 sequencedBatchNum) returns() +func (_Supernets2 *Supernets2Transactor) ActivateEmergencyState(opts *bind.TransactOpts, sequencedBatchNum uint64) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "activateEmergencyState", sequencedBatchNum) +} + +// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x7215541a. +// +// Solidity: function activateEmergencyState(uint64 sequencedBatchNum) returns() +func (_Supernets2 *Supernets2Session) ActivateEmergencyState(sequencedBatchNum uint64) (*types.Transaction, error) { + return _Supernets2.Contract.ActivateEmergencyState(&_Supernets2.TransactOpts, sequencedBatchNum) +} + +// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x7215541a. +// +// Solidity: function activateEmergencyState(uint64 sequencedBatchNum) returns() +func (_Supernets2 *Supernets2TransactorSession) ActivateEmergencyState(sequencedBatchNum uint64) (*types.Transaction, error) { + return _Supernets2.Contract.ActivateEmergencyState(&_Supernets2.TransactOpts, sequencedBatchNum) +} + +// ActivateForceBatches is a paid mutator transaction binding the contract method 0x5ec91958. +// +// Solidity: function activateForceBatches() returns() +func (_Supernets2 *Supernets2Transactor) ActivateForceBatches(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "activateForceBatches") +} + +// ActivateForceBatches is a paid mutator transaction binding the contract method 0x5ec91958. +// +// Solidity: function activateForceBatches() returns() +func (_Supernets2 *Supernets2Session) ActivateForceBatches() (*types.Transaction, error) { + return _Supernets2.Contract.ActivateForceBatches(&_Supernets2.TransactOpts) +} + +// ActivateForceBatches is a paid mutator transaction binding the contract method 0x5ec91958. +// +// Solidity: function activateForceBatches() returns() +func (_Supernets2 *Supernets2TransactorSession) ActivateForceBatches() (*types.Transaction, error) { + return _Supernets2.Contract.ActivateForceBatches(&_Supernets2.TransactOpts) +} + +// ConsolidatePendingState is a paid mutator transaction binding the contract method 0x4a910e6a. +// +// Solidity: function consolidatePendingState(uint64 pendingStateNum) returns() +func (_Supernets2 *Supernets2Transactor) ConsolidatePendingState(opts *bind.TransactOpts, pendingStateNum uint64) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "consolidatePendingState", pendingStateNum) +} + +// ConsolidatePendingState is a paid mutator transaction binding the contract method 0x4a910e6a. +// +// Solidity: function consolidatePendingState(uint64 pendingStateNum) returns() +func (_Supernets2 *Supernets2Session) ConsolidatePendingState(pendingStateNum uint64) (*types.Transaction, error) { + return _Supernets2.Contract.ConsolidatePendingState(&_Supernets2.TransactOpts, pendingStateNum) +} + +// ConsolidatePendingState is a paid mutator transaction binding the contract method 0x4a910e6a. +// +// Solidity: function consolidatePendingState(uint64 pendingStateNum) returns() +func (_Supernets2 *Supernets2TransactorSession) ConsolidatePendingState(pendingStateNum uint64) (*types.Transaction, error) { + return _Supernets2.Contract.ConsolidatePendingState(&_Supernets2.TransactOpts, pendingStateNum) +} + +// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. +// +// Solidity: function deactivateEmergencyState() returns() +func (_Supernets2 *Supernets2Transactor) DeactivateEmergencyState(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "deactivateEmergencyState") +} + +// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. +// +// Solidity: function deactivateEmergencyState() returns() +func (_Supernets2 *Supernets2Session) DeactivateEmergencyState() (*types.Transaction, error) { + return _Supernets2.Contract.DeactivateEmergencyState(&_Supernets2.TransactOpts) +} + +// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. +// +// Solidity: function deactivateEmergencyState() returns() +func (_Supernets2 *Supernets2TransactorSession) DeactivateEmergencyState() (*types.Transaction, error) { + return _Supernets2.Contract.DeactivateEmergencyState(&_Supernets2.TransactOpts) +} + +// ForceBatch is a paid mutator transaction binding the contract method 0xeaeb077b. +// +// Solidity: function forceBatch(bytes transactions, uint256 maticAmount) returns() +func (_Supernets2 *Supernets2Transactor) ForceBatch(opts *bind.TransactOpts, transactions []byte, maticAmount *big.Int) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "forceBatch", transactions, maticAmount) +} + +// ForceBatch is a paid mutator transaction binding the contract method 0xeaeb077b. +// +// Solidity: function forceBatch(bytes transactions, uint256 maticAmount) returns() +func (_Supernets2 *Supernets2Session) ForceBatch(transactions []byte, maticAmount *big.Int) (*types.Transaction, error) { + return _Supernets2.Contract.ForceBatch(&_Supernets2.TransactOpts, transactions, maticAmount) +} + +// ForceBatch is a paid mutator transaction binding the contract method 0xeaeb077b. +// +// Solidity: function forceBatch(bytes transactions, uint256 maticAmount) returns() +func (_Supernets2 *Supernets2TransactorSession) ForceBatch(transactions []byte, maticAmount *big.Int) (*types.Transaction, error) { + return _Supernets2.Contract.ForceBatch(&_Supernets2.TransactOpts, transactions, maticAmount) +} + +// Initialize is a paid mutator transaction binding the contract method 0xd2e129f9. +// +// Solidity: function initialize((address,address,uint64,address,uint64) initializePackedParameters, bytes32 genesisRoot, string _trustedSequencerURL, string _networkName, string _version) returns() +func (_Supernets2 *Supernets2Transactor) Initialize(opts *bind.TransactOpts, initializePackedParameters Supernets2InitializePackedParameters, genesisRoot [32]byte, _trustedSequencerURL string, _networkName string, _version string) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "initialize", initializePackedParameters, genesisRoot, _trustedSequencerURL, _networkName, _version) +} + +// Initialize is a paid mutator transaction binding the contract method 0xd2e129f9. +// +// Solidity: function initialize((address,address,uint64,address,uint64) initializePackedParameters, bytes32 genesisRoot, string _trustedSequencerURL, string _networkName, string _version) returns() +func (_Supernets2 *Supernets2Session) Initialize(initializePackedParameters Supernets2InitializePackedParameters, genesisRoot [32]byte, _trustedSequencerURL string, _networkName string, _version string) (*types.Transaction, error) { + return _Supernets2.Contract.Initialize(&_Supernets2.TransactOpts, initializePackedParameters, genesisRoot, _trustedSequencerURL, _networkName, _version) +} + +// Initialize is a paid mutator transaction binding the contract method 0xd2e129f9. +// +// Solidity: function initialize((address,address,uint64,address,uint64) initializePackedParameters, bytes32 genesisRoot, string _trustedSequencerURL, string _networkName, string _version) returns() +func (_Supernets2 *Supernets2TransactorSession) Initialize(initializePackedParameters Supernets2InitializePackedParameters, genesisRoot [32]byte, _trustedSequencerURL string, _networkName string, _version string) (*types.Transaction, error) { + return _Supernets2.Contract.Initialize(&_Supernets2.TransactOpts, initializePackedParameters, genesisRoot, _trustedSequencerURL, _networkName, _version) +} + +// OverridePendingState is a paid mutator transaction binding the contract method 0xe6ad707e. +// +// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() +func (_Supernets2 *Supernets2Transactor) OverridePendingState(opts *bind.TransactOpts, initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "overridePendingState", initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// OverridePendingState is a paid mutator transaction binding the contract method 0xe6ad707e. +// +// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() +func (_Supernets2 *Supernets2Session) OverridePendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { + return _Supernets2.Contract.OverridePendingState(&_Supernets2.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// OverridePendingState is a paid mutator transaction binding the contract method 0xe6ad707e. +// +// Solidity: function overridePendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() +func (_Supernets2 *Supernets2TransactorSession) OverridePendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { + return _Supernets2.Contract.OverridePendingState(&_Supernets2.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x0808270c. +// +// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() +func (_Supernets2 *Supernets2Transactor) ProveNonDeterministicPendingState(opts *bind.TransactOpts, initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "proveNonDeterministicPendingState", initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x0808270c. +// +// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() +func (_Supernets2 *Supernets2Session) ProveNonDeterministicPendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { + return _Supernets2.Contract.ProveNonDeterministicPendingState(&_Supernets2.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// ProveNonDeterministicPendingState is a paid mutator transaction binding the contract method 0x0808270c. +// +// Solidity: function proveNonDeterministicPendingState(uint64 initPendingStateNum, uint64 finalPendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() +func (_Supernets2 *Supernets2TransactorSession) ProveNonDeterministicPendingState(initPendingStateNum uint64, finalPendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { + return _Supernets2.Contract.ProveNonDeterministicPendingState(&_Supernets2.TransactOpts, initPendingStateNum, finalPendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Supernets2 *Supernets2Transactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Supernets2 *Supernets2Session) RenounceOwnership() (*types.Transaction, error) { + return _Supernets2.Contract.RenounceOwnership(&_Supernets2.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Supernets2 *Supernets2TransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Supernets2.Contract.RenounceOwnership(&_Supernets2.TransactOpts) +} + +// SequenceBatches is a paid mutator transaction binding the contract method 0x438a5399. +// +// Solidity: function sequenceBatches((bytes32,bytes32,uint64,uint64)[] batches, address l2Coinbase, bytes signaturesAndAddrs) returns() +func (_Supernets2 *Supernets2Transactor) SequenceBatches(opts *bind.TransactOpts, batches []Supernets2BatchData, l2Coinbase common.Address, signaturesAndAddrs []byte) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "sequenceBatches", batches, l2Coinbase, signaturesAndAddrs) +} + +// SequenceBatches is a paid mutator transaction binding the contract method 0x438a5399. +// +// Solidity: function sequenceBatches((bytes32,bytes32,uint64,uint64)[] batches, address l2Coinbase, bytes signaturesAndAddrs) returns() +func (_Supernets2 *Supernets2Session) SequenceBatches(batches []Supernets2BatchData, l2Coinbase common.Address, signaturesAndAddrs []byte) (*types.Transaction, error) { + return _Supernets2.Contract.SequenceBatches(&_Supernets2.TransactOpts, batches, l2Coinbase, signaturesAndAddrs) +} + +// SequenceBatches is a paid mutator transaction binding the contract method 0x438a5399. +// +// Solidity: function sequenceBatches((bytes32,bytes32,uint64,uint64)[] batches, address l2Coinbase, bytes signaturesAndAddrs) returns() +func (_Supernets2 *Supernets2TransactorSession) SequenceBatches(batches []Supernets2BatchData, l2Coinbase common.Address, signaturesAndAddrs []byte) (*types.Transaction, error) { + return _Supernets2.Contract.SequenceBatches(&_Supernets2.TransactOpts, batches, l2Coinbase, signaturesAndAddrs) +} + +// SequenceForceBatches is a paid mutator transaction binding the contract method 0xd8d1091b. +// +// Solidity: function sequenceForceBatches((bytes,bytes32,uint64)[] batches) returns() +func (_Supernets2 *Supernets2Transactor) SequenceForceBatches(opts *bind.TransactOpts, batches []Supernets2ForcedBatchData) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "sequenceForceBatches", batches) +} + +// SequenceForceBatches is a paid mutator transaction binding the contract method 0xd8d1091b. +// +// Solidity: function sequenceForceBatches((bytes,bytes32,uint64)[] batches) returns() +func (_Supernets2 *Supernets2Session) SequenceForceBatches(batches []Supernets2ForcedBatchData) (*types.Transaction, error) { + return _Supernets2.Contract.SequenceForceBatches(&_Supernets2.TransactOpts, batches) +} + +// SequenceForceBatches is a paid mutator transaction binding the contract method 0xd8d1091b. +// +// Solidity: function sequenceForceBatches((bytes,bytes32,uint64)[] batches) returns() +func (_Supernets2 *Supernets2TransactorSession) SequenceForceBatches(batches []Supernets2ForcedBatchData) (*types.Transaction, error) { + return _Supernets2.Contract.SequenceForceBatches(&_Supernets2.TransactOpts, batches) +} + +// SetForceBatchTimeout is a paid mutator transaction binding the contract method 0x4e487706. +// +// Solidity: function setForceBatchTimeout(uint64 newforceBatchTimeout) returns() +func (_Supernets2 *Supernets2Transactor) SetForceBatchTimeout(opts *bind.TransactOpts, newforceBatchTimeout uint64) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "setForceBatchTimeout", newforceBatchTimeout) +} + +// SetForceBatchTimeout is a paid mutator transaction binding the contract method 0x4e487706. +// +// Solidity: function setForceBatchTimeout(uint64 newforceBatchTimeout) returns() +func (_Supernets2 *Supernets2Session) SetForceBatchTimeout(newforceBatchTimeout uint64) (*types.Transaction, error) { + return _Supernets2.Contract.SetForceBatchTimeout(&_Supernets2.TransactOpts, newforceBatchTimeout) +} + +// SetForceBatchTimeout is a paid mutator transaction binding the contract method 0x4e487706. +// +// Solidity: function setForceBatchTimeout(uint64 newforceBatchTimeout) returns() +func (_Supernets2 *Supernets2TransactorSession) SetForceBatchTimeout(newforceBatchTimeout uint64) (*types.Transaction, error) { + return _Supernets2.Contract.SetForceBatchTimeout(&_Supernets2.TransactOpts, newforceBatchTimeout) +} + +// SetMultiplierBatchFee is a paid mutator transaction binding the contract method 0x1816b7e5. +// +// Solidity: function setMultiplierBatchFee(uint16 newMultiplierBatchFee) returns() +func (_Supernets2 *Supernets2Transactor) SetMultiplierBatchFee(opts *bind.TransactOpts, newMultiplierBatchFee uint16) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "setMultiplierBatchFee", newMultiplierBatchFee) +} + +// SetMultiplierBatchFee is a paid mutator transaction binding the contract method 0x1816b7e5. +// +// Solidity: function setMultiplierBatchFee(uint16 newMultiplierBatchFee) returns() +func (_Supernets2 *Supernets2Session) SetMultiplierBatchFee(newMultiplierBatchFee uint16) (*types.Transaction, error) { + return _Supernets2.Contract.SetMultiplierBatchFee(&_Supernets2.TransactOpts, newMultiplierBatchFee) +} + +// SetMultiplierBatchFee is a paid mutator transaction binding the contract method 0x1816b7e5. +// +// Solidity: function setMultiplierBatchFee(uint16 newMultiplierBatchFee) returns() +func (_Supernets2 *Supernets2TransactorSession) SetMultiplierBatchFee(newMultiplierBatchFee uint16) (*types.Transaction, error) { + return _Supernets2.Contract.SetMultiplierBatchFee(&_Supernets2.TransactOpts, newMultiplierBatchFee) +} + +// SetPendingStateTimeout is a paid mutator transaction binding the contract method 0x9c9f3dfe. +// +// Solidity: function setPendingStateTimeout(uint64 newPendingStateTimeout) returns() +func (_Supernets2 *Supernets2Transactor) SetPendingStateTimeout(opts *bind.TransactOpts, newPendingStateTimeout uint64) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "setPendingStateTimeout", newPendingStateTimeout) +} + +// SetPendingStateTimeout is a paid mutator transaction binding the contract method 0x9c9f3dfe. +// +// Solidity: function setPendingStateTimeout(uint64 newPendingStateTimeout) returns() +func (_Supernets2 *Supernets2Session) SetPendingStateTimeout(newPendingStateTimeout uint64) (*types.Transaction, error) { + return _Supernets2.Contract.SetPendingStateTimeout(&_Supernets2.TransactOpts, newPendingStateTimeout) +} + +// SetPendingStateTimeout is a paid mutator transaction binding the contract method 0x9c9f3dfe. +// +// Solidity: function setPendingStateTimeout(uint64 newPendingStateTimeout) returns() +func (_Supernets2 *Supernets2TransactorSession) SetPendingStateTimeout(newPendingStateTimeout uint64) (*types.Transaction, error) { + return _Supernets2.Contract.SetPendingStateTimeout(&_Supernets2.TransactOpts, newPendingStateTimeout) +} + +// SetTrustedAggregator is a paid mutator transaction binding the contract method 0xf14916d6. +// +// Solidity: function setTrustedAggregator(address newTrustedAggregator) returns() +func (_Supernets2 *Supernets2Transactor) SetTrustedAggregator(opts *bind.TransactOpts, newTrustedAggregator common.Address) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "setTrustedAggregator", newTrustedAggregator) +} + +// SetTrustedAggregator is a paid mutator transaction binding the contract method 0xf14916d6. +// +// Solidity: function setTrustedAggregator(address newTrustedAggregator) returns() +func (_Supernets2 *Supernets2Session) SetTrustedAggregator(newTrustedAggregator common.Address) (*types.Transaction, error) { + return _Supernets2.Contract.SetTrustedAggregator(&_Supernets2.TransactOpts, newTrustedAggregator) +} + +// SetTrustedAggregator is a paid mutator transaction binding the contract method 0xf14916d6. +// +// Solidity: function setTrustedAggregator(address newTrustedAggregator) returns() +func (_Supernets2 *Supernets2TransactorSession) SetTrustedAggregator(newTrustedAggregator common.Address) (*types.Transaction, error) { + return _Supernets2.Contract.SetTrustedAggregator(&_Supernets2.TransactOpts, newTrustedAggregator) +} + +// SetTrustedAggregatorTimeout is a paid mutator transaction binding the contract method 0x394218e9. +// +// Solidity: function setTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) returns() +func (_Supernets2 *Supernets2Transactor) SetTrustedAggregatorTimeout(opts *bind.TransactOpts, newTrustedAggregatorTimeout uint64) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "setTrustedAggregatorTimeout", newTrustedAggregatorTimeout) +} + +// SetTrustedAggregatorTimeout is a paid mutator transaction binding the contract method 0x394218e9. +// +// Solidity: function setTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) returns() +func (_Supernets2 *Supernets2Session) SetTrustedAggregatorTimeout(newTrustedAggregatorTimeout uint64) (*types.Transaction, error) { + return _Supernets2.Contract.SetTrustedAggregatorTimeout(&_Supernets2.TransactOpts, newTrustedAggregatorTimeout) +} + +// SetTrustedAggregatorTimeout is a paid mutator transaction binding the contract method 0x394218e9. +// +// Solidity: function setTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) returns() +func (_Supernets2 *Supernets2TransactorSession) SetTrustedAggregatorTimeout(newTrustedAggregatorTimeout uint64) (*types.Transaction, error) { + return _Supernets2.Contract.SetTrustedAggregatorTimeout(&_Supernets2.TransactOpts, newTrustedAggregatorTimeout) +} + +// SetTrustedSequencer is a paid mutator transaction binding the contract method 0x6ff512cc. +// +// Solidity: function setTrustedSequencer(address newTrustedSequencer) returns() +func (_Supernets2 *Supernets2Transactor) SetTrustedSequencer(opts *bind.TransactOpts, newTrustedSequencer common.Address) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "setTrustedSequencer", newTrustedSequencer) +} + +// SetTrustedSequencer is a paid mutator transaction binding the contract method 0x6ff512cc. +// +// Solidity: function setTrustedSequencer(address newTrustedSequencer) returns() +func (_Supernets2 *Supernets2Session) SetTrustedSequencer(newTrustedSequencer common.Address) (*types.Transaction, error) { + return _Supernets2.Contract.SetTrustedSequencer(&_Supernets2.TransactOpts, newTrustedSequencer) +} + +// SetTrustedSequencer is a paid mutator transaction binding the contract method 0x6ff512cc. +// +// Solidity: function setTrustedSequencer(address newTrustedSequencer) returns() +func (_Supernets2 *Supernets2TransactorSession) SetTrustedSequencer(newTrustedSequencer common.Address) (*types.Transaction, error) { + return _Supernets2.Contract.SetTrustedSequencer(&_Supernets2.TransactOpts, newTrustedSequencer) +} + +// SetTrustedSequencerURL is a paid mutator transaction binding the contract method 0xc89e42df. +// +// Solidity: function setTrustedSequencerURL(string newTrustedSequencerURL) returns() +func (_Supernets2 *Supernets2Transactor) SetTrustedSequencerURL(opts *bind.TransactOpts, newTrustedSequencerURL string) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "setTrustedSequencerURL", newTrustedSequencerURL) +} + +// SetTrustedSequencerURL is a paid mutator transaction binding the contract method 0xc89e42df. +// +// Solidity: function setTrustedSequencerURL(string newTrustedSequencerURL) returns() +func (_Supernets2 *Supernets2Session) SetTrustedSequencerURL(newTrustedSequencerURL string) (*types.Transaction, error) { + return _Supernets2.Contract.SetTrustedSequencerURL(&_Supernets2.TransactOpts, newTrustedSequencerURL) +} + +// SetTrustedSequencerURL is a paid mutator transaction binding the contract method 0xc89e42df. +// +// Solidity: function setTrustedSequencerURL(string newTrustedSequencerURL) returns() +func (_Supernets2 *Supernets2TransactorSession) SetTrustedSequencerURL(newTrustedSequencerURL string) (*types.Transaction, error) { + return _Supernets2.Contract.SetTrustedSequencerURL(&_Supernets2.TransactOpts, newTrustedSequencerURL) +} + +// SetVerifyBatchTimeTarget is a paid mutator transaction binding the contract method 0xa066215c. +// +// Solidity: function setVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) returns() +func (_Supernets2 *Supernets2Transactor) SetVerifyBatchTimeTarget(opts *bind.TransactOpts, newVerifyBatchTimeTarget uint64) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "setVerifyBatchTimeTarget", newVerifyBatchTimeTarget) +} + +// SetVerifyBatchTimeTarget is a paid mutator transaction binding the contract method 0xa066215c. +// +// Solidity: function setVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) returns() +func (_Supernets2 *Supernets2Session) SetVerifyBatchTimeTarget(newVerifyBatchTimeTarget uint64) (*types.Transaction, error) { + return _Supernets2.Contract.SetVerifyBatchTimeTarget(&_Supernets2.TransactOpts, newVerifyBatchTimeTarget) +} + +// SetVerifyBatchTimeTarget is a paid mutator transaction binding the contract method 0xa066215c. +// +// Solidity: function setVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) returns() +func (_Supernets2 *Supernets2TransactorSession) SetVerifyBatchTimeTarget(newVerifyBatchTimeTarget uint64) (*types.Transaction, error) { + return _Supernets2.Contract.SetVerifyBatchTimeTarget(&_Supernets2.TransactOpts, newVerifyBatchTimeTarget) +} + +// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. +// +// Solidity: function transferAdminRole(address newPendingAdmin) returns() +func (_Supernets2 *Supernets2Transactor) TransferAdminRole(opts *bind.TransactOpts, newPendingAdmin common.Address) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "transferAdminRole", newPendingAdmin) +} + +// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. +// +// Solidity: function transferAdminRole(address newPendingAdmin) returns() +func (_Supernets2 *Supernets2Session) TransferAdminRole(newPendingAdmin common.Address) (*types.Transaction, error) { + return _Supernets2.Contract.TransferAdminRole(&_Supernets2.TransactOpts, newPendingAdmin) +} + +// TransferAdminRole is a paid mutator transaction binding the contract method 0xada8f919. +// +// Solidity: function transferAdminRole(address newPendingAdmin) returns() +func (_Supernets2 *Supernets2TransactorSession) TransferAdminRole(newPendingAdmin common.Address) (*types.Transaction, error) { + return _Supernets2.Contract.TransferAdminRole(&_Supernets2.TransactOpts, newPendingAdmin) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Supernets2 *Supernets2Transactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Supernets2 *Supernets2Session) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Supernets2.Contract.TransferOwnership(&_Supernets2.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Supernets2 *Supernets2TransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Supernets2.Contract.TransferOwnership(&_Supernets2.TransactOpts, newOwner) +} + +// VerifyBatches is a paid mutator transaction binding the contract method 0x4fd70464. +// +// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() +func (_Supernets2 *Supernets2Transactor) VerifyBatches(opts *bind.TransactOpts, pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "verifyBatches", pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// VerifyBatches is a paid mutator transaction binding the contract method 0x4fd70464. +// +// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() +func (_Supernets2 *Supernets2Session) VerifyBatches(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { + return _Supernets2.Contract.VerifyBatches(&_Supernets2.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// VerifyBatches is a paid mutator transaction binding the contract method 0x4fd70464. +// +// Solidity: function verifyBatches(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() +func (_Supernets2 *Supernets2TransactorSession) VerifyBatches(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { + return _Supernets2.Contract.VerifyBatches(&_Supernets2.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0xa50a164b. +// +// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() +func (_Supernets2 *Supernets2Transactor) VerifyBatchesTrustedAggregator(opts *bind.TransactOpts, pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { + return _Supernets2.contract.Transact(opts, "verifyBatchesTrustedAggregator", pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0xa50a164b. +// +// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() +func (_Supernets2 *Supernets2Session) VerifyBatchesTrustedAggregator(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { + return _Supernets2.Contract.VerifyBatchesTrustedAggregator(&_Supernets2.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// VerifyBatchesTrustedAggregator is a paid mutator transaction binding the contract method 0xa50a164b. +// +// Solidity: function verifyBatchesTrustedAggregator(uint64 pendingStateNum, uint64 initNumBatch, uint64 finalNewBatch, bytes32 newLocalExitRoot, bytes32 newStateRoot, bytes proof) returns() +func (_Supernets2 *Supernets2TransactorSession) VerifyBatchesTrustedAggregator(pendingStateNum uint64, initNumBatch uint64, finalNewBatch uint64, newLocalExitRoot [32]byte, newStateRoot [32]byte, proof []byte) (*types.Transaction, error) { + return _Supernets2.Contract.VerifyBatchesTrustedAggregator(&_Supernets2.TransactOpts, pendingStateNum, initNumBatch, finalNewBatch, newLocalExitRoot, newStateRoot, proof) +} + +// Supernets2AcceptAdminRoleIterator is returned from FilterAcceptAdminRole and is used to iterate over the raw logs and unpacked data for AcceptAdminRole events raised by the Supernets2 contract. +type Supernets2AcceptAdminRoleIterator struct { + Event *Supernets2AcceptAdminRole // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2AcceptAdminRoleIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2AcceptAdminRole) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2AcceptAdminRole) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2AcceptAdminRoleIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2AcceptAdminRoleIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2AcceptAdminRole represents a AcceptAdminRole event raised by the Supernets2 contract. +type Supernets2AcceptAdminRole struct { + NewAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAcceptAdminRole is a free log retrieval operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. +// +// Solidity: event AcceptAdminRole(address newAdmin) +func (_Supernets2 *Supernets2Filterer) FilterAcceptAdminRole(opts *bind.FilterOpts) (*Supernets2AcceptAdminRoleIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "AcceptAdminRole") + if err != nil { + return nil, err + } + return &Supernets2AcceptAdminRoleIterator{contract: _Supernets2.contract, event: "AcceptAdminRole", logs: logs, sub: sub}, nil +} + +// WatchAcceptAdminRole is a free log subscription operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. +// +// Solidity: event AcceptAdminRole(address newAdmin) +func (_Supernets2 *Supernets2Filterer) WatchAcceptAdminRole(opts *bind.WatchOpts, sink chan<- *Supernets2AcceptAdminRole) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "AcceptAdminRole") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2AcceptAdminRole) + if err := _Supernets2.contract.UnpackLog(event, "AcceptAdminRole", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAcceptAdminRole is a log parse operation binding the contract event 0x056dc487bbf0795d0bbb1b4f0af523a855503cff740bfb4d5475f7a90c091e8e. +// +// Solidity: event AcceptAdminRole(address newAdmin) +func (_Supernets2 *Supernets2Filterer) ParseAcceptAdminRole(log types.Log) (*Supernets2AcceptAdminRole, error) { + event := new(Supernets2AcceptAdminRole) + if err := _Supernets2.contract.UnpackLog(event, "AcceptAdminRole", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2ActivateForceBatchesIterator is returned from FilterActivateForceBatches and is used to iterate over the raw logs and unpacked data for ActivateForceBatches events raised by the Supernets2 contract. +type Supernets2ActivateForceBatchesIterator struct { + Event *Supernets2ActivateForceBatches // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2ActivateForceBatchesIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2ActivateForceBatches) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2ActivateForceBatches) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2ActivateForceBatchesIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2ActivateForceBatchesIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2ActivateForceBatches represents a ActivateForceBatches event raised by the Supernets2 contract. +type Supernets2ActivateForceBatches struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterActivateForceBatches is a free log retrieval operation binding the contract event 0x854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f. +// +// Solidity: event ActivateForceBatches() +func (_Supernets2 *Supernets2Filterer) FilterActivateForceBatches(opts *bind.FilterOpts) (*Supernets2ActivateForceBatchesIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "ActivateForceBatches") + if err != nil { + return nil, err + } + return &Supernets2ActivateForceBatchesIterator{contract: _Supernets2.contract, event: "ActivateForceBatches", logs: logs, sub: sub}, nil +} + +// WatchActivateForceBatches is a free log subscription operation binding the contract event 0x854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f. +// +// Solidity: event ActivateForceBatches() +func (_Supernets2 *Supernets2Filterer) WatchActivateForceBatches(opts *bind.WatchOpts, sink chan<- *Supernets2ActivateForceBatches) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "ActivateForceBatches") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2ActivateForceBatches) + if err := _Supernets2.contract.UnpackLog(event, "ActivateForceBatches", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseActivateForceBatches is a log parse operation binding the contract event 0x854dd6ce5a1445c4c54388b21cffd11cf5bba1b9e763aec48ce3da75d617412f. +// +// Solidity: event ActivateForceBatches() +func (_Supernets2 *Supernets2Filterer) ParseActivateForceBatches(log types.Log) (*Supernets2ActivateForceBatches, error) { + event := new(Supernets2ActivateForceBatches) + if err := _Supernets2.contract.UnpackLog(event, "ActivateForceBatches", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2ConsolidatePendingStateIterator is returned from FilterConsolidatePendingState and is used to iterate over the raw logs and unpacked data for ConsolidatePendingState events raised by the Supernets2 contract. +type Supernets2ConsolidatePendingStateIterator struct { + Event *Supernets2ConsolidatePendingState // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2ConsolidatePendingStateIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2ConsolidatePendingState) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2ConsolidatePendingState) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2ConsolidatePendingStateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2ConsolidatePendingStateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2ConsolidatePendingState represents a ConsolidatePendingState event raised by the Supernets2 contract. +type Supernets2ConsolidatePendingState struct { + NumBatch uint64 + StateRoot [32]byte + PendingStateNum uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterConsolidatePendingState is a free log retrieval operation binding the contract event 0x328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e. +// +// Solidity: event ConsolidatePendingState(uint64 indexed numBatch, bytes32 stateRoot, uint64 indexed pendingStateNum) +func (_Supernets2 *Supernets2Filterer) FilterConsolidatePendingState(opts *bind.FilterOpts, numBatch []uint64, pendingStateNum []uint64) (*Supernets2ConsolidatePendingStateIterator, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var pendingStateNumRule []interface{} + for _, pendingStateNumItem := range pendingStateNum { + pendingStateNumRule = append(pendingStateNumRule, pendingStateNumItem) + } + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "ConsolidatePendingState", numBatchRule, pendingStateNumRule) + if err != nil { + return nil, err + } + return &Supernets2ConsolidatePendingStateIterator{contract: _Supernets2.contract, event: "ConsolidatePendingState", logs: logs, sub: sub}, nil +} + +// WatchConsolidatePendingState is a free log subscription operation binding the contract event 0x328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e. +// +// Solidity: event ConsolidatePendingState(uint64 indexed numBatch, bytes32 stateRoot, uint64 indexed pendingStateNum) +func (_Supernets2 *Supernets2Filterer) WatchConsolidatePendingState(opts *bind.WatchOpts, sink chan<- *Supernets2ConsolidatePendingState, numBatch []uint64, pendingStateNum []uint64) (event.Subscription, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var pendingStateNumRule []interface{} + for _, pendingStateNumItem := range pendingStateNum { + pendingStateNumRule = append(pendingStateNumRule, pendingStateNumItem) + } + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "ConsolidatePendingState", numBatchRule, pendingStateNumRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2ConsolidatePendingState) + if err := _Supernets2.contract.UnpackLog(event, "ConsolidatePendingState", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseConsolidatePendingState is a log parse operation binding the contract event 0x328d3c6c0fd6f1be0515e422f2d87e59f25922cbc2233568515a0c4bc3f8510e. +// +// Solidity: event ConsolidatePendingState(uint64 indexed numBatch, bytes32 stateRoot, uint64 indexed pendingStateNum) +func (_Supernets2 *Supernets2Filterer) ParseConsolidatePendingState(log types.Log) (*Supernets2ConsolidatePendingState, error) { + event := new(Supernets2ConsolidatePendingState) + if err := _Supernets2.contract.UnpackLog(event, "ConsolidatePendingState", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2EmergencyStateActivatedIterator is returned from FilterEmergencyStateActivated and is used to iterate over the raw logs and unpacked data for EmergencyStateActivated events raised by the Supernets2 contract. +type Supernets2EmergencyStateActivatedIterator struct { + Event *Supernets2EmergencyStateActivated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2EmergencyStateActivatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2EmergencyStateActivated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2EmergencyStateActivated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2EmergencyStateActivatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2EmergencyStateActivatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2EmergencyStateActivated represents a EmergencyStateActivated event raised by the Supernets2 contract. +type Supernets2EmergencyStateActivated struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEmergencyStateActivated is a free log retrieval operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. +// +// Solidity: event EmergencyStateActivated() +func (_Supernets2 *Supernets2Filterer) FilterEmergencyStateActivated(opts *bind.FilterOpts) (*Supernets2EmergencyStateActivatedIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "EmergencyStateActivated") + if err != nil { + return nil, err + } + return &Supernets2EmergencyStateActivatedIterator{contract: _Supernets2.contract, event: "EmergencyStateActivated", logs: logs, sub: sub}, nil +} + +// WatchEmergencyStateActivated is a free log subscription operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. +// +// Solidity: event EmergencyStateActivated() +func (_Supernets2 *Supernets2Filterer) WatchEmergencyStateActivated(opts *bind.WatchOpts, sink chan<- *Supernets2EmergencyStateActivated) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "EmergencyStateActivated") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2EmergencyStateActivated) + if err := _Supernets2.contract.UnpackLog(event, "EmergencyStateActivated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseEmergencyStateActivated is a log parse operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. +// +// Solidity: event EmergencyStateActivated() +func (_Supernets2 *Supernets2Filterer) ParseEmergencyStateActivated(log types.Log) (*Supernets2EmergencyStateActivated, error) { + event := new(Supernets2EmergencyStateActivated) + if err := _Supernets2.contract.UnpackLog(event, "EmergencyStateActivated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2EmergencyStateDeactivatedIterator is returned from FilterEmergencyStateDeactivated and is used to iterate over the raw logs and unpacked data for EmergencyStateDeactivated events raised by the Supernets2 contract. +type Supernets2EmergencyStateDeactivatedIterator struct { + Event *Supernets2EmergencyStateDeactivated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2EmergencyStateDeactivatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2EmergencyStateDeactivated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2EmergencyStateDeactivated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2EmergencyStateDeactivatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2EmergencyStateDeactivatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2EmergencyStateDeactivated represents a EmergencyStateDeactivated event raised by the Supernets2 contract. +type Supernets2EmergencyStateDeactivated struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEmergencyStateDeactivated is a free log retrieval operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. +// +// Solidity: event EmergencyStateDeactivated() +func (_Supernets2 *Supernets2Filterer) FilterEmergencyStateDeactivated(opts *bind.FilterOpts) (*Supernets2EmergencyStateDeactivatedIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "EmergencyStateDeactivated") + if err != nil { + return nil, err + } + return &Supernets2EmergencyStateDeactivatedIterator{contract: _Supernets2.contract, event: "EmergencyStateDeactivated", logs: logs, sub: sub}, nil +} + +// WatchEmergencyStateDeactivated is a free log subscription operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. +// +// Solidity: event EmergencyStateDeactivated() +func (_Supernets2 *Supernets2Filterer) WatchEmergencyStateDeactivated(opts *bind.WatchOpts, sink chan<- *Supernets2EmergencyStateDeactivated) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "EmergencyStateDeactivated") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2EmergencyStateDeactivated) + if err := _Supernets2.contract.UnpackLog(event, "EmergencyStateDeactivated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseEmergencyStateDeactivated is a log parse operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. +// +// Solidity: event EmergencyStateDeactivated() +func (_Supernets2 *Supernets2Filterer) ParseEmergencyStateDeactivated(log types.Log) (*Supernets2EmergencyStateDeactivated, error) { + event := new(Supernets2EmergencyStateDeactivated) + if err := _Supernets2.contract.UnpackLog(event, "EmergencyStateDeactivated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2ForceBatchIterator is returned from FilterForceBatch and is used to iterate over the raw logs and unpacked data for ForceBatch events raised by the Supernets2 contract. +type Supernets2ForceBatchIterator struct { + Event *Supernets2ForceBatch // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2ForceBatchIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2ForceBatch) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2ForceBatch) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2ForceBatchIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2ForceBatchIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2ForceBatch represents a ForceBatch event raised by the Supernets2 contract. +type Supernets2ForceBatch struct { + ForceBatchNum uint64 + LastGlobalExitRoot [32]byte + Sequencer common.Address + Transactions []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterForceBatch is a free log retrieval operation binding the contract event 0xf94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc931. +// +// Solidity: event ForceBatch(uint64 indexed forceBatchNum, bytes32 lastGlobalExitRoot, address sequencer, bytes transactions) +func (_Supernets2 *Supernets2Filterer) FilterForceBatch(opts *bind.FilterOpts, forceBatchNum []uint64) (*Supernets2ForceBatchIterator, error) { + + var forceBatchNumRule []interface{} + for _, forceBatchNumItem := range forceBatchNum { + forceBatchNumRule = append(forceBatchNumRule, forceBatchNumItem) + } + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "ForceBatch", forceBatchNumRule) + if err != nil { + return nil, err + } + return &Supernets2ForceBatchIterator{contract: _Supernets2.contract, event: "ForceBatch", logs: logs, sub: sub}, nil +} + +// WatchForceBatch is a free log subscription operation binding the contract event 0xf94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc931. +// +// Solidity: event ForceBatch(uint64 indexed forceBatchNum, bytes32 lastGlobalExitRoot, address sequencer, bytes transactions) +func (_Supernets2 *Supernets2Filterer) WatchForceBatch(opts *bind.WatchOpts, sink chan<- *Supernets2ForceBatch, forceBatchNum []uint64) (event.Subscription, error) { + + var forceBatchNumRule []interface{} + for _, forceBatchNumItem := range forceBatchNum { + forceBatchNumRule = append(forceBatchNumRule, forceBatchNumItem) + } + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "ForceBatch", forceBatchNumRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2ForceBatch) + if err := _Supernets2.contract.UnpackLog(event, "ForceBatch", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseForceBatch is a log parse operation binding the contract event 0xf94bb37db835f1ab585ee00041849a09b12cd081d77fa15ca070757619cbc931. +// +// Solidity: event ForceBatch(uint64 indexed forceBatchNum, bytes32 lastGlobalExitRoot, address sequencer, bytes transactions) +func (_Supernets2 *Supernets2Filterer) ParseForceBatch(log types.Log) (*Supernets2ForceBatch, error) { + event := new(Supernets2ForceBatch) + if err := _Supernets2.contract.UnpackLog(event, "ForceBatch", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2InitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Supernets2 contract. +type Supernets2InitializedIterator struct { + Event *Supernets2Initialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2InitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2Initialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2Initialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2InitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2InitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2Initialized represents a Initialized event raised by the Supernets2 contract. +type Supernets2Initialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Supernets2 *Supernets2Filterer) FilterInitialized(opts *bind.FilterOpts) (*Supernets2InitializedIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &Supernets2InitializedIterator{contract: _Supernets2.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Supernets2 *Supernets2Filterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *Supernets2Initialized) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2Initialized) + if err := _Supernets2.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Supernets2 *Supernets2Filterer) ParseInitialized(log types.Log) (*Supernets2Initialized, error) { + event := new(Supernets2Initialized) + if err := _Supernets2.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2OverridePendingStateIterator is returned from FilterOverridePendingState and is used to iterate over the raw logs and unpacked data for OverridePendingState events raised by the Supernets2 contract. +type Supernets2OverridePendingStateIterator struct { + Event *Supernets2OverridePendingState // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2OverridePendingStateIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2OverridePendingState) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2OverridePendingState) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2OverridePendingStateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2OverridePendingStateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2OverridePendingState represents a OverridePendingState event raised by the Supernets2 contract. +type Supernets2OverridePendingState struct { + NumBatch uint64 + StateRoot [32]byte + Aggregator common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOverridePendingState is a free log retrieval operation binding the contract event 0xcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf72. +// +// Solidity: event OverridePendingState(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Supernets2 *Supernets2Filterer) FilterOverridePendingState(opts *bind.FilterOpts, numBatch []uint64, aggregator []common.Address) (*Supernets2OverridePendingStateIterator, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "OverridePendingState", numBatchRule, aggregatorRule) + if err != nil { + return nil, err + } + return &Supernets2OverridePendingStateIterator{contract: _Supernets2.contract, event: "OverridePendingState", logs: logs, sub: sub}, nil +} + +// WatchOverridePendingState is a free log subscription operation binding the contract event 0xcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf72. +// +// Solidity: event OverridePendingState(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Supernets2 *Supernets2Filterer) WatchOverridePendingState(opts *bind.WatchOpts, sink chan<- *Supernets2OverridePendingState, numBatch []uint64, aggregator []common.Address) (event.Subscription, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "OverridePendingState", numBatchRule, aggregatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2OverridePendingState) + if err := _Supernets2.contract.UnpackLog(event, "OverridePendingState", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOverridePendingState is a log parse operation binding the contract event 0xcc1b5520188bf1dd3e63f98164b577c4d75c11a619ddea692112f0d1aec4cf72. +// +// Solidity: event OverridePendingState(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Supernets2 *Supernets2Filterer) ParseOverridePendingState(log types.Log) (*Supernets2OverridePendingState, error) { + event := new(Supernets2OverridePendingState) + if err := _Supernets2.contract.UnpackLog(event, "OverridePendingState", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2OwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Supernets2 contract. +type Supernets2OwnershipTransferredIterator struct { + Event *Supernets2OwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2OwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2OwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2OwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2OwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2OwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2OwnershipTransferred represents a OwnershipTransferred event raised by the Supernets2 contract. +type Supernets2OwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Supernets2 *Supernets2Filterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*Supernets2OwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &Supernets2OwnershipTransferredIterator{contract: _Supernets2.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Supernets2 *Supernets2Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *Supernets2OwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2OwnershipTransferred) + if err := _Supernets2.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Supernets2 *Supernets2Filterer) ParseOwnershipTransferred(log types.Log) (*Supernets2OwnershipTransferred, error) { + event := new(Supernets2OwnershipTransferred) + if err := _Supernets2.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2ProveNonDeterministicPendingStateIterator is returned from FilterProveNonDeterministicPendingState and is used to iterate over the raw logs and unpacked data for ProveNonDeterministicPendingState events raised by the Supernets2 contract. +type Supernets2ProveNonDeterministicPendingStateIterator struct { + Event *Supernets2ProveNonDeterministicPendingState // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2ProveNonDeterministicPendingStateIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2ProveNonDeterministicPendingState) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2ProveNonDeterministicPendingState) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2ProveNonDeterministicPendingStateIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2ProveNonDeterministicPendingStateIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2ProveNonDeterministicPendingState represents a ProveNonDeterministicPendingState event raised by the Supernets2 contract. +type Supernets2ProveNonDeterministicPendingState struct { + StoredStateRoot [32]byte + ProvedStateRoot [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProveNonDeterministicPendingState is a free log retrieval operation binding the contract event 0x1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010. +// +// Solidity: event ProveNonDeterministicPendingState(bytes32 storedStateRoot, bytes32 provedStateRoot) +func (_Supernets2 *Supernets2Filterer) FilterProveNonDeterministicPendingState(opts *bind.FilterOpts) (*Supernets2ProveNonDeterministicPendingStateIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "ProveNonDeterministicPendingState") + if err != nil { + return nil, err + } + return &Supernets2ProveNonDeterministicPendingStateIterator{contract: _Supernets2.contract, event: "ProveNonDeterministicPendingState", logs: logs, sub: sub}, nil +} + +// WatchProveNonDeterministicPendingState is a free log subscription operation binding the contract event 0x1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010. +// +// Solidity: event ProveNonDeterministicPendingState(bytes32 storedStateRoot, bytes32 provedStateRoot) +func (_Supernets2 *Supernets2Filterer) WatchProveNonDeterministicPendingState(opts *bind.WatchOpts, sink chan<- *Supernets2ProveNonDeterministicPendingState) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "ProveNonDeterministicPendingState") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2ProveNonDeterministicPendingState) + if err := _Supernets2.contract.UnpackLog(event, "ProveNonDeterministicPendingState", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseProveNonDeterministicPendingState is a log parse operation binding the contract event 0x1f44c21118c4603cfb4e1b621dbcfa2b73efcececee2b99b620b2953d33a7010. +// +// Solidity: event ProveNonDeterministicPendingState(bytes32 storedStateRoot, bytes32 provedStateRoot) +func (_Supernets2 *Supernets2Filterer) ParseProveNonDeterministicPendingState(log types.Log) (*Supernets2ProveNonDeterministicPendingState, error) { + event := new(Supernets2ProveNonDeterministicPendingState) + if err := _Supernets2.contract.UnpackLog(event, "ProveNonDeterministicPendingState", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2SequenceBatchesIterator is returned from FilterSequenceBatches and is used to iterate over the raw logs and unpacked data for SequenceBatches events raised by the Supernets2 contract. +type Supernets2SequenceBatchesIterator struct { + Event *Supernets2SequenceBatches // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2SequenceBatchesIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2SequenceBatches) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2SequenceBatches) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2SequenceBatchesIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2SequenceBatchesIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2SequenceBatches represents a SequenceBatches event raised by the Supernets2 contract. +type Supernets2SequenceBatches struct { + NumBatch uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSequenceBatches is a free log retrieval operation binding the contract event 0x303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce. +// +// Solidity: event SequenceBatches(uint64 indexed numBatch) +func (_Supernets2 *Supernets2Filterer) FilterSequenceBatches(opts *bind.FilterOpts, numBatch []uint64) (*Supernets2SequenceBatchesIterator, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "SequenceBatches", numBatchRule) + if err != nil { + return nil, err + } + return &Supernets2SequenceBatchesIterator{contract: _Supernets2.contract, event: "SequenceBatches", logs: logs, sub: sub}, nil +} + +// WatchSequenceBatches is a free log subscription operation binding the contract event 0x303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce. +// +// Solidity: event SequenceBatches(uint64 indexed numBatch) +func (_Supernets2 *Supernets2Filterer) WatchSequenceBatches(opts *bind.WatchOpts, sink chan<- *Supernets2SequenceBatches, numBatch []uint64) (event.Subscription, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "SequenceBatches", numBatchRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2SequenceBatches) + if err := _Supernets2.contract.UnpackLog(event, "SequenceBatches", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSequenceBatches is a log parse operation binding the contract event 0x303446e6a8cb73c83dff421c0b1d5e5ce0719dab1bff13660fc254e58cc17fce. +// +// Solidity: event SequenceBatches(uint64 indexed numBatch) +func (_Supernets2 *Supernets2Filterer) ParseSequenceBatches(log types.Log) (*Supernets2SequenceBatches, error) { + event := new(Supernets2SequenceBatches) + if err := _Supernets2.contract.UnpackLog(event, "SequenceBatches", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2SequenceForceBatchesIterator is returned from FilterSequenceForceBatches and is used to iterate over the raw logs and unpacked data for SequenceForceBatches events raised by the Supernets2 contract. +type Supernets2SequenceForceBatchesIterator struct { + Event *Supernets2SequenceForceBatches // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2SequenceForceBatchesIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2SequenceForceBatches) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2SequenceForceBatches) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2SequenceForceBatchesIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2SequenceForceBatchesIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2SequenceForceBatches represents a SequenceForceBatches event raised by the Supernets2 contract. +type Supernets2SequenceForceBatches struct { + NumBatch uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSequenceForceBatches is a free log retrieval operation binding the contract event 0x648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a4. +// +// Solidity: event SequenceForceBatches(uint64 indexed numBatch) +func (_Supernets2 *Supernets2Filterer) FilterSequenceForceBatches(opts *bind.FilterOpts, numBatch []uint64) (*Supernets2SequenceForceBatchesIterator, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "SequenceForceBatches", numBatchRule) + if err != nil { + return nil, err + } + return &Supernets2SequenceForceBatchesIterator{contract: _Supernets2.contract, event: "SequenceForceBatches", logs: logs, sub: sub}, nil +} + +// WatchSequenceForceBatches is a free log subscription operation binding the contract event 0x648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a4. +// +// Solidity: event SequenceForceBatches(uint64 indexed numBatch) +func (_Supernets2 *Supernets2Filterer) WatchSequenceForceBatches(opts *bind.WatchOpts, sink chan<- *Supernets2SequenceForceBatches, numBatch []uint64) (event.Subscription, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "SequenceForceBatches", numBatchRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2SequenceForceBatches) + if err := _Supernets2.contract.UnpackLog(event, "SequenceForceBatches", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSequenceForceBatches is a log parse operation binding the contract event 0x648a61dd2438f072f5a1960939abd30f37aea80d2e94c9792ad142d3e0a490a4. +// +// Solidity: event SequenceForceBatches(uint64 indexed numBatch) +func (_Supernets2 *Supernets2Filterer) ParseSequenceForceBatches(log types.Log) (*Supernets2SequenceForceBatches, error) { + event := new(Supernets2SequenceForceBatches) + if err := _Supernets2.contract.UnpackLog(event, "SequenceForceBatches", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2SetForceBatchTimeoutIterator is returned from FilterSetForceBatchTimeout and is used to iterate over the raw logs and unpacked data for SetForceBatchTimeout events raised by the Supernets2 contract. +type Supernets2SetForceBatchTimeoutIterator struct { + Event *Supernets2SetForceBatchTimeout // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2SetForceBatchTimeoutIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2SetForceBatchTimeout) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2SetForceBatchTimeout) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2SetForceBatchTimeoutIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2SetForceBatchTimeoutIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2SetForceBatchTimeout represents a SetForceBatchTimeout event raised by the Supernets2 contract. +type Supernets2SetForceBatchTimeout struct { + NewforceBatchTimeout uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetForceBatchTimeout is a free log retrieval operation binding the contract event 0xa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b. +// +// Solidity: event SetForceBatchTimeout(uint64 newforceBatchTimeout) +func (_Supernets2 *Supernets2Filterer) FilterSetForceBatchTimeout(opts *bind.FilterOpts) (*Supernets2SetForceBatchTimeoutIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "SetForceBatchTimeout") + if err != nil { + return nil, err + } + return &Supernets2SetForceBatchTimeoutIterator{contract: _Supernets2.contract, event: "SetForceBatchTimeout", logs: logs, sub: sub}, nil +} + +// WatchSetForceBatchTimeout is a free log subscription operation binding the contract event 0xa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b. +// +// Solidity: event SetForceBatchTimeout(uint64 newforceBatchTimeout) +func (_Supernets2 *Supernets2Filterer) WatchSetForceBatchTimeout(opts *bind.WatchOpts, sink chan<- *Supernets2SetForceBatchTimeout) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "SetForceBatchTimeout") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2SetForceBatchTimeout) + if err := _Supernets2.contract.UnpackLog(event, "SetForceBatchTimeout", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetForceBatchTimeout is a log parse operation binding the contract event 0xa7eb6cb8a613eb4e8bddc1ac3d61ec6cf10898760f0b187bcca794c6ca6fa40b. +// +// Solidity: event SetForceBatchTimeout(uint64 newforceBatchTimeout) +func (_Supernets2 *Supernets2Filterer) ParseSetForceBatchTimeout(log types.Log) (*Supernets2SetForceBatchTimeout, error) { + event := new(Supernets2SetForceBatchTimeout) + if err := _Supernets2.contract.UnpackLog(event, "SetForceBatchTimeout", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2SetMultiplierBatchFeeIterator is returned from FilterSetMultiplierBatchFee and is used to iterate over the raw logs and unpacked data for SetMultiplierBatchFee events raised by the Supernets2 contract. +type Supernets2SetMultiplierBatchFeeIterator struct { + Event *Supernets2SetMultiplierBatchFee // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2SetMultiplierBatchFeeIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2SetMultiplierBatchFee) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2SetMultiplierBatchFee) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2SetMultiplierBatchFeeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2SetMultiplierBatchFeeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2SetMultiplierBatchFee represents a SetMultiplierBatchFee event raised by the Supernets2 contract. +type Supernets2SetMultiplierBatchFee struct { + NewMultiplierBatchFee uint16 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetMultiplierBatchFee is a free log retrieval operation binding the contract event 0x7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5. +// +// Solidity: event SetMultiplierBatchFee(uint16 newMultiplierBatchFee) +func (_Supernets2 *Supernets2Filterer) FilterSetMultiplierBatchFee(opts *bind.FilterOpts) (*Supernets2SetMultiplierBatchFeeIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "SetMultiplierBatchFee") + if err != nil { + return nil, err + } + return &Supernets2SetMultiplierBatchFeeIterator{contract: _Supernets2.contract, event: "SetMultiplierBatchFee", logs: logs, sub: sub}, nil +} + +// WatchSetMultiplierBatchFee is a free log subscription operation binding the contract event 0x7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5. +// +// Solidity: event SetMultiplierBatchFee(uint16 newMultiplierBatchFee) +func (_Supernets2 *Supernets2Filterer) WatchSetMultiplierBatchFee(opts *bind.WatchOpts, sink chan<- *Supernets2SetMultiplierBatchFee) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "SetMultiplierBatchFee") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2SetMultiplierBatchFee) + if err := _Supernets2.contract.UnpackLog(event, "SetMultiplierBatchFee", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetMultiplierBatchFee is a log parse operation binding the contract event 0x7019933d795eba185c180209e8ae8bffbaa25bcef293364687702c31f4d302c5. +// +// Solidity: event SetMultiplierBatchFee(uint16 newMultiplierBatchFee) +func (_Supernets2 *Supernets2Filterer) ParseSetMultiplierBatchFee(log types.Log) (*Supernets2SetMultiplierBatchFee, error) { + event := new(Supernets2SetMultiplierBatchFee) + if err := _Supernets2.contract.UnpackLog(event, "SetMultiplierBatchFee", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2SetPendingStateTimeoutIterator is returned from FilterSetPendingStateTimeout and is used to iterate over the raw logs and unpacked data for SetPendingStateTimeout events raised by the Supernets2 contract. +type Supernets2SetPendingStateTimeoutIterator struct { + Event *Supernets2SetPendingStateTimeout // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2SetPendingStateTimeoutIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2SetPendingStateTimeout) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2SetPendingStateTimeout) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2SetPendingStateTimeoutIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2SetPendingStateTimeoutIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2SetPendingStateTimeout represents a SetPendingStateTimeout event raised by the Supernets2 contract. +type Supernets2SetPendingStateTimeout struct { + NewPendingStateTimeout uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetPendingStateTimeout is a free log retrieval operation binding the contract event 0xc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c75. +// +// Solidity: event SetPendingStateTimeout(uint64 newPendingStateTimeout) +func (_Supernets2 *Supernets2Filterer) FilterSetPendingStateTimeout(opts *bind.FilterOpts) (*Supernets2SetPendingStateTimeoutIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "SetPendingStateTimeout") + if err != nil { + return nil, err + } + return &Supernets2SetPendingStateTimeoutIterator{contract: _Supernets2.contract, event: "SetPendingStateTimeout", logs: logs, sub: sub}, nil +} + +// WatchSetPendingStateTimeout is a free log subscription operation binding the contract event 0xc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c75. +// +// Solidity: event SetPendingStateTimeout(uint64 newPendingStateTimeout) +func (_Supernets2 *Supernets2Filterer) WatchSetPendingStateTimeout(opts *bind.WatchOpts, sink chan<- *Supernets2SetPendingStateTimeout) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "SetPendingStateTimeout") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2SetPendingStateTimeout) + if err := _Supernets2.contract.UnpackLog(event, "SetPendingStateTimeout", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetPendingStateTimeout is a log parse operation binding the contract event 0xc4121f4e22c69632ebb7cf1f462be0511dc034f999b52013eddfb24aab765c75. +// +// Solidity: event SetPendingStateTimeout(uint64 newPendingStateTimeout) +func (_Supernets2 *Supernets2Filterer) ParseSetPendingStateTimeout(log types.Log) (*Supernets2SetPendingStateTimeout, error) { + event := new(Supernets2SetPendingStateTimeout) + if err := _Supernets2.contract.UnpackLog(event, "SetPendingStateTimeout", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2SetTrustedAggregatorIterator is returned from FilterSetTrustedAggregator and is used to iterate over the raw logs and unpacked data for SetTrustedAggregator events raised by the Supernets2 contract. +type Supernets2SetTrustedAggregatorIterator struct { + Event *Supernets2SetTrustedAggregator // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2SetTrustedAggregatorIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2SetTrustedAggregator) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2SetTrustedAggregator) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2SetTrustedAggregatorIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2SetTrustedAggregatorIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2SetTrustedAggregator represents a SetTrustedAggregator event raised by the Supernets2 contract. +type Supernets2SetTrustedAggregator struct { + NewTrustedAggregator common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetTrustedAggregator is a free log retrieval operation binding the contract event 0x61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca. +// +// Solidity: event SetTrustedAggregator(address newTrustedAggregator) +func (_Supernets2 *Supernets2Filterer) FilterSetTrustedAggregator(opts *bind.FilterOpts) (*Supernets2SetTrustedAggregatorIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "SetTrustedAggregator") + if err != nil { + return nil, err + } + return &Supernets2SetTrustedAggregatorIterator{contract: _Supernets2.contract, event: "SetTrustedAggregator", logs: logs, sub: sub}, nil +} + +// WatchSetTrustedAggregator is a free log subscription operation binding the contract event 0x61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca. +// +// Solidity: event SetTrustedAggregator(address newTrustedAggregator) +func (_Supernets2 *Supernets2Filterer) WatchSetTrustedAggregator(opts *bind.WatchOpts, sink chan<- *Supernets2SetTrustedAggregator) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "SetTrustedAggregator") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2SetTrustedAggregator) + if err := _Supernets2.contract.UnpackLog(event, "SetTrustedAggregator", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetTrustedAggregator is a log parse operation binding the contract event 0x61f8fec29495a3078e9271456f05fb0707fd4e41f7661865f80fc437d06681ca. +// +// Solidity: event SetTrustedAggregator(address newTrustedAggregator) +func (_Supernets2 *Supernets2Filterer) ParseSetTrustedAggregator(log types.Log) (*Supernets2SetTrustedAggregator, error) { + event := new(Supernets2SetTrustedAggregator) + if err := _Supernets2.contract.UnpackLog(event, "SetTrustedAggregator", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2SetTrustedAggregatorTimeoutIterator is returned from FilterSetTrustedAggregatorTimeout and is used to iterate over the raw logs and unpacked data for SetTrustedAggregatorTimeout events raised by the Supernets2 contract. +type Supernets2SetTrustedAggregatorTimeoutIterator struct { + Event *Supernets2SetTrustedAggregatorTimeout // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2SetTrustedAggregatorTimeoutIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2SetTrustedAggregatorTimeout) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2SetTrustedAggregatorTimeout) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2SetTrustedAggregatorTimeoutIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2SetTrustedAggregatorTimeoutIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2SetTrustedAggregatorTimeout represents a SetTrustedAggregatorTimeout event raised by the Supernets2 contract. +type Supernets2SetTrustedAggregatorTimeout struct { + NewTrustedAggregatorTimeout uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetTrustedAggregatorTimeout is a free log retrieval operation binding the contract event 0x1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a1. +// +// Solidity: event SetTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) +func (_Supernets2 *Supernets2Filterer) FilterSetTrustedAggregatorTimeout(opts *bind.FilterOpts) (*Supernets2SetTrustedAggregatorTimeoutIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "SetTrustedAggregatorTimeout") + if err != nil { + return nil, err + } + return &Supernets2SetTrustedAggregatorTimeoutIterator{contract: _Supernets2.contract, event: "SetTrustedAggregatorTimeout", logs: logs, sub: sub}, nil +} + +// WatchSetTrustedAggregatorTimeout is a free log subscription operation binding the contract event 0x1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a1. +// +// Solidity: event SetTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) +func (_Supernets2 *Supernets2Filterer) WatchSetTrustedAggregatorTimeout(opts *bind.WatchOpts, sink chan<- *Supernets2SetTrustedAggregatorTimeout) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "SetTrustedAggregatorTimeout") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2SetTrustedAggregatorTimeout) + if err := _Supernets2.contract.UnpackLog(event, "SetTrustedAggregatorTimeout", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetTrustedAggregatorTimeout is a log parse operation binding the contract event 0x1f4fa24c2e4bad19a7f3ec5c5485f70d46c798461c2e684f55bbd0fc661373a1. +// +// Solidity: event SetTrustedAggregatorTimeout(uint64 newTrustedAggregatorTimeout) +func (_Supernets2 *Supernets2Filterer) ParseSetTrustedAggregatorTimeout(log types.Log) (*Supernets2SetTrustedAggregatorTimeout, error) { + event := new(Supernets2SetTrustedAggregatorTimeout) + if err := _Supernets2.contract.UnpackLog(event, "SetTrustedAggregatorTimeout", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2SetTrustedSequencerIterator is returned from FilterSetTrustedSequencer and is used to iterate over the raw logs and unpacked data for SetTrustedSequencer events raised by the Supernets2 contract. +type Supernets2SetTrustedSequencerIterator struct { + Event *Supernets2SetTrustedSequencer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2SetTrustedSequencerIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2SetTrustedSequencer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2SetTrustedSequencer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2SetTrustedSequencerIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2SetTrustedSequencerIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2SetTrustedSequencer represents a SetTrustedSequencer event raised by the Supernets2 contract. +type Supernets2SetTrustedSequencer struct { + NewTrustedSequencer common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetTrustedSequencer is a free log retrieval operation binding the contract event 0xf54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc0. +// +// Solidity: event SetTrustedSequencer(address newTrustedSequencer) +func (_Supernets2 *Supernets2Filterer) FilterSetTrustedSequencer(opts *bind.FilterOpts) (*Supernets2SetTrustedSequencerIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "SetTrustedSequencer") + if err != nil { + return nil, err + } + return &Supernets2SetTrustedSequencerIterator{contract: _Supernets2.contract, event: "SetTrustedSequencer", logs: logs, sub: sub}, nil +} + +// WatchSetTrustedSequencer is a free log subscription operation binding the contract event 0xf54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc0. +// +// Solidity: event SetTrustedSequencer(address newTrustedSequencer) +func (_Supernets2 *Supernets2Filterer) WatchSetTrustedSequencer(opts *bind.WatchOpts, sink chan<- *Supernets2SetTrustedSequencer) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "SetTrustedSequencer") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2SetTrustedSequencer) + if err := _Supernets2.contract.UnpackLog(event, "SetTrustedSequencer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetTrustedSequencer is a log parse operation binding the contract event 0xf54144f9611984021529f814a1cb6a41e22c58351510a0d9f7e822618abb9cc0. +// +// Solidity: event SetTrustedSequencer(address newTrustedSequencer) +func (_Supernets2 *Supernets2Filterer) ParseSetTrustedSequencer(log types.Log) (*Supernets2SetTrustedSequencer, error) { + event := new(Supernets2SetTrustedSequencer) + if err := _Supernets2.contract.UnpackLog(event, "SetTrustedSequencer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2SetTrustedSequencerURLIterator is returned from FilterSetTrustedSequencerURL and is used to iterate over the raw logs and unpacked data for SetTrustedSequencerURL events raised by the Supernets2 contract. +type Supernets2SetTrustedSequencerURLIterator struct { + Event *Supernets2SetTrustedSequencerURL // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2SetTrustedSequencerURLIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2SetTrustedSequencerURL) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2SetTrustedSequencerURL) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2SetTrustedSequencerURLIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2SetTrustedSequencerURLIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2SetTrustedSequencerURL represents a SetTrustedSequencerURL event raised by the Supernets2 contract. +type Supernets2SetTrustedSequencerURL struct { + NewTrustedSequencerURL string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetTrustedSequencerURL is a free log retrieval operation binding the contract event 0x6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b20. +// +// Solidity: event SetTrustedSequencerURL(string newTrustedSequencerURL) +func (_Supernets2 *Supernets2Filterer) FilterSetTrustedSequencerURL(opts *bind.FilterOpts) (*Supernets2SetTrustedSequencerURLIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "SetTrustedSequencerURL") + if err != nil { + return nil, err + } + return &Supernets2SetTrustedSequencerURLIterator{contract: _Supernets2.contract, event: "SetTrustedSequencerURL", logs: logs, sub: sub}, nil +} + +// WatchSetTrustedSequencerURL is a free log subscription operation binding the contract event 0x6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b20. +// +// Solidity: event SetTrustedSequencerURL(string newTrustedSequencerURL) +func (_Supernets2 *Supernets2Filterer) WatchSetTrustedSequencerURL(opts *bind.WatchOpts, sink chan<- *Supernets2SetTrustedSequencerURL) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "SetTrustedSequencerURL") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2SetTrustedSequencerURL) + if err := _Supernets2.contract.UnpackLog(event, "SetTrustedSequencerURL", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetTrustedSequencerURL is a log parse operation binding the contract event 0x6b8f723a4c7a5335cafae8a598a0aa0301be1387c037dccc085b62add6448b20. +// +// Solidity: event SetTrustedSequencerURL(string newTrustedSequencerURL) +func (_Supernets2 *Supernets2Filterer) ParseSetTrustedSequencerURL(log types.Log) (*Supernets2SetTrustedSequencerURL, error) { + event := new(Supernets2SetTrustedSequencerURL) + if err := _Supernets2.contract.UnpackLog(event, "SetTrustedSequencerURL", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2SetVerifyBatchTimeTargetIterator is returned from FilterSetVerifyBatchTimeTarget and is used to iterate over the raw logs and unpacked data for SetVerifyBatchTimeTarget events raised by the Supernets2 contract. +type Supernets2SetVerifyBatchTimeTargetIterator struct { + Event *Supernets2SetVerifyBatchTimeTarget // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2SetVerifyBatchTimeTargetIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2SetVerifyBatchTimeTarget) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2SetVerifyBatchTimeTarget) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2SetVerifyBatchTimeTargetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2SetVerifyBatchTimeTargetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2SetVerifyBatchTimeTarget represents a SetVerifyBatchTimeTarget event raised by the Supernets2 contract. +type Supernets2SetVerifyBatchTimeTarget struct { + NewVerifyBatchTimeTarget uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSetVerifyBatchTimeTarget is a free log retrieval operation binding the contract event 0x1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c28. +// +// Solidity: event SetVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) +func (_Supernets2 *Supernets2Filterer) FilterSetVerifyBatchTimeTarget(opts *bind.FilterOpts) (*Supernets2SetVerifyBatchTimeTargetIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "SetVerifyBatchTimeTarget") + if err != nil { + return nil, err + } + return &Supernets2SetVerifyBatchTimeTargetIterator{contract: _Supernets2.contract, event: "SetVerifyBatchTimeTarget", logs: logs, sub: sub}, nil +} + +// WatchSetVerifyBatchTimeTarget is a free log subscription operation binding the contract event 0x1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c28. +// +// Solidity: event SetVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) +func (_Supernets2 *Supernets2Filterer) WatchSetVerifyBatchTimeTarget(opts *bind.WatchOpts, sink chan<- *Supernets2SetVerifyBatchTimeTarget) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "SetVerifyBatchTimeTarget") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2SetVerifyBatchTimeTarget) + if err := _Supernets2.contract.UnpackLog(event, "SetVerifyBatchTimeTarget", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSetVerifyBatchTimeTarget is a log parse operation binding the contract event 0x1b023231a1ab6b5d93992f168fb44498e1a7e64cef58daff6f1c216de6a68c28. +// +// Solidity: event SetVerifyBatchTimeTarget(uint64 newVerifyBatchTimeTarget) +func (_Supernets2 *Supernets2Filterer) ParseSetVerifyBatchTimeTarget(log types.Log) (*Supernets2SetVerifyBatchTimeTarget, error) { + event := new(Supernets2SetVerifyBatchTimeTarget) + if err := _Supernets2.contract.UnpackLog(event, "SetVerifyBatchTimeTarget", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2TransferAdminRoleIterator is returned from FilterTransferAdminRole and is used to iterate over the raw logs and unpacked data for TransferAdminRole events raised by the Supernets2 contract. +type Supernets2TransferAdminRoleIterator struct { + Event *Supernets2TransferAdminRole // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2TransferAdminRoleIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2TransferAdminRole) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2TransferAdminRole) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2TransferAdminRoleIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2TransferAdminRoleIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2TransferAdminRole represents a TransferAdminRole event raised by the Supernets2 contract. +type Supernets2TransferAdminRole struct { + NewPendingAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransferAdminRole is a free log retrieval operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. +// +// Solidity: event TransferAdminRole(address newPendingAdmin) +func (_Supernets2 *Supernets2Filterer) FilterTransferAdminRole(opts *bind.FilterOpts) (*Supernets2TransferAdminRoleIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "TransferAdminRole") + if err != nil { + return nil, err + } + return &Supernets2TransferAdminRoleIterator{contract: _Supernets2.contract, event: "TransferAdminRole", logs: logs, sub: sub}, nil +} + +// WatchTransferAdminRole is a free log subscription operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. +// +// Solidity: event TransferAdminRole(address newPendingAdmin) +func (_Supernets2 *Supernets2Filterer) WatchTransferAdminRole(opts *bind.WatchOpts, sink chan<- *Supernets2TransferAdminRole) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "TransferAdminRole") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2TransferAdminRole) + if err := _Supernets2.contract.UnpackLog(event, "TransferAdminRole", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransferAdminRole is a log parse operation binding the contract event 0xa5b56b7906fd0a20e3f35120dd8343db1e12e037a6c90111c7e42885e82a1ce6. +// +// Solidity: event TransferAdminRole(address newPendingAdmin) +func (_Supernets2 *Supernets2Filterer) ParseTransferAdminRole(log types.Log) (*Supernets2TransferAdminRole, error) { + event := new(Supernets2TransferAdminRole) + if err := _Supernets2.contract.UnpackLog(event, "TransferAdminRole", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2UpdateSupernets2VersionIterator is returned from FilterUpdateSupernets2Version and is used to iterate over the raw logs and unpacked data for UpdateSupernets2Version events raised by the Supernets2 contract. +type Supernets2UpdateSupernets2VersionIterator struct { + Event *Supernets2UpdateSupernets2Version // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2UpdateSupernets2VersionIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2UpdateSupernets2Version) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2UpdateSupernets2Version) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2UpdateSupernets2VersionIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2UpdateSupernets2VersionIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2UpdateSupernets2Version represents a UpdateSupernets2Version event raised by the Supernets2 contract. +type Supernets2UpdateSupernets2Version struct { + NumBatch uint64 + ForkID uint64 + Version string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdateSupernets2Version is a free log retrieval operation binding the contract event 0x13e60734641bd97ab6e444f419277d9983e2c3eab9bb631a578ffa07756b6351. +// +// Solidity: event UpdateSupernets2Version(uint64 numBatch, uint64 forkID, string version) +func (_Supernets2 *Supernets2Filterer) FilterUpdateSupernets2Version(opts *bind.FilterOpts) (*Supernets2UpdateSupernets2VersionIterator, error) { + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "UpdateSupernets2Version") + if err != nil { + return nil, err + } + return &Supernets2UpdateSupernets2VersionIterator{contract: _Supernets2.contract, event: "UpdateSupernets2Version", logs: logs, sub: sub}, nil +} + +// WatchUpdateSupernets2Version is a free log subscription operation binding the contract event 0x13e60734641bd97ab6e444f419277d9983e2c3eab9bb631a578ffa07756b6351. +// +// Solidity: event UpdateSupernets2Version(uint64 numBatch, uint64 forkID, string version) +func (_Supernets2 *Supernets2Filterer) WatchUpdateSupernets2Version(opts *bind.WatchOpts, sink chan<- *Supernets2UpdateSupernets2Version) (event.Subscription, error) { + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "UpdateSupernets2Version") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2UpdateSupernets2Version) + if err := _Supernets2.contract.UnpackLog(event, "UpdateSupernets2Version", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpdateSupernets2Version is a log parse operation binding the contract event 0x13e60734641bd97ab6e444f419277d9983e2c3eab9bb631a578ffa07756b6351. +// +// Solidity: event UpdateSupernets2Version(uint64 numBatch, uint64 forkID, string version) +func (_Supernets2 *Supernets2Filterer) ParseUpdateSupernets2Version(log types.Log) (*Supernets2UpdateSupernets2Version, error) { + event := new(Supernets2UpdateSupernets2Version) + if err := _Supernets2.contract.UnpackLog(event, "UpdateSupernets2Version", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2VerifyBatchesIterator is returned from FilterVerifyBatches and is used to iterate over the raw logs and unpacked data for VerifyBatches events raised by the Supernets2 contract. +type Supernets2VerifyBatchesIterator struct { + Event *Supernets2VerifyBatches // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2VerifyBatchesIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2VerifyBatches) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2VerifyBatches) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2VerifyBatchesIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2VerifyBatchesIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2VerifyBatches represents a VerifyBatches event raised by the Supernets2 contract. +type Supernets2VerifyBatches struct { + NumBatch uint64 + StateRoot [32]byte + Aggregator common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterVerifyBatches is a free log retrieval operation binding the contract event 0x9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966. +// +// Solidity: event VerifyBatches(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Supernets2 *Supernets2Filterer) FilterVerifyBatches(opts *bind.FilterOpts, numBatch []uint64, aggregator []common.Address) (*Supernets2VerifyBatchesIterator, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "VerifyBatches", numBatchRule, aggregatorRule) + if err != nil { + return nil, err + } + return &Supernets2VerifyBatchesIterator{contract: _Supernets2.contract, event: "VerifyBatches", logs: logs, sub: sub}, nil +} + +// WatchVerifyBatches is a free log subscription operation binding the contract event 0x9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966. +// +// Solidity: event VerifyBatches(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Supernets2 *Supernets2Filterer) WatchVerifyBatches(opts *bind.WatchOpts, sink chan<- *Supernets2VerifyBatches, numBatch []uint64, aggregator []common.Address) (event.Subscription, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "VerifyBatches", numBatchRule, aggregatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2VerifyBatches) + if err := _Supernets2.contract.UnpackLog(event, "VerifyBatches", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseVerifyBatches is a log parse operation binding the contract event 0x9c72852172521097ba7e1482e6b44b351323df0155f97f4ea18fcec28e1f5966. +// +// Solidity: event VerifyBatches(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Supernets2 *Supernets2Filterer) ParseVerifyBatches(log types.Log) (*Supernets2VerifyBatches, error) { + event := new(Supernets2VerifyBatches) + if err := _Supernets2.contract.UnpackLog(event, "VerifyBatches", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2VerifyBatchesTrustedAggregatorIterator is returned from FilterVerifyBatchesTrustedAggregator and is used to iterate over the raw logs and unpacked data for VerifyBatchesTrustedAggregator events raised by the Supernets2 contract. +type Supernets2VerifyBatchesTrustedAggregatorIterator struct { + Event *Supernets2VerifyBatchesTrustedAggregator // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2VerifyBatchesTrustedAggregatorIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2VerifyBatchesTrustedAggregator) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2VerifyBatchesTrustedAggregator) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2VerifyBatchesTrustedAggregatorIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2VerifyBatchesTrustedAggregatorIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2VerifyBatchesTrustedAggregator represents a VerifyBatchesTrustedAggregator event raised by the Supernets2 contract. +type Supernets2VerifyBatchesTrustedAggregator struct { + NumBatch uint64 + StateRoot [32]byte + Aggregator common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterVerifyBatchesTrustedAggregator is a free log retrieval operation binding the contract event 0xcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe. +// +// Solidity: event VerifyBatchesTrustedAggregator(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Supernets2 *Supernets2Filterer) FilterVerifyBatchesTrustedAggregator(opts *bind.FilterOpts, numBatch []uint64, aggregator []common.Address) (*Supernets2VerifyBatchesTrustedAggregatorIterator, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + + logs, sub, err := _Supernets2.contract.FilterLogs(opts, "VerifyBatchesTrustedAggregator", numBatchRule, aggregatorRule) + if err != nil { + return nil, err + } + return &Supernets2VerifyBatchesTrustedAggregatorIterator{contract: _Supernets2.contract, event: "VerifyBatchesTrustedAggregator", logs: logs, sub: sub}, nil +} + +// WatchVerifyBatchesTrustedAggregator is a free log subscription operation binding the contract event 0xcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe. +// +// Solidity: event VerifyBatchesTrustedAggregator(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Supernets2 *Supernets2Filterer) WatchVerifyBatchesTrustedAggregator(opts *bind.WatchOpts, sink chan<- *Supernets2VerifyBatchesTrustedAggregator, numBatch []uint64, aggregator []common.Address) (event.Subscription, error) { + + var numBatchRule []interface{} + for _, numBatchItem := range numBatch { + numBatchRule = append(numBatchRule, numBatchItem) + } + + var aggregatorRule []interface{} + for _, aggregatorItem := range aggregator { + aggregatorRule = append(aggregatorRule, aggregatorItem) + } + + logs, sub, err := _Supernets2.contract.WatchLogs(opts, "VerifyBatchesTrustedAggregator", numBatchRule, aggregatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2VerifyBatchesTrustedAggregator) + if err := _Supernets2.contract.UnpackLog(event, "VerifyBatchesTrustedAggregator", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseVerifyBatchesTrustedAggregator is a log parse operation binding the contract event 0xcb339b570a7f0b25afa7333371ff11192092a0aeace12b671f4c212f2815c6fe. +// +// Solidity: event VerifyBatchesTrustedAggregator(uint64 indexed numBatch, bytes32 stateRoot, address indexed aggregator) +func (_Supernets2 *Supernets2Filterer) ParseVerifyBatchesTrustedAggregator(log types.Log) (*Supernets2VerifyBatchesTrustedAggregator, error) { + event := new(Supernets2VerifyBatchesTrustedAggregator) + if err := _Supernets2.contract.UnpackLog(event, "VerifyBatchesTrustedAggregator", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/etherman/smartcontracts/supernets2bridge/supernets2bridge.go b/etherman/smartcontracts/supernets2bridge/supernets2bridge.go new file mode 100644 index 00000000..ed8629e4 --- /dev/null +++ b/etherman/smartcontracts/supernets2bridge/supernets2bridge.go @@ -0,0 +1,1666 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package supernets2bridge + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// Supernets2bridgeMetaData contains all meta data concerning the Supernets2bridge contract. +var Supernets2bridgeMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"AlreadyClaimed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AmountDoesNotMatchMsgValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DestinationNetworkInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EtherTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GlobalExitRootInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSmtProof\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MerkleTreeFull\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MessageFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MsgValueNotZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotValidAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotValidOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotValidSignature\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotValidSpender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyEmergencyState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyNotEmergencyState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySupernets2\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"leafType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"originAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"destinationNetwork\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"depositCount\",\"type\":\"uint32\"}],\"name\":\"BridgeEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"index\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"originAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ClaimEvent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyStateActivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EmergencyStateDeactivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"originTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"wrappedTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"name\":\"NewWrappedToken\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"activateEmergencyState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"destinationNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"forceUpdateGlobalExitRoot\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"permitData\",\"type\":\"bytes\"}],\"name\":\"bridgeAsset\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"destinationNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"forceUpdateGlobalExitRoot\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"name\":\"bridgeMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[32]\",\"name\":\"smtProof\",\"type\":\"bytes32[32]\"},{\"internalType\":\"uint32\",\"name\":\"index\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"mainnetExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rollupExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"originTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"destinationNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"name\":\"claimAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[32]\",\"name\":\"smtProof\",\"type\":\"bytes32[32]\"},{\"internalType\":\"uint32\",\"name\":\"index\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"mainnetExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"rollupExitRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"originAddress\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"destinationNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"metadata\",\"type\":\"bytes\"}],\"name\":\"claimMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimedBitMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deactivateEmergencyState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDepositRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"leafType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"originAddress\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"destinationNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"metadataHash\",\"type\":\"bytes32\"}],\"name\":\"getLeafValue\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"originTokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenWrappedAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"globalExitRootManager\",\"outputs\":[{\"internalType\":\"contractIBaseSupernets2GlobalExitRoot\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_networkID\",\"type\":\"uint32\"},{\"internalType\":\"contractIBaseSupernets2GlobalExitRoot\",\"name\":\"_globalExitRootManager\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_supernets2address\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"isClaimed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isEmergencyState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastUpdatedDepositCount\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"networkID\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"originTokenAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"}],\"name\":\"precalculatedWrapperAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"supernets2address\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"tokenInfoToWrappedToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateGlobalExitRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"leafHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[32]\",\"name\":\"smtProof\",\"type\":\"bytes32[32]\"},{\"internalType\":\"uint32\",\"name\":\"index\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"verifyMerkleProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"wrappedTokenToTokenInfo\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"originNetwork\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"originTokenAddress\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50615c83806100206000396000f3fe6080604052600436106200019f5760003560e01c806379e2cf9711620000e7578063be5831c71162000089578063dbc169761162000060578063dbc169761462000639578063ee25560b1462000651578063fb570834146200068257600080fd5b8063be5831c714620005ae578063cd58657914620005ea578063d02103ca146200060157600080fd5b80639e34070f11620000be5780639e34070f146200050a578063aaa13cc2146200054f578063bab161bf146200057457600080fd5b806379e2cf97146200047c57806381b1c1741462000494578063900fca6814620004db57600080fd5b80632d2c9d9411620001515780633ae0504711620001285780633ae05047146200034b5780633e1970431462000363578063647c576c146200045757600080fd5b80632d2c9d9414620002765780632dfdf0b5146200029b578063318aee3d14620002c257600080fd5b806322e95f2c116200018657806322e95f2c14620001ef578063240ff378146200023a5780632cffd02e146200025157600080fd5b806315064c9614620001a45780632072f6c514620001d5575b600080fd5b348015620001b157600080fd5b50606854620001c09060ff1681565b60405190151581526020015b60405180910390f35b348015620001e257600080fd5b50620001ed620006a7565b005b348015620001fc57600080fd5b50620002146200020e366004620032db565b62000705565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001620001cc565b620001ed6200024b36600462003372565b620007a8565b3480156200025e57600080fd5b50620001ed6200027036600462003409565b620009d0565b3480156200028357600080fd5b50620001ed6200029536600462003409565b62000f74565b348015620002a857600080fd5b50620002b360535481565b604051908152602001620001cc565b348015620002cf57600080fd5b5062000319620002e1366004620034ef565b606b6020526000908152604090205463ffffffff811690640100000000900473ffffffffffffffffffffffffffffffffffffffff1682565b6040805163ffffffff909316835273ffffffffffffffffffffffffffffffffffffffff909116602083015201620001cc565b3480156200035857600080fd5b50620002b362001178565b3480156200037057600080fd5b50620002b36200038236600462003526565b6040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b3480156200046457600080fd5b50620001ed62000476366004620035b0565b6200125e565b3480156200048957600080fd5b50620001ed620014ad565b348015620004a157600080fd5b5062000214620004b336600462003600565b606a6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b348015620004e857600080fd5b50606c54620002149073ffffffffffffffffffffffffffffffffffffffff1681565b3480156200051757600080fd5b50620001c06200052936600462003600565b600881901c600090815260696020526040902054600160ff9092169190911b9081161490565b3480156200055c57600080fd5b50620002146200056e3660046200361a565b620014e7565b3480156200058157600080fd5b506068546200059890610100900463ffffffff1681565b60405163ffffffff9091168152602001620001cc565b348015620005bb57600080fd5b506068546200059890790100000000000000000000000000000000000000000000000000900463ffffffff1681565b620001ed620005fb366004620036ce565b620016d3565b3480156200060e57600080fd5b50606854620002149065010000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b3480156200064657600080fd5b50620001ed62001c37565b3480156200065e57600080fd5b50620002b36200067036600462003600565b60696020526000908152604090205481565b3480156200068f57600080fd5b50620001c0620006a136600462003770565b62001c93565b606c5473ffffffffffffffffffffffffffffffffffffffff163314620006f9576040517f3fa8b6e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200070362001d7c565b565b6040805160e084901b7fffffffff0000000000000000000000000000000000000000000000000000000016602080830191909152606084901b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602483015282516018818403018152603890920183528151918101919091206000908152606a909152205473ffffffffffffffffffffffffffffffffffffffff165b92915050565b60685460ff1615620007e6576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60685463ffffffff8681166101009092041614806200080c5750600263ffffffff861610155b1562000844576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b6001606860019054906101000a900463ffffffff163388883488886053546040516200089a9998979695949392919062003806565b60405180910390a1620009b8620009b26001606860019054906101000a900463ffffffff16338989348989604051620008d592919062003881565b60405180910390206040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b62001e10565b8215620009c957620009c962001f27565b5050505050565b60685460ff161562000a0e576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000a258b8b8b8b8b8b8b8b8b8b8b600062001ffc565b73ffffffffffffffffffffffffffffffffffffffff861662000b01576040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff861690859060405162000a7a9190620038e6565b60006040518083038185875af1925050503d806000811462000ab9576040519150601f19603f3d011682016040523d82523d6000602084013e62000abe565b606091505b505090508062000afa576040517f6747a28800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5062000efc565b60685463ffffffff61010090910481169088160362000b435762000b3d73ffffffffffffffffffffffffffffffffffffffff87168585620021ed565b62000efc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b1660208201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b166024820152600090603801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152606a90935291205490915073ffffffffffffffffffffffffffffffffffffffff168062000e6e576000808062000c1886880188620039fb565b92509250925060008584848460405162000c329062003292565b62000c409392919062003abd565b8190604051809103906000f590508015801562000c61573d6000803e3d6000fd5b506040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c81166004830152602482018c9052919250908216906340c10f1990604401600060405180830381600087803b15801562000cd757600080fd5b505af115801562000cec573d6000803e3d6000fd5b5050505080606a600088815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060405180604001604052808e63ffffffff1681526020018d73ffffffffffffffffffffffffffffffffffffffff16815250606b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050507f490e59a1701b938786ac72570a1efeac994a3dbe96e2e883e19e902ace6e6a398d8d838b8b60405162000e5c95949392919062003afa565b60405180910390a15050505062000ef9565b6040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152602482018790528216906340c10f1990604401600060405180830381600087803b15801562000edf57600080fd5b505af115801562000ef4573d6000803e3d6000fd5b505050505b50505b6040805163ffffffff8c811682528916602082015273ffffffffffffffffffffffffffffffffffffffff88811682840152861660608201526080810185905290517f25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe275459839181900360a00190a15050505050505050505050565b60685460ff161562000fb2576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b62000fc98b8b8b8b8b8b8b8b8b8b8b600162001ffc565b60008473ffffffffffffffffffffffffffffffffffffffff1684888a868660405160240162000ffc949392919062003b42565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f1806b5f200000000000000000000000000000000000000000000000000000000179052516200107f9190620038e6565b60006040518083038185875af1925050503d8060008114620010be576040519150601f19603f3d011682016040523d82523d6000602084013e620010c3565b606091505b5050905080620010ff576040517f37e391c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805163ffffffff8d811682528a16602082015273ffffffffffffffffffffffffffffffffffffffff89811682840152871660608201526080810186905290517f25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe275459839181900360a00190a1505050505050505050505050565b605354600090819081805b602081101562001255578083901c600116600103620011e65760338160208110620011b257620011b262003b8a565b0154604080516020810192909252810185905260600160405160208183030381529060405280519060200120935062001213565b60408051602081018690529081018390526060016040516020818303038152906040528051906020012093505b604080516020810184905290810183905260600160405160208183030381529060405280519060200120915080806200124c9062003be8565b91505062001183565b50919392505050565b600054610100900460ff16158080156200127f5750600054600160ff909116105b806200129b5750303b1580156200129b575060005460ff166001145b6200132d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156200138c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b606880547fffffffffffffff000000000000000000000000000000000000000000000000ff1661010063ffffffff8716027fffffffffffffff0000000000000000000000000000000000000000ffffffffff16176501000000000073ffffffffffffffffffffffffffffffffffffffff8681169190910291909117909155606c80547fffffffffffffffffffffffff00000000000000000000000000000000000000001691841691909117905562001443620022c3565b8015620014a757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b605354606854790100000000000000000000000000000000000000000000000000900463ffffffff16101562000703576200070362001f27565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b1660208201527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b1660248201526000908190603801604051602081830303815290604052805190602001209050600060ff60f81b3083604051806020016200157d9062003292565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f909101166040819052620015c8908d908d908d908d908d9060200162003c23565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905262001606929160200162003c64565b604051602081830303815290604052805190602001206040516020016200168f94939291907fff0000000000000000000000000000000000000000000000000000000000000094909416845260609290921b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660018401526015830152603582015260550190565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291905280516020909101209a9950505050505050505050565b60685460ff161562001711576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200171b62002366565b60685463ffffffff888116610100909204161480620017415750600263ffffffff881610155b1562001779576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060608773ffffffffffffffffffffffffffffffffffffffff8816620017df57883414620017d5576040517fb89240f500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000925062001ad9565b341562001818576040517f798ee6f100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8089166000908152606b602090815260409182902082518084019093525463ffffffff811683526401000000009004909216918101829052901562001908576040517f9dc29fac000000000000000000000000000000000000000000000000000000008152336004820152602481018b905273ffffffffffffffffffffffffffffffffffffffff8a1690639dc29fac90604401600060405180830381600087803b158015620018db57600080fd5b505af1158015620018f0573d6000803e3d6000fd5b50505050806020015194508060000151935062001ad7565b85156200191d576200191d898b8989620023db565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8b16906370a0823190602401602060405180830381865afa1580156200198b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620019b1919062003c97565b9050620019d773ffffffffffffffffffffffffffffffffffffffff8b1633308e620028f9565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8c16906370a0823190602401602060405180830381865afa15801562001a45573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001a6b919062003c97565b905062001a79828262003cb1565b6068548c9850610100900463ffffffff169650935062001a998762002959565b62001aa48c62002a71565b62001aaf8d62002b7e565b60405160200162001ac39392919062003abd565b604051602081830303815290604052945050505b505b7f501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b600084868e8e868860535460405162001b1b98979695949392919062003cc7565b60405180910390a162001c0f620009b2600085878f8f8789805190602001206040517fff0000000000000000000000000000000000000000000000000000000000000060f889901b1660208201527fffffffff0000000000000000000000000000000000000000000000000000000060e088811b821660218401527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606089811b821660258601529188901b909216603984015285901b16603d8201526051810183905260718101829052600090609101604051602081830303815290604052805190602001209050979650505050505050565b861562001c205762001c2062001f27565b5050505062001c2e60018055565b50505050505050565b606c5473ffffffffffffffffffffffffffffffffffffffff16331462001c89576040517f3fa8b6e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200070362002c80565b600084815b602081101562001d6e57600163ffffffff8616821c8116900362001d0a5785816020811062001ccb5762001ccb62003b8a565b60200201358260405160200162001cec929190918252602082015260400190565b60405160208183030381529060405280519060200120915062001d59565b8186826020811062001d205762001d2062003b8a565b602002013560405160200162001d40929190918252602082015260400190565b6040516020818303038152906040528051906020012091505b8062001d658162003be8565b91505062001c98565b50821490505b949350505050565b60685460ff161562001dba576040517f2f0047fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a549790600090a1565b80600162001e216020600262003e79565b62001e2d919062003cb1565b6053541062001e68576040517fef5ccf6600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060536000815462001e7b9062003be8565b9182905550905060005b602081101562001f17578082901c60011660010362001ebd57826033826020811062001eb55762001eb562003b8a565b015550505050565b6033816020811062001ed35762001ed362003b8a565b01546040805160208101929092528101849052606001604051602081830303815290604052805190602001209250808062001f0e9062003be8565b91505062001e85565b5062001f2262003e87565b505050565b6053546068805463ffffffff909216790100000000000000000000000000000000000000000000000000027fffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffffff909216919091179081905573ffffffffffffffffffffffffffffffffffffffff65010000000000909104166333d6247d62001fad62001178565b6040518263ffffffff1660e01b815260040162001fcc91815260200190565b600060405180830381600087803b15801562001fe757600080fd5b505af1158015620014a7573d6000803e3d6000fd5b6200200d8b63ffffffff1662002d10565b6068546040805160208082018e90528183018d9052825180830384018152606083019384905280519101207f257b363200000000000000000000000000000000000000000000000000000000909252606481019190915260009165010000000000900473ffffffffffffffffffffffffffffffffffffffff169063257b3632906084016020604051808303816000875af1158015620020b0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620020d6919062003c97565b90508060000362002112576040517e2f6fad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60685463ffffffff88811661010090920416146200215c576040517f0595ea2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606854600090610100900463ffffffff166200217a5750896200217d565b508a5b620021a66200219d848c8c8c8c8c8c8c604051620008d592919062003881565b8f8f8462001c93565b620021dd576040517fe0417cec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905262001f229084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915262002d75565b600054610100900460ff166200235c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840162001324565b6200070362002e88565b600260015403620023d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640162001324565b6002600155565b6000620023ec600482848662003eb6565b620023f79162003ee2565b90507f2afa5331000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821601620026765760008080808080806200245a896004818d62003eb6565b81019062002469919062003f2b565b96509650965096509650965096503373ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614620024dd576040517f912ecce700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff861630146200252d576040517f750643af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8a851462002567576040517f03fffc4b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff89811660248301528881166044830152606482018890526084820187905260ff861660a483015260c4820185905260e48083018590528351808403909101815261010490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fd505accf000000000000000000000000000000000000000000000000000000001790529151918e1691620026229190620038e6565b6000604051808303816000865af19150503d806000811462002661576040519150601f19603f3d011682016040523d82523d6000602084013e62002666565b606091505b50505050505050505050620009c9565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f8fcbaf0c0000000000000000000000000000000000000000000000000000000014620026f2576040517fe282c0ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808080808080806200270a8a6004818e62003eb6565b81019062002719919062003f86565b975097509750975097509750975097503373ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146200278f576040517f912ecce700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff87163014620027df576040517f750643af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8a811660248301528981166044830152606482018990526084820188905286151560a483015260ff861660c483015260e482018590526101048083018590528351808403909101815261012490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f8fcbaf0c000000000000000000000000000000000000000000000000000000001790529151918f1691620028a39190620038e6565b6000604051808303816000865af19150503d8060008114620028e2576040519150601f19603f3d011682016040523d82523d6000602084013e620028e7565b606091505b50505050505050505050505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052620014a79085907f23b872dd000000000000000000000000000000000000000000000000000000009060840162002240565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f06fdde03000000000000000000000000000000000000000000000000000000001790529051606091600091829173ffffffffffffffffffffffffffffffffffffffff861691620029dd9190620038e6565b600060405180830381855afa9150503d806000811462002a1a576040519150601f19603f3d011682016040523d82523d6000602084013e62002a1f565b606091505b50915091508162002a66576040518060400160405280600781526020017f4e4f5f4e414d450000000000000000000000000000000000000000000000000081525062001d74565b62001d748162002f21565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f95d89b41000000000000000000000000000000000000000000000000000000001790529051606091600091829173ffffffffffffffffffffffffffffffffffffffff86169162002af59190620038e6565b600060405180830381855afa9150503d806000811462002b32576040519150601f19603f3d011682016040523d82523d6000602084013e62002b37565b606091505b50915091508162002a66576040518060400160405280600981526020017f4e4f5f53594d424f4c000000000000000000000000000000000000000000000081525062001d74565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f313ce5670000000000000000000000000000000000000000000000000000000017905290516000918291829173ffffffffffffffffffffffffffffffffffffffff86169162002c019190620038e6565b600060405180830381855afa9150503d806000811462002c3e576040519150601f19603f3d011682016040523d82523d6000602084013e62002c43565b606091505b509150915081801562002c57575080516020145b62002c6457601262001d74565b8080602001905181019062001d74919062004012565b60018055565b60685460ff1662002cbd576040517f5386698100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040517f1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b390600090a1565b600881901c60008181526069602052604081208054600160ff861690811b91821892839055929091908183169003620009c9576040517f646cf55800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600062002dd9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16620031119092919063ffffffff16565b80519091501562001f22578080602001905181019062002dfa919062004032565b62001f22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840162001324565b600054610100900460ff1662002c7a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840162001324565b6060604082511062002f435781806020019051810190620007a2919062004052565b8151602003620030d35760005b60208110801562002f9b575082818151811062002f715762002f7162003b8a565b01602001517fff000000000000000000000000000000000000000000000000000000000000001615155b1562002fb6578062002fad8162003be8565b91505062002f50565b8060000362002ffa57505060408051808201909152601281527f4e4f545f56414c49445f454e434f44494e4700000000000000000000000000006020820152919050565b60008167ffffffffffffffff81111562003018576200301862003891565b6040519080825280601f01601f19166020018201604052801562003043576020820181803683370190505b50905060005b82811015620030cb5784818151811062003067576200306762003b8a565b602001015160f81c60f81b82828151811062003087576200308762003b8a565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080620030c28162003be8565b91505062003049565b509392505050565b505060408051808201909152601281527f4e4f545f56414c49445f454e434f44494e470000000000000000000000000000602082015290565b919050565b606062001d748484600085856000808673ffffffffffffffffffffffffffffffffffffffff168587604051620031489190620038e6565b60006040518083038185875af1925050503d806000811462003187576040519150601f19603f3d011682016040523d82523d6000602084013e6200318c565b606091505b50915091506200319f87838387620031aa565b979650505050505050565b60608315620032455782516000036200323d5773ffffffffffffffffffffffffffffffffffffffff85163b6200323d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162001324565b508162001d74565b62001d7483838151156200325c5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620013249190620040d2565b611b6680620040e883390190565b803563ffffffff811681146200310c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff81168114620032d857600080fd5b50565b60008060408385031215620032ef57600080fd5b620032fa83620032a0565b915060208301356200330c81620032b5565b809150509250929050565b8015158114620032d857600080fd5b60008083601f8401126200333957600080fd5b50813567ffffffffffffffff8111156200335257600080fd5b6020830191508360208285010111156200336b57600080fd5b9250929050565b6000806000806000608086880312156200338b57600080fd5b6200339686620032a0565b94506020860135620033a881620032b5565b93506040860135620033ba8162003317565b9250606086013567ffffffffffffffff811115620033d757600080fd5b620033e58882890162003326565b969995985093965092949392505050565b806104008101831015620007a257600080fd5b60008060008060008060008060008060006105208c8e0312156200342c57600080fd5b620034388d8d620033f6565b9a50620034496104008d01620032a0565b99506104208c013598506104408c013597506200346a6104608d01620032a0565b96506104808c01356200347d81620032b5565b95506200348e6104a08d01620032a0565b94506104c08c0135620034a181620032b5565b93506104e08c013592506105008c013567ffffffffffffffff811115620034c757600080fd5b620034d58e828f0162003326565b915080935050809150509295989b509295989b9093969950565b6000602082840312156200350257600080fd5b81356200350f81620032b5565b9392505050565b60ff81168114620032d857600080fd5b600080600080600080600060e0888a0312156200354257600080fd5b87356200354f8162003516565b96506200355f60208901620032a0565b955060408801356200357181620032b5565b94506200358160608901620032a0565b935060808801356200359381620032b5565b9699959850939692959460a0840135945060c09093013592915050565b600080600060608486031215620035c657600080fd5b620035d184620032a0565b92506020840135620035e381620032b5565b91506040840135620035f581620032b5565b809150509250925092565b6000602082840312156200361357600080fd5b5035919050565b600080600080600080600060a0888a0312156200363657600080fd5b6200364188620032a0565b965060208801356200365381620032b5565b9550604088013567ffffffffffffffff808211156200367157600080fd5b6200367f8b838c0162003326565b909750955060608a01359150808211156200369957600080fd5b50620036a88a828b0162003326565b9094509250506080880135620036be8162003516565b8091505092959891949750929550565b600080600080600080600060c0888a031215620036ea57600080fd5b620036f588620032a0565b965060208801356200370781620032b5565b95506040880135945060608801356200372081620032b5565b93506080880135620037328162003317565b925060a088013567ffffffffffffffff8111156200374f57600080fd5b6200375d8a828b0162003326565b989b979a50959850939692959293505050565b60008060008061046085870312156200378857600080fd5b843593506200379b8660208701620033f6565b9250620037ac6104208601620032a0565b939692955092936104400135925050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600061010060ff8c16835263ffffffff808c16602085015273ffffffffffffffffffffffffffffffffffffffff808c166040860152818b166060860152808a166080860152508760a08501528160c0850152620038678285018789620037bd565b925080851660e085015250509a9950505050505050505050565b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60005b83811015620038dd578181015183820152602001620038c3565b50506000910152565b60008251620038fa818460208701620038c0565b9190910192915050565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156200394e576200394e62003891565b604052919050565b600067ffffffffffffffff82111562003973576200397362003891565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f830112620039b157600080fd5b8135620039c8620039c28262003956565b62003904565b818152846020838601011115620039de57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121562003a1157600080fd5b833567ffffffffffffffff8082111562003a2a57600080fd5b62003a38878388016200399f565b9450602086013591508082111562003a4f57600080fd5b5062003a5e868287016200399f565b9250506040840135620035f58162003516565b6000815180845262003a8b816020860160208601620038c0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60608152600062003ad2606083018662003a71565b828103602084015262003ae6818662003a71565b91505060ff83166040830152949350505050565b63ffffffff86168152600073ffffffffffffffffffffffffffffffffffffffff8087166020840152808616604084015250608060608301526200319f608083018486620037bd565b73ffffffffffffffffffffffffffffffffffffffff8516815263ffffffff8416602082015260606040820152600062003b80606083018486620037bd565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820362003c1c5762003c1c62003bb9565b5060010190565b60608152600062003c39606083018789620037bd565b828103602084015262003c4e818688620037bd565b91505060ff831660408301529695505050505050565b6000835162003c78818460208801620038c0565b83519083019062003c8e818360208801620038c0565b01949350505050565b60006020828403121562003caa57600080fd5b5051919050565b81810381811115620007a257620007a262003bb9565b600061010060ff8b16835263ffffffff808b16602085015273ffffffffffffffffffffffffffffffffffffffff808b166040860152818a1660608601528089166080860152508660a08501528160c085015262003d278285018762003a71565b925080851660e085015250509998505050505050505050565b600181815b8085111562003d9f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111562003d835762003d8362003bb9565b8085161562003d9157918102915b93841c939080029062003d45565b509250929050565b60008262003db857506001620007a2565b8162003dc757506000620007a2565b816001811462003de0576002811462003deb5762003e0b565b6001915050620007a2565b60ff84111562003dff5762003dff62003bb9565b50506001821b620007a2565b5060208310610133831016604e8410600b841016171562003e30575081810a620007a2565b62003e3c838362003d40565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111562003e715762003e7162003bb9565b029392505050565b60006200350f838362003da7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b6000808585111562003ec757600080fd5b8386111562003ed557600080fd5b5050820193919092039150565b7fffffffff00000000000000000000000000000000000000000000000000000000813581811691600485101562003f235780818660040360031b1b83161692505b505092915050565b600080600080600080600060e0888a03121562003f4757600080fd5b873562003f5481620032b5565b9650602088013562003f6681620032b5565b955060408801359450606088013593506080880135620035938162003516565b600080600080600080600080610100898b03121562003fa457600080fd5b883562003fb181620032b5565b9750602089013562003fc381620032b5565b96506040890135955060608901359450608089013562003fe38162003317565b935060a089013562003ff58162003516565b979a969950949793969295929450505060c08201359160e0013590565b6000602082840312156200402557600080fd5b81516200350f8162003516565b6000602082840312156200404557600080fd5b81516200350f8162003317565b6000602082840312156200406557600080fd5b815167ffffffffffffffff8111156200407d57600080fd5b8201601f810184136200408f57600080fd5b8051620040a0620039c28262003956565b818152856020838501011115620040b657600080fd5b620040c9826020830160208601620038c0565b95945050505050565b6020815260006200350f602083018462003a7156fe6101006040523480156200001257600080fd5b5060405162001b6638038062001b6683398101604081905262000035916200028d565b82826003620000458382620003a1565b506004620000548282620003a1565b50503360c0525060ff811660e052466080819052620000739062000080565b60a052506200046d915050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620000ad6200012e565b805160209182012060408051808201825260018152603160f81b90840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b6060600380546200013f9062000312565b80601f01602080910402602001604051908101604052809291908181526020018280546200016d9062000312565b8015620001be5780601f106200019257610100808354040283529160200191620001be565b820191906000526020600020905b815481529060010190602001808311620001a057829003601f168201915b5050505050905090565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001f057600080fd5b81516001600160401b03808211156200020d576200020d620001c8565b604051601f8301601f19908116603f01168101908282118183101715620002385762000238620001c8565b816040528381526020925086838588010111156200025557600080fd5b600091505b838210156200027957858201830151818301840152908201906200025a565b600093810190920192909252949350505050565b600080600060608486031215620002a357600080fd5b83516001600160401b0380821115620002bb57600080fd5b620002c987838801620001de565b94506020860151915080821115620002e057600080fd5b50620002ef86828701620001de565b925050604084015160ff811681146200030757600080fd5b809150509250925092565b600181811c908216806200032757607f821691505b6020821081036200034857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200039c57600081815260208120601f850160051c81016020861015620003775750805b601f850160051c820191505b81811015620003985782815560010162000383565b5050505b505050565b81516001600160401b03811115620003bd57620003bd620001c8565b620003d581620003ce845462000312565b846200034e565b602080601f8311600181146200040d5760008415620003f45750858301515b600019600386901b1c1916600185901b17855562000398565b600085815260208120601f198616915b828110156200043e578886015182559484019460019091019084016200041d565b50858210156200045d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e0516116aa620004bc6000396000610237015260008181610307015281816105c001526106a70152600061053a015260008181610379015261050401526116aa6000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c806370a08231116100d8578063a457c2d71161008c578063d505accf11610066578063d505accf1461039b578063dd62ed3e146103ae578063ffa1ad74146103f457600080fd5b8063a457c2d71461034e578063a9059cbb14610361578063cd0d00961461037457600080fd5b806395d89b41116100bd57806395d89b41146102e75780639dc29fac146102ef578063a3c573eb1461030257600080fd5b806370a08231146102915780637ecebe00146102c757600080fd5b806330adf81f1161012f5780633644e515116101145780633644e51514610261578063395093511461026957806340c10f191461027c57600080fd5b806330adf81f14610209578063313ce5671461023057600080fd5b806318160ddd1161016057806318160ddd146101bd57806320606b70146101cf57806323b872dd146101f657600080fd5b806306fdde031461017c578063095ea7b31461019a575b600080fd5b610184610430565b60405161019191906113e4565b60405180910390f35b6101ad6101a8366004611479565b6104c2565b6040519015158152602001610191565b6002545b604051908152602001610191565b6101c17f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6101ad6102043660046114a3565b6104dc565b6101c17f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610191565b6101c1610500565b6101ad610277366004611479565b61055c565b61028f61028a366004611479565b6105a8565b005b6101c161029f3660046114df565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6101c16102d53660046114df565b60056020526000908152604090205481565b610184610680565b61028f6102fd366004611479565b61068f565b6103297f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610191565b6101ad61035c366004611479565b61075e565b6101ad61036f366004611479565b61082f565b6101c17f000000000000000000000000000000000000000000000000000000000000000081565b61028f6103a9366004611501565b61083d565b6101c16103bc366004611574565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6101846040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525081565b60606003805461043f906115a7565b80601f016020809104026020016040519081016040528092919081815260200182805461046b906115a7565b80156104b85780601f1061048d576101008083540402835291602001916104b8565b820191906000526020600020905b81548152906001019060200180831161049b57829003601f168201915b5050505050905090565b6000336104d0818585610b73565b60019150505b92915050565b6000336104ea858285610d27565b6104f5858585610dfe565b506001949350505050565b60007f00000000000000000000000000000000000000000000000000000000000000004614610537576105324661106d565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091528120549091906104d090829086906105a3908790611629565b610b73565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610672576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f546f6b656e577261707065643a3a6f6e6c794272696467653a204e6f7420537560448201527f7065726e6574733242726964676500000000000000000000000000000000000060648201526084015b60405180910390fd5b61067c8282611135565b5050565b60606004805461043f906115a7565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610754576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f546f6b656e577261707065643a3a6f6e6c794272696467653a204e6f7420537560448201527f7065726e657473324272696467650000000000000000000000000000000000006064820152608401610669565b61067c8282611228565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015610822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610669565b6104f58286868403610b73565b6000336104d0818585610dfe565b834211156108cc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f546f6b656e577261707065643a3a7065726d69743a204578706972656420706560448201527f726d6974000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8716600090815260056020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918a918a918a9190866109268361163c565b9091555060408051602081019690965273ffffffffffffffffffffffffffffffffffffffff94851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610991610500565b6040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281019190915260428101839052606201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120600080855291840180845281905260ff89169284019290925260608301879052608083018690529092509060019060a0016020604051602081039080840390855afa158015610a55573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811615801590610ad057508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f546f6b656e577261707065643a3a7065726d69743a20496e76616c696420736960448201527f676e6174757265000000000000000000000000000000000000000000000000006064820152608401610669565b610b678a8a8a610b73565b50505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8316610c15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8216610cb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610df85781811015610deb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610669565b610df88484848403610b73565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610ea1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff8216610f44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015610ffa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610df8565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611098610430565b8051602091820120604080518082018252600181527f310000000000000000000000000000000000000000000000000000000000000090840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b73ffffffffffffffffffffffffffffffffffffffff82166111b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610669565b80600260008282546111c49190611629565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff82166112cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090205481811015611381576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610669565b73ffffffffffffffffffffffffffffffffffffffff83166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101610d1a565b600060208083528351808285015260005b81811015611411578581018301518582016040015282016113f5565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461147457600080fd5b919050565b6000806040838503121561148c57600080fd5b61149583611450565b946020939093013593505050565b6000806000606084860312156114b857600080fd5b6114c184611450565b92506114cf60208501611450565b9150604084013590509250925092565b6000602082840312156114f157600080fd5b6114fa82611450565b9392505050565b600080600080600080600060e0888a03121561151c57600080fd5b61152588611450565b965061153360208901611450565b95506040880135945060608801359350608088013560ff8116811461155757600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561158757600080fd5b61159083611450565b915061159e60208401611450565b90509250929050565b600181811c908216806115bb57607f821691505b6020821081036115f4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156104d6576104d66115fa565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361166d5761166d6115fa565b506001019056fea264697066735822122051f33791a57b9eec9504fba7401051e93f4cd7af7facd3f699991bdda18c9f7064736f6c63430008110033a264697066735822122005725ef3340b4b249151d4ba864fa3b4273f883606a7929bf58470971f213fca64736f6c63430008110033", +} + +// Supernets2bridgeABI is the input ABI used to generate the binding from. +// Deprecated: Use Supernets2bridgeMetaData.ABI instead. +var Supernets2bridgeABI = Supernets2bridgeMetaData.ABI + +// Supernets2bridgeBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use Supernets2bridgeMetaData.Bin instead. +var Supernets2bridgeBin = Supernets2bridgeMetaData.Bin + +// DeploySupernets2bridge deploys a new Ethereum contract, binding an instance of Supernets2bridge to it. +func DeploySupernets2bridge(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Supernets2bridge, error) { + parsed, err := Supernets2bridgeMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(Supernets2bridgeBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Supernets2bridge{Supernets2bridgeCaller: Supernets2bridgeCaller{contract: contract}, Supernets2bridgeTransactor: Supernets2bridgeTransactor{contract: contract}, Supernets2bridgeFilterer: Supernets2bridgeFilterer{contract: contract}}, nil +} + +// Supernets2bridge is an auto generated Go binding around an Ethereum contract. +type Supernets2bridge struct { + Supernets2bridgeCaller // Read-only binding to the contract + Supernets2bridgeTransactor // Write-only binding to the contract + Supernets2bridgeFilterer // Log filterer for contract events +} + +// Supernets2bridgeCaller is an auto generated read-only Go binding around an Ethereum contract. +type Supernets2bridgeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Supernets2bridgeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type Supernets2bridgeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Supernets2bridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type Supernets2bridgeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Supernets2bridgeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type Supernets2bridgeSession struct { + Contract *Supernets2bridge // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// Supernets2bridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type Supernets2bridgeCallerSession struct { + Contract *Supernets2bridgeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// Supernets2bridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type Supernets2bridgeTransactorSession struct { + Contract *Supernets2bridgeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// Supernets2bridgeRaw is an auto generated low-level Go binding around an Ethereum contract. +type Supernets2bridgeRaw struct { + Contract *Supernets2bridge // Generic contract binding to access the raw methods on +} + +// Supernets2bridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type Supernets2bridgeCallerRaw struct { + Contract *Supernets2bridgeCaller // Generic read-only contract binding to access the raw methods on +} + +// Supernets2bridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type Supernets2bridgeTransactorRaw struct { + Contract *Supernets2bridgeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSupernets2bridge creates a new instance of Supernets2bridge, bound to a specific deployed contract. +func NewSupernets2bridge(address common.Address, backend bind.ContractBackend) (*Supernets2bridge, error) { + contract, err := bindSupernets2bridge(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Supernets2bridge{Supernets2bridgeCaller: Supernets2bridgeCaller{contract: contract}, Supernets2bridgeTransactor: Supernets2bridgeTransactor{contract: contract}, Supernets2bridgeFilterer: Supernets2bridgeFilterer{contract: contract}}, nil +} + +// NewSupernets2bridgeCaller creates a new read-only instance of Supernets2bridge, bound to a specific deployed contract. +func NewSupernets2bridgeCaller(address common.Address, caller bind.ContractCaller) (*Supernets2bridgeCaller, error) { + contract, err := bindSupernets2bridge(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &Supernets2bridgeCaller{contract: contract}, nil +} + +// NewSupernets2bridgeTransactor creates a new write-only instance of Supernets2bridge, bound to a specific deployed contract. +func NewSupernets2bridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*Supernets2bridgeTransactor, error) { + contract, err := bindSupernets2bridge(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &Supernets2bridgeTransactor{contract: contract}, nil +} + +// NewSupernets2bridgeFilterer creates a new log filterer instance of Supernets2bridge, bound to a specific deployed contract. +func NewSupernets2bridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*Supernets2bridgeFilterer, error) { + contract, err := bindSupernets2bridge(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &Supernets2bridgeFilterer{contract: contract}, nil +} + +// bindSupernets2bridge binds a generic wrapper to an already deployed contract. +func bindSupernets2bridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := Supernets2bridgeMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Supernets2bridge *Supernets2bridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Supernets2bridge.Contract.Supernets2bridgeCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Supernets2bridge *Supernets2bridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2bridge.Contract.Supernets2bridgeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Supernets2bridge *Supernets2bridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Supernets2bridge.Contract.Supernets2bridgeTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Supernets2bridge *Supernets2bridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Supernets2bridge.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Supernets2bridge *Supernets2bridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2bridge.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Supernets2bridge *Supernets2bridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Supernets2bridge.Contract.contract.Transact(opts, method, params...) +} + +// ClaimedBitMap is a free data retrieval call binding the contract method 0xee25560b. +// +// Solidity: function claimedBitMap(uint256 ) view returns(uint256) +func (_Supernets2bridge *Supernets2bridgeCaller) ClaimedBitMap(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "claimedBitMap", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ClaimedBitMap is a free data retrieval call binding the contract method 0xee25560b. +// +// Solidity: function claimedBitMap(uint256 ) view returns(uint256) +func (_Supernets2bridge *Supernets2bridgeSession) ClaimedBitMap(arg0 *big.Int) (*big.Int, error) { + return _Supernets2bridge.Contract.ClaimedBitMap(&_Supernets2bridge.CallOpts, arg0) +} + +// ClaimedBitMap is a free data retrieval call binding the contract method 0xee25560b. +// +// Solidity: function claimedBitMap(uint256 ) view returns(uint256) +func (_Supernets2bridge *Supernets2bridgeCallerSession) ClaimedBitMap(arg0 *big.Int) (*big.Int, error) { + return _Supernets2bridge.Contract.ClaimedBitMap(&_Supernets2bridge.CallOpts, arg0) +} + +// DepositCount is a free data retrieval call binding the contract method 0x2dfdf0b5. +// +// Solidity: function depositCount() view returns(uint256) +func (_Supernets2bridge *Supernets2bridgeCaller) DepositCount(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "depositCount") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// DepositCount is a free data retrieval call binding the contract method 0x2dfdf0b5. +// +// Solidity: function depositCount() view returns(uint256) +func (_Supernets2bridge *Supernets2bridgeSession) DepositCount() (*big.Int, error) { + return _Supernets2bridge.Contract.DepositCount(&_Supernets2bridge.CallOpts) +} + +// DepositCount is a free data retrieval call binding the contract method 0x2dfdf0b5. +// +// Solidity: function depositCount() view returns(uint256) +func (_Supernets2bridge *Supernets2bridgeCallerSession) DepositCount() (*big.Int, error) { + return _Supernets2bridge.Contract.DepositCount(&_Supernets2bridge.CallOpts) +} + +// GetDepositRoot is a free data retrieval call binding the contract method 0x3ae05047. +// +// Solidity: function getDepositRoot() view returns(bytes32) +func (_Supernets2bridge *Supernets2bridgeCaller) GetDepositRoot(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "getDepositRoot") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetDepositRoot is a free data retrieval call binding the contract method 0x3ae05047. +// +// Solidity: function getDepositRoot() view returns(bytes32) +func (_Supernets2bridge *Supernets2bridgeSession) GetDepositRoot() ([32]byte, error) { + return _Supernets2bridge.Contract.GetDepositRoot(&_Supernets2bridge.CallOpts) +} + +// GetDepositRoot is a free data retrieval call binding the contract method 0x3ae05047. +// +// Solidity: function getDepositRoot() view returns(bytes32) +func (_Supernets2bridge *Supernets2bridgeCallerSession) GetDepositRoot() ([32]byte, error) { + return _Supernets2bridge.Contract.GetDepositRoot(&_Supernets2bridge.CallOpts) +} + +// GetLeafValue is a free data retrieval call binding the contract method 0x3e197043. +// +// Solidity: function getLeafValue(uint8 leafType, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes32 metadataHash) pure returns(bytes32) +func (_Supernets2bridge *Supernets2bridgeCaller) GetLeafValue(opts *bind.CallOpts, leafType uint8, originNetwork uint32, originAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadataHash [32]byte) ([32]byte, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "getLeafValue", leafType, originNetwork, originAddress, destinationNetwork, destinationAddress, amount, metadataHash) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetLeafValue is a free data retrieval call binding the contract method 0x3e197043. +// +// Solidity: function getLeafValue(uint8 leafType, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes32 metadataHash) pure returns(bytes32) +func (_Supernets2bridge *Supernets2bridgeSession) GetLeafValue(leafType uint8, originNetwork uint32, originAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadataHash [32]byte) ([32]byte, error) { + return _Supernets2bridge.Contract.GetLeafValue(&_Supernets2bridge.CallOpts, leafType, originNetwork, originAddress, destinationNetwork, destinationAddress, amount, metadataHash) +} + +// GetLeafValue is a free data retrieval call binding the contract method 0x3e197043. +// +// Solidity: function getLeafValue(uint8 leafType, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes32 metadataHash) pure returns(bytes32) +func (_Supernets2bridge *Supernets2bridgeCallerSession) GetLeafValue(leafType uint8, originNetwork uint32, originAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadataHash [32]byte) ([32]byte, error) { + return _Supernets2bridge.Contract.GetLeafValue(&_Supernets2bridge.CallOpts, leafType, originNetwork, originAddress, destinationNetwork, destinationAddress, amount, metadataHash) +} + +// GetTokenWrappedAddress is a free data retrieval call binding the contract method 0x22e95f2c. +// +// Solidity: function getTokenWrappedAddress(uint32 originNetwork, address originTokenAddress) view returns(address) +func (_Supernets2bridge *Supernets2bridgeCaller) GetTokenWrappedAddress(opts *bind.CallOpts, originNetwork uint32, originTokenAddress common.Address) (common.Address, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "getTokenWrappedAddress", originNetwork, originTokenAddress) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetTokenWrappedAddress is a free data retrieval call binding the contract method 0x22e95f2c. +// +// Solidity: function getTokenWrappedAddress(uint32 originNetwork, address originTokenAddress) view returns(address) +func (_Supernets2bridge *Supernets2bridgeSession) GetTokenWrappedAddress(originNetwork uint32, originTokenAddress common.Address) (common.Address, error) { + return _Supernets2bridge.Contract.GetTokenWrappedAddress(&_Supernets2bridge.CallOpts, originNetwork, originTokenAddress) +} + +// GetTokenWrappedAddress is a free data retrieval call binding the contract method 0x22e95f2c. +// +// Solidity: function getTokenWrappedAddress(uint32 originNetwork, address originTokenAddress) view returns(address) +func (_Supernets2bridge *Supernets2bridgeCallerSession) GetTokenWrappedAddress(originNetwork uint32, originTokenAddress common.Address) (common.Address, error) { + return _Supernets2bridge.Contract.GetTokenWrappedAddress(&_Supernets2bridge.CallOpts, originNetwork, originTokenAddress) +} + +// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. +// +// Solidity: function globalExitRootManager() view returns(address) +func (_Supernets2bridge *Supernets2bridgeCaller) GlobalExitRootManager(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "globalExitRootManager") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. +// +// Solidity: function globalExitRootManager() view returns(address) +func (_Supernets2bridge *Supernets2bridgeSession) GlobalExitRootManager() (common.Address, error) { + return _Supernets2bridge.Contract.GlobalExitRootManager(&_Supernets2bridge.CallOpts) +} + +// GlobalExitRootManager is a free data retrieval call binding the contract method 0xd02103ca. +// +// Solidity: function globalExitRootManager() view returns(address) +func (_Supernets2bridge *Supernets2bridgeCallerSession) GlobalExitRootManager() (common.Address, error) { + return _Supernets2bridge.Contract.GlobalExitRootManager(&_Supernets2bridge.CallOpts) +} + +// IsClaimed is a free data retrieval call binding the contract method 0x9e34070f. +// +// Solidity: function isClaimed(uint256 index) view returns(bool) +func (_Supernets2bridge *Supernets2bridgeCaller) IsClaimed(opts *bind.CallOpts, index *big.Int) (bool, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "isClaimed", index) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsClaimed is a free data retrieval call binding the contract method 0x9e34070f. +// +// Solidity: function isClaimed(uint256 index) view returns(bool) +func (_Supernets2bridge *Supernets2bridgeSession) IsClaimed(index *big.Int) (bool, error) { + return _Supernets2bridge.Contract.IsClaimed(&_Supernets2bridge.CallOpts, index) +} + +// IsClaimed is a free data retrieval call binding the contract method 0x9e34070f. +// +// Solidity: function isClaimed(uint256 index) view returns(bool) +func (_Supernets2bridge *Supernets2bridgeCallerSession) IsClaimed(index *big.Int) (bool, error) { + return _Supernets2bridge.Contract.IsClaimed(&_Supernets2bridge.CallOpts, index) +} + +// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. +// +// Solidity: function isEmergencyState() view returns(bool) +func (_Supernets2bridge *Supernets2bridgeCaller) IsEmergencyState(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "isEmergencyState") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. +// +// Solidity: function isEmergencyState() view returns(bool) +func (_Supernets2bridge *Supernets2bridgeSession) IsEmergencyState() (bool, error) { + return _Supernets2bridge.Contract.IsEmergencyState(&_Supernets2bridge.CallOpts) +} + +// IsEmergencyState is a free data retrieval call binding the contract method 0x15064c96. +// +// Solidity: function isEmergencyState() view returns(bool) +func (_Supernets2bridge *Supernets2bridgeCallerSession) IsEmergencyState() (bool, error) { + return _Supernets2bridge.Contract.IsEmergencyState(&_Supernets2bridge.CallOpts) +} + +// LastUpdatedDepositCount is a free data retrieval call binding the contract method 0xbe5831c7. +// +// Solidity: function lastUpdatedDepositCount() view returns(uint32) +func (_Supernets2bridge *Supernets2bridgeCaller) LastUpdatedDepositCount(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "lastUpdatedDepositCount") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// LastUpdatedDepositCount is a free data retrieval call binding the contract method 0xbe5831c7. +// +// Solidity: function lastUpdatedDepositCount() view returns(uint32) +func (_Supernets2bridge *Supernets2bridgeSession) LastUpdatedDepositCount() (uint32, error) { + return _Supernets2bridge.Contract.LastUpdatedDepositCount(&_Supernets2bridge.CallOpts) +} + +// LastUpdatedDepositCount is a free data retrieval call binding the contract method 0xbe5831c7. +// +// Solidity: function lastUpdatedDepositCount() view returns(uint32) +func (_Supernets2bridge *Supernets2bridgeCallerSession) LastUpdatedDepositCount() (uint32, error) { + return _Supernets2bridge.Contract.LastUpdatedDepositCount(&_Supernets2bridge.CallOpts) +} + +// NetworkID is a free data retrieval call binding the contract method 0xbab161bf. +// +// Solidity: function networkID() view returns(uint32) +func (_Supernets2bridge *Supernets2bridgeCaller) NetworkID(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "networkID") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +// NetworkID is a free data retrieval call binding the contract method 0xbab161bf. +// +// Solidity: function networkID() view returns(uint32) +func (_Supernets2bridge *Supernets2bridgeSession) NetworkID() (uint32, error) { + return _Supernets2bridge.Contract.NetworkID(&_Supernets2bridge.CallOpts) +} + +// NetworkID is a free data retrieval call binding the contract method 0xbab161bf. +// +// Solidity: function networkID() view returns(uint32) +func (_Supernets2bridge *Supernets2bridgeCallerSession) NetworkID() (uint32, error) { + return _Supernets2bridge.Contract.NetworkID(&_Supernets2bridge.CallOpts) +} + +// PrecalculatedWrapperAddress is a free data retrieval call binding the contract method 0xaaa13cc2. +// +// Solidity: function precalculatedWrapperAddress(uint32 originNetwork, address originTokenAddress, string name, string symbol, uint8 decimals) view returns(address) +func (_Supernets2bridge *Supernets2bridgeCaller) PrecalculatedWrapperAddress(opts *bind.CallOpts, originNetwork uint32, originTokenAddress common.Address, name string, symbol string, decimals uint8) (common.Address, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "precalculatedWrapperAddress", originNetwork, originTokenAddress, name, symbol, decimals) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// PrecalculatedWrapperAddress is a free data retrieval call binding the contract method 0xaaa13cc2. +// +// Solidity: function precalculatedWrapperAddress(uint32 originNetwork, address originTokenAddress, string name, string symbol, uint8 decimals) view returns(address) +func (_Supernets2bridge *Supernets2bridgeSession) PrecalculatedWrapperAddress(originNetwork uint32, originTokenAddress common.Address, name string, symbol string, decimals uint8) (common.Address, error) { + return _Supernets2bridge.Contract.PrecalculatedWrapperAddress(&_Supernets2bridge.CallOpts, originNetwork, originTokenAddress, name, symbol, decimals) +} + +// PrecalculatedWrapperAddress is a free data retrieval call binding the contract method 0xaaa13cc2. +// +// Solidity: function precalculatedWrapperAddress(uint32 originNetwork, address originTokenAddress, string name, string symbol, uint8 decimals) view returns(address) +func (_Supernets2bridge *Supernets2bridgeCallerSession) PrecalculatedWrapperAddress(originNetwork uint32, originTokenAddress common.Address, name string, symbol string, decimals uint8) (common.Address, error) { + return _Supernets2bridge.Contract.PrecalculatedWrapperAddress(&_Supernets2bridge.CallOpts, originNetwork, originTokenAddress, name, symbol, decimals) +} + +// Supernets2address is a free data retrieval call binding the contract method 0x900fca68. +// +// Solidity: function supernets2address() view returns(address) +func (_Supernets2bridge *Supernets2bridgeCaller) Supernets2address(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "supernets2address") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Supernets2address is a free data retrieval call binding the contract method 0x900fca68. +// +// Solidity: function supernets2address() view returns(address) +func (_Supernets2bridge *Supernets2bridgeSession) Supernets2address() (common.Address, error) { + return _Supernets2bridge.Contract.Supernets2address(&_Supernets2bridge.CallOpts) +} + +// Supernets2address is a free data retrieval call binding the contract method 0x900fca68. +// +// Solidity: function supernets2address() view returns(address) +func (_Supernets2bridge *Supernets2bridgeCallerSession) Supernets2address() (common.Address, error) { + return _Supernets2bridge.Contract.Supernets2address(&_Supernets2bridge.CallOpts) +} + +// TokenInfoToWrappedToken is a free data retrieval call binding the contract method 0x81b1c174. +// +// Solidity: function tokenInfoToWrappedToken(bytes32 ) view returns(address) +func (_Supernets2bridge *Supernets2bridgeCaller) TokenInfoToWrappedToken(opts *bind.CallOpts, arg0 [32]byte) (common.Address, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "tokenInfoToWrappedToken", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// TokenInfoToWrappedToken is a free data retrieval call binding the contract method 0x81b1c174. +// +// Solidity: function tokenInfoToWrappedToken(bytes32 ) view returns(address) +func (_Supernets2bridge *Supernets2bridgeSession) TokenInfoToWrappedToken(arg0 [32]byte) (common.Address, error) { + return _Supernets2bridge.Contract.TokenInfoToWrappedToken(&_Supernets2bridge.CallOpts, arg0) +} + +// TokenInfoToWrappedToken is a free data retrieval call binding the contract method 0x81b1c174. +// +// Solidity: function tokenInfoToWrappedToken(bytes32 ) view returns(address) +func (_Supernets2bridge *Supernets2bridgeCallerSession) TokenInfoToWrappedToken(arg0 [32]byte) (common.Address, error) { + return _Supernets2bridge.Contract.TokenInfoToWrappedToken(&_Supernets2bridge.CallOpts, arg0) +} + +// VerifyMerkleProof is a free data retrieval call binding the contract method 0xfb570834. +// +// Solidity: function verifyMerkleProof(bytes32 leafHash, bytes32[32] smtProof, uint32 index, bytes32 root) pure returns(bool) +func (_Supernets2bridge *Supernets2bridgeCaller) VerifyMerkleProof(opts *bind.CallOpts, leafHash [32]byte, smtProof [32][32]byte, index uint32, root [32]byte) (bool, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "verifyMerkleProof", leafHash, smtProof, index, root) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// VerifyMerkleProof is a free data retrieval call binding the contract method 0xfb570834. +// +// Solidity: function verifyMerkleProof(bytes32 leafHash, bytes32[32] smtProof, uint32 index, bytes32 root) pure returns(bool) +func (_Supernets2bridge *Supernets2bridgeSession) VerifyMerkleProof(leafHash [32]byte, smtProof [32][32]byte, index uint32, root [32]byte) (bool, error) { + return _Supernets2bridge.Contract.VerifyMerkleProof(&_Supernets2bridge.CallOpts, leafHash, smtProof, index, root) +} + +// VerifyMerkleProof is a free data retrieval call binding the contract method 0xfb570834. +// +// Solidity: function verifyMerkleProof(bytes32 leafHash, bytes32[32] smtProof, uint32 index, bytes32 root) pure returns(bool) +func (_Supernets2bridge *Supernets2bridgeCallerSession) VerifyMerkleProof(leafHash [32]byte, smtProof [32][32]byte, index uint32, root [32]byte) (bool, error) { + return _Supernets2bridge.Contract.VerifyMerkleProof(&_Supernets2bridge.CallOpts, leafHash, smtProof, index, root) +} + +// WrappedTokenToTokenInfo is a free data retrieval call binding the contract method 0x318aee3d. +// +// Solidity: function wrappedTokenToTokenInfo(address ) view returns(uint32 originNetwork, address originTokenAddress) +func (_Supernets2bridge *Supernets2bridgeCaller) WrappedTokenToTokenInfo(opts *bind.CallOpts, arg0 common.Address) (struct { + OriginNetwork uint32 + OriginTokenAddress common.Address +}, error) { + var out []interface{} + err := _Supernets2bridge.contract.Call(opts, &out, "wrappedTokenToTokenInfo", arg0) + + outstruct := new(struct { + OriginNetwork uint32 + OriginTokenAddress common.Address + }) + if err != nil { + return *outstruct, err + } + + outstruct.OriginNetwork = *abi.ConvertType(out[0], new(uint32)).(*uint32) + outstruct.OriginTokenAddress = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) + + return *outstruct, err + +} + +// WrappedTokenToTokenInfo is a free data retrieval call binding the contract method 0x318aee3d. +// +// Solidity: function wrappedTokenToTokenInfo(address ) view returns(uint32 originNetwork, address originTokenAddress) +func (_Supernets2bridge *Supernets2bridgeSession) WrappedTokenToTokenInfo(arg0 common.Address) (struct { + OriginNetwork uint32 + OriginTokenAddress common.Address +}, error) { + return _Supernets2bridge.Contract.WrappedTokenToTokenInfo(&_Supernets2bridge.CallOpts, arg0) +} + +// WrappedTokenToTokenInfo is a free data retrieval call binding the contract method 0x318aee3d. +// +// Solidity: function wrappedTokenToTokenInfo(address ) view returns(uint32 originNetwork, address originTokenAddress) +func (_Supernets2bridge *Supernets2bridgeCallerSession) WrappedTokenToTokenInfo(arg0 common.Address) (struct { + OriginNetwork uint32 + OriginTokenAddress common.Address +}, error) { + return _Supernets2bridge.Contract.WrappedTokenToTokenInfo(&_Supernets2bridge.CallOpts, arg0) +} + +// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x2072f6c5. +// +// Solidity: function activateEmergencyState() returns() +func (_Supernets2bridge *Supernets2bridgeTransactor) ActivateEmergencyState(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2bridge.contract.Transact(opts, "activateEmergencyState") +} + +// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x2072f6c5. +// +// Solidity: function activateEmergencyState() returns() +func (_Supernets2bridge *Supernets2bridgeSession) ActivateEmergencyState() (*types.Transaction, error) { + return _Supernets2bridge.Contract.ActivateEmergencyState(&_Supernets2bridge.TransactOpts) +} + +// ActivateEmergencyState is a paid mutator transaction binding the contract method 0x2072f6c5. +// +// Solidity: function activateEmergencyState() returns() +func (_Supernets2bridge *Supernets2bridgeTransactorSession) ActivateEmergencyState() (*types.Transaction, error) { + return _Supernets2bridge.Contract.ActivateEmergencyState(&_Supernets2bridge.TransactOpts) +} + +// BridgeAsset is a paid mutator transaction binding the contract method 0xcd586579. +// +// Solidity: function bridgeAsset(uint32 destinationNetwork, address destinationAddress, uint256 amount, address token, bool forceUpdateGlobalExitRoot, bytes permitData) payable returns() +func (_Supernets2bridge *Supernets2bridgeTransactor) BridgeAsset(opts *bind.TransactOpts, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, token common.Address, forceUpdateGlobalExitRoot bool, permitData []byte) (*types.Transaction, error) { + return _Supernets2bridge.contract.Transact(opts, "bridgeAsset", destinationNetwork, destinationAddress, amount, token, forceUpdateGlobalExitRoot, permitData) +} + +// BridgeAsset is a paid mutator transaction binding the contract method 0xcd586579. +// +// Solidity: function bridgeAsset(uint32 destinationNetwork, address destinationAddress, uint256 amount, address token, bool forceUpdateGlobalExitRoot, bytes permitData) payable returns() +func (_Supernets2bridge *Supernets2bridgeSession) BridgeAsset(destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, token common.Address, forceUpdateGlobalExitRoot bool, permitData []byte) (*types.Transaction, error) { + return _Supernets2bridge.Contract.BridgeAsset(&_Supernets2bridge.TransactOpts, destinationNetwork, destinationAddress, amount, token, forceUpdateGlobalExitRoot, permitData) +} + +// BridgeAsset is a paid mutator transaction binding the contract method 0xcd586579. +// +// Solidity: function bridgeAsset(uint32 destinationNetwork, address destinationAddress, uint256 amount, address token, bool forceUpdateGlobalExitRoot, bytes permitData) payable returns() +func (_Supernets2bridge *Supernets2bridgeTransactorSession) BridgeAsset(destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, token common.Address, forceUpdateGlobalExitRoot bool, permitData []byte) (*types.Transaction, error) { + return _Supernets2bridge.Contract.BridgeAsset(&_Supernets2bridge.TransactOpts, destinationNetwork, destinationAddress, amount, token, forceUpdateGlobalExitRoot, permitData) +} + +// BridgeMessage is a paid mutator transaction binding the contract method 0x240ff378. +// +// Solidity: function bridgeMessage(uint32 destinationNetwork, address destinationAddress, bool forceUpdateGlobalExitRoot, bytes metadata) payable returns() +func (_Supernets2bridge *Supernets2bridgeTransactor) BridgeMessage(opts *bind.TransactOpts, destinationNetwork uint32, destinationAddress common.Address, forceUpdateGlobalExitRoot bool, metadata []byte) (*types.Transaction, error) { + return _Supernets2bridge.contract.Transact(opts, "bridgeMessage", destinationNetwork, destinationAddress, forceUpdateGlobalExitRoot, metadata) +} + +// BridgeMessage is a paid mutator transaction binding the contract method 0x240ff378. +// +// Solidity: function bridgeMessage(uint32 destinationNetwork, address destinationAddress, bool forceUpdateGlobalExitRoot, bytes metadata) payable returns() +func (_Supernets2bridge *Supernets2bridgeSession) BridgeMessage(destinationNetwork uint32, destinationAddress common.Address, forceUpdateGlobalExitRoot bool, metadata []byte) (*types.Transaction, error) { + return _Supernets2bridge.Contract.BridgeMessage(&_Supernets2bridge.TransactOpts, destinationNetwork, destinationAddress, forceUpdateGlobalExitRoot, metadata) +} + +// BridgeMessage is a paid mutator transaction binding the contract method 0x240ff378. +// +// Solidity: function bridgeMessage(uint32 destinationNetwork, address destinationAddress, bool forceUpdateGlobalExitRoot, bytes metadata) payable returns() +func (_Supernets2bridge *Supernets2bridgeTransactorSession) BridgeMessage(destinationNetwork uint32, destinationAddress common.Address, forceUpdateGlobalExitRoot bool, metadata []byte) (*types.Transaction, error) { + return _Supernets2bridge.Contract.BridgeMessage(&_Supernets2bridge.TransactOpts, destinationNetwork, destinationAddress, forceUpdateGlobalExitRoot, metadata) +} + +// ClaimAsset is a paid mutator transaction binding the contract method 0x2cffd02e. +// +// Solidity: function claimAsset(bytes32[32] smtProof, uint32 index, bytes32 mainnetExitRoot, bytes32 rollupExitRoot, uint32 originNetwork, address originTokenAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata) returns() +func (_Supernets2bridge *Supernets2bridgeTransactor) ClaimAsset(opts *bind.TransactOpts, smtProof [32][32]byte, index uint32, mainnetExitRoot [32]byte, rollupExitRoot [32]byte, originNetwork uint32, originTokenAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadata []byte) (*types.Transaction, error) { + return _Supernets2bridge.contract.Transact(opts, "claimAsset", smtProof, index, mainnetExitRoot, rollupExitRoot, originNetwork, originTokenAddress, destinationNetwork, destinationAddress, amount, metadata) +} + +// ClaimAsset is a paid mutator transaction binding the contract method 0x2cffd02e. +// +// Solidity: function claimAsset(bytes32[32] smtProof, uint32 index, bytes32 mainnetExitRoot, bytes32 rollupExitRoot, uint32 originNetwork, address originTokenAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata) returns() +func (_Supernets2bridge *Supernets2bridgeSession) ClaimAsset(smtProof [32][32]byte, index uint32, mainnetExitRoot [32]byte, rollupExitRoot [32]byte, originNetwork uint32, originTokenAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadata []byte) (*types.Transaction, error) { + return _Supernets2bridge.Contract.ClaimAsset(&_Supernets2bridge.TransactOpts, smtProof, index, mainnetExitRoot, rollupExitRoot, originNetwork, originTokenAddress, destinationNetwork, destinationAddress, amount, metadata) +} + +// ClaimAsset is a paid mutator transaction binding the contract method 0x2cffd02e. +// +// Solidity: function claimAsset(bytes32[32] smtProof, uint32 index, bytes32 mainnetExitRoot, bytes32 rollupExitRoot, uint32 originNetwork, address originTokenAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata) returns() +func (_Supernets2bridge *Supernets2bridgeTransactorSession) ClaimAsset(smtProof [32][32]byte, index uint32, mainnetExitRoot [32]byte, rollupExitRoot [32]byte, originNetwork uint32, originTokenAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadata []byte) (*types.Transaction, error) { + return _Supernets2bridge.Contract.ClaimAsset(&_Supernets2bridge.TransactOpts, smtProof, index, mainnetExitRoot, rollupExitRoot, originNetwork, originTokenAddress, destinationNetwork, destinationAddress, amount, metadata) +} + +// ClaimMessage is a paid mutator transaction binding the contract method 0x2d2c9d94. +// +// Solidity: function claimMessage(bytes32[32] smtProof, uint32 index, bytes32 mainnetExitRoot, bytes32 rollupExitRoot, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata) returns() +func (_Supernets2bridge *Supernets2bridgeTransactor) ClaimMessage(opts *bind.TransactOpts, smtProof [32][32]byte, index uint32, mainnetExitRoot [32]byte, rollupExitRoot [32]byte, originNetwork uint32, originAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadata []byte) (*types.Transaction, error) { + return _Supernets2bridge.contract.Transact(opts, "claimMessage", smtProof, index, mainnetExitRoot, rollupExitRoot, originNetwork, originAddress, destinationNetwork, destinationAddress, amount, metadata) +} + +// ClaimMessage is a paid mutator transaction binding the contract method 0x2d2c9d94. +// +// Solidity: function claimMessage(bytes32[32] smtProof, uint32 index, bytes32 mainnetExitRoot, bytes32 rollupExitRoot, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata) returns() +func (_Supernets2bridge *Supernets2bridgeSession) ClaimMessage(smtProof [32][32]byte, index uint32, mainnetExitRoot [32]byte, rollupExitRoot [32]byte, originNetwork uint32, originAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadata []byte) (*types.Transaction, error) { + return _Supernets2bridge.Contract.ClaimMessage(&_Supernets2bridge.TransactOpts, smtProof, index, mainnetExitRoot, rollupExitRoot, originNetwork, originAddress, destinationNetwork, destinationAddress, amount, metadata) +} + +// ClaimMessage is a paid mutator transaction binding the contract method 0x2d2c9d94. +// +// Solidity: function claimMessage(bytes32[32] smtProof, uint32 index, bytes32 mainnetExitRoot, bytes32 rollupExitRoot, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata) returns() +func (_Supernets2bridge *Supernets2bridgeTransactorSession) ClaimMessage(smtProof [32][32]byte, index uint32, mainnetExitRoot [32]byte, rollupExitRoot [32]byte, originNetwork uint32, originAddress common.Address, destinationNetwork uint32, destinationAddress common.Address, amount *big.Int, metadata []byte) (*types.Transaction, error) { + return _Supernets2bridge.Contract.ClaimMessage(&_Supernets2bridge.TransactOpts, smtProof, index, mainnetExitRoot, rollupExitRoot, originNetwork, originAddress, destinationNetwork, destinationAddress, amount, metadata) +} + +// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. +// +// Solidity: function deactivateEmergencyState() returns() +func (_Supernets2bridge *Supernets2bridgeTransactor) DeactivateEmergencyState(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2bridge.contract.Transact(opts, "deactivateEmergencyState") +} + +// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. +// +// Solidity: function deactivateEmergencyState() returns() +func (_Supernets2bridge *Supernets2bridgeSession) DeactivateEmergencyState() (*types.Transaction, error) { + return _Supernets2bridge.Contract.DeactivateEmergencyState(&_Supernets2bridge.TransactOpts) +} + +// DeactivateEmergencyState is a paid mutator transaction binding the contract method 0xdbc16976. +// +// Solidity: function deactivateEmergencyState() returns() +func (_Supernets2bridge *Supernets2bridgeTransactorSession) DeactivateEmergencyState() (*types.Transaction, error) { + return _Supernets2bridge.Contract.DeactivateEmergencyState(&_Supernets2bridge.TransactOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0x647c576c. +// +// Solidity: function initialize(uint32 _networkID, address _globalExitRootManager, address _supernets2address) returns() +func (_Supernets2bridge *Supernets2bridgeTransactor) Initialize(opts *bind.TransactOpts, _networkID uint32, _globalExitRootManager common.Address, _supernets2address common.Address) (*types.Transaction, error) { + return _Supernets2bridge.contract.Transact(opts, "initialize", _networkID, _globalExitRootManager, _supernets2address) +} + +// Initialize is a paid mutator transaction binding the contract method 0x647c576c. +// +// Solidity: function initialize(uint32 _networkID, address _globalExitRootManager, address _supernets2address) returns() +func (_Supernets2bridge *Supernets2bridgeSession) Initialize(_networkID uint32, _globalExitRootManager common.Address, _supernets2address common.Address) (*types.Transaction, error) { + return _Supernets2bridge.Contract.Initialize(&_Supernets2bridge.TransactOpts, _networkID, _globalExitRootManager, _supernets2address) +} + +// Initialize is a paid mutator transaction binding the contract method 0x647c576c. +// +// Solidity: function initialize(uint32 _networkID, address _globalExitRootManager, address _supernets2address) returns() +func (_Supernets2bridge *Supernets2bridgeTransactorSession) Initialize(_networkID uint32, _globalExitRootManager common.Address, _supernets2address common.Address) (*types.Transaction, error) { + return _Supernets2bridge.Contract.Initialize(&_Supernets2bridge.TransactOpts, _networkID, _globalExitRootManager, _supernets2address) +} + +// UpdateGlobalExitRoot is a paid mutator transaction binding the contract method 0x79e2cf97. +// +// Solidity: function updateGlobalExitRoot() returns() +func (_Supernets2bridge *Supernets2bridgeTransactor) UpdateGlobalExitRoot(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2bridge.contract.Transact(opts, "updateGlobalExitRoot") +} + +// UpdateGlobalExitRoot is a paid mutator transaction binding the contract method 0x79e2cf97. +// +// Solidity: function updateGlobalExitRoot() returns() +func (_Supernets2bridge *Supernets2bridgeSession) UpdateGlobalExitRoot() (*types.Transaction, error) { + return _Supernets2bridge.Contract.UpdateGlobalExitRoot(&_Supernets2bridge.TransactOpts) +} + +// UpdateGlobalExitRoot is a paid mutator transaction binding the contract method 0x79e2cf97. +// +// Solidity: function updateGlobalExitRoot() returns() +func (_Supernets2bridge *Supernets2bridgeTransactorSession) UpdateGlobalExitRoot() (*types.Transaction, error) { + return _Supernets2bridge.Contract.UpdateGlobalExitRoot(&_Supernets2bridge.TransactOpts) +} + +// Supernets2bridgeBridgeEventIterator is returned from FilterBridgeEvent and is used to iterate over the raw logs and unpacked data for BridgeEvent events raised by the Supernets2bridge contract. +type Supernets2bridgeBridgeEventIterator struct { + Event *Supernets2bridgeBridgeEvent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2bridgeBridgeEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2bridgeBridgeEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2bridgeBridgeEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2bridgeBridgeEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2bridgeBridgeEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2bridgeBridgeEvent represents a BridgeEvent event raised by the Supernets2bridge contract. +type Supernets2bridgeBridgeEvent struct { + LeafType uint8 + OriginNetwork uint32 + OriginAddress common.Address + DestinationNetwork uint32 + DestinationAddress common.Address + Amount *big.Int + Metadata []byte + DepositCount uint32 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBridgeEvent is a free log retrieval operation binding the contract event 0x501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b. +// +// Solidity: event BridgeEvent(uint8 leafType, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata, uint32 depositCount) +func (_Supernets2bridge *Supernets2bridgeFilterer) FilterBridgeEvent(opts *bind.FilterOpts) (*Supernets2bridgeBridgeEventIterator, error) { + + logs, sub, err := _Supernets2bridge.contract.FilterLogs(opts, "BridgeEvent") + if err != nil { + return nil, err + } + return &Supernets2bridgeBridgeEventIterator{contract: _Supernets2bridge.contract, event: "BridgeEvent", logs: logs, sub: sub}, nil +} + +// WatchBridgeEvent is a free log subscription operation binding the contract event 0x501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b. +// +// Solidity: event BridgeEvent(uint8 leafType, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata, uint32 depositCount) +func (_Supernets2bridge *Supernets2bridgeFilterer) WatchBridgeEvent(opts *bind.WatchOpts, sink chan<- *Supernets2bridgeBridgeEvent) (event.Subscription, error) { + + logs, sub, err := _Supernets2bridge.contract.WatchLogs(opts, "BridgeEvent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2bridgeBridgeEvent) + if err := _Supernets2bridge.contract.UnpackLog(event, "BridgeEvent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseBridgeEvent is a log parse operation binding the contract event 0x501781209a1f8899323b96b4ef08b168df93e0a90c673d1e4cce39366cb62f9b. +// +// Solidity: event BridgeEvent(uint8 leafType, uint32 originNetwork, address originAddress, uint32 destinationNetwork, address destinationAddress, uint256 amount, bytes metadata, uint32 depositCount) +func (_Supernets2bridge *Supernets2bridgeFilterer) ParseBridgeEvent(log types.Log) (*Supernets2bridgeBridgeEvent, error) { + event := new(Supernets2bridgeBridgeEvent) + if err := _Supernets2bridge.contract.UnpackLog(event, "BridgeEvent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2bridgeClaimEventIterator is returned from FilterClaimEvent and is used to iterate over the raw logs and unpacked data for ClaimEvent events raised by the Supernets2bridge contract. +type Supernets2bridgeClaimEventIterator struct { + Event *Supernets2bridgeClaimEvent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2bridgeClaimEventIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2bridgeClaimEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2bridgeClaimEvent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2bridgeClaimEventIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2bridgeClaimEventIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2bridgeClaimEvent represents a ClaimEvent event raised by the Supernets2bridge contract. +type Supernets2bridgeClaimEvent struct { + Index uint32 + OriginNetwork uint32 + OriginAddress common.Address + DestinationAddress common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterClaimEvent is a free log retrieval operation binding the contract event 0x25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe27545983. +// +// Solidity: event ClaimEvent(uint32 index, uint32 originNetwork, address originAddress, address destinationAddress, uint256 amount) +func (_Supernets2bridge *Supernets2bridgeFilterer) FilterClaimEvent(opts *bind.FilterOpts) (*Supernets2bridgeClaimEventIterator, error) { + + logs, sub, err := _Supernets2bridge.contract.FilterLogs(opts, "ClaimEvent") + if err != nil { + return nil, err + } + return &Supernets2bridgeClaimEventIterator{contract: _Supernets2bridge.contract, event: "ClaimEvent", logs: logs, sub: sub}, nil +} + +// WatchClaimEvent is a free log subscription operation binding the contract event 0x25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe27545983. +// +// Solidity: event ClaimEvent(uint32 index, uint32 originNetwork, address originAddress, address destinationAddress, uint256 amount) +func (_Supernets2bridge *Supernets2bridgeFilterer) WatchClaimEvent(opts *bind.WatchOpts, sink chan<- *Supernets2bridgeClaimEvent) (event.Subscription, error) { + + logs, sub, err := _Supernets2bridge.contract.WatchLogs(opts, "ClaimEvent") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2bridgeClaimEvent) + if err := _Supernets2bridge.contract.UnpackLog(event, "ClaimEvent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseClaimEvent is a log parse operation binding the contract event 0x25308c93ceeed162da955b3f7ce3e3f93606579e40fb92029faa9efe27545983. +// +// Solidity: event ClaimEvent(uint32 index, uint32 originNetwork, address originAddress, address destinationAddress, uint256 amount) +func (_Supernets2bridge *Supernets2bridgeFilterer) ParseClaimEvent(log types.Log) (*Supernets2bridgeClaimEvent, error) { + event := new(Supernets2bridgeClaimEvent) + if err := _Supernets2bridge.contract.UnpackLog(event, "ClaimEvent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2bridgeEmergencyStateActivatedIterator is returned from FilterEmergencyStateActivated and is used to iterate over the raw logs and unpacked data for EmergencyStateActivated events raised by the Supernets2bridge contract. +type Supernets2bridgeEmergencyStateActivatedIterator struct { + Event *Supernets2bridgeEmergencyStateActivated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2bridgeEmergencyStateActivatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2bridgeEmergencyStateActivated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2bridgeEmergencyStateActivated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2bridgeEmergencyStateActivatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2bridgeEmergencyStateActivatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2bridgeEmergencyStateActivated represents a EmergencyStateActivated event raised by the Supernets2bridge contract. +type Supernets2bridgeEmergencyStateActivated struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEmergencyStateActivated is a free log retrieval operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. +// +// Solidity: event EmergencyStateActivated() +func (_Supernets2bridge *Supernets2bridgeFilterer) FilterEmergencyStateActivated(opts *bind.FilterOpts) (*Supernets2bridgeEmergencyStateActivatedIterator, error) { + + logs, sub, err := _Supernets2bridge.contract.FilterLogs(opts, "EmergencyStateActivated") + if err != nil { + return nil, err + } + return &Supernets2bridgeEmergencyStateActivatedIterator{contract: _Supernets2bridge.contract, event: "EmergencyStateActivated", logs: logs, sub: sub}, nil +} + +// WatchEmergencyStateActivated is a free log subscription operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. +// +// Solidity: event EmergencyStateActivated() +func (_Supernets2bridge *Supernets2bridgeFilterer) WatchEmergencyStateActivated(opts *bind.WatchOpts, sink chan<- *Supernets2bridgeEmergencyStateActivated) (event.Subscription, error) { + + logs, sub, err := _Supernets2bridge.contract.WatchLogs(opts, "EmergencyStateActivated") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2bridgeEmergencyStateActivated) + if err := _Supernets2bridge.contract.UnpackLog(event, "EmergencyStateActivated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseEmergencyStateActivated is a log parse operation binding the contract event 0x2261efe5aef6fedc1fd1550b25facc9181745623049c7901287030b9ad1a5497. +// +// Solidity: event EmergencyStateActivated() +func (_Supernets2bridge *Supernets2bridgeFilterer) ParseEmergencyStateActivated(log types.Log) (*Supernets2bridgeEmergencyStateActivated, error) { + event := new(Supernets2bridgeEmergencyStateActivated) + if err := _Supernets2bridge.contract.UnpackLog(event, "EmergencyStateActivated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2bridgeEmergencyStateDeactivatedIterator is returned from FilterEmergencyStateDeactivated and is used to iterate over the raw logs and unpacked data for EmergencyStateDeactivated events raised by the Supernets2bridge contract. +type Supernets2bridgeEmergencyStateDeactivatedIterator struct { + Event *Supernets2bridgeEmergencyStateDeactivated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2bridgeEmergencyStateDeactivatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2bridgeEmergencyStateDeactivated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2bridgeEmergencyStateDeactivated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2bridgeEmergencyStateDeactivatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2bridgeEmergencyStateDeactivatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2bridgeEmergencyStateDeactivated represents a EmergencyStateDeactivated event raised by the Supernets2bridge contract. +type Supernets2bridgeEmergencyStateDeactivated struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEmergencyStateDeactivated is a free log retrieval operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. +// +// Solidity: event EmergencyStateDeactivated() +func (_Supernets2bridge *Supernets2bridgeFilterer) FilterEmergencyStateDeactivated(opts *bind.FilterOpts) (*Supernets2bridgeEmergencyStateDeactivatedIterator, error) { + + logs, sub, err := _Supernets2bridge.contract.FilterLogs(opts, "EmergencyStateDeactivated") + if err != nil { + return nil, err + } + return &Supernets2bridgeEmergencyStateDeactivatedIterator{contract: _Supernets2bridge.contract, event: "EmergencyStateDeactivated", logs: logs, sub: sub}, nil +} + +// WatchEmergencyStateDeactivated is a free log subscription operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. +// +// Solidity: event EmergencyStateDeactivated() +func (_Supernets2bridge *Supernets2bridgeFilterer) WatchEmergencyStateDeactivated(opts *bind.WatchOpts, sink chan<- *Supernets2bridgeEmergencyStateDeactivated) (event.Subscription, error) { + + logs, sub, err := _Supernets2bridge.contract.WatchLogs(opts, "EmergencyStateDeactivated") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2bridgeEmergencyStateDeactivated) + if err := _Supernets2bridge.contract.UnpackLog(event, "EmergencyStateDeactivated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseEmergencyStateDeactivated is a log parse operation binding the contract event 0x1e5e34eea33501aecf2ebec9fe0e884a40804275ea7fe10b2ba084c8374308b3. +// +// Solidity: event EmergencyStateDeactivated() +func (_Supernets2bridge *Supernets2bridgeFilterer) ParseEmergencyStateDeactivated(log types.Log) (*Supernets2bridgeEmergencyStateDeactivated, error) { + event := new(Supernets2bridgeEmergencyStateDeactivated) + if err := _Supernets2bridge.contract.UnpackLog(event, "EmergencyStateDeactivated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2bridgeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Supernets2bridge contract. +type Supernets2bridgeInitializedIterator struct { + Event *Supernets2bridgeInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2bridgeInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2bridgeInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2bridgeInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2bridgeInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2bridgeInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2bridgeInitialized represents a Initialized event raised by the Supernets2bridge contract. +type Supernets2bridgeInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Supernets2bridge *Supernets2bridgeFilterer) FilterInitialized(opts *bind.FilterOpts) (*Supernets2bridgeInitializedIterator, error) { + + logs, sub, err := _Supernets2bridge.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &Supernets2bridgeInitializedIterator{contract: _Supernets2bridge.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Supernets2bridge *Supernets2bridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *Supernets2bridgeInitialized) (event.Subscription, error) { + + logs, sub, err := _Supernets2bridge.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2bridgeInitialized) + if err := _Supernets2bridge.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Supernets2bridge *Supernets2bridgeFilterer) ParseInitialized(log types.Log) (*Supernets2bridgeInitialized, error) { + event := new(Supernets2bridgeInitialized) + if err := _Supernets2bridge.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2bridgeNewWrappedTokenIterator is returned from FilterNewWrappedToken and is used to iterate over the raw logs and unpacked data for NewWrappedToken events raised by the Supernets2bridge contract. +type Supernets2bridgeNewWrappedTokenIterator struct { + Event *Supernets2bridgeNewWrappedToken // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2bridgeNewWrappedTokenIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2bridgeNewWrappedToken) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2bridgeNewWrappedToken) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2bridgeNewWrappedTokenIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2bridgeNewWrappedTokenIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2bridgeNewWrappedToken represents a NewWrappedToken event raised by the Supernets2bridge contract. +type Supernets2bridgeNewWrappedToken struct { + OriginNetwork uint32 + OriginTokenAddress common.Address + WrappedTokenAddress common.Address + Metadata []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterNewWrappedToken is a free log retrieval operation binding the contract event 0x490e59a1701b938786ac72570a1efeac994a3dbe96e2e883e19e902ace6e6a39. +// +// Solidity: event NewWrappedToken(uint32 originNetwork, address originTokenAddress, address wrappedTokenAddress, bytes metadata) +func (_Supernets2bridge *Supernets2bridgeFilterer) FilterNewWrappedToken(opts *bind.FilterOpts) (*Supernets2bridgeNewWrappedTokenIterator, error) { + + logs, sub, err := _Supernets2bridge.contract.FilterLogs(opts, "NewWrappedToken") + if err != nil { + return nil, err + } + return &Supernets2bridgeNewWrappedTokenIterator{contract: _Supernets2bridge.contract, event: "NewWrappedToken", logs: logs, sub: sub}, nil +} + +// WatchNewWrappedToken is a free log subscription operation binding the contract event 0x490e59a1701b938786ac72570a1efeac994a3dbe96e2e883e19e902ace6e6a39. +// +// Solidity: event NewWrappedToken(uint32 originNetwork, address originTokenAddress, address wrappedTokenAddress, bytes metadata) +func (_Supernets2bridge *Supernets2bridgeFilterer) WatchNewWrappedToken(opts *bind.WatchOpts, sink chan<- *Supernets2bridgeNewWrappedToken) (event.Subscription, error) { + + logs, sub, err := _Supernets2bridge.contract.WatchLogs(opts, "NewWrappedToken") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2bridgeNewWrappedToken) + if err := _Supernets2bridge.contract.UnpackLog(event, "NewWrappedToken", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseNewWrappedToken is a log parse operation binding the contract event 0x490e59a1701b938786ac72570a1efeac994a3dbe96e2e883e19e902ace6e6a39. +// +// Solidity: event NewWrappedToken(uint32 originNetwork, address originTokenAddress, address wrappedTokenAddress, bytes metadata) +func (_Supernets2bridge *Supernets2bridgeFilterer) ParseNewWrappedToken(log types.Log) (*Supernets2bridgeNewWrappedToken, error) { + event := new(Supernets2bridgeNewWrappedToken) + if err := _Supernets2bridge.contract.UnpackLog(event, "NewWrappedToken", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/etherman/smartcontracts/supernets2datacommittee/supernets2datacommittee.go b/etherman/smartcontracts/supernets2datacommittee/supernets2datacommittee.go new file mode 100644 index 00000000..726d3ace --- /dev/null +++ b/etherman/smartcontracts/supernets2datacommittee/supernets2datacommittee.go @@ -0,0 +1,906 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package supernets2datacommittee + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// Supernets2datacommitteeMetaData contains all meta data concerning the Supernets2datacommittee contract. +var Supernets2datacommitteeMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"CommitteeAddressDoesntExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EmptyURLNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyRequiredSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedAddrsAndSignaturesSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedAddrsBytesLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedCommitteeHash\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongAddrOrder\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"committeeHash\",\"type\":\"bytes32\"}],\"name\":\"CommitteeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"committeeHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAmountOfMembers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"members\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"url\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"requiredAmountOfSignatures\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requiredAmountOfSignatures\",\"type\":\"uint256\"},{\"internalType\":\"string[]\",\"name\":\"urls\",\"type\":\"string[]\"},{\"internalType\":\"bytes\",\"name\":\"addrsBytes\",\"type\":\"bytes\"}],\"name\":\"setupCommittee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"signedHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signaturesAndAddrs\",\"type\":\"bytes\"}],\"name\":\"verifySignatures\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b506115e0806100206000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c80638129fc1c11610076578063c7a823e01161005b578063c7a823e01461015a578063dce1e2b61461016d578063f2fde38b1461017557600080fd5b80638129fc1c1461012a5780638da5cb5b1461013257600080fd5b8063609d4544116100a7578063609d4544146101025780636beedd3914610119578063715018a61461012257600080fd5b8063078fba2a146100c35780635daf08ca146100d8575b600080fd5b6100d66100d1366004610fa9565b610188565b005b6100eb6100e6366004611054565b61048c565b6040516100f992919061106d565b60405180910390f35b61010b60665481565b6040519081526020016100f9565b61010b60655481565b6100d661055e565b6100d6610572565b60335460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100f9565b6100d66101683660046110f6565b610709565b60675461010b565b6100d6610183366004611142565b61095c565b610190610a10565b82858110156101cb576040517f2e7dcd6e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101d66014826111ae565b821461020e576040517f2ab6a12900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61021a60676000610eb5565b6000805b828110156104305760006102336014836111ae565b905060008682876102456014836111c5565b92610252939291906111d8565b61025b91611202565b60601c90508888848181106102725761027261124a565b90506020028101906102849190611279565b90506000036102bf576040517fb54b70e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610610324576040517fd53cfbe000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b809350606760405180604001604052808b8b878181106103465761034661124a565b90506020028101906103589190611279565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250505073ffffffffffffffffffffffffffffffffffffffff851660209283015283546001810185559381522081519192600202019081906103cc90826113af565b5060209190910151600190910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905550819050610428816114c9565b91505061021e565b508383604051610441929190611501565b6040519081900381206066819055606589905581527f831403fd381b3e6ac875d912ec2eee0e0203d0d29f7b3e0c96fc8f582d6db6579060200160405180910390a150505050505050565b6067818154811061049c57600080fd5b90600052602060002090600202016000915090508060000180546104bf9061130d565b80601f01602080910402602001604051908101604052809291908181526020018280546104eb9061130d565b80156105385780601f1061050d57610100808354040283529160200191610538565b820191906000526020600020905b81548152906001019060200180831161051b57829003601f168201915b5050506001909301549192505073ffffffffffffffffffffffffffffffffffffffff1682565b610566610a10565b6105706000610a91565b565b600054610100900460ff16158080156105925750600054600160ff909116105b806105ac5750303b1580156105ac575060005460ff166001145b61063d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561069b57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6106a3610b08565b801561070657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6000606554604161071a91906111ae565b90508082108061073e575060146107318284611511565b61073b9190611553565b15155b15610775576040517f6b8eec4600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606654610784838381876111d8565b604051610792929190611501565b6040518091039020146107d1576040517f6b156b2800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060146107e08486611511565b6107ea9190611567565b905060005b60655481101561095357600061086a88888861080c6041876111ae565b90604161081981896111ae565b61082391906111c5565b92610830939291906111d8565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610ba892505050565b90506000845b848110156109065760006108856014836111ae565b61088f90896111c5565b905060008a828b6108a16014836111c5565b926108ae939291906111d8565b6108b791611202565b60601c905073ffffffffffffffffffffffffffffffffffffffff851681036108f1576108e48360016111c5565b9750600193505050610906565b505080806108fe906114c9565b915050610870565b508061093e576040517f8431721300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050808061094b906114c9565b9150506107ef565b50505050505050565b610964610a10565b73ffffffffffffffffffffffffffffffffffffffff8116610a07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610634565b61070681610a91565b60335473ffffffffffffffffffffffffffffffffffffffff163314610570576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610634565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610634565b61057033610a91565b6000806000610bb78585610bce565b91509150610bc481610c13565b5090505b92915050565b6000808251604103610c045760208301516040840151606085015160001a610bf887828585610dc6565b94509450505050610c0c565b506000905060025b9250929050565b6000816004811115610c2757610c2761157b565b03610c2f5750565b6001816004811115610c4357610c4361157b565b03610caa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610634565b6002816004811115610cbe57610cbe61157b565b03610d25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610634565b6003816004811115610d3957610d3961157b565b03610706576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610634565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610dfd5750600090506003610eac565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610e51573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116610ea557600060019250925050610eac565b9150600090505b94509492505050565b508054600082556002029060005260206000209081019061070691905b80821115610f19576000610ee68282610f1d565b506001810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600201610ed2565b5090565b508054610f299061130d565b6000825580601f10610f39575050565b601f01602090049060005260206000209081019061070691905b80821115610f195760008155600101610f53565b60008083601f840112610f7957600080fd5b50813567ffffffffffffffff811115610f9157600080fd5b602083019150836020828501011115610c0c57600080fd5b600080600080600060608688031215610fc157600080fd5b85359450602086013567ffffffffffffffff80821115610fe057600080fd5b818801915088601f830112610ff457600080fd5b81358181111561100357600080fd5b8960208260051b850101111561101857600080fd5b60208301965080955050604088013591508082111561103657600080fd5b5061104388828901610f67565b969995985093965092949392505050565b60006020828403121561106657600080fd5b5035919050565b604081526000835180604084015260005b8181101561109b576020818701810151606086840101520161107e565b5060006060828501015260607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505073ffffffffffffffffffffffffffffffffffffffff831660208301529392505050565b60008060006040848603121561110b57600080fd5b83359250602084013567ffffffffffffffff81111561112957600080fd5b61113586828701610f67565b9497909650939450505050565b60006020828403121561115457600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461117857600080fd5b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082028115828204841417610bc857610bc861117f565b80820180821115610bc857610bc861117f565b600080858511156111e857600080fd5b838611156111f557600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156112425780818660140360031b1b83161692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126112ae57600080fd5b83018035915067ffffffffffffffff8211156112c957600080fd5b602001915036819003821315610c0c57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600181811c9082168061132157607f821691505b60208210810361135a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f8211156113aa57600081815260208120601f850160051c810160208610156113875750805b601f850160051c820191505b818110156113a657828155600101611393565b5050505b505050565b815167ffffffffffffffff8111156113c9576113c96112de565b6113dd816113d7845461130d565b84611360565b602080601f83116001811461143057600084156113fa5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556113a6565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561147d5788860151825594840194600190910190840161145e565b50858210156114b957878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036114fa576114fa61117f565b5060010190565b8183823760009101908152919050565b81810381811115610bc857610bc861117f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261156257611562611524565b500690565b60008261157657611576611524565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea2646970667358221220a7cda335f388ab7e6f034edd256ac3bf132ec1297e19d952a06acd1bacb553ff64736f6c63430008110033", +} + +// Supernets2datacommitteeABI is the input ABI used to generate the binding from. +// Deprecated: Use Supernets2datacommitteeMetaData.ABI instead. +var Supernets2datacommitteeABI = Supernets2datacommitteeMetaData.ABI + +// Supernets2datacommitteeBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use Supernets2datacommitteeMetaData.Bin instead. +var Supernets2datacommitteeBin = Supernets2datacommitteeMetaData.Bin + +// DeploySupernets2datacommittee deploys a new Ethereum contract, binding an instance of Supernets2datacommittee to it. +func DeploySupernets2datacommittee(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Supernets2datacommittee, error) { + parsed, err := Supernets2datacommitteeMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(Supernets2datacommitteeBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Supernets2datacommittee{Supernets2datacommitteeCaller: Supernets2datacommitteeCaller{contract: contract}, Supernets2datacommitteeTransactor: Supernets2datacommitteeTransactor{contract: contract}, Supernets2datacommitteeFilterer: Supernets2datacommitteeFilterer{contract: contract}}, nil +} + +// Supernets2datacommittee is an auto generated Go binding around an Ethereum contract. +type Supernets2datacommittee struct { + Supernets2datacommitteeCaller // Read-only binding to the contract + Supernets2datacommitteeTransactor // Write-only binding to the contract + Supernets2datacommitteeFilterer // Log filterer for contract events +} + +// Supernets2datacommitteeCaller is an auto generated read-only Go binding around an Ethereum contract. +type Supernets2datacommitteeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Supernets2datacommitteeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type Supernets2datacommitteeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Supernets2datacommitteeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type Supernets2datacommitteeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Supernets2datacommitteeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type Supernets2datacommitteeSession struct { + Contract *Supernets2datacommittee // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// Supernets2datacommitteeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type Supernets2datacommitteeCallerSession struct { + Contract *Supernets2datacommitteeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// Supernets2datacommitteeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type Supernets2datacommitteeTransactorSession struct { + Contract *Supernets2datacommitteeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// Supernets2datacommitteeRaw is an auto generated low-level Go binding around an Ethereum contract. +type Supernets2datacommitteeRaw struct { + Contract *Supernets2datacommittee // Generic contract binding to access the raw methods on +} + +// Supernets2datacommitteeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type Supernets2datacommitteeCallerRaw struct { + Contract *Supernets2datacommitteeCaller // Generic read-only contract binding to access the raw methods on +} + +// Supernets2datacommitteeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type Supernets2datacommitteeTransactorRaw struct { + Contract *Supernets2datacommitteeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSupernets2datacommittee creates a new instance of Supernets2datacommittee, bound to a specific deployed contract. +func NewSupernets2datacommittee(address common.Address, backend bind.ContractBackend) (*Supernets2datacommittee, error) { + contract, err := bindSupernets2datacommittee(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Supernets2datacommittee{Supernets2datacommitteeCaller: Supernets2datacommitteeCaller{contract: contract}, Supernets2datacommitteeTransactor: Supernets2datacommitteeTransactor{contract: contract}, Supernets2datacommitteeFilterer: Supernets2datacommitteeFilterer{contract: contract}}, nil +} + +// NewSupernets2datacommitteeCaller creates a new read-only instance of Supernets2datacommittee, bound to a specific deployed contract. +func NewSupernets2datacommitteeCaller(address common.Address, caller bind.ContractCaller) (*Supernets2datacommitteeCaller, error) { + contract, err := bindSupernets2datacommittee(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &Supernets2datacommitteeCaller{contract: contract}, nil +} + +// NewSupernets2datacommitteeTransactor creates a new write-only instance of Supernets2datacommittee, bound to a specific deployed contract. +func NewSupernets2datacommitteeTransactor(address common.Address, transactor bind.ContractTransactor) (*Supernets2datacommitteeTransactor, error) { + contract, err := bindSupernets2datacommittee(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &Supernets2datacommitteeTransactor{contract: contract}, nil +} + +// NewSupernets2datacommitteeFilterer creates a new log filterer instance of Supernets2datacommittee, bound to a specific deployed contract. +func NewSupernets2datacommitteeFilterer(address common.Address, filterer bind.ContractFilterer) (*Supernets2datacommitteeFilterer, error) { + contract, err := bindSupernets2datacommittee(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &Supernets2datacommitteeFilterer{contract: contract}, nil +} + +// bindSupernets2datacommittee binds a generic wrapper to an already deployed contract. +func bindSupernets2datacommittee(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := Supernets2datacommitteeMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Supernets2datacommittee *Supernets2datacommitteeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Supernets2datacommittee.Contract.Supernets2datacommitteeCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Supernets2datacommittee *Supernets2datacommitteeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2datacommittee.Contract.Supernets2datacommitteeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Supernets2datacommittee *Supernets2datacommitteeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Supernets2datacommittee.Contract.Supernets2datacommitteeTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Supernets2datacommittee *Supernets2datacommitteeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Supernets2datacommittee.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Supernets2datacommittee *Supernets2datacommitteeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2datacommittee.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Supernets2datacommittee *Supernets2datacommitteeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Supernets2datacommittee.Contract.contract.Transact(opts, method, params...) +} + +// CommitteeHash is a free data retrieval call binding the contract method 0x609d4544. +// +// Solidity: function committeeHash() view returns(bytes32) +func (_Supernets2datacommittee *Supernets2datacommitteeCaller) CommitteeHash(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Supernets2datacommittee.contract.Call(opts, &out, "committeeHash") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// CommitteeHash is a free data retrieval call binding the contract method 0x609d4544. +// +// Solidity: function committeeHash() view returns(bytes32) +func (_Supernets2datacommittee *Supernets2datacommitteeSession) CommitteeHash() ([32]byte, error) { + return _Supernets2datacommittee.Contract.CommitteeHash(&_Supernets2datacommittee.CallOpts) +} + +// CommitteeHash is a free data retrieval call binding the contract method 0x609d4544. +// +// Solidity: function committeeHash() view returns(bytes32) +func (_Supernets2datacommittee *Supernets2datacommitteeCallerSession) CommitteeHash() ([32]byte, error) { + return _Supernets2datacommittee.Contract.CommitteeHash(&_Supernets2datacommittee.CallOpts) +} + +// GetAmountOfMembers is a free data retrieval call binding the contract method 0xdce1e2b6. +// +// Solidity: function getAmountOfMembers() view returns(uint256) +func (_Supernets2datacommittee *Supernets2datacommitteeCaller) GetAmountOfMembers(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Supernets2datacommittee.contract.Call(opts, &out, "getAmountOfMembers") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetAmountOfMembers is a free data retrieval call binding the contract method 0xdce1e2b6. +// +// Solidity: function getAmountOfMembers() view returns(uint256) +func (_Supernets2datacommittee *Supernets2datacommitteeSession) GetAmountOfMembers() (*big.Int, error) { + return _Supernets2datacommittee.Contract.GetAmountOfMembers(&_Supernets2datacommittee.CallOpts) +} + +// GetAmountOfMembers is a free data retrieval call binding the contract method 0xdce1e2b6. +// +// Solidity: function getAmountOfMembers() view returns(uint256) +func (_Supernets2datacommittee *Supernets2datacommitteeCallerSession) GetAmountOfMembers() (*big.Int, error) { + return _Supernets2datacommittee.Contract.GetAmountOfMembers(&_Supernets2datacommittee.CallOpts) +} + +// Members is a free data retrieval call binding the contract method 0x5daf08ca. +// +// Solidity: function members(uint256 ) view returns(string url, address addr) +func (_Supernets2datacommittee *Supernets2datacommitteeCaller) Members(opts *bind.CallOpts, arg0 *big.Int) (struct { + Url string + Addr common.Address +}, error) { + var out []interface{} + err := _Supernets2datacommittee.contract.Call(opts, &out, "members", arg0) + + outstruct := new(struct { + Url string + Addr common.Address + }) + if err != nil { + return *outstruct, err + } + + outstruct.Url = *abi.ConvertType(out[0], new(string)).(*string) + outstruct.Addr = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) + + return *outstruct, err + +} + +// Members is a free data retrieval call binding the contract method 0x5daf08ca. +// +// Solidity: function members(uint256 ) view returns(string url, address addr) +func (_Supernets2datacommittee *Supernets2datacommitteeSession) Members(arg0 *big.Int) (struct { + Url string + Addr common.Address +}, error) { + return _Supernets2datacommittee.Contract.Members(&_Supernets2datacommittee.CallOpts, arg0) +} + +// Members is a free data retrieval call binding the contract method 0x5daf08ca. +// +// Solidity: function members(uint256 ) view returns(string url, address addr) +func (_Supernets2datacommittee *Supernets2datacommitteeCallerSession) Members(arg0 *big.Int) (struct { + Url string + Addr common.Address +}, error) { + return _Supernets2datacommittee.Contract.Members(&_Supernets2datacommittee.CallOpts, arg0) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Supernets2datacommittee *Supernets2datacommitteeCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2datacommittee.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Supernets2datacommittee *Supernets2datacommitteeSession) Owner() (common.Address, error) { + return _Supernets2datacommittee.Contract.Owner(&_Supernets2datacommittee.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Supernets2datacommittee *Supernets2datacommitteeCallerSession) Owner() (common.Address, error) { + return _Supernets2datacommittee.Contract.Owner(&_Supernets2datacommittee.CallOpts) +} + +// RequiredAmountOfSignatures is a free data retrieval call binding the contract method 0x6beedd39. +// +// Solidity: function requiredAmountOfSignatures() view returns(uint256) +func (_Supernets2datacommittee *Supernets2datacommitteeCaller) RequiredAmountOfSignatures(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Supernets2datacommittee.contract.Call(opts, &out, "requiredAmountOfSignatures") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// RequiredAmountOfSignatures is a free data retrieval call binding the contract method 0x6beedd39. +// +// Solidity: function requiredAmountOfSignatures() view returns(uint256) +func (_Supernets2datacommittee *Supernets2datacommitteeSession) RequiredAmountOfSignatures() (*big.Int, error) { + return _Supernets2datacommittee.Contract.RequiredAmountOfSignatures(&_Supernets2datacommittee.CallOpts) +} + +// RequiredAmountOfSignatures is a free data retrieval call binding the contract method 0x6beedd39. +// +// Solidity: function requiredAmountOfSignatures() view returns(uint256) +func (_Supernets2datacommittee *Supernets2datacommitteeCallerSession) RequiredAmountOfSignatures() (*big.Int, error) { + return _Supernets2datacommittee.Contract.RequiredAmountOfSignatures(&_Supernets2datacommittee.CallOpts) +} + +// VerifySignatures is a free data retrieval call binding the contract method 0xc7a823e0. +// +// Solidity: function verifySignatures(bytes32 signedHash, bytes signaturesAndAddrs) view returns() +func (_Supernets2datacommittee *Supernets2datacommitteeCaller) VerifySignatures(opts *bind.CallOpts, signedHash [32]byte, signaturesAndAddrs []byte) error { + var out []interface{} + err := _Supernets2datacommittee.contract.Call(opts, &out, "verifySignatures", signedHash, signaturesAndAddrs) + + if err != nil { + return err + } + + return err + +} + +// VerifySignatures is a free data retrieval call binding the contract method 0xc7a823e0. +// +// Solidity: function verifySignatures(bytes32 signedHash, bytes signaturesAndAddrs) view returns() +func (_Supernets2datacommittee *Supernets2datacommitteeSession) VerifySignatures(signedHash [32]byte, signaturesAndAddrs []byte) error { + return _Supernets2datacommittee.Contract.VerifySignatures(&_Supernets2datacommittee.CallOpts, signedHash, signaturesAndAddrs) +} + +// VerifySignatures is a free data retrieval call binding the contract method 0xc7a823e0. +// +// Solidity: function verifySignatures(bytes32 signedHash, bytes signaturesAndAddrs) view returns() +func (_Supernets2datacommittee *Supernets2datacommitteeCallerSession) VerifySignatures(signedHash [32]byte, signaturesAndAddrs []byte) error { + return _Supernets2datacommittee.Contract.VerifySignatures(&_Supernets2datacommittee.CallOpts, signedHash, signaturesAndAddrs) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_Supernets2datacommittee *Supernets2datacommitteeTransactor) Initialize(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2datacommittee.contract.Transact(opts, "initialize") +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_Supernets2datacommittee *Supernets2datacommitteeSession) Initialize() (*types.Transaction, error) { + return _Supernets2datacommittee.Contract.Initialize(&_Supernets2datacommittee.TransactOpts) +} + +// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. +// +// Solidity: function initialize() returns() +func (_Supernets2datacommittee *Supernets2datacommitteeTransactorSession) Initialize() (*types.Transaction, error) { + return _Supernets2datacommittee.Contract.Initialize(&_Supernets2datacommittee.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Supernets2datacommittee *Supernets2datacommitteeTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2datacommittee.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Supernets2datacommittee *Supernets2datacommitteeSession) RenounceOwnership() (*types.Transaction, error) { + return _Supernets2datacommittee.Contract.RenounceOwnership(&_Supernets2datacommittee.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Supernets2datacommittee *Supernets2datacommitteeTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Supernets2datacommittee.Contract.RenounceOwnership(&_Supernets2datacommittee.TransactOpts) +} + +// SetupCommittee is a paid mutator transaction binding the contract method 0x078fba2a. +// +// Solidity: function setupCommittee(uint256 _requiredAmountOfSignatures, string[] urls, bytes addrsBytes) returns() +func (_Supernets2datacommittee *Supernets2datacommitteeTransactor) SetupCommittee(opts *bind.TransactOpts, _requiredAmountOfSignatures *big.Int, urls []string, addrsBytes []byte) (*types.Transaction, error) { + return _Supernets2datacommittee.contract.Transact(opts, "setupCommittee", _requiredAmountOfSignatures, urls, addrsBytes) +} + +// SetupCommittee is a paid mutator transaction binding the contract method 0x078fba2a. +// +// Solidity: function setupCommittee(uint256 _requiredAmountOfSignatures, string[] urls, bytes addrsBytes) returns() +func (_Supernets2datacommittee *Supernets2datacommitteeSession) SetupCommittee(_requiredAmountOfSignatures *big.Int, urls []string, addrsBytes []byte) (*types.Transaction, error) { + return _Supernets2datacommittee.Contract.SetupCommittee(&_Supernets2datacommittee.TransactOpts, _requiredAmountOfSignatures, urls, addrsBytes) +} + +// SetupCommittee is a paid mutator transaction binding the contract method 0x078fba2a. +// +// Solidity: function setupCommittee(uint256 _requiredAmountOfSignatures, string[] urls, bytes addrsBytes) returns() +func (_Supernets2datacommittee *Supernets2datacommitteeTransactorSession) SetupCommittee(_requiredAmountOfSignatures *big.Int, urls []string, addrsBytes []byte) (*types.Transaction, error) { + return _Supernets2datacommittee.Contract.SetupCommittee(&_Supernets2datacommittee.TransactOpts, _requiredAmountOfSignatures, urls, addrsBytes) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Supernets2datacommittee *Supernets2datacommitteeTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Supernets2datacommittee.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Supernets2datacommittee *Supernets2datacommitteeSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Supernets2datacommittee.Contract.TransferOwnership(&_Supernets2datacommittee.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Supernets2datacommittee *Supernets2datacommitteeTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Supernets2datacommittee.Contract.TransferOwnership(&_Supernets2datacommittee.TransactOpts, newOwner) +} + +// Supernets2datacommitteeCommitteeUpdatedIterator is returned from FilterCommitteeUpdated and is used to iterate over the raw logs and unpacked data for CommitteeUpdated events raised by the Supernets2datacommittee contract. +type Supernets2datacommitteeCommitteeUpdatedIterator struct { + Event *Supernets2datacommitteeCommitteeUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2datacommitteeCommitteeUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2datacommitteeCommitteeUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2datacommitteeCommitteeUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2datacommitteeCommitteeUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2datacommitteeCommitteeUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2datacommitteeCommitteeUpdated represents a CommitteeUpdated event raised by the Supernets2datacommittee contract. +type Supernets2datacommitteeCommitteeUpdated struct { + CommitteeHash [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCommitteeUpdated is a free log retrieval operation binding the contract event 0x831403fd381b3e6ac875d912ec2eee0e0203d0d29f7b3e0c96fc8f582d6db657. +// +// Solidity: event CommitteeUpdated(bytes32 committeeHash) +func (_Supernets2datacommittee *Supernets2datacommitteeFilterer) FilterCommitteeUpdated(opts *bind.FilterOpts) (*Supernets2datacommitteeCommitteeUpdatedIterator, error) { + + logs, sub, err := _Supernets2datacommittee.contract.FilterLogs(opts, "CommitteeUpdated") + if err != nil { + return nil, err + } + return &Supernets2datacommitteeCommitteeUpdatedIterator{contract: _Supernets2datacommittee.contract, event: "CommitteeUpdated", logs: logs, sub: sub}, nil +} + +// WatchCommitteeUpdated is a free log subscription operation binding the contract event 0x831403fd381b3e6ac875d912ec2eee0e0203d0d29f7b3e0c96fc8f582d6db657. +// +// Solidity: event CommitteeUpdated(bytes32 committeeHash) +func (_Supernets2datacommittee *Supernets2datacommitteeFilterer) WatchCommitteeUpdated(opts *bind.WatchOpts, sink chan<- *Supernets2datacommitteeCommitteeUpdated) (event.Subscription, error) { + + logs, sub, err := _Supernets2datacommittee.contract.WatchLogs(opts, "CommitteeUpdated") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2datacommitteeCommitteeUpdated) + if err := _Supernets2datacommittee.contract.UnpackLog(event, "CommitteeUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCommitteeUpdated is a log parse operation binding the contract event 0x831403fd381b3e6ac875d912ec2eee0e0203d0d29f7b3e0c96fc8f582d6db657. +// +// Solidity: event CommitteeUpdated(bytes32 committeeHash) +func (_Supernets2datacommittee *Supernets2datacommitteeFilterer) ParseCommitteeUpdated(log types.Log) (*Supernets2datacommitteeCommitteeUpdated, error) { + event := new(Supernets2datacommitteeCommitteeUpdated) + if err := _Supernets2datacommittee.contract.UnpackLog(event, "CommitteeUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2datacommitteeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Supernets2datacommittee contract. +type Supernets2datacommitteeInitializedIterator struct { + Event *Supernets2datacommitteeInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2datacommitteeInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2datacommitteeInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2datacommitteeInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2datacommitteeInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2datacommitteeInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2datacommitteeInitialized represents a Initialized event raised by the Supernets2datacommittee contract. +type Supernets2datacommitteeInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Supernets2datacommittee *Supernets2datacommitteeFilterer) FilterInitialized(opts *bind.FilterOpts) (*Supernets2datacommitteeInitializedIterator, error) { + + logs, sub, err := _Supernets2datacommittee.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &Supernets2datacommitteeInitializedIterator{contract: _Supernets2datacommittee.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Supernets2datacommittee *Supernets2datacommitteeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *Supernets2datacommitteeInitialized) (event.Subscription, error) { + + logs, sub, err := _Supernets2datacommittee.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2datacommitteeInitialized) + if err := _Supernets2datacommittee.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Supernets2datacommittee *Supernets2datacommitteeFilterer) ParseInitialized(log types.Log) (*Supernets2datacommitteeInitialized, error) { + event := new(Supernets2datacommitteeInitialized) + if err := _Supernets2datacommittee.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Supernets2datacommitteeOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Supernets2datacommittee contract. +type Supernets2datacommitteeOwnershipTransferredIterator struct { + Event *Supernets2datacommitteeOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2datacommitteeOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2datacommitteeOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2datacommitteeOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2datacommitteeOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2datacommitteeOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2datacommitteeOwnershipTransferred represents a OwnershipTransferred event raised by the Supernets2datacommittee contract. +type Supernets2datacommitteeOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Supernets2datacommittee *Supernets2datacommitteeFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*Supernets2datacommitteeOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Supernets2datacommittee.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &Supernets2datacommitteeOwnershipTransferredIterator{contract: _Supernets2datacommittee.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Supernets2datacommittee *Supernets2datacommitteeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *Supernets2datacommitteeOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Supernets2datacommittee.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2datacommitteeOwnershipTransferred) + if err := _Supernets2datacommittee.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Supernets2datacommittee *Supernets2datacommitteeFilterer) ParseOwnershipTransferred(log types.Log) (*Supernets2datacommitteeOwnershipTransferred, error) { + event := new(Supernets2datacommitteeOwnershipTransferred) + if err := _Supernets2datacommittee.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/etherman/smartcontracts/supernets2globalexitroot/supernets2globalexitroot.go b/etherman/smartcontracts/supernets2globalexitroot/supernets2globalexitroot.go new file mode 100644 index 00000000..85f0cd19 --- /dev/null +++ b/etherman/smartcontracts/supernets2globalexitroot/supernets2globalexitroot.go @@ -0,0 +1,563 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package supernets2globalexitroot + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// Supernets2globalexitrootMetaData contains all meta data concerning the Supernets2globalexitroot contract. +var Supernets2globalexitrootMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rollupAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridgeAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"OnlyAllowedContracts\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"mainnetExitRoot\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"rollupExitRoot\",\"type\":\"bytes32\"}],\"name\":\"UpdateGlobalExitRoot\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridgeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastGlobalExitRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"globalExitRootMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastMainnetExitRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRollupExitRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rollupAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"newRoot\",\"type\":\"bytes32\"}],\"name\":\"updateExitRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60c060405234801561001057600080fd5b506040516103f83803806103f883398101604081905261002f91610062565b6001600160a01b0391821660a05216608052610095565b80516001600160a01b038116811461005d57600080fd5b919050565b6000806040838503121561007557600080fd5b61007e83610046565b915061008c60208401610046565b90509250929050565b60805160a0516103316100c76000396000818160e901526101bd015260008181610135015261017401526103316000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806333d6247d1161005b57806333d6247d146100c75780633ed691ef146100dc5780635ec6a8df146100e4578063a3c573eb1461013057600080fd5b806301fd904414610082578063257b36321461009e578063319cf735146100be575b600080fd5b61008b60005481565b6040519081526020015b60405180910390f35b61008b6100ac3660046102e2565b60026020526000908152604090205481565b61008b60015481565b6100da6100d53660046102e2565b610157565b005b61008b6102a6565b61010b7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610095565b61010b7f000000000000000000000000000000000000000000000000000000000000000081565b60005460015473ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036101a65750600182905581610222565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001633036101f0576000839055829150610222565b6040517fb49365dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051602080820184905281830185905282518083038401815260609092019092528051910120600090600081815260026020526040812054919250036102a05760008181526002602052604080822042905551849184917f61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce39190a35b50505050565b60006102dd600154600054604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b905090565b6000602082840312156102f457600080fd5b503591905056fea26469706673582212203c4d2d0547a17af6dc140c2a13674ce2911241efa8d9600104536fdae5d3693664736f6c63430008110033", +} + +// Supernets2globalexitrootABI is the input ABI used to generate the binding from. +// Deprecated: Use Supernets2globalexitrootMetaData.ABI instead. +var Supernets2globalexitrootABI = Supernets2globalexitrootMetaData.ABI + +// Supernets2globalexitrootBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use Supernets2globalexitrootMetaData.Bin instead. +var Supernets2globalexitrootBin = Supernets2globalexitrootMetaData.Bin + +// DeploySupernets2globalexitroot deploys a new Ethereum contract, binding an instance of Supernets2globalexitroot to it. +func DeploySupernets2globalexitroot(auth *bind.TransactOpts, backend bind.ContractBackend, _rollupAddress common.Address, _bridgeAddress common.Address) (common.Address, *types.Transaction, *Supernets2globalexitroot, error) { + parsed, err := Supernets2globalexitrootMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(Supernets2globalexitrootBin), backend, _rollupAddress, _bridgeAddress) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Supernets2globalexitroot{Supernets2globalexitrootCaller: Supernets2globalexitrootCaller{contract: contract}, Supernets2globalexitrootTransactor: Supernets2globalexitrootTransactor{contract: contract}, Supernets2globalexitrootFilterer: Supernets2globalexitrootFilterer{contract: contract}}, nil +} + +// Supernets2globalexitroot is an auto generated Go binding around an Ethereum contract. +type Supernets2globalexitroot struct { + Supernets2globalexitrootCaller // Read-only binding to the contract + Supernets2globalexitrootTransactor // Write-only binding to the contract + Supernets2globalexitrootFilterer // Log filterer for contract events +} + +// Supernets2globalexitrootCaller is an auto generated read-only Go binding around an Ethereum contract. +type Supernets2globalexitrootCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Supernets2globalexitrootTransactor is an auto generated write-only Go binding around an Ethereum contract. +type Supernets2globalexitrootTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Supernets2globalexitrootFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type Supernets2globalexitrootFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Supernets2globalexitrootSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type Supernets2globalexitrootSession struct { + Contract *Supernets2globalexitroot // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// Supernets2globalexitrootCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type Supernets2globalexitrootCallerSession struct { + Contract *Supernets2globalexitrootCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// Supernets2globalexitrootTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type Supernets2globalexitrootTransactorSession struct { + Contract *Supernets2globalexitrootTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// Supernets2globalexitrootRaw is an auto generated low-level Go binding around an Ethereum contract. +type Supernets2globalexitrootRaw struct { + Contract *Supernets2globalexitroot // Generic contract binding to access the raw methods on +} + +// Supernets2globalexitrootCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type Supernets2globalexitrootCallerRaw struct { + Contract *Supernets2globalexitrootCaller // Generic read-only contract binding to access the raw methods on +} + +// Supernets2globalexitrootTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type Supernets2globalexitrootTransactorRaw struct { + Contract *Supernets2globalexitrootTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSupernets2globalexitroot creates a new instance of Supernets2globalexitroot, bound to a specific deployed contract. +func NewSupernets2globalexitroot(address common.Address, backend bind.ContractBackend) (*Supernets2globalexitroot, error) { + contract, err := bindSupernets2globalexitroot(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Supernets2globalexitroot{Supernets2globalexitrootCaller: Supernets2globalexitrootCaller{contract: contract}, Supernets2globalexitrootTransactor: Supernets2globalexitrootTransactor{contract: contract}, Supernets2globalexitrootFilterer: Supernets2globalexitrootFilterer{contract: contract}}, nil +} + +// NewSupernets2globalexitrootCaller creates a new read-only instance of Supernets2globalexitroot, bound to a specific deployed contract. +func NewSupernets2globalexitrootCaller(address common.Address, caller bind.ContractCaller) (*Supernets2globalexitrootCaller, error) { + contract, err := bindSupernets2globalexitroot(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &Supernets2globalexitrootCaller{contract: contract}, nil +} + +// NewSupernets2globalexitrootTransactor creates a new write-only instance of Supernets2globalexitroot, bound to a specific deployed contract. +func NewSupernets2globalexitrootTransactor(address common.Address, transactor bind.ContractTransactor) (*Supernets2globalexitrootTransactor, error) { + contract, err := bindSupernets2globalexitroot(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &Supernets2globalexitrootTransactor{contract: contract}, nil +} + +// NewSupernets2globalexitrootFilterer creates a new log filterer instance of Supernets2globalexitroot, bound to a specific deployed contract. +func NewSupernets2globalexitrootFilterer(address common.Address, filterer bind.ContractFilterer) (*Supernets2globalexitrootFilterer, error) { + contract, err := bindSupernets2globalexitroot(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &Supernets2globalexitrootFilterer{contract: contract}, nil +} + +// bindSupernets2globalexitroot binds a generic wrapper to an already deployed contract. +func bindSupernets2globalexitroot(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := Supernets2globalexitrootMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Supernets2globalexitroot *Supernets2globalexitrootRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Supernets2globalexitroot.Contract.Supernets2globalexitrootCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Supernets2globalexitroot *Supernets2globalexitrootRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2globalexitroot.Contract.Supernets2globalexitrootTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Supernets2globalexitroot *Supernets2globalexitrootRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Supernets2globalexitroot.Contract.Supernets2globalexitrootTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Supernets2globalexitroot *Supernets2globalexitrootCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Supernets2globalexitroot.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Supernets2globalexitroot *Supernets2globalexitrootTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Supernets2globalexitroot.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Supernets2globalexitroot *Supernets2globalexitrootTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Supernets2globalexitroot.Contract.contract.Transact(opts, method, params...) +} + +// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. +// +// Solidity: function bridgeAddress() view returns(address) +func (_Supernets2globalexitroot *Supernets2globalexitrootCaller) BridgeAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2globalexitroot.contract.Call(opts, &out, "bridgeAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. +// +// Solidity: function bridgeAddress() view returns(address) +func (_Supernets2globalexitroot *Supernets2globalexitrootSession) BridgeAddress() (common.Address, error) { + return _Supernets2globalexitroot.Contract.BridgeAddress(&_Supernets2globalexitroot.CallOpts) +} + +// BridgeAddress is a free data retrieval call binding the contract method 0xa3c573eb. +// +// Solidity: function bridgeAddress() view returns(address) +func (_Supernets2globalexitroot *Supernets2globalexitrootCallerSession) BridgeAddress() (common.Address, error) { + return _Supernets2globalexitroot.Contract.BridgeAddress(&_Supernets2globalexitroot.CallOpts) +} + +// GetLastGlobalExitRoot is a free data retrieval call binding the contract method 0x3ed691ef. +// +// Solidity: function getLastGlobalExitRoot() view returns(bytes32) +func (_Supernets2globalexitroot *Supernets2globalexitrootCaller) GetLastGlobalExitRoot(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Supernets2globalexitroot.contract.Call(opts, &out, "getLastGlobalExitRoot") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetLastGlobalExitRoot is a free data retrieval call binding the contract method 0x3ed691ef. +// +// Solidity: function getLastGlobalExitRoot() view returns(bytes32) +func (_Supernets2globalexitroot *Supernets2globalexitrootSession) GetLastGlobalExitRoot() ([32]byte, error) { + return _Supernets2globalexitroot.Contract.GetLastGlobalExitRoot(&_Supernets2globalexitroot.CallOpts) +} + +// GetLastGlobalExitRoot is a free data retrieval call binding the contract method 0x3ed691ef. +// +// Solidity: function getLastGlobalExitRoot() view returns(bytes32) +func (_Supernets2globalexitroot *Supernets2globalexitrootCallerSession) GetLastGlobalExitRoot() ([32]byte, error) { + return _Supernets2globalexitroot.Contract.GetLastGlobalExitRoot(&_Supernets2globalexitroot.CallOpts) +} + +// GlobalExitRootMap is a free data retrieval call binding the contract method 0x257b3632. +// +// Solidity: function globalExitRootMap(bytes32 ) view returns(uint256) +func (_Supernets2globalexitroot *Supernets2globalexitrootCaller) GlobalExitRootMap(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { + var out []interface{} + err := _Supernets2globalexitroot.contract.Call(opts, &out, "globalExitRootMap", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GlobalExitRootMap is a free data retrieval call binding the contract method 0x257b3632. +// +// Solidity: function globalExitRootMap(bytes32 ) view returns(uint256) +func (_Supernets2globalexitroot *Supernets2globalexitrootSession) GlobalExitRootMap(arg0 [32]byte) (*big.Int, error) { + return _Supernets2globalexitroot.Contract.GlobalExitRootMap(&_Supernets2globalexitroot.CallOpts, arg0) +} + +// GlobalExitRootMap is a free data retrieval call binding the contract method 0x257b3632. +// +// Solidity: function globalExitRootMap(bytes32 ) view returns(uint256) +func (_Supernets2globalexitroot *Supernets2globalexitrootCallerSession) GlobalExitRootMap(arg0 [32]byte) (*big.Int, error) { + return _Supernets2globalexitroot.Contract.GlobalExitRootMap(&_Supernets2globalexitroot.CallOpts, arg0) +} + +// LastMainnetExitRoot is a free data retrieval call binding the contract method 0x319cf735. +// +// Solidity: function lastMainnetExitRoot() view returns(bytes32) +func (_Supernets2globalexitroot *Supernets2globalexitrootCaller) LastMainnetExitRoot(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Supernets2globalexitroot.contract.Call(opts, &out, "lastMainnetExitRoot") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// LastMainnetExitRoot is a free data retrieval call binding the contract method 0x319cf735. +// +// Solidity: function lastMainnetExitRoot() view returns(bytes32) +func (_Supernets2globalexitroot *Supernets2globalexitrootSession) LastMainnetExitRoot() ([32]byte, error) { + return _Supernets2globalexitroot.Contract.LastMainnetExitRoot(&_Supernets2globalexitroot.CallOpts) +} + +// LastMainnetExitRoot is a free data retrieval call binding the contract method 0x319cf735. +// +// Solidity: function lastMainnetExitRoot() view returns(bytes32) +func (_Supernets2globalexitroot *Supernets2globalexitrootCallerSession) LastMainnetExitRoot() ([32]byte, error) { + return _Supernets2globalexitroot.Contract.LastMainnetExitRoot(&_Supernets2globalexitroot.CallOpts) +} + +// LastRollupExitRoot is a free data retrieval call binding the contract method 0x01fd9044. +// +// Solidity: function lastRollupExitRoot() view returns(bytes32) +func (_Supernets2globalexitroot *Supernets2globalexitrootCaller) LastRollupExitRoot(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Supernets2globalexitroot.contract.Call(opts, &out, "lastRollupExitRoot") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// LastRollupExitRoot is a free data retrieval call binding the contract method 0x01fd9044. +// +// Solidity: function lastRollupExitRoot() view returns(bytes32) +func (_Supernets2globalexitroot *Supernets2globalexitrootSession) LastRollupExitRoot() ([32]byte, error) { + return _Supernets2globalexitroot.Contract.LastRollupExitRoot(&_Supernets2globalexitroot.CallOpts) +} + +// LastRollupExitRoot is a free data retrieval call binding the contract method 0x01fd9044. +// +// Solidity: function lastRollupExitRoot() view returns(bytes32) +func (_Supernets2globalexitroot *Supernets2globalexitrootCallerSession) LastRollupExitRoot() ([32]byte, error) { + return _Supernets2globalexitroot.Contract.LastRollupExitRoot(&_Supernets2globalexitroot.CallOpts) +} + +// RollupAddress is a free data retrieval call binding the contract method 0x5ec6a8df. +// +// Solidity: function rollupAddress() view returns(address) +func (_Supernets2globalexitroot *Supernets2globalexitrootCaller) RollupAddress(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Supernets2globalexitroot.contract.Call(opts, &out, "rollupAddress") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// RollupAddress is a free data retrieval call binding the contract method 0x5ec6a8df. +// +// Solidity: function rollupAddress() view returns(address) +func (_Supernets2globalexitroot *Supernets2globalexitrootSession) RollupAddress() (common.Address, error) { + return _Supernets2globalexitroot.Contract.RollupAddress(&_Supernets2globalexitroot.CallOpts) +} + +// RollupAddress is a free data retrieval call binding the contract method 0x5ec6a8df. +// +// Solidity: function rollupAddress() view returns(address) +func (_Supernets2globalexitroot *Supernets2globalexitrootCallerSession) RollupAddress() (common.Address, error) { + return _Supernets2globalexitroot.Contract.RollupAddress(&_Supernets2globalexitroot.CallOpts) +} + +// UpdateExitRoot is a paid mutator transaction binding the contract method 0x33d6247d. +// +// Solidity: function updateExitRoot(bytes32 newRoot) returns() +func (_Supernets2globalexitroot *Supernets2globalexitrootTransactor) UpdateExitRoot(opts *bind.TransactOpts, newRoot [32]byte) (*types.Transaction, error) { + return _Supernets2globalexitroot.contract.Transact(opts, "updateExitRoot", newRoot) +} + +// UpdateExitRoot is a paid mutator transaction binding the contract method 0x33d6247d. +// +// Solidity: function updateExitRoot(bytes32 newRoot) returns() +func (_Supernets2globalexitroot *Supernets2globalexitrootSession) UpdateExitRoot(newRoot [32]byte) (*types.Transaction, error) { + return _Supernets2globalexitroot.Contract.UpdateExitRoot(&_Supernets2globalexitroot.TransactOpts, newRoot) +} + +// UpdateExitRoot is a paid mutator transaction binding the contract method 0x33d6247d. +// +// Solidity: function updateExitRoot(bytes32 newRoot) returns() +func (_Supernets2globalexitroot *Supernets2globalexitrootTransactorSession) UpdateExitRoot(newRoot [32]byte) (*types.Transaction, error) { + return _Supernets2globalexitroot.Contract.UpdateExitRoot(&_Supernets2globalexitroot.TransactOpts, newRoot) +} + +// Supernets2globalexitrootUpdateGlobalExitRootIterator is returned from FilterUpdateGlobalExitRoot and is used to iterate over the raw logs and unpacked data for UpdateGlobalExitRoot events raised by the Supernets2globalexitroot contract. +type Supernets2globalexitrootUpdateGlobalExitRootIterator struct { + Event *Supernets2globalexitrootUpdateGlobalExitRoot // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Supernets2globalexitrootUpdateGlobalExitRootIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Supernets2globalexitrootUpdateGlobalExitRoot) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Supernets2globalexitrootUpdateGlobalExitRoot) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Supernets2globalexitrootUpdateGlobalExitRootIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Supernets2globalexitrootUpdateGlobalExitRootIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Supernets2globalexitrootUpdateGlobalExitRoot represents a UpdateGlobalExitRoot event raised by the Supernets2globalexitroot contract. +type Supernets2globalexitrootUpdateGlobalExitRoot struct { + MainnetExitRoot [32]byte + RollupExitRoot [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdateGlobalExitRoot is a free log retrieval operation binding the contract event 0x61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce3. +// +// Solidity: event UpdateGlobalExitRoot(bytes32 indexed mainnetExitRoot, bytes32 indexed rollupExitRoot) +func (_Supernets2globalexitroot *Supernets2globalexitrootFilterer) FilterUpdateGlobalExitRoot(opts *bind.FilterOpts, mainnetExitRoot [][32]byte, rollupExitRoot [][32]byte) (*Supernets2globalexitrootUpdateGlobalExitRootIterator, error) { + + var mainnetExitRootRule []interface{} + for _, mainnetExitRootItem := range mainnetExitRoot { + mainnetExitRootRule = append(mainnetExitRootRule, mainnetExitRootItem) + } + var rollupExitRootRule []interface{} + for _, rollupExitRootItem := range rollupExitRoot { + rollupExitRootRule = append(rollupExitRootRule, rollupExitRootItem) + } + + logs, sub, err := _Supernets2globalexitroot.contract.FilterLogs(opts, "UpdateGlobalExitRoot", mainnetExitRootRule, rollupExitRootRule) + if err != nil { + return nil, err + } + return &Supernets2globalexitrootUpdateGlobalExitRootIterator{contract: _Supernets2globalexitroot.contract, event: "UpdateGlobalExitRoot", logs: logs, sub: sub}, nil +} + +// WatchUpdateGlobalExitRoot is a free log subscription operation binding the contract event 0x61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce3. +// +// Solidity: event UpdateGlobalExitRoot(bytes32 indexed mainnetExitRoot, bytes32 indexed rollupExitRoot) +func (_Supernets2globalexitroot *Supernets2globalexitrootFilterer) WatchUpdateGlobalExitRoot(opts *bind.WatchOpts, sink chan<- *Supernets2globalexitrootUpdateGlobalExitRoot, mainnetExitRoot [][32]byte, rollupExitRoot [][32]byte) (event.Subscription, error) { + + var mainnetExitRootRule []interface{} + for _, mainnetExitRootItem := range mainnetExitRoot { + mainnetExitRootRule = append(mainnetExitRootRule, mainnetExitRootItem) + } + var rollupExitRootRule []interface{} + for _, rollupExitRootItem := range rollupExitRoot { + rollupExitRootRule = append(rollupExitRootRule, rollupExitRootItem) + } + + logs, sub, err := _Supernets2globalexitroot.contract.WatchLogs(opts, "UpdateGlobalExitRoot", mainnetExitRootRule, rollupExitRootRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Supernets2globalexitrootUpdateGlobalExitRoot) + if err := _Supernets2globalexitroot.contract.UnpackLog(event, "UpdateGlobalExitRoot", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpdateGlobalExitRoot is a log parse operation binding the contract event 0x61014378f82a0d809aefaf87a8ac9505b89c321808287a6e7810f29304c1fce3. +// +// Solidity: event UpdateGlobalExitRoot(bytes32 indexed mainnetExitRoot, bytes32 indexed rollupExitRoot) +func (_Supernets2globalexitroot *Supernets2globalexitrootFilterer) ParseUpdateGlobalExitRoot(log types.Log) (*Supernets2globalexitrootUpdateGlobalExitRoot, error) { + event := new(Supernets2globalexitrootUpdateGlobalExitRoot) + if err := _Supernets2globalexitroot.contract.UnpackLog(event, "UpdateGlobalExitRoot", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/etherman/types.go b/etherman/types.go index 9e07a2fb..0e2a87c3 100644 --- a/etherman/types.go +++ b/etherman/types.go @@ -3,7 +3,7 @@ package etherman import ( "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" "github.com/ethereum/go-ethereum/common" ) @@ -36,7 +36,7 @@ type SequencedBatch struct { TxHash common.Hash Nonce uint64 Coinbase common.Address - polygonzkevm.PolygonZkEVMBatchData + supernets2.Supernets2BatchData } // ForcedBatch represents a ForcedBatch @@ -65,7 +65,7 @@ type SequencedForceBatch struct { TxHash common.Hash Timestamp time.Time Nonce uint64 - polygonzkevm.PolygonZkEVMForcedBatchData + supernets2.Supernets2ForcedBatchData } // ForkID is a sturct to track the ForkID event. diff --git a/etherman/types/finalproofinputs.go b/etherman/types/finalproofinputs.go index f5686691..2b17f297 100644 --- a/etherman/types/finalproofinputs.go +++ b/etherman/types/finalproofinputs.go @@ -1,6 +1,6 @@ package types -import "github.com/0xPolygonHermez/zkevm-node/aggregator/pb" +import "github.com/0xPolygon/supernets2-node/aggregator/pb" // FinalProofInputs struct type FinalProofInputs struct { diff --git a/ethtxmanager/config.go b/ethtxmanager/config.go index 3bf486bc..e3eb9180 100644 --- a/ethtxmanager/config.go +++ b/ethtxmanager/config.go @@ -1,6 +1,6 @@ package ethtxmanager -import "github.com/0xPolygonHermez/zkevm-node/config/types" +import "github.com/0xPolygon/supernets2-node/config/types" // Config is configuration for ethereum transaction manager type Config struct { diff --git a/ethtxmanager/ethtxmanager.go b/ethtxmanager/ethtxmanager.go index e7099afd..93b5e84c 100644 --- a/ethtxmanager/ethtxmanager.go +++ b/ethtxmanager/ethtxmanager.go @@ -11,8 +11,8 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/ethtxmanager/ethtxmanager_test.go b/ethtxmanager/ethtxmanager_test.go index 9d5b4e2b..901979d6 100644 --- a/ethtxmanager/ethtxmanager_test.go +++ b/ethtxmanager/ethtxmanager_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" + "github.com/0xPolygon/supernets2-node/config/types" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/dbutils" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" diff --git a/ethtxmanager/interfaces.go b/ethtxmanager/interfaces.go index 304e6fd1..d578e447 100644 --- a/ethtxmanager/interfaces.go +++ b/ethtxmanager/interfaces.go @@ -5,7 +5,7 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" diff --git a/ethtxmanager/mock_state_test.go b/ethtxmanager/mock_state_test.go index befb5963..429d6d18 100644 --- a/ethtxmanager/mock_state_test.go +++ b/ethtxmanager/mock_state_test.go @@ -9,7 +9,7 @@ import ( pgx "github.com/jackc/pgx/v4" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/supernets2-node/state" ) // stateMock is an autogenerated mock type for the stateInterface type diff --git a/ethtxmanager/pgstorage.go b/ethtxmanager/pgstorage.go index b9d611cc..9dc2f2de 100644 --- a/ethtxmanager/pgstorage.go +++ b/ethtxmanager/pgstorage.go @@ -7,7 +7,7 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/db" + "github.com/0xPolygon/supernets2-node/db" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgconn" "github.com/jackc/pgx/v4" diff --git a/ethtxmanager/pgstorage_test.go b/ethtxmanager/pgstorage_test.go index be20b2d4..35c7c72c 100644 --- a/ethtxmanager/pgstorage_test.go +++ b/ethtxmanager/pgstorage_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" + "github.com/0xPolygon/supernets2-node/test/dbutils" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/event/config.go b/event/config.go index cae1dbc8..642bf905 100644 --- a/event/config.go +++ b/event/config.go @@ -1,6 +1,6 @@ package event -import "github.com/0xPolygonHermez/zkevm-node/db" +import "github.com/0xPolygon/supernets2-node/db" // Config for event type Config struct { diff --git a/event/eventlog.go b/event/eventlog.go index 4c1f0ce0..5196e1d6 100644 --- a/event/eventlog.go +++ b/event/eventlog.go @@ -5,8 +5,8 @@ import ( "encoding/json" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" ) // EventLog is the main struct for the event log diff --git a/event/eventlog_test.go b/event/eventlog_test.go index c77dc209..151f63f8 100644 --- a/event/eventlog_test.go +++ b/event/eventlog_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/pgeventstorage" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/event/pgeventstorage" + "github.com/0xPolygon/supernets2-node/test/dbutils" "github.com/stretchr/testify/require" "golang.org/x/net/context" ) diff --git a/event/nileventstorage/nileventstorage.go b/event/nileventstorage/nileventstorage.go index 0fa65581..83723606 100644 --- a/event/nileventstorage/nileventstorage.go +++ b/event/nileventstorage/nileventstorage.go @@ -3,8 +3,8 @@ package nileventstorage import ( "context" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/log" ) // NilEventStorage is an implementation of the event storage interface diff --git a/event/pgeventstorage/pgeventstorage.go b/event/pgeventstorage/pgeventstorage.go index 93839524..b40fd926 100644 --- a/event/pgeventstorage/pgeventstorage.go +++ b/event/pgeventstorage/pgeventstorage.go @@ -3,9 +3,9 @@ package pgeventstorage import ( "context" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/event/nileventstorage" "github.com/jackc/pgx/v4/pgxpool" ) diff --git a/gasprice/config.go b/gasprice/config.go index 4ab42d27..c3dd7af1 100644 --- a/gasprice/config.go +++ b/gasprice/config.go @@ -3,7 +3,7 @@ package gasprice import ( "math/big" - "github.com/0xPolygonHermez/zkevm-node/config/types" + "github.com/0xPolygon/supernets2-node/config/types" ) // EstimatorType different gas estimator types. diff --git a/gasprice/default_test.go b/gasprice/default_test.go index 7a2622eb..140a7490 100644 --- a/gasprice/default_test.go +++ b/gasprice/default_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" ) func init() { diff --git a/gasprice/follower.go b/gasprice/follower.go index adfc4784..eca7a190 100644 --- a/gasprice/follower.go +++ b/gasprice/follower.go @@ -6,8 +6,8 @@ import ( "math/big" "strconv" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/log" ) // FollowerGasPrice struct. diff --git a/gasprice/follower_test.go b/gasprice/follower_test.go index 206f3ec9..eef88766 100644 --- a/gasprice/follower_test.go +++ b/gasprice/follower_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/config/types" + "github.com/0xPolygon/supernets2-node/log" ) func init() { diff --git a/gasprice/gaspricesuggester.go b/gasprice/gaspricesuggester.go index 63aebe78..b71e3b6c 100644 --- a/gasprice/gaspricesuggester.go +++ b/gasprice/gaspricesuggester.go @@ -4,9 +4,9 @@ import ( "context" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/etherman" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" ) // L2GasPricer interface for gas price suggester. diff --git a/gasprice/lastnbatches.go b/gasprice/lastnbatches.go index 80346afd..da85aa30 100644 --- a/gasprice/lastnbatches.go +++ b/gasprice/lastnbatches.go @@ -6,7 +6,7 @@ import ( "sort" "sync" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" ) const sampleNumber = 3 // Number of transactions sampled in a batch. diff --git a/go.mod b/go.mod index 823f321e..278d3edb 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,10 @@ -module github.com/0xPolygonHermez/zkevm-node +module github.com/0xPolygon/supernets2-node go 1.19 require ( + github.com/0xPolygon/supernets2-data-availability v0.0.0-20230706174409-c13d92e1e0a5 + github.com/0xPolygonHermez/zkevm-node v0.1.0-RC8.0.20230601153103-86d9fb808691 github.com/didip/tollbooth/v6 v6.1.2 github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7 github.com/ethereum/go-ethereum v1.12.0 @@ -95,6 +97,7 @@ require ( github.com/markbates/safe v1.0.1 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/miguelmota/go-solidity-sha3 v0.1.1 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect diff --git a/go.sum b/go.sum index 2c3abe3b..07e7d8e3 100644 --- a/go.sum +++ b/go.sum @@ -40,6 +40,10 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/0xPolygon/supernets2-data-availability v0.0.0-20230706174409-c13d92e1e0a5 h1:/k92Ls5a0gGEh88n2ELqA/mbfSTyltdlzspDAL8joxA= +github.com/0xPolygon/supernets2-data-availability v0.0.0-20230706174409-c13d92e1e0a5/go.mod h1:ZXpi5j1IJlnlzZKN2ZmM9mPp0ol6zCGwWiMrMoaxnyU= +github.com/0xPolygonHermez/zkevm-node v0.1.0-RC8.0.20230601153103-86d9fb808691 h1:PTbLJ6HEQ9J0CzKrv62n/l4GsGYygyAVX4kRAWY530Q= +github.com/0xPolygonHermez/zkevm-node v0.1.0-RC8.0.20230601153103-86d9fb808691/go.mod h1:6/9FEzpZVSQJaRY5iAJpwIanokNQWkbl1yUP5mUbShA= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -565,6 +569,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfr github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miguelmota/go-solidity-sha3 v0.1.1 h1:3Y08sKZDtudtE5kbTBPC9RYJznoSYyWI9VD6mghU0CA= +github.com/miguelmota/go-solidity-sha3 v0.1.1/go.mod h1:sax1FvQF+f71j8W1uUHMZn8NxKyl5rYLks2nqj8RFEw= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= diff --git a/jsonrpc/client/client.go b/jsonrpc/client/client.go index 7ae00577..cac0dcb1 100644 --- a/jsonrpc/client/client.go +++ b/jsonrpc/client/client.go @@ -7,7 +7,7 @@ import ( "io" "net/http" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" ) // Client defines typed wrappers for the zkEVM RPC API. diff --git a/jsonrpc/client/zkevm.go b/jsonrpc/client/zkevm.go index f2e78aa4..d37af844 100644 --- a/jsonrpc/client/zkevm.go +++ b/jsonrpc/client/zkevm.go @@ -6,8 +6,8 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" ) // BatchNumber returns the latest batch number diff --git a/jsonrpc/config.go b/jsonrpc/config.go index 5284c671..a6085700 100644 --- a/jsonrpc/config.go +++ b/jsonrpc/config.go @@ -1,6 +1,6 @@ package jsonrpc -import "github.com/0xPolygonHermez/zkevm-node/config/types" +import "github.com/0xPolygon/supernets2-node/config/types" // Config represents the configuration of the json rpc type Config struct { diff --git a/jsonrpc/dbtxmanager.go b/jsonrpc/dbtxmanager.go index 0b294469..59dcf295 100644 --- a/jsonrpc/dbtxmanager.go +++ b/jsonrpc/dbtxmanager.go @@ -3,7 +3,7 @@ package jsonrpc import ( "context" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" "github.com/jackc/pgx/v4" ) diff --git a/jsonrpc/dbtxmanager_test.go b/jsonrpc/dbtxmanager_test.go index b3dba726..f3c4be93 100644 --- a/jsonrpc/dbtxmanager_test.go +++ b/jsonrpc/dbtxmanager_test.go @@ -5,8 +5,8 @@ import ( "errors" "testing" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/mocks" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/jsonrpc/mocks" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" "github.com/jackc/pgx/v4" "github.com/stretchr/testify/assert" ) diff --git a/jsonrpc/endpoints_debug.go b/jsonrpc/endpoints_debug.go index e78eab02..5da7ffec 100644 --- a/jsonrpc/endpoints_debug.go +++ b/jsonrpc/endpoints_debug.go @@ -8,10 +8,10 @@ import ( "fmt" "strings" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" diff --git a/jsonrpc/endpoints_eth.go b/jsonrpc/endpoints_eth.go index ae3788df..289f02b2 100644 --- a/jsonrpc/endpoints_eth.go +++ b/jsonrpc/endpoints_eth.go @@ -9,13 +9,13 @@ import ( "net/http" "strings" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/jsonrpc/client" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/runtime" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/gorilla/websocket" diff --git a/jsonrpc/endpoints_eth_test.go b/jsonrpc/endpoints_eth_test.go index a671c910..c0e1d734 100644 --- a/jsonrpc/endpoints_eth_test.go +++ b/jsonrpc/endpoints_eth_test.go @@ -9,12 +9,12 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/runtime" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/jsonrpc/endpoints_net.go b/jsonrpc/endpoints_net.go index d7827bd4..ee73e09a 100644 --- a/jsonrpc/endpoints_net.go +++ b/jsonrpc/endpoints_net.go @@ -3,8 +3,8 @@ package jsonrpc import ( "strconv" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" ) // NetEndpoints contains implementations for the "net" RPC endpoints diff --git a/jsonrpc/endpoints_txpool.go b/jsonrpc/endpoints_txpool.go index edb68812..24543337 100644 --- a/jsonrpc/endpoints_txpool.go +++ b/jsonrpc/endpoints_txpool.go @@ -1,7 +1,7 @@ package jsonrpc import ( - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" "github.com/ethereum/go-ethereum/common" ) diff --git a/jsonrpc/endpoints_web3.go b/jsonrpc/endpoints_web3.go index da076bf1..038899e2 100644 --- a/jsonrpc/endpoints_web3.go +++ b/jsonrpc/endpoints_web3.go @@ -3,8 +3,8 @@ package jsonrpc import ( "math/big" - "github.com/0xPolygonHermez/zkevm-node" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + zkevm "github.com/0xPolygon/supernets2-node" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" "golang.org/x/crypto/sha3" ) diff --git a/jsonrpc/endpoints_zkevm.go b/jsonrpc/endpoints_zkevm.go index 77c276b5..da8bf3d1 100644 --- a/jsonrpc/endpoints_zkevm.go +++ b/jsonrpc/endpoints_zkevm.go @@ -5,10 +5,10 @@ import ( "errors" "fmt" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" ethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" ) @@ -168,7 +168,11 @@ func (z *ZKEVMEndpoints) GetBatchByNumber(batchNumber types.BatchNumber, fullTx } batch.Transactions = txs - rpcBatch := types.NewBatch(batch, virtualBatch, verifiedBatch, receipts, fullTx, ger) + rpcBatch, err := types.NewBatch(batch, virtualBatch, verifiedBatch, receipts, fullTx, ger) + if err != nil { + return RPCErrorResponse(types.DefaultErrorCode, fmt.Sprintf("couldn't generate new batch for number %v", batchNumber), err) + } + return rpcBatch, nil }) } diff --git a/jsonrpc/endpoints_zkevm_test.go b/jsonrpc/endpoints_zkevm_test.go index f53e3cbf..d7b6e19b 100644 --- a/jsonrpc/endpoints_zkevm_test.go +++ b/jsonrpc/endpoints_zkevm_test.go @@ -9,9 +9,9 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" @@ -661,55 +661,6 @@ func TestGetBatchByNumber(t *testing.T) { Return(m.DbTx, nil). Once() - txs := []*ethTypes.Transaction{ - signTx(ethTypes.NewTransaction(1001, common.HexToAddress("0x1000"), big.NewInt(1000), 1001, big.NewInt(1002), []byte("1003")), s.ChainID()), - signTx(ethTypes.NewTransaction(1002, common.HexToAddress("0x1000"), big.NewInt(1000), 1001, big.NewInt(1002), []byte("1003")), s.ChainID()), - } - - batchTxs := make([]ethTypes.Transaction, 0, len(txs)) - - tc.ExpectedResult.Transactions = []types.TransactionOrHash{} - receipts := []*ethTypes.Receipt{} - for i, tx := range txs { - blockNumber := big.NewInt(int64(i)) - blockHash := common.HexToHash(hex.EncodeUint64(uint64(i))) - receipt := ethTypes.NewReceipt([]byte{}, false, uint64(0)) - receipt.TxHash = tx.Hash() - receipt.TransactionIndex = uint(i) - receipt.BlockNumber = blockNumber - receipt.BlockHash = blockHash - receipts = append(receipts, receipt) - from, _ := state.GetSender(*tx) - V, R, S := tx.RawSignatureValues() - - tc.ExpectedResult.Transactions = append(tc.ExpectedResult.Transactions, - types.TransactionOrHash{ - Tx: &types.Transaction{ - Nonce: types.ArgUint64(tx.Nonce()), - GasPrice: types.ArgBig(*tx.GasPrice()), - Gas: types.ArgUint64(tx.Gas()), - To: tx.To(), - Value: types.ArgBig(*tx.Value()), - Input: tx.Data(), - Hash: tx.Hash(), - From: from, - BlockNumber: ptrArgUint64FromUint64(blockNumber.Uint64()), - BlockHash: ptrHash(receipt.BlockHash), - TxIndex: ptrArgUint64FromUint(receipt.TransactionIndex), - ChainID: types.ArgBig(*tx.ChainId()), - Type: types.ArgUint64(tx.Type()), - V: types.ArgBig(*V), - R: types.ArgBig(*R), - S: types.ArgBig(*S), - }, - }, - ) - - batchTxs = append(batchTxs, *tx) - } - batchL2Data, err := state.EncodeTransactions(batchTxs) - require.NoError(t, err) - tc.ExpectedResult.BatchL2Data = batchL2Data batch := &state.Batch{ BatchNumber: 1, Coinbase: common.HexToAddress("0x1"), @@ -717,7 +668,6 @@ func TestGetBatchByNumber(t *testing.T) { AccInputHash: common.HexToHash("0x3"), GlobalExitRoot: common.HexToHash("0x4"), Timestamp: time.Unix(1, 0), - BatchL2Data: batchL2Data, } m.State. @@ -753,16 +703,63 @@ func TestGetBatchByNumber(t *testing.T) { Return(&ger, nil). Once() + txs := []*ethTypes.Transaction{ + signTx(ethTypes.NewTransaction(1001, common.HexToAddress("0x1000"), big.NewInt(1000), 1001, big.NewInt(1002), []byte("1003")), s.ChainID()), + signTx(ethTypes.NewTransaction(1002, common.HexToAddress("0x1000"), big.NewInt(1000), 1001, big.NewInt(1002), []byte("1003")), s.ChainID()), + } + + batchTxs := make([]ethTypes.Transaction, 0, len(txs)) + + tc.ExpectedResult.Transactions = []types.TransactionOrHash{} + for i, tx := range txs { + blockNumber := big.NewInt(int64(i)) + blockHash := common.HexToHash(hex.EncodeUint64(uint64(i))) + receipt := ethTypes.NewReceipt([]byte{}, false, uint64(0)) + receipt.TxHash = tx.Hash() + receipt.TransactionIndex = uint(i) + receipt.BlockNumber = blockNumber + receipt.BlockHash = blockHash m.State. On("GetTransactionReceipt", context.Background(), tx.Hash(), m.DbTx). - Return(receipts[i], nil). + Return(receipt, nil). Once() + + from, _ := state.GetSender(*tx) + V, R, S := tx.RawSignatureValues() + + tc.ExpectedResult.Transactions = append(tc.ExpectedResult.Transactions, + types.TransactionOrHash{ + Tx: &types.Transaction{ + Nonce: types.ArgUint64(tx.Nonce()), + GasPrice: types.ArgBig(*tx.GasPrice()), + Gas: types.ArgUint64(tx.Gas()), + To: tx.To(), + Value: types.ArgBig(*tx.Value()), + Input: tx.Data(), + Hash: tx.Hash(), + From: from, + BlockNumber: ptrArgUint64FromUint64(blockNumber.Uint64()), + BlockHash: ptrHash(receipt.BlockHash), + TxIndex: ptrArgUint64FromUint(receipt.TransactionIndex), + ChainID: types.ArgBig(*tx.ChainId()), + Type: types.ArgUint64(tx.Type()), + V: types.ArgBig(*V), + R: types.ArgBig(*R), + S: types.ArgBig(*S), + }, + }, + ) + + batchTxs = append(batchTxs, *tx) } m.State. On("GetTransactionsByBatchNumber", context.Background(), hex.DecodeBig(tc.Number).Uint64(), m.DbTx). Return(batchTxs, nil). Once() + batchL2Data, err := state.EncodeTransactions(batchTxs) + require.NoError(t, err) + tc.ExpectedResult.BatchL2Data = batchL2Data }, }, { @@ -791,37 +788,6 @@ func TestGetBatchByNumber(t *testing.T) { Return(m.DbTx, nil). Once() - txs := []*ethTypes.Transaction{ - signTx(ethTypes.NewTransaction(1001, common.HexToAddress("0x1000"), big.NewInt(1000), 1001, big.NewInt(1002), []byte("1003")), s.ChainID()), - signTx(ethTypes.NewTransaction(1002, common.HexToAddress("0x1000"), big.NewInt(1000), 1001, big.NewInt(1002), []byte("1003")), s.ChainID()), - } - - batchTxs := make([]ethTypes.Transaction, 0, len(txs)) - - tc.ExpectedResult.Transactions = []types.TransactionOrHash{} - - receipts := []*ethTypes.Receipt{} - for i, tx := range txs { - blockNumber := big.NewInt(int64(i)) - blockHash := common.HexToHash(hex.EncodeUint64(uint64(i))) - receipt := ethTypes.NewReceipt([]byte{}, false, uint64(0)) - receipt.TxHash = tx.Hash() - receipt.TransactionIndex = uint(i) - receipt.BlockNumber = blockNumber - receipt.BlockHash = blockHash - receipts = append(receipts, receipt) - - tc.ExpectedResult.Transactions = append(tc.ExpectedResult.Transactions, - types.TransactionOrHash{ - Hash: state.HashPtr(tx.Hash()), - }, - ) - - batchTxs = append(batchTxs, *tx) - } - batchL2Data, err := state.EncodeTransactions(batchTxs) - require.NoError(t, err) - batch := &state.Batch{ BatchNumber: 1, Coinbase: common.HexToAddress("0x1"), @@ -829,7 +795,6 @@ func TestGetBatchByNumber(t *testing.T) { AccInputHash: common.HexToHash("0x3"), GlobalExitRoot: common.HexToHash("0x4"), Timestamp: time.Unix(1, 0), - BatchL2Data: batchL2Data, } m.State. @@ -864,17 +829,43 @@ func TestGetBatchByNumber(t *testing.T) { On("GetExitRootByGlobalExitRoot", context.Background(), batch.GlobalExitRoot, m.DbTx). Return(&ger, nil). Once() + + txs := []*ethTypes.Transaction{ + signTx(ethTypes.NewTransaction(1001, common.HexToAddress("0x1000"), big.NewInt(1000), 1001, big.NewInt(1002), []byte("1003")), s.ChainID()), + signTx(ethTypes.NewTransaction(1002, common.HexToAddress("0x1000"), big.NewInt(1000), 1001, big.NewInt(1002), []byte("1003")), s.ChainID()), + } + + batchTxs := make([]ethTypes.Transaction, 0, len(txs)) + + tc.ExpectedResult.Transactions = []types.TransactionOrHash{} + for i, tx := range txs { + blockNumber := big.NewInt(int64(i)) + blockHash := common.HexToHash(hex.EncodeUint64(uint64(i))) + receipt := ethTypes.NewReceipt([]byte{}, false, uint64(0)) + receipt.TxHash = tx.Hash() + receipt.TransactionIndex = uint(i) + receipt.BlockNumber = blockNumber + receipt.BlockHash = blockHash m.State. On("GetTransactionReceipt", context.Background(), tx.Hash(), m.DbTx). - Return(receipts[i], nil). + Return(receipt, nil). Once() + + tc.ExpectedResult.Transactions = append(tc.ExpectedResult.Transactions, + types.TransactionOrHash{ + Hash: state.HashPtr(tx.Hash()), + }, + ) + + batchTxs = append(batchTxs, *tx) } m.State. On("GetTransactionsByBatchNumber", context.Background(), hex.DecodeBig(tc.Number).Uint64(), m.DbTx). Return(batchTxs, nil). Once() - + batchL2Data, err := state.EncodeTransactions(batchTxs) + require.NoError(t, err) tc.ExpectedResult.BatchL2Data = batchL2Data }, }, @@ -909,55 +900,6 @@ func TestGetBatchByNumber(t *testing.T) { Return(uint64(tc.ExpectedResult.Number), nil). Once() - txs := []*ethTypes.Transaction{ - signTx(ethTypes.NewTransaction(1001, common.HexToAddress("0x1000"), big.NewInt(1000), 1001, big.NewInt(1002), []byte("1003")), s.ChainID()), - signTx(ethTypes.NewTransaction(1002, common.HexToAddress("0x1000"), big.NewInt(1000), 1001, big.NewInt(1002), []byte("1003")), s.ChainID()), - } - - batchTxs := make([]ethTypes.Transaction, 0, len(txs)) - - tc.ExpectedResult.Transactions = []types.TransactionOrHash{} - - receipts := []*ethTypes.Receipt{} - for i, tx := range txs { - blockNumber := big.NewInt(int64(i)) - blockHash := common.HexToHash(hex.EncodeUint64(uint64(i))) - receipt := ethTypes.NewReceipt([]byte{}, false, uint64(0)) - receipt.TxHash = tx.Hash() - receipt.TransactionIndex = uint(i) - receipt.BlockNumber = blockNumber - receipt.BlockHash = blockHash - receipts = append(receipts, receipt) - from, _ := state.GetSender(*tx) - V, R, S := tx.RawSignatureValues() - - tc.ExpectedResult.Transactions = append(tc.ExpectedResult.Transactions, - types.TransactionOrHash{ - Tx: &types.Transaction{ - Nonce: types.ArgUint64(tx.Nonce()), - GasPrice: types.ArgBig(*tx.GasPrice()), - Gas: types.ArgUint64(tx.Gas()), - To: tx.To(), - Value: types.ArgBig(*tx.Value()), - Input: tx.Data(), - Hash: tx.Hash(), - From: from, - BlockNumber: ptrArgUint64FromUint64(blockNumber.Uint64()), - BlockHash: ptrHash(receipt.BlockHash), - TxIndex: ptrArgUint64FromUint(receipt.TransactionIndex), - ChainID: types.ArgBig(*tx.ChainId()), - Type: types.ArgUint64(tx.Type()), - V: types.ArgBig(*V), - R: types.ArgBig(*R), - S: types.ArgBig(*S), - }, - }, - ) - - batchTxs = append(batchTxs, *tx) - } - batchL2Data, err := state.EncodeTransactions(batchTxs) - require.NoError(t, err) batch := &state.Batch{ BatchNumber: 1, Coinbase: common.HexToAddress("0x1"), @@ -965,7 +907,6 @@ func TestGetBatchByNumber(t *testing.T) { AccInputHash: common.HexToHash("0x3"), GlobalExitRoot: common.HexToHash("0x4"), Timestamp: time.Unix(1, 0), - BatchL2Data: batchL2Data, } m.State. @@ -1001,16 +942,62 @@ func TestGetBatchByNumber(t *testing.T) { Return(&ger, nil). Once() + txs := []*ethTypes.Transaction{ + signTx(ethTypes.NewTransaction(1001, common.HexToAddress("0x1000"), big.NewInt(1000), 1001, big.NewInt(1002), []byte("1003")), s.ChainID()), + signTx(ethTypes.NewTransaction(1002, common.HexToAddress("0x1000"), big.NewInt(1000), 1001, big.NewInt(1002), []byte("1003")), s.ChainID()), + } + + batchTxs := make([]ethTypes.Transaction, 0, len(txs)) + + tc.ExpectedResult.Transactions = []types.TransactionOrHash{} + for i, tx := range txs { + blockNumber := big.NewInt(int64(i)) + blockHash := common.HexToHash(hex.EncodeUint64(uint64(i))) + receipt := ethTypes.NewReceipt([]byte{}, false, uint64(0)) + receipt.TxHash = tx.Hash() + receipt.TransactionIndex = uint(i) + receipt.BlockNumber = blockNumber + receipt.BlockHash = blockHash m.State. On("GetTransactionReceipt", context.Background(), tx.Hash(), m.DbTx). - Return(receipts[i], nil). + Return(receipt, nil). Once() + + from, _ := state.GetSender(*tx) + V, R, S := tx.RawSignatureValues() + + tc.ExpectedResult.Transactions = append(tc.ExpectedResult.Transactions, + types.TransactionOrHash{ + Tx: &types.Transaction{ + Nonce: types.ArgUint64(tx.Nonce()), + GasPrice: types.ArgBig(*tx.GasPrice()), + Gas: types.ArgUint64(tx.Gas()), + To: tx.To(), + Value: types.ArgBig(*tx.Value()), + Input: tx.Data(), + Hash: tx.Hash(), + From: from, + BlockNumber: ptrArgUint64FromUint64(blockNumber.Uint64()), + BlockHash: ptrHash(receipt.BlockHash), + TxIndex: ptrArgUint64FromUint(receipt.TransactionIndex), + ChainID: types.ArgBig(*tx.ChainId()), + Type: types.ArgUint64(tx.Type()), + V: types.ArgBig(*V), + R: types.ArgBig(*R), + S: types.ArgBig(*S), + }, + }, + ) + + batchTxs = append(batchTxs, *tx) } m.State. On("GetTransactionsByBatchNumber", context.Background(), uint64(tc.ExpectedResult.Number), m.DbTx). Return(batchTxs, nil). Once() + batchL2Data, err := state.EncodeTransactions(batchTxs) + require.NoError(t, err) tc.ExpectedResult.BatchL2Data = batchL2Data }, }, diff --git a/jsonrpc/handler.go b/jsonrpc/handler.go index cd78075f..c4903884 100644 --- a/jsonrpc/handler.go +++ b/jsonrpc/handler.go @@ -9,8 +9,8 @@ import ( "sync" "unicode" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/log" "github.com/gorilla/websocket" ) diff --git a/jsonrpc/metrics/metrics.go b/jsonrpc/metrics/metrics.go index 4ffefca2..5002d4ba 100644 --- a/jsonrpc/metrics/metrics.go +++ b/jsonrpc/metrics/metrics.go @@ -3,7 +3,7 @@ package metrics import ( "time" - "github.com/0xPolygonHermez/zkevm-node/metrics" + "github.com/0xPolygon/supernets2-node/metrics" "github.com/prometheus/client_golang/prometheus" ) diff --git a/jsonrpc/mocks/mock_pool.go b/jsonrpc/mocks/mock_pool.go index 84e3111f..14e2b2b8 100644 --- a/jsonrpc/mocks/mock_pool.go +++ b/jsonrpc/mocks/mock_pool.go @@ -9,7 +9,7 @@ import ( mock "github.com/stretchr/testify/mock" - pool "github.com/0xPolygonHermez/zkevm-node/pool" + pool "github.com/0xPolygon/supernets2-node/pool" time "time" diff --git a/jsonrpc/mocks/mock_state.go b/jsonrpc/mocks/mock_state.go index 960abe17..69ae1d41 100644 --- a/jsonrpc/mocks/mock_state.go +++ b/jsonrpc/mocks/mock_state.go @@ -14,9 +14,9 @@ import ( pgx "github.com/jackc/pgx/v4" - runtime "github.com/0xPolygonHermez/zkevm-node/state/runtime" + runtime "github.com/0xPolygon/supernets2-node/state/runtime" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/supernets2-node/state" time "time" ) diff --git a/jsonrpc/query.go b/jsonrpc/query.go index 2cc375dd..3747af1f 100644 --- a/jsonrpc/query.go +++ b/jsonrpc/query.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" "github.com/ethereum/go-ethereum/common" "github.com/gorilla/websocket" ) diff --git a/jsonrpc/server.go b/jsonrpc/server.go index 2f55bf5b..8f28cc33 100644 --- a/jsonrpc/server.go +++ b/jsonrpc/server.go @@ -11,9 +11,9 @@ import ( "net/http" "time" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/metrics" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/jsonrpc/metrics" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/log" "github.com/didip/tollbooth/v6" "github.com/gorilla/websocket" ) diff --git a/jsonrpc/server_test.go b/jsonrpc/server_test.go index cd15c79d..ce447185 100644 --- a/jsonrpc/server_test.go +++ b/jsonrpc/server_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/mocks" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/jsonrpc/client" + "github.com/0xPolygon/supernets2-node/jsonrpc/mocks" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/ethclient" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/jsonrpc/storage.go b/jsonrpc/storage.go index 32de18fc..c09c5c73 100644 --- a/jsonrpc/storage.go +++ b/jsonrpc/storage.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" + "github.com/0xPolygon/supernets2-node/hex" "github.com/google/uuid" "github.com/gorilla/websocket" ) diff --git a/jsonrpc/types/codec.go b/jsonrpc/types/codec.go index 8af467a5..0a6295c1 100644 --- a/jsonrpc/types/codec.go +++ b/jsonrpc/types/codec.go @@ -6,8 +6,8 @@ import ( "fmt" "strings" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/hex" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/hex" "github.com/jackc/pgx/v4" ) diff --git a/jsonrpc/types/codec_test.go b/jsonrpc/types/codec_test.go index 76c03e42..44d7a780 100644 --- a/jsonrpc/types/codec_test.go +++ b/jsonrpc/types/codec_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/mocks" + "github.com/0xPolygon/supernets2-node/jsonrpc/mocks" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/jsonrpc/types/interfaces.go b/jsonrpc/types/interfaces.go index f6d516b8..1e132cbc 100644 --- a/jsonrpc/types/interfaces.go +++ b/jsonrpc/types/interfaces.go @@ -5,9 +5,9 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/runtime" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" diff --git a/jsonrpc/types/types.go b/jsonrpc/types/types.go index 87074456..a24e6b36 100644 --- a/jsonrpc/types/types.go +++ b/jsonrpc/types/types.go @@ -8,8 +8,8 @@ import ( "strconv" "strings" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -348,8 +348,16 @@ func NewBatch( receipts []types.Receipt, fullTx bool, ger *state.GlobalExitRoot, -) *Batch { +) (*Batch, error) { batchL2Data := batch.BatchL2Data + if batchL2Data == nil { + batchL2dataFromTxs, err := state.EncodeTransactions(batch.Transactions) + if err != nil { + return nil, fmt.Errorf("error encoding txs into raw data: %w", err) + } else { + batchL2Data = batchL2dataFromTxs + } + } res := &Batch{ Number: ArgUint64(batch.BatchNumber), GlobalExitRoot: batch.GlobalExitRoot, @@ -388,7 +396,7 @@ func NewBatch( } } - return res + return res, nil } // TransactionOrHash for union type of transaction and types.Hash diff --git a/jsonrpc/types/types_test.go b/jsonrpc/types/types_test.go index 29fa459a..edcffc97 100644 --- a/jsonrpc/types/types_test.go +++ b/jsonrpc/types/types_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/log/log.go b/log/log.go index f8d26d08..5f471a91 100644 --- a/log/log.go +++ b/log/log.go @@ -5,7 +5,7 @@ import ( "os" "strings" - "github.com/0xPolygonHermez/zkevm-node" + zkevm "github.com/0xPolygon/supernets2-node" "github.com/hermeznetwork/tracerr" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/merkletree/client.go b/merkletree/client.go index 9c55022b..7bb167a2 100644 --- a/merkletree/client.go +++ b/merkletree/client.go @@ -4,8 +4,8 @@ import ( "context" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree/pb" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/merkletree/pb" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) diff --git a/merkletree/split.go b/merkletree/split.go index bc164f0a..4be43444 100644 --- a/merkletree/split.go +++ b/merkletree/split.go @@ -6,7 +6,7 @@ import ( "math/big" "strings" - "github.com/0xPolygonHermez/zkevm-node/hex" + "github.com/0xPolygon/supernets2-node/hex" poseidon "github.com/iden3/go-iden3-crypto/goldenposeidon" ) diff --git a/merkletree/split_test.go b/merkletree/split_test.go index 12f2302a..a390bd08 100644 --- a/merkletree/split_test.go +++ b/merkletree/split_test.go @@ -5,8 +5,8 @@ import ( "math/big" "testing" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/test/testutils" "github.com/stretchr/testify/require" ) diff --git a/merkletree/tree.go b/merkletree/tree.go index 32f81565..c1ed0341 100644 --- a/merkletree/tree.go +++ b/merkletree/tree.go @@ -6,8 +6,8 @@ import ( "math/big" "strings" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/merkletree/pb" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/merkletree/pb" "github.com/ethereum/go-ethereum/common" "google.golang.org/protobuf/types/known/emptypb" ) diff --git a/metrics/prometheus.go b/metrics/prometheus.go index 4e091b8d..2a686ed8 100644 --- a/metrics/prometheus.go +++ b/metrics/prometheus.go @@ -4,7 +4,7 @@ import ( "net/http" "sync" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" ) diff --git a/pool/config.go b/pool/config.go index 247f6114..696d05da 100644 --- a/pool/config.go +++ b/pool/config.go @@ -1,8 +1,8 @@ package pool import ( - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/db" + "github.com/0xPolygon/supernets2-node/config/types" + "github.com/0xPolygon/supernets2-node/db" ) // Config is the pool configuration diff --git a/pool/interfaces.go b/pool/interfaces.go index c887a327..425f1600 100644 --- a/pool/interfaces.go +++ b/pool/interfaces.go @@ -5,7 +5,7 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" diff --git a/pool/pgpoolstorage/pgpoolstorage.go b/pool/pgpoolstorage/pgpoolstorage.go index 4ae9fd25..df4a8af6 100644 --- a/pool/pgpoolstorage/pgpoolstorage.go +++ b/pool/pgpoolstorage/pgpoolstorage.go @@ -6,10 +6,10 @@ import ( "errors" "time" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" diff --git a/pool/pool.go b/pool/pool.go index 0a3d77e3..a117903e 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -8,11 +8,11 @@ import ( "sync" "time" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/runtime" + "github.com/0xPolygon/supernets2-node/state/runtime/executor" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core/types" diff --git a/pool/pool_test.go b/pool/pool_test.go index d84a852c..21781f27 100644 --- a/pool/pool_test.go +++ b/pool/pool_test.go @@ -11,22 +11,22 @@ import ( "testing" "time" - cfgTypes "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/pool/pgpoolstorage" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Revert" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + cfgTypes "github.com/0xPolygon/supernets2-node/config/types" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/event/nileventstorage" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/merkletree" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/pool/pgpoolstorage" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/runtime/executor" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Revert" + "github.com/0xPolygon/supernets2-node/test/dbutils" + "github.com/0xPolygon/supernets2-node/test/operations" + "github.com/0xPolygon/supernets2-node/test/testutils" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" diff --git a/pool/transaction.go b/pool/transaction.go index 24d5a812..917dad9a 100644 --- a/pool/transaction.go +++ b/pool/transaction.go @@ -3,7 +3,7 @@ package pool import ( "time" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" ) diff --git a/pricegetter/config.go b/pricegetter/config.go index 6cf22d14..2ff7c647 100644 --- a/pricegetter/config.go +++ b/pricegetter/config.go @@ -4,8 +4,8 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/pricegetter/priceprovider" + "github.com/0xPolygon/supernets2-node/config/types" + "github.com/0xPolygon/supernets2-node/pricegetter/priceprovider" ) // TokenPrice is a wrapper type that parses token amount to big float diff --git a/pricegetter/pricegetter.go b/pricegetter/pricegetter.go index bff2364b..cae7a3b2 100644 --- a/pricegetter/pricegetter.go +++ b/pricegetter/pricegetter.go @@ -6,9 +6,9 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pricegetter/priceprovider" - "github.com/0xPolygonHermez/zkevm-node/pricegetter/priceprovider/uniswap" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/pricegetter/priceprovider" + "github.com/0xPolygon/supernets2-node/pricegetter/priceprovider/uniswap" ) // Client for the pricegetter diff --git a/pricegetter/priceprovider/uniswap/client.go b/pricegetter/priceprovider/uniswap/client.go index 8a67bd68..0c3ba764 100644 --- a/pricegetter/priceprovider/uniswap/client.go +++ b/pricegetter/priceprovider/uniswap/client.go @@ -5,7 +5,7 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" diff --git a/proto/src/proto/aggregator/v1/aggregator.proto b/proto/src/proto/aggregator/v1/aggregator.proto index 66be5387..19e47c2e 100644 --- a/proto/src/proto/aggregator/v1/aggregator.proto +++ b/proto/src/proto/aggregator/v1/aggregator.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package aggregator.v1; -option go_package = "github.com/0xPolygonHermez/zkevm-node/aggregator/pb"; +option go_package = "github.com/0xPolygon/supernets2-node/aggregator/pb"; message Version { string v0_0_1 = 1; diff --git a/proto/src/proto/executor/v1/executor.proto b/proto/src/proto/executor/v1/executor.proto index d377578c..49b14139 100644 --- a/proto/src/proto/executor/v1/executor.proto +++ b/proto/src/proto/executor/v1/executor.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package executor.v1; -option go_package = "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb"; +option go_package = "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb"; service ExecutorService { /// Processes a batch diff --git a/proto/src/proto/statedb/v1/statedb.proto b/proto/src/proto/statedb/v1/statedb.proto index 25476dfe..3c2bd5a6 100644 --- a/proto/src/proto/statedb/v1/statedb.proto +++ b/proto/src/proto/statedb/v1/statedb.proto @@ -4,7 +4,7 @@ import "google/protobuf/empty.proto"; package statedb.v1; -option go_package = "github.com/0xPolygonHermez/zkevm-node/merkletree/pb"; +option go_package = "github.com/0xPolygon/supernets2-node/merkletree/pb"; message Version { string v0_0_1 = 1; diff --git a/sequencer/addrqueue.go b/sequencer/addrqueue.go index 84d5e4e9..563e7dc7 100644 --- a/sequencer/addrqueue.go +++ b/sequencer/addrqueue.go @@ -4,9 +4,9 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/runtime" "github.com/ethereum/go-ethereum/common" ) diff --git a/sequencer/closingsignalsmanager.go b/sequencer/closingsignalsmanager.go index 84aae76b..f969b49e 100644 --- a/sequencer/closingsignalsmanager.go +++ b/sequencer/closingsignalsmanager.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" ) type closingSignalsManager struct { diff --git a/sequencer/closingsignalsmanager_test.go b/sequencer/closingsignalsmanager_test.go index bcdedaa4..649c3ce7 100644 --- a/sequencer/closingsignalsmanager_test.go +++ b/sequencer/closingsignalsmanager_test.go @@ -6,17 +6,17 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - mtDBclientpb "github.com/0xPolygonHermez/zkevm-node/merkletree/pb" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - executorclientpb "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/event/nileventstorage" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/merkletree" + mtDBclientpb "github.com/0xPolygon/supernets2-node/merkletree/pb" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/runtime/executor" + executorclientpb "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" + "github.com/0xPolygon/supernets2-node/test/dbutils" + "github.com/0xPolygon/supernets2-node/test/testutils" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4/pgxpool" "github.com/stretchr/testify/assert" diff --git a/sequencer/config.go b/sequencer/config.go index b46f8cfc..dce52bdc 100644 --- a/sequencer/config.go +++ b/sequencer/config.go @@ -1,7 +1,7 @@ package sequencer import ( - "github.com/0xPolygonHermez/zkevm-node/config/types" + "github.com/0xPolygon/supernets2-node/config/types" ) // Config represents the configuration of a sequencer diff --git a/sequencer/dbmanager.go b/sequencer/dbmanager.go index ce0c4ccb..9b75b5d9 100644 --- a/sequencer/dbmanager.go +++ b/sequencer/dbmanager.go @@ -5,9 +5,9 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" diff --git a/sequencer/dbmanager_test.go b/sequencer/dbmanager_test.go index 76272124..88cce703 100644 --- a/sequencer/dbmanager_test.go +++ b/sequencer/dbmanager_test.go @@ -7,17 +7,17 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - mtDBclientpb "github.com/0xPolygonHermez/zkevm-node/merkletree/pb" - "github.com/0xPolygonHermez/zkevm-node/state" - executorclientpb "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/supernets2-node/config/types" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/event/nileventstorage" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/merkletree" + mtDBclientpb "github.com/0xPolygon/supernets2-node/merkletree/pb" + "github.com/0xPolygon/supernets2-node/state" + executorclientpb "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" + "github.com/0xPolygon/supernets2-node/test/dbutils" + "github.com/0xPolygon/supernets2-node/test/testutils" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4/pgxpool" "github.com/stretchr/testify/require" diff --git a/sequencer/efficiencylist.go b/sequencer/efficiencylist.go index 0508046b..ad1bfc63 100644 --- a/sequencer/efficiencylist.go +++ b/sequencer/efficiencylist.go @@ -5,7 +5,7 @@ import ( "sort" "sync" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" ) // efficiencyList represents a list of tx sorted by efficiency diff --git a/sequencer/finalizer.go b/sequencer/finalizer.go index 0076ab6f..adb2a070 100644 --- a/sequencer/finalizer.go +++ b/sequencer/finalizer.go @@ -9,13 +9,13 @@ import ( "sync" "time" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/sequencer/metrics" - "github.com/0xPolygonHermez/zkevm-node/state" - stateMetrics "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/sequencer/metrics" + "github.com/0xPolygon/supernets2-node/state" + stateMetrics "github.com/0xPolygon/supernets2-node/state/metrics" + "github.com/0xPolygon/supernets2-node/state/runtime/executor" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4" ) diff --git a/sequencer/finalizer_test.go b/sequencer/finalizer_test.go index 8e32e78c..12ae40d2 100644 --- a/sequencer/finalizer_test.go +++ b/sequencer/finalizer_test.go @@ -8,13 +8,13 @@ import ( "testing" "time" - cfgTypes "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" + cfgTypes "github.com/0xPolygon/supernets2-node/config/types" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/event/nileventstorage" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/runtime/executor" + "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/assert" diff --git a/sequencer/interfaces.go b/sequencer/interfaces.go index c8122080..d623c910 100644 --- a/sequencer/interfaces.go +++ b/sequencer/interfaces.go @@ -5,12 +5,11 @@ import ( "math/big" "time" - ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" - pb "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" + "github.com/0xPolygon/supernets2-node/ethtxmanager" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/metrics" + pb "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -31,13 +30,11 @@ type txPool interface { // etherman contains the methods required to interact with ethereum. type etherman interface { - EstimateGasSequenceBatches(sender common.Address, sequences []ethmanTypes.Sequence) (*types.Transaction, error) GetSendSequenceFee(numBatches uint64) (*big.Int, error) TrustedSequencer() (common.Address, error) GetLatestBatchNumber() (uint64, error) GetLastBatchTimestamp() (uint64, error) GetLatestBlockTimestamp(ctx context.Context) (uint64, error) - BuildSequenceBatchesTxData(sender common.Address, sequences []ethmanTypes.Sequence) (to *common.Address, data []byte, err error) GetLatestBlockNumber(ctx context.Context) (uint64, error) } diff --git a/sequencer/metrics/metrics.go b/sequencer/metrics/metrics.go index df82049a..23366ae4 100644 --- a/sequencer/metrics/metrics.go +++ b/sequencer/metrics/metrics.go @@ -3,7 +3,7 @@ package metrics import ( "time" - "github.com/0xPolygonHermez/zkevm-node/metrics" + "github.com/0xPolygon/supernets2-node/metrics" "github.com/prometheus/client_golang/prometheus" ) diff --git a/sequencer/mock_db_manager.go b/sequencer/mock_db_manager.go index 7f30bc1a..f36831af 100644 --- a/sequencer/mock_db_manager.go +++ b/sequencer/mock_db_manager.go @@ -12,9 +12,9 @@ import ( pgx "github.com/jackc/pgx/v4" - pool "github.com/0xPolygonHermez/zkevm-node/pool" + pool "github.com/0xPolygon/supernets2-node/pool" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/supernets2-node/state" time "time" diff --git a/sequencer/mock_etherman.go b/sequencer/mock_etherman.go index 1089528d..ad3192ad 100644 --- a/sequencer/mock_etherman.go +++ b/sequencer/mock_etherman.go @@ -8,11 +8,7 @@ import ( common "github.com/ethereum/go-ethereum/common" - coretypes "github.com/ethereum/go-ethereum/core/types" - mock "github.com/stretchr/testify/mock" - - types "github.com/0xPolygonHermez/zkevm-node/etherman/types" ) // EthermanMock is an autogenerated mock type for the etherman type @@ -20,67 +16,6 @@ type EthermanMock struct { mock.Mock } -// BuildSequenceBatchesTxData provides a mock function with given fields: sender, sequences -func (_m *EthermanMock) BuildSequenceBatchesTxData(sender common.Address, sequences []types.Sequence) (*common.Address, []byte, error) { - ret := _m.Called(sender, sequences) - - var r0 *common.Address - var r1 []byte - var r2 error - if rf, ok := ret.Get(0).(func(common.Address, []types.Sequence) (*common.Address, []byte, error)); ok { - return rf(sender, sequences) - } - if rf, ok := ret.Get(0).(func(common.Address, []types.Sequence) *common.Address); ok { - r0 = rf(sender, sequences) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*common.Address) - } - } - - if rf, ok := ret.Get(1).(func(common.Address, []types.Sequence) []byte); ok { - r1 = rf(sender, sequences) - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).([]byte) - } - } - - if rf, ok := ret.Get(2).(func(common.Address, []types.Sequence) error); ok { - r2 = rf(sender, sequences) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// EstimateGasSequenceBatches provides a mock function with given fields: sender, sequences -func (_m *EthermanMock) EstimateGasSequenceBatches(sender common.Address, sequences []types.Sequence) (*coretypes.Transaction, error) { - ret := _m.Called(sender, sequences) - - var r0 *coretypes.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(common.Address, []types.Sequence) (*coretypes.Transaction, error)); ok { - return rf(sender, sequences) - } - if rf, ok := ret.Get(0).(func(common.Address, []types.Sequence) *coretypes.Transaction); ok { - r0 = rf(sender, sequences) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretypes.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(common.Address, []types.Sequence) error); ok { - r1 = rf(sender, sequences) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // GetLastBatchTimestamp provides a mock function with given fields: func (_m *EthermanMock) GetLastBatchTimestamp() (uint64, error) { ret := _m.Called() diff --git a/sequencer/mock_pool.go b/sequencer/mock_pool.go index 5e979083..6fb12050 100644 --- a/sequencer/mock_pool.go +++ b/sequencer/mock_pool.go @@ -9,9 +9,9 @@ import ( mock "github.com/stretchr/testify/mock" - pool "github.com/0xPolygonHermez/zkevm-node/pool" + pool "github.com/0xPolygon/supernets2-node/pool" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/supernets2-node/state" ) // PoolMock is an autogenerated mock type for the txPool type diff --git a/sequencer/mock_state.go b/sequencer/mock_state.go index 1cbfdef5..8d4d580e 100644 --- a/sequencer/mock_state.go +++ b/sequencer/mock_state.go @@ -8,15 +8,15 @@ import ( common "github.com/ethereum/go-ethereum/common" - metrics "github.com/0xPolygonHermez/zkevm-node/state/metrics" + metrics "github.com/0xPolygon/supernets2-node/state/metrics" mock "github.com/stretchr/testify/mock" - pb "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" + pb "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" pgx "github.com/jackc/pgx/v4" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/supernets2-node/state" time "time" diff --git a/sequencer/mock_worker.go b/sequencer/mock_worker.go index 61fcfd0a..dacbf95f 100644 --- a/sequencer/mock_worker.go +++ b/sequencer/mock_worker.go @@ -10,7 +10,7 @@ import ( mock "github.com/stretchr/testify/mock" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/supernets2-node/state" types "github.com/ethereum/go-ethereum/core/types" ) diff --git a/sequencer/sequencer.go b/sequencer/sequencer.go index 038f2e39..1502ff9d 100644 --- a/sequencer/sequencer.go +++ b/sequencer/sequencer.go @@ -7,12 +7,12 @@ import ( "sync" "time" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/sequencer/metrics" - "github.com/0xPolygonHermez/zkevm-node/state" - stateMetrics "github.com/0xPolygonHermez/zkevm-node/state/metrics" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/sequencer/metrics" + "github.com/0xPolygon/supernets2-node/state" + stateMetrics "github.com/0xPolygon/supernets2-node/state/metrics" "github.com/ethereum/go-ethereum/common" ) diff --git a/sequencer/txtracker.go b/sequencer/txtracker.go index 781bfeb4..4c92c673 100644 --- a/sequencer/txtracker.go +++ b/sequencer/txtracker.go @@ -4,8 +4,8 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" ) diff --git a/sequencer/txtracker_test.go b/sequencer/txtracker_test.go index a238ebed..adda4c34 100644 --- a/sequencer/txtracker_test.go +++ b/sequencer/txtracker_test.go @@ -5,7 +5,7 @@ import ( "math/big" "testing" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/state" "github.com/stretchr/testify/assert" ) diff --git a/sequencer/worker.go b/sequencer/worker.go index b138ff55..64f599e9 100644 --- a/sequencer/worker.go +++ b/sequencer/worker.go @@ -8,8 +8,8 @@ import ( "sync" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" ) diff --git a/sequencer/worker_test.go b/sequencer/worker_test.go index 0c34d858..645b7ca3 100644 --- a/sequencer/worker_test.go +++ b/sequencer/worker_test.go @@ -6,7 +6,7 @@ import ( "math/big" "testing" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" ) diff --git a/sequencesender/config.go b/sequencesender/config.go index 84e2b353..ecd38652 100644 --- a/sequencesender/config.go +++ b/sequencesender/config.go @@ -1,7 +1,7 @@ package sequencesender import ( - "github.com/0xPolygonHermez/zkevm-node/config/types" + "github.com/0xPolygon/supernets2-node/config/types" ) // Config represents the configuration of a sequence sender @@ -11,15 +11,11 @@ type Config struct { WaitPeriodSendSequence types.Duration `mapstructure:"WaitPeriodSendSequence"` // LastBatchVirtualizationTimeMaxWaitPeriod is time since sequences should be sent LastBatchVirtualizationTimeMaxWaitPeriod types.Duration `mapstructure:"LastBatchVirtualizationTimeMaxWaitPeriod"` - // MaxTxSizeForL1 is the maximum size a single transaction can have. This field has - // non-trivial consequences: larger transactions than 128KB are significantly harder and - // more expensive to propagate; larger transactions also take more resources - // to validate whether they fit into the pool or not. - MaxTxSizeForL1 uint64 `mapstructure:"MaxTxSizeForL1"` + // MaxBatchesForL1 is the maximum amount of batches to be sequenced in a single L1 tx + MaxBatchesForL1 uint64 `mapstructure:"MaxBatchesForL1"` // SenderAddress defines which private key the eth tx manager needs to use // to sign the L1 txs SenderAddress string `mapstructure:"SenderAddress"` - // PrivateKeys defines all the key store files that are going - // to be read in order to provide the private keys to sign the L1 txs + // TODO: rollback to array PrivateKeys []types.KeystoreFileConfig `mapstructure:"PrivateKeys"` } diff --git a/sequencesender/datacommittee.go b/sequencesender/datacommittee.go new file mode 100644 index 00000000..e2e2ad10 --- /dev/null +++ b/sequencesender/datacommittee.go @@ -0,0 +1,151 @@ +package sequencesender + +import ( + "context" + "errors" + "fmt" + "sort" + "strings" + + "github.com/0xPolygon/supernets2-data-availability/batch" + "github.com/0xPolygon/supernets2-data-availability/client" + "github.com/0xPolygon/supernets2-data-availability/sequence" + ethman "github.com/0xPolygon/supernets2-node/etherman" + "github.com/0xPolygon/supernets2-node/etherman/types" + "github.com/0xPolygon/supernets2-node/log" + jTypes "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + "github.com/ethereum/go-ethereum/common" +) + +type signatureMsg struct { + addr common.Address + signature []byte + err error +} + +func (s *SequenceSender) getSignaturesAndAddrsFromDataCommittee(ctx context.Context, sequences []types.Sequence) ([]byte, error) { + // Get current committee + committee, err := s.etherman.GetCurrentDataCommittee() + if err != nil { + return nil, err + } + + // Get last accInputHash + var accInputHash common.Hash + if sequences[0].BatchNumber != 0 { + prevBatch, err := s.state.GetBatchByNumber(ctx, sequences[0].BatchNumber-1, nil) + if err != nil { + return nil, err + } + accInputHash = prevBatch.AccInputHash + } + + // Authenticate as trusted sequencer by signing the sequences + sequence := sequence.Sequence{ + Batches: []batch.Batch{}, + OldAccInputHash: accInputHash, + } + for _, seq := range sequences { + sequence.Batches = append(sequence.Batches, batch.Batch{ + Number: jTypes.ArgUint64(seq.BatchNumber), + GlobalExitRoot: seq.GlobalExitRoot, + Timestamp: jTypes.ArgUint64(seq.Timestamp), + Coinbase: common.HexToAddress(s.cfg.SenderAddress), + L2Data: seq.BatchL2Data, + }) + } + signedSequence, err := sequence.Sign(s.privKey) + if err != nil { + return nil, err + } + + // Request signatures to all members in parallel + ch := make(chan signatureMsg, len(committee.Members)) + signatureCtx, cancelSignatureCollection := context.WithCancel(ctx) + for _, member := range committee.Members { + go requestSignatureFromMember(signatureCtx, *signedSequence, member, ch) + } + + // Collect signatures + msgs := []signatureMsg{} + var collectedSignatures uint64 + var failedToCollect uint64 + for collectedSignatures < committee.RequiredSignatures { + msg := <-ch + if msg.err != nil { + log.Errorf("error when trying to get signature from %s: %s", msg.addr, msg.err) + failedToCollect++ + if len(committee.Members)-int(failedToCollect) < int(committee.RequiredSignatures) { + cancelSignatureCollection() + return nil, errors.New("too many members failed to send their signature") + } + } else { + log.Infof("received signature from %s", msg.addr) + collectedSignatures++ + } + msgs = append(msgs, msg) + } + + // Stop requesting as soon as we have N valid signatures + cancelSignatureCollection() + + return buildSignaturesAndAddrs(signatureMsgs(msgs), committee.Members), nil +} + +func requestSignatureFromMember(ctx context.Context, signedSequence sequence.SignedSequence, member ethman.DataCommitteeMember, ch chan signatureMsg) { + // request + c := client.New(member.URL) + log.Infof("sending request to sign the sequence to %s at %s", member.Addr.Hex(), member.URL) + signature, err := c.SignSequence(signedSequence) + if err != nil { + ch <- signatureMsg{ + addr: member.Addr, + err: err, + } + return + } + // verify returned signature + signedSequence.Signature = signature + signer, err := signedSequence.Signer() + if err != nil { + ch <- signatureMsg{ + addr: member.Addr, + err: err, + } + return + } + if signer != member.Addr { + ch <- signatureMsg{ + addr: member.Addr, + err: fmt.Errorf("invalid signer. Expected %s, actual %s", member.Addr.Hex(), signer.Hex()), + } + return + } + ch <- signatureMsg{ + addr: member.Addr, + signature: signature, + } +} + +func buildSignaturesAndAddrs(msgs signatureMsgs, members []ethman.DataCommitteeMember) []byte { + res := []byte{} + sort.Sort(msgs) + for _, msg := range msgs { + log.Debugf("adding signature %s from %s", common.Bytes2Hex(msg.signature), msg.addr.Hex()) + res = append(res, msg.signature...) + } + for _, member := range members { + log.Debugf("adding addr %s", common.Bytes2Hex(member.Addr.Bytes())) + res = append(res, member.Addr.Bytes()...) + } + log.Debugf("full res %s", common.Bytes2Hex(res)) + return res +} + +type signatureMsgs []signatureMsg + +func (s signatureMsgs) Len() int { return len(s) } +func (s signatureMsgs) Less(i, j int) bool { + return strings.ToUpper(s[i].addr.Hex()) < strings.ToUpper(s[j].addr.Hex()) +} +func (s signatureMsgs) Swap(i, j int) { s[i], s[j] = s[j], s[i] } diff --git a/sequencesender/interfaces.go b/sequencesender/interfaces.go index d203e13c..c8821036 100644 --- a/sequencesender/interfaces.go +++ b/sequencesender/interfaces.go @@ -5,9 +5,10 @@ import ( "math/big" "time" - ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" - "github.com/0xPolygonHermez/zkevm-node/state" + theEtherman "github.com/0xPolygon/supernets2-node/etherman" + ethmanTypes "github.com/0xPolygon/supernets2-node/etherman/types" + "github.com/0xPolygon/supernets2-node/ethtxmanager" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -17,11 +18,12 @@ import ( // etherman contains the methods required to interact with ethereum. type etherman interface { - BuildSequenceBatchesTxData(sender common.Address, sequences []ethmanTypes.Sequence) (to *common.Address, data []byte, err error) - EstimateGasSequenceBatches(sender common.Address, sequences []ethmanTypes.Sequence) (*types.Transaction, error) + BuildSequenceBatchesTxData(sender common.Address, sequences []ethmanTypes.Sequence, committeeSignaturesAndAddrs []byte) (to *common.Address, data []byte, err error) + EstimateGasSequenceBatches(sender common.Address, sequences []ethmanTypes.Sequence, committeeSignaturesAndAddrs []byte) (*types.Transaction, error) GetLastBatchTimestamp() (uint64, error) GetLatestBlockTimestamp(ctx context.Context) (uint64, error) GetLatestBatchNumber() (uint64, error) + GetCurrentDataCommittee() (*theEtherman.DataCommittee, error) } // stateInterface gathers the methods required to interact with the state. diff --git a/sequencesender/sequencesender.go b/sequencesender/sequencesender.go index b041b20c..c5a7d3e1 100644 --- a/sequencesender/sequencesender.go +++ b/sequencesender/sequencesender.go @@ -2,19 +2,18 @@ package sequencesender import ( "context" + "crypto/ecdsa" "errors" "fmt" "time" - ethman "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/ethtxmanager" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/sequencer/metrics" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/etherman/types" + "github.com/0xPolygon/supernets2-node/ethtxmanager" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/sequencer/metrics" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" - ethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" ) @@ -33,6 +32,7 @@ var ( // SequenceSender represents a sequence sender type SequenceSender struct { cfg Config + privKey *ecdsa.PrivateKey state stateInterface ethTxManager ethTxManager etherman etherman @@ -40,13 +40,14 @@ type SequenceSender struct { } // New inits sequence sender -func New(cfg Config, state stateInterface, etherman etherman, manager ethTxManager, eventLog *event.EventLog) (*SequenceSender, error) { +func New(cfg Config, state stateInterface, etherman etherman, manager ethTxManager, eventLog *event.EventLog, privKey *ecdsa.PrivateKey) (*SequenceSender, error) { return &SequenceSender{ cfg: cfg, state: state, etherman: etherman, ethTxManager: manager, eventLog: eventLog, + privKey: privKey, }, nil } @@ -109,7 +110,12 @@ func (s *SequenceSender) tryToSendSequence(ctx context.Context, ticker *time.Tic // add sequence to be monitored sender := common.HexToAddress(s.cfg.SenderAddress) - to, data, err := s.etherman.BuildSequenceBatchesTxData(sender, sequences) + signaturesAndAddrs, err := s.getSignaturesAndAddrsFromDataCommittee(ctx, sequences) + if err != nil { + log.Error("error getting signatures and addresses from the data committee: ", err) + return + } + to, data, err := s.etherman.BuildSequenceBatchesTxData(sender, sequences, signaturesAndAddrs) if err != nil { log.Error("error estimating new sequenceBatches to add to eth tx manager: ", err) return @@ -137,7 +143,7 @@ func (s *SequenceSender) getSequencesToSend(ctx context.Context) ([]types.Sequen sequences := []types.Sequence{} // var estimatedGas uint64 - var tx *ethTypes.Transaction + // var tx *ethTypes.Transaction // Add sequences until too big for a single L1 tx or last batch is reached for { @@ -172,25 +178,13 @@ func (s *SequenceSender) getSequencesToSend(ctx context.Context) ([]types.Sequen } sequences = append(sequences, seq) - // Check if can be send - sender := common.HexToAddress(s.cfg.SenderAddress) - tx, err = s.etherman.EstimateGasSequenceBatches(sender, sequences) - if err == nil && tx.Size() > s.cfg.MaxTxSizeForL1 { - metrics.SequencesOvesizedDataError() - log.Infof("oversized Data on TX oldHash %s (txSize %d > 128KB)", tx.Hash(), tx.Size()) - err = ErrOversizedData + if len(sequences) == int(s.cfg.MaxBatchesForL1) { + log.Info( + "sequence should be sent to L1, because MaxBatchesForL1 (%d) has been reached", + s.cfg.MaxBatchesForL1, + ) + return sequences, nil } - if err != nil { - log.Infof("Handling estimage gas send sequence error: %v", err) - sequences, err = s.handleEstimateGasSendSequenceErr(ctx, sequences, currentBatchNumToSequence, err) - if sequences != nil { - // Handling the error gracefully, re-processing the sequence as a sanity check - _, err = s.etherman.EstimateGasSequenceBatches(sender, sequences) - return sequences, err - } - return sequences, err - } - // estimatedGas = tx.Gas() // Increase batch num for next iteration currentBatchNumToSequence++ @@ -219,78 +213,6 @@ func (s *SequenceSender) getSequencesToSend(ctx context.Context) ([]types.Sequen return nil, nil } -// handleEstimateGasSendSequenceErr handles an error on the estimate gas. It will return: -// nil, error: impossible to handle gracefully -// sequence, nil: handled gracefully. Potentially manipulating the sequences -// nil, nil: a situation that requires waiting -func (s *SequenceSender) handleEstimateGasSendSequenceErr( - ctx context.Context, - sequences []types.Sequence, - currentBatchNumToSequence uint64, - err error, -) ([]types.Sequence, error) { - // Insufficient allowance - if errors.Is(err, ethman.ErrInsufficientAllowance) { - return nil, err - } - if isDataForEthTxTooBig(err) { - // Remove the latest item and send the sequences - log.Infof( - "Done building sequences, selected batches to %d. Batch %d caused the L1 tx to be too big", - currentBatchNumToSequence-1, currentBatchNumToSequence, - ) - sequences = sequences[:len(sequences)-1] - return sequences, nil - } - - // while estimating gas a new block is not created and the POE SC may return - // an error regarding timestamp verification, this must be handled - if errors.Is(err, ethman.ErrTimestampMustBeInsideRange) { - // query the sc about the value of its lastTimestamp variable - lastTimestamp, err := s.etherman.GetLastBatchTimestamp() - if err != nil { - return nil, err - } - // check POE SC lastTimestamp against sequences' one - for _, seq := range sequences { - if seq.Timestamp < int64(lastTimestamp) { - // TODO: gracefully handle this situation by creating an L2 reorg - log.Fatalf("sequence timestamp %d is < POE SC lastTimestamp %d", seq.Timestamp, lastTimestamp) - } - lastTimestamp = uint64(seq.Timestamp) - } - blockTimestamp, err := s.etherman.GetLatestBlockTimestamp(ctx) - if err != nil { - log.Error("error getting block timestamp: ", err) - } - log.Debugf("block.timestamp: %d is smaller than seq.Timestamp: %d. A new block must be mined in L1 before the gas can be estimated.", blockTimestamp, sequences[0].Timestamp) - return nil, nil - } - - // Unknown error - if len(sequences) == 1 { - // TODO: gracefully handle this situation by creating an L2 reorg - log.Errorf( - "Error when estimating gas for BatchNum %d (alone in the sequences): %v", - currentBatchNumToSequence, err, - ) - } - // Remove the latest item and send the sequences - log.Infof( - "Done building sequences, selected batches to %d. Batch %d excluded due to unknown error: %v", - currentBatchNumToSequence, currentBatchNumToSequence+1, err, - ) - sequences = sequences[:len(sequences)-1] - - return sequences, nil -} - -func isDataForEthTxTooBig(err error) bool { - return errors.Is(err, ethman.ErrGasRequiredExceedsAllowance) || - errors.Is(err, ErrOversizedData) || - errors.Is(err, ethman.ErrContentLengthTooLarge) -} - func waitTick(ctx context.Context, ticker *time.Ticker) { select { case <-ticker.C: diff --git a/state/batch.go b/state/batch.go index 36622be6..fb8d8a71 100644 --- a/state/batch.go +++ b/state/batch.go @@ -6,11 +6,11 @@ import ( "fmt" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state/metrics" + "github.com/0xPolygon/supernets2-node/state/runtime/executor" + "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" diff --git a/state/converters.go b/state/converters.go index 07fa329b..88a63309 100644 --- a/state/converters.go +++ b/state/converters.go @@ -6,14 +6,14 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state/runtime/executor" + "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" + "github.com/0xPolygon/supernets2-node/state/runtime/fakevm" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" ) diff --git a/state/fakedb.go b/state/fakedb.go index f204f8b9..4754c590 100644 --- a/state/fakedb.go +++ b/state/fakedb.go @@ -4,7 +4,7 @@ import ( "context" "math/big" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" diff --git a/state/forkid.go b/state/forkid.go index 2337dee0..e426ebbb 100644 --- a/state/forkid.go +++ b/state/forkid.go @@ -1,6 +1,6 @@ package state -import "github.com/0xPolygonHermez/zkevm-node/log" +import "github.com/0xPolygon/supernets2-node/log" // ForkIDInterval is a fork id interval type ForkIDInterval struct { diff --git a/state/genesis.go b/state/genesis.go index ef38a5e6..6ad1e427 100644 --- a/state/genesis.go +++ b/state/genesis.go @@ -5,10 +5,10 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/merkletree" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/trie" diff --git a/state/genesis_test.go b/state/genesis_test.go index 10105159..64f54fa8 100644 --- a/state/genesis_test.go +++ b/state/genesis_test.go @@ -11,9 +11,9 @@ import ( "runtime" "testing" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" - "github.com/0xPolygonHermez/zkevm-node/tools/genesis/genesisparser" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/dbutils" + "github.com/0xPolygon/supernets2-node/tools/genesis/genesisparser" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/state/helper.go b/state/helper.go index c3a1cacd..3cd67bf6 100644 --- a/state/helper.go +++ b/state/helper.go @@ -5,8 +5,8 @@ import ( "math/big" "strconv" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" ) diff --git a/state/helper_test.go b/state/helper_test.go index 10229ae1..36bfc5ea 100644 --- a/state/helper_test.go +++ b/state/helper_test.go @@ -6,8 +6,8 @@ import ( "math/big" "testing" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/state/l2block.go b/state/l2block.go index 3d602171..64b7032f 100644 --- a/state/l2block.go +++ b/state/l2block.go @@ -7,7 +7,7 @@ import ( "sync" "time" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/ethereum/go-ethereum/core/types" ) diff --git a/state/metrics/metrics.go b/state/metrics/metrics.go index 43daf734..42709698 100644 --- a/state/metrics/metrics.go +++ b/state/metrics/metrics.go @@ -3,7 +3,7 @@ package metrics import ( "time" - "github.com/0xPolygonHermez/zkevm-node/metrics" + "github.com/0xPolygon/supernets2-node/metrics" "github.com/prometheus/client_golang/prometheus" ) diff --git a/state/pgstatestorage.go b/state/pgstatestorage.go index 9389df41..241472a7 100644 --- a/state/pgstatestorage.go +++ b/state/pgstatestorage.go @@ -8,7 +8,7 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" + "github.com/0xPolygon/supernets2-node/hex" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -474,7 +474,7 @@ func (p *PostgresStorage) GetLastNBatchesByL2BlockNumber(ctx context.Context, l2 l2BlockStateRoot = _l2BlockStateRoot } // if there is no corresponding l2_block, it will use the latest batch state_root - // it is related to https://github.com/0xPolygonHermez/zkevm-node/issues/1299 + // it is related to https://github.com/0xPolygon/supernets2-node/issues/1299 if l2BlockStateRoot == nil && batch.StateRoot != emptyHash { l2BlockStateRoot = &batch.StateRoot } @@ -585,6 +585,21 @@ func (p *PostgresStorage) GetBatchByNumber(ctx context.Context, batchNumber uint return &batch, nil } +// GetBatchL2DataByNumber returns the batch L2 data of the given batch number. +func (p *PostgresStorage) GetBatchL2DataByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) ([]byte, error) { + getBatchL2DataByBatchNumber := "SELECT raw_txs_data FROM state.batch WHERE batch_num = $1" + q := p.getExecQuerier(dbTx) + var batchL2Data []byte + err := q.QueryRow(ctx, getBatchL2DataByBatchNumber, batchNumber).Scan(&batchL2Data) + + if errors.Is(err, pgx.ErrNoRows) { + return nil, ErrNotFound + } else if err != nil { + return nil, err + } + return batchL2Data, nil +} + // GetBatchByTxHash returns the batch including the given tx func (p *PostgresStorage) GetBatchByTxHash(ctx context.Context, transactionHash common.Hash, dbTx pgx.Tx) (*Batch, error) { const getBatchByTxHashSQL = ` diff --git a/state/pgstatestorage_test.go b/state/pgstatestorage_test.go index c1bd8197..2de2f3c2 100644 --- a/state/pgstatestorage_test.go +++ b/state/pgstatestorage_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/trie" @@ -437,3 +437,30 @@ func TestVirtualBatch(t *testing.T) { require.Equal(t, virtualBatch, *actualVirtualBatch) require.NoError(t, dbTx.Commit(ctx)) } + +func TestGetBatchL2DataByNumber(t *testing.T) { + // Init database instance + initOrResetDB() + ctx := context.Background() + tx, err := testState.BeginStateTransaction(ctx) + require.NoError(t, err) + defer func() { require.NoError(t, tx.Commit(ctx)) }() + + // empty case + var batchNum uint64 = 4 + const openBatchSQL = "INSERT INTO state.batch (batch_num, raw_txs_data) VALUES ($1, $2)" + _, err = tx.Exec(ctx, openBatchSQL, batchNum, nil) + require.NoError(t, err) + data, err := testState.GetBatchL2DataByNumber(ctx, batchNum, tx) + require.NoError(t, err) + assert.Nil(t, data) + + // not empty case + expectedData := []byte("foo bar") + batchNum = 5 + _, err = tx.Exec(ctx, openBatchSQL, batchNum, expectedData) + require.NoError(t, err) + actualData, err := testState.GetBatchL2DataByNumber(ctx, batchNum, tx) + require.NoError(t, err) + assert.Equal(t, expectedData, actualData) +} diff --git a/state/runtime/executor/client.go b/state/runtime/executor/client.go index d9da8234..90a9ef83 100644 --- a/state/runtime/executor/client.go +++ b/state/runtime/executor/client.go @@ -5,8 +5,8 @@ import ( "os/exec" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) diff --git a/state/runtime/executor/errors.go b/state/runtime/executor/errors.go index 0ed116c5..07eb34ac 100644 --- a/state/runtime/executor/errors.go +++ b/state/runtime/executor/errors.go @@ -4,8 +4,8 @@ import ( "fmt" "math" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" + "github.com/0xPolygon/supernets2-node/state/runtime" + "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" ) const ( diff --git a/state/runtime/instrumentation/intrumentation_test.go b/state/runtime/instrumentation/intrumentation_test.go index d5ea1056..a80a41a8 100644 --- a/state/runtime/instrumentation/intrumentation_test.go +++ b/state/runtime/instrumentation/intrumentation_test.go @@ -8,12 +8,12 @@ import ( "os" "testing" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation" - "github.com/0xPolygonHermez/zkevm-node/state/tree" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation" + "github.com/0xPolygon/supernets2-node/state/tree" + "github.com/0xPolygon/supernets2-node/test/dbutils" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" ) diff --git a/state/runtime/instrumentation/js/goja.go b/state/runtime/instrumentation/js/goja.go index 6e418eaf..f065f15e 100644 --- a/state/runtime/instrumentation/js/goja.go +++ b/state/runtime/instrumentation/js/goja.go @@ -22,9 +22,9 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - jsassets "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/js/internal/tracers" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers" + "github.com/0xPolygon/supernets2-node/state/runtime/fakevm" + jsassets "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation/js/internal/tracers" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation/tracers" "github.com/dop251/goja" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/state/runtime/instrumentation/tracers/native/4byte.go b/state/runtime/instrumentation/tracers/native/4byte.go index 524f26f7..8a8aa1f2 100644 --- a/state/runtime/instrumentation/tracers/native/4byte.go +++ b/state/runtime/instrumentation/tracers/native/4byte.go @@ -22,8 +22,8 @@ import ( "strconv" "sync/atomic" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers" + "github.com/0xPolygon/supernets2-node/state/runtime/fakevm" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation/tracers" "github.com/ethereum/go-ethereum/common" ) diff --git a/state/runtime/instrumentation/tracers/native/call.go b/state/runtime/instrumentation/tracers/native/call.go index a4975ed1..cfc6db38 100644 --- a/state/runtime/instrumentation/tracers/native/call.go +++ b/state/runtime/instrumentation/tracers/native/call.go @@ -22,8 +22,8 @@ import ( "math/big" "sync/atomic" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers" + "github.com/0xPolygon/supernets2-node/state/runtime/fakevm" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation/tracers" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/state/runtime/instrumentation/tracers/native/call_flat.go b/state/runtime/instrumentation/tracers/native/call_flat.go index c91077f9..e36ae2f3 100644 --- a/state/runtime/instrumentation/tracers/native/call_flat.go +++ b/state/runtime/instrumentation/tracers/native/call_flat.go @@ -23,8 +23,8 @@ import ( "math/big" "strings" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers" + "github.com/0xPolygon/supernets2-node/state/runtime/fakevm" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation/tracers" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ) diff --git a/state/runtime/instrumentation/tracers/native/gen_callframe_json.go b/state/runtime/instrumentation/tracers/native/gen_callframe_json.go index b17cb22d..5fd2dec7 100644 --- a/state/runtime/instrumentation/tracers/native/gen_callframe_json.go +++ b/state/runtime/instrumentation/tracers/native/gen_callframe_json.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" + "github.com/0xPolygon/supernets2-node/state/runtime/fakevm" ) var _ = (*callFrameMarshaling)(nil) diff --git a/state/runtime/instrumentation/tracers/native/noop.go b/state/runtime/instrumentation/tracers/native/noop.go index fc692363..1b99a348 100644 --- a/state/runtime/instrumentation/tracers/native/noop.go +++ b/state/runtime/instrumentation/tracers/native/noop.go @@ -20,8 +20,8 @@ import ( "encoding/json" "math/big" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers" + "github.com/0xPolygon/supernets2-node/state/runtime/fakevm" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation/tracers" "github.com/ethereum/go-ethereum/common" ) diff --git a/state/runtime/instrumentation/tracers/native/prestate.go b/state/runtime/instrumentation/tracers/native/prestate.go index 16d99a23..3e8feb64 100644 --- a/state/runtime/instrumentation/tracers/native/prestate.go +++ b/state/runtime/instrumentation/tracers/native/prestate.go @@ -22,8 +22,8 @@ import ( "math/big" "sync/atomic" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers" + "github.com/0xPolygon/supernets2-node/state/runtime/fakevm" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation/tracers" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" diff --git a/state/runtime/instrumentation/tracers/tracers.go b/state/runtime/instrumentation/tracers/tracers.go index ec21f91e..f81a4f24 100644 --- a/state/runtime/instrumentation/tracers/tracers.go +++ b/state/runtime/instrumentation/tracers/tracers.go @@ -21,7 +21,7 @@ import ( "encoding/json" "math/big" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" + "github.com/0xPolygon/supernets2-node/state/runtime/fakevm" "github.com/ethereum/go-ethereum/common" ) diff --git a/state/runtime/runtime.go b/state/runtime/runtime.go index d7363b09..df55b27d 100644 --- a/state/runtime/runtime.go +++ b/state/runtime/runtime.go @@ -4,7 +4,7 @@ import ( "encoding/json" "errors" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation" "github.com/ethereum/go-ethereum/common" ) diff --git a/state/state.go b/state/state.go index 865a17f7..0d55ae1a 100644 --- a/state/state.go +++ b/state/state.go @@ -5,10 +5,10 @@ import ( "math/big" "sync" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/merkletree" + "github.com/0xPolygon/supernets2-node/state/metrics" + "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" diff --git a/state/state_test.go b/state/state_test.go index a31c0fee..57d318db 100644 --- a/state/state_test.go +++ b/state/state_test.go @@ -14,23 +14,23 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - mtDBclientpb "github.com/0xPolygonHermez/zkevm-node/merkletree/pb" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - executorclientpb "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Counter" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/event/nileventstorage" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/merkletree" + mtDBclientpb "github.com/0xPolygon/supernets2-node/merkletree/pb" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/metrics" + "github.com/0xPolygon/supernets2-node/state/runtime" + "github.com/0xPolygon/supernets2-node/state/runtime/executor" + executorclientpb "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Counter" + "github.com/0xPolygon/supernets2-node/test/dbutils" + "github.com/0xPolygon/supernets2-node/test/operations" + "github.com/0xPolygon/supernets2-node/test/testutils" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -1522,7 +1522,7 @@ func TestGenesisNewLeafType(t *testing.T) { // err = testState.ProcessAndStoreClosedBatch(ctx, processCtx, common.Hex2Bytes(tv.BatchL2Data), dbTx) // nolint:ineffassign,staticcheck // // TODO: actually check for nil err in ProcessAndStoreClosedBatch return value, // // currently blocked by the issue about the mismatched tx hashes described here -// // https://github.com/0xPolygonHermez/zkevm-node/issues/1033 +// // https://github.com/0xPolygon/supernets2-node/issues/1033 // // require.NoError(t, err) // // TODO: currently the db tx is marked as invalid after the first error, once diff --git a/state/transaction.go b/state/transaction.go index d356c727..09bea07c 100644 --- a/state/transaction.go +++ b/state/transaction.go @@ -10,17 +10,17 @@ import ( "strings" "time" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state/runtime" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/fakevm" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/js" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation/tracers/native" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state/runtime" + "github.com/0xPolygon/supernets2-node/state/runtime/executor" + "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" + "github.com/0xPolygon/supernets2-node/state/runtime/fakevm" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation/js" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation/tracers" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation/tracers/native" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" diff --git a/state/types.go b/state/types.go index 72e8c4c1..95e5fce2 100644 --- a/state/types.go +++ b/state/types.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation" + "github.com/0xPolygon/supernets2-node/state/metrics" + "github.com/0xPolygon/supernets2-node/state/runtime/instrumentation" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" ) diff --git a/synchronizer/config.go b/synchronizer/config.go index 5142aaef..81775af8 100644 --- a/synchronizer/config.go +++ b/synchronizer/config.go @@ -1,7 +1,7 @@ package synchronizer import ( - "github.com/0xPolygonHermez/zkevm-node/config/types" + "github.com/0xPolygon/supernets2-node/config/types" ) // Config represents the configuration of the synchronizer diff --git a/synchronizer/datacommittee.go b/synchronizer/datacommittee.go new file mode 100644 index 00000000..4c3a9576 --- /dev/null +++ b/synchronizer/datacommittee.go @@ -0,0 +1,127 @@ +package synchronizer + +import ( + "fmt" + "math/big" + "math/rand" + + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" +) + +const unexpectedHashTemplate = "missmatch on transaction data for batch num %d. Expected hash %s, actual hash: %s" + +func (s *ClientSynchronizer) loadCommittee() error { + committee, err := s.etherMan.GetCurrentDataCommittee() + if err != nil { + return err + } + selectedCommitteeMember := -1 + if committee != nil { + s.committeeMembers = committee.Members + if len(committee.Members) > 0 { + selectedCommitteeMember = rand.Intn(len(committee.Members)) //nolint:gosec + } + } + s.selectedCommitteeMember = selectedCommitteeMember + return nil +} + +func (s *ClientSynchronizer) getBatchL2Data(batchNum uint64, expectedTransactionsHash common.Hash) ([]byte, error) { + found := true + transactionsData, err := s.state.GetBatchL2DataByNumber(s.ctx, batchNum, nil) + if err != nil { + if err == state.ErrNotFound { + found = false + } else { + return nil, fmt.Errorf("failed to get batch data from state for batch num %d: %w", batchNum, err) + } + } + actualTransactionsHash := crypto.Keccak256Hash(transactionsData) + if !found || expectedTransactionsHash != actualTransactionsHash { + if found { + log.Warnf(unexpectedHashTemplate, batchNum, expectedTransactionsHash, actualTransactionsHash) + } + + if !s.isTrustedSequencer { + log.Info("trying to get data from trusted sequencer") + data, err := s.getDataFromTrustedSequencer(batchNum, expectedTransactionsHash) + if err != nil { + log.Error(err) + } else { + return data, nil + } + } + + log.Info("trying to get data from data committee node") + data, err := s.getDataFromCommittee(batchNum, expectedTransactionsHash) + if err != nil { + log.Error(err) + if s.isTrustedSequencer { + return nil, fmt.Errorf("data not found on the local DB nor on any data committee member") + } else { + return nil, fmt.Errorf("data not found on the local DB, nor from the trusted sequencer nor on any data committee member") + } + } + return data, nil + } + return transactionsData, nil +} + +func (s *ClientSynchronizer) getDataFromCommittee(batchNum uint64, expectedTransactionsHash common.Hash) ([]byte, error) { + intialMember := s.selectedCommitteeMember + found := false + for !found && intialMember != -1 { + member := s.committeeMembers[s.selectedCommitteeMember] + log.Infof("trying to get data from %s at %s", member.Addr.Hex(), member.URL) + c := s.dataCommitteeClientFactory.New(member.URL) + data, err := c.GetOffChainData(s.ctx, expectedTransactionsHash) + if err != nil { + log.Warnf( + "error getting data from DAC node %s at %s: %s", + member.Addr.Hex(), member.URL, err, + ) + s.selectedCommitteeMember = (s.selectedCommitteeMember + 1) % len(s.committeeMembers) + if s.selectedCommitteeMember == intialMember { + break + } + continue + } + actualTransactionsHash := crypto.Keccak256Hash(data) + if actualTransactionsHash != expectedTransactionsHash { + unexpectedHash := fmt.Errorf( + unexpectedHashTemplate, batchNum, expectedTransactionsHash, actualTransactionsHash, + ) + log.Warnf( + "error getting data from DAC node %s at %s: %s", + member.Addr.Hex(), member.URL, unexpectedHash, + ) + s.selectedCommitteeMember = (s.selectedCommitteeMember + 1) % len(s.committeeMembers) + if s.selectedCommitteeMember == intialMember { + break + } + continue + } + return data, nil + } + if err := s.loadCommittee(); err != nil { + return nil, fmt.Errorf("error loading data committee: %s", err) + } + return nil, fmt.Errorf("couldn't get the data from any committee member") +} + +func (s *ClientSynchronizer) getDataFromTrustedSequencer(batchNum uint64, expectedTransactionsHash common.Hash) ([]byte, error) { + b, err := s.zkEVMClient.BatchByNumber(s.ctx, big.NewInt(int64(batchNum))) + if err != nil { + return nil, fmt.Errorf("failed to get batch num %d from trusted sequencer: %w", batchNum, err) + } + actualTransactionsHash := crypto.Keccak256Hash(b.BatchL2Data) + if expectedTransactionsHash != actualTransactionsHash { + return nil, fmt.Errorf( + unexpectedHashTemplate, batchNum, expectedTransactionsHash, actualTransactionsHash, + ) + } + return b.BatchL2Data, nil +} diff --git a/synchronizer/datacommittee_test.go b/synchronizer/datacommittee_test.go new file mode 100644 index 00000000..0a790896 --- /dev/null +++ b/synchronizer/datacommittee_test.go @@ -0,0 +1,609 @@ +package synchronizer + +import ( + "context" + "errors" + "fmt" + "math/big" + "strconv" + "testing" + + "github.com/0xPolygon/supernets2-node/etherman" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/state" + "github.com/ethereum/go-ethereum/common" + ethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestGetBatchL2DataWithoutCommittee(t *testing.T) { + m := mocks{ + State: newStateMock(t), + ZKEVMClient: newZkEVMClientMock(t), + Etherman: newEthermanMock(t), + } + + ctx := context.Background() + + trustedSync := ClientSynchronizer{ + isTrustedSequencer: true, + state: m.State, + zkEVMClient: m.ZKEVMClient, + etherMan: m.Etherman, + ctx: ctx, + selectedCommitteeMember: -1, + } + + permissionlessSync := ClientSynchronizer{ + isTrustedSequencer: false, + state: m.State, + zkEVMClient: m.ZKEVMClient, + etherMan: m.Etherman, + ctx: ctx, + selectedCommitteeMember: -1, + } + + const batchNum uint64 = 5 + batchNumBig := big.NewInt(int64(batchNum)) + dataFromDB := []byte("i poli tis Kerkyras einai omorfi") + errorHash := state.ZeroHash + unexpectedErrFromDB := errors.New("unexpected db") + errFromDBTemplate := "failed to get batch data from state for batch num " + strconv.Itoa(int(batchNum)) + ": %s" + + trustedResponse := &types.Batch{Transactions: []types.TransactionOrHash{ + {Tx: &types.Transaction{Nonce: 4}}, + {Tx: &types.Transaction{Nonce: 284}}, + }} + txs := []ethTypes.Transaction{} + for _, transaction := range trustedResponse.Transactions { + tx := transaction.Tx.CoreTx() + txs = append(txs, *tx) + } + dataFromTrusted, err := state.EncodeTransactions(txs) + require.NoError(t, err) + trustedResponse.BatchL2Data = dataFromTrusted + trustedResponseEmpty := &types.Batch{Transactions: []types.TransactionOrHash{}} + txs = []ethTypes.Transaction{} + dataFromTrustedEmpty, err := state.EncodeTransactions(txs) + require.NoError(t, err) + + unexpectedErrFromTrusted := errors.New("unexpected trusted") + + type testCase struct { + Name string + ExpectedResult []byte + ExpectedError error + Sync *ClientSynchronizer + SetupMocks func(m *mocks) + } + + testCases := []testCase{ + // Trusted sync cases + { + Name: "Trusted sync fail if unexpected error from DB", + ExpectedResult: nil, + ExpectedError: fmt.Errorf(errFromDBTemplate, unexpectedErrFromDB), + Sync: &trustedSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, unexpectedErrFromDB). + Once() + }, + }, + { + Name: "Trusted sync fail if data not found on DB", + ExpectedResult: nil, + ExpectedError: fmt.Errorf("data not found on the local DB nor on any data committee member"), + Sync: &trustedSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil). + Once() + }, + }, + { + Name: "Trusted sync fail if hash missmatch on DB", + ExpectedResult: nil, + ExpectedError: fmt.Errorf("data not found on the local DB nor on any data committee member"), + Sync: &trustedSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(dataFromDB, nil). + Once() + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil). + Once() + }, + }, + { + Name: "Trusted sync succeeds if hash match on DB", + ExpectedResult: dataFromDB, + ExpectedError: nil, + Sync: &trustedSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(dataFromDB, nil). + Once() + }, + }, + // Permissionless sync cases + { + Name: "Permissionless sync succeeds if hash match on DB", + ExpectedResult: dataFromDB, + ExpectedError: nil, + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(dataFromDB, nil). + Once() + }, + }, + { + Name: "Permissionless sync fail if unexpected error from DB", + ExpectedResult: nil, + ExpectedError: fmt.Errorf(errFromDBTemplate, unexpectedErrFromDB), + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, unexpectedErrFromDB). + Once() + }, + }, + { + Name: "Permissionless sync fail if hash missmatch on the DB and error from trusted", + ExpectedResult: nil, + ExpectedError: fmt.Errorf("data not found on the local DB, nor from the trusted sequencer nor on any data committee member"), + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(dataFromDB, nil). + Once() + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(nil, unexpectedErrFromTrusted). + Once() + }, + }, + { + Name: "Permissionless sync fail if hash missmatch on the DB and from trusted sequencer", + ExpectedResult: nil, + ExpectedError: fmt.Errorf("data not found on the local DB, nor from the trusted sequencer nor on any data committee member"), + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(dataFromDB, nil). + Once() + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(trustedResponse, nil). + Once() + }, + }, + { + Name: "Permissionless sync succeeds if hash missmatch on the DB and match from trusted", + ExpectedResult: dataFromTrusted, + ExpectedError: nil, + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(dataFromDB, nil). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(trustedResponse, nil). + Once() + }, + }, + { + Name: "Permissionless sync fail if not found on the DB and error from trusted", + ExpectedResult: nil, + ExpectedError: fmt.Errorf("data not found on the local DB, nor from the trusted sequencer nor on any data committee member"), + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(nil, unexpectedErrFromTrusted). + Once() + }, + }, + { + Name: "Permissionless sync fail fail if not found on the DB and hash missmatch trusted", + ExpectedResult: nil, + ExpectedError: fmt.Errorf("data not found on the local DB, nor from the trusted sequencer nor on any data committee member"), + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(trustedResponse, nil). + Once() + }, + }, + { + Name: "Permissionless sync succeeds if not found on the DB and match from trusted", + ExpectedResult: dataFromTrusted, + ExpectedError: nil, + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(trustedResponse, nil). + Once() + }, + }, + { + Name: "Permissionless sync succeeds if not found on the DB and match from trusted empty response", + ExpectedResult: dataFromTrustedEmpty, + ExpectedError: nil, + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(trustedResponseEmpty, nil). + Once() + }, + }, + } + + for _, testCase := range testCases { + t.Run(testCase.Name, func(t *testing.T) { + tc := testCase + tc.SetupMocks(&m) + + var expectedHash common.Hash + if tc.ExpectedError == nil { + expectedHash = crypto.Keccak256Hash(tc.ExpectedResult) + } else { + expectedHash = errorHash + } + + res, err := tc.Sync.getBatchL2Data(batchNum, expectedHash) + assert.Equal(t, tc.ExpectedResult, res) + if tc.ExpectedError != nil { + require.NotNil(t, err) + assert.Equal(t, tc.ExpectedError.Error(), err.Error()) + } + }) + } +} + +func TestGetBatchL2DataWithCommittee(t *testing.T) { + m := mocks{ + State: newStateMock(t), + ZKEVMClient: newZkEVMClientMock(t), + Etherman: newEthermanMock(t), + DataCommitteeClientFactory: newDataCommitteeClientFactoryMock(t), + } + + ctx := context.Background() + + committeeMembers := []etherman.DataCommitteeMember{ + { + URL: "0", + Addr: common.HexToAddress("0x0"), + }, + { + URL: "1", + Addr: common.HexToAddress("0x1"), + }, + { + URL: "2", + Addr: common.HexToAddress("0x2"), + }, + } + trustedSync := ClientSynchronizer{ + isTrustedSequencer: true, + state: m.State, + zkEVMClient: m.ZKEVMClient, + etherMan: m.Etherman, + ctx: ctx, + selectedCommitteeMember: 0, + committeeMembers: committeeMembers, + dataCommitteeClientFactory: m.DataCommitteeClientFactory, + } + + permissionlessSync := ClientSynchronizer{ + isTrustedSequencer: false, + state: m.State, + zkEVMClient: m.ZKEVMClient, + etherMan: m.Etherman, + ctx: ctx, + selectedCommitteeMember: 1, + committeeMembers: committeeMembers, + dataCommitteeClientFactory: m.DataCommitteeClientFactory, + } + + const batchNum uint64 = 5 + batchNumBig := big.NewInt(int64(batchNum)) + dataFromDB := []byte("i poli tis Kerkyras einai omorfi") + errorHash := state.ZeroHash + + trustedResponse := &types.Batch{Transactions: []types.TransactionOrHash{ + {Tx: &types.Transaction{Nonce: 4}}, + {Tx: &types.Transaction{Nonce: 284}}, + }} + txs := []ethTypes.Transaction{} + for _, transaction := range trustedResponse.Transactions { + tx := transaction.Tx.CoreTx() + txs = append(txs, *tx) + } + dataFromTrusted, err := state.EncodeTransactions(txs) + require.NoError(t, err) + trustedResponse.BatchL2Data = dataFromTrusted + + type testCase struct { + Name string + ExpectedResult []byte + ExpectedError error + Sync *ClientSynchronizer + SetupMocks func(m *mocks) + Retry bool + } + + testCases := []testCase{ + // Trusted sync cases + { + Name: "Trusted sync fail if all the members don't answer", + ExpectedResult: nil, + ExpectedError: fmt.Errorf("data not found on the local DB nor on any data committee member"), + Sync: &trustedSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + DAClientMock := newDataCommitteeClientMock(t) + m.DataCommitteeClientFactory. + On("New", "0"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, state.ZeroHash). + Return([]byte("not the correct data"), nil). + Once() + m.DataCommitteeClientFactory. + On("New", "1"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, state.ZeroHash). + Return(nil, errors.New("not today")). + Once() + m.DataCommitteeClientFactory. + On("New", "2"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, state.ZeroHash). + Return([]byte("not the correct data"), nil). + Once() + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil). + Once() + }, + }, + { + Name: "Trusted sync succeeds after 2nd committee member answers correctly", + ExpectedResult: dataFromDB, + ExpectedError: nil, + Sync: &trustedSync, + SetupMocks: func(m *mocks) { + // Reset DAC + trustedSync.committeeMembers = committeeMembers + trustedSync.selectedCommitteeMember = 0 + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + DAClientMock := newDataCommitteeClientMock(t) + m.DataCommitteeClientFactory. + On("New", "0"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return([]byte("not the correct data"), nil). + Once() + m.DataCommitteeClientFactory. + On("New", "1"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return(nil, errors.New("not today")). + Once() + m.DataCommitteeClientFactory. + On("New", "2"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return(dataFromDB, nil). + Once() + }, + }, + // Permissionless sync cases + { + Name: "Permissionless sync succeeds after 2nd committee member answers correctly", + ExpectedResult: dataFromDB, + ExpectedError: nil, + Sync: &permissionlessSync, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(nil, errors.New("not today")). + Once() + DAClientMock := newDataCommitteeClientMock(t) + m.DataCommitteeClientFactory. + On("New", "1"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return([]byte("not the correct data"), nil). + Once() + m.DataCommitteeClientFactory. + On("New", "2"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return(nil, errors.New("not today")). + Once() + m.DataCommitteeClientFactory. + On("New", "0"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return(dataFromDB, nil). + Once() + }, + }, + { + Name: "Permissionless sync succeeds after updating DAC", + ExpectedResult: dataFromDB, + ExpectedError: nil, + Sync: &permissionlessSync, + Retry: true, + SetupMocks: func(m *mocks) { + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(nil, errors.New("not today")). + Once() + DAClientMock := newDataCommitteeClientMock(t) + m.DataCommitteeClientFactory. + On("New", "1"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return([]byte("not the correct data"), nil). + Once() + m.DataCommitteeClientFactory. + On("New", "2"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return(nil, errors.New("not today")). + Once() + m.DataCommitteeClientFactory. + On("New", "0"). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return(nil, errors.New("not today")). + Once() + const succesfullURL = "the time is now" + m.Etherman. + On("GetCurrentDataCommittee"). + Return(ðerman.DataCommittee{ + Members: []etherman.DataCommitteeMember{{ + URL: succesfullURL, + Addr: common.HexToAddress("0xff"), + }}, + }, nil). + Once() + m.State. + On("GetBatchL2DataByNumber", ctx, batchNum, nil). + Return(nil, state.ErrNotFound). + Once() + m.ZKEVMClient. + On("BatchByNumber", ctx, batchNumBig). + Return(nil, errors.New("not today")). + Once() + m.DataCommitteeClientFactory. + On("New", succesfullURL). + Return(DAClientMock). + Once() + DAClientMock. + On("GetOffChainData", trustedSync.ctx, crypto.Keccak256Hash(dataFromDB)). + Return(dataFromDB, nil). + Once() + }, + }, + } + + for _, testCase := range testCases { + t.Run(testCase.Name, func(t *testing.T) { + tc := testCase + tc.SetupMocks(&m) + + var expectedHash common.Hash + if tc.ExpectedError == nil { + expectedHash = crypto.Keccak256Hash(tc.ExpectedResult) + } else { + expectedHash = errorHash + } + + res, err := tc.Sync.getBatchL2Data(batchNum, expectedHash) + if tc.Retry { + require.Error(t, err) + res, err = tc.Sync.getBatchL2Data(batchNum, expectedHash) + } + assert.Equal(t, tc.ExpectedResult, res) + if tc.ExpectedError != nil { + require.NotNil(t, err) + assert.Equal(t, tc.ExpectedError.Error(), err.Error()) + } + }) + } +} diff --git a/synchronizer/interfaces.go b/synchronizer/interfaces.go index 732b5d5f..ae1c661b 100644 --- a/synchronizer/interfaces.go +++ b/synchronizer/interfaces.go @@ -4,11 +4,11 @@ import ( "context" "math/big" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" + "github.com/0xPolygon/supernets2-node/etherman" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/metrics" + "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" "github.com/jackc/pgx/v4" @@ -24,6 +24,7 @@ type ethermanInterface interface { VerifyGenBlockNumber(ctx context.Context, genBlockNumber uint64) (bool, error) GetForks(ctx context.Context, genBlockNumber uint64) ([]state.ForkIDInterval, error) GetLatestVerifiedBatchNum() (uint64, error) + GetCurrentDataCommittee() (*etherman.DataCommittee, error) } // stateInterface gathers the methods required to interact with the state. @@ -36,6 +37,7 @@ type stateInterface interface { GetPreviousBlock(ctx context.Context, offset uint64, dbTx pgx.Tx) (*state.Block, error) GetLastBatchNumber(ctx context.Context, dbTx pgx.Tx) (uint64, error) GetBatchByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.Batch, error) + GetBatchL2DataByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) ([]byte, error) ResetTrustedState(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) error AddVirtualBatch(ctx context.Context, virtualBatch *state.VirtualBatch, dbTx pgx.Tx) error GetNextForcedBatches(ctx context.Context, nextForcedBatches int, dbTx pgx.Tx) ([]state.ForcedBatch, error) diff --git a/synchronizer/mock_datacommitteeclient.go b/synchronizer/mock_datacommitteeclient.go new file mode 100644 index 00000000..ff3c07a4 --- /dev/null +++ b/synchronizer/mock_datacommitteeclient.go @@ -0,0 +1,85 @@ +// Code generated by mockery v2.22.1. DO NOT EDIT. + +package synchronizer + +import ( + context "context" + + common "github.com/ethereum/go-ethereum/common" + + mock "github.com/stretchr/testify/mock" + + sequence "github.com/0xPolygon/supernets2-data-availability/sequence" +) + +// dataCommitteeClientMock is an autogenerated mock type for the ClientInterface type +type dataCommitteeClientMock struct { + mock.Mock +} + +// GetOffChainData provides a mock function with given fields: ctx, hash +func (_m *dataCommitteeClientMock) GetOffChainData(ctx context.Context, hash common.Hash) ([]byte, error) { + ret := _m.Called(ctx, hash) + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, common.Hash) ([]byte, error)); ok { + return rf(ctx, hash) + } + if rf, ok := ret.Get(0).(func(context.Context, common.Hash) []byte); ok { + r0 = rf(ctx, hash) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, common.Hash) error); ok { + r1 = rf(ctx, hash) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SignSequence provides a mock function with given fields: signedSequence +func (_m *dataCommitteeClientMock) SignSequence(signedSequence sequence.SignedSequence) ([]byte, error) { + ret := _m.Called(signedSequence) + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(sequence.SignedSequence) ([]byte, error)); ok { + return rf(signedSequence) + } + if rf, ok := ret.Get(0).(func(sequence.SignedSequence) []byte); ok { + r0 = rf(signedSequence) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(sequence.SignedSequence) error); ok { + r1 = rf(signedSequence) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type mockConstructorTestingTnewDataCommitteeClientMock interface { + mock.TestingT + Cleanup(func()) +} + +// newDataCommitteeClientMock creates a new instance of dataCommitteeClientMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newDataCommitteeClientMock(t mockConstructorTestingTnewDataCommitteeClientMock) *dataCommitteeClientMock { + mock := &dataCommitteeClientMock{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/synchronizer/mock_datacommitteeclientfactory.go b/synchronizer/mock_datacommitteeclientfactory.go new file mode 100644 index 00000000..2ac8d1d4 --- /dev/null +++ b/synchronizer/mock_datacommitteeclientfactory.go @@ -0,0 +1,44 @@ +// Code generated by mockery v2.22.1. DO NOT EDIT. + +package synchronizer + +import ( + client "github.com/0xPolygon/supernets2-data-availability/client" + mock "github.com/stretchr/testify/mock" +) + +// dataCommitteeClientFactoryMock is an autogenerated mock type for the ClientFactoryInterface type +type dataCommitteeClientFactoryMock struct { + mock.Mock +} + +// New provides a mock function with given fields: url +func (_m *dataCommitteeClientFactoryMock) New(url string) client.ClientInterface { + ret := _m.Called(url) + + var r0 client.ClientInterface + if rf, ok := ret.Get(0).(func(string) client.ClientInterface); ok { + r0 = rf(url) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(client.ClientInterface) + } + } + + return r0 +} + +type mockConstructorTestingTnewDataCommitteeClientFactoryMock interface { + mock.TestingT + Cleanup(func()) +} + +// newDataCommitteeClientFactoryMock creates a new instance of dataCommitteeClientFactoryMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newDataCommitteeClientFactoryMock(t mockConstructorTestingTnewDataCommitteeClientFactoryMock) *dataCommitteeClientFactoryMock { + mock := &dataCommitteeClientFactoryMock{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/synchronizer/mock_etherman.go b/synchronizer/mock_etherman.go index 45b93cdc..63068b61 100644 --- a/synchronizer/mock_etherman.go +++ b/synchronizer/mock_etherman.go @@ -8,11 +8,11 @@ import ( common "github.com/ethereum/go-ethereum/common" - etherman "github.com/0xPolygonHermez/zkevm-node/etherman" + etherman "github.com/0xPolygon/supernets2-node/etherman" mock "github.com/stretchr/testify/mock" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/supernets2-node/state" types "github.com/ethereum/go-ethereum/core/types" ) @@ -48,6 +48,32 @@ func (_m *ethermanMock) EthBlockByNumber(ctx context.Context, blockNumber uint64 return r0, r1 } +// GetCurrentDataCommittee provides a mock function with given fields: +func (_m *ethermanMock) GetCurrentDataCommittee() (*etherman.DataCommittee, error) { + ret := _m.Called() + + var r0 *etherman.DataCommittee + var r1 error + if rf, ok := ret.Get(0).(func() (*etherman.DataCommittee, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() *etherman.DataCommittee); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*etherman.DataCommittee) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // GetForks provides a mock function with given fields: ctx, genBlockNumber func (_m *ethermanMock) GetForks(ctx context.Context, genBlockNumber uint64) ([]state.ForkIDInterval, error) { ret := _m.Called(ctx, genBlockNumber) diff --git a/synchronizer/mock_state.go b/synchronizer/mock_state.go index 8e05a7d1..14272d3b 100644 --- a/synchronizer/mock_state.go +++ b/synchronizer/mock_state.go @@ -7,15 +7,15 @@ import ( common "github.com/ethereum/go-ethereum/common" - metrics "github.com/0xPolygonHermez/zkevm-node/state/metrics" + metrics "github.com/0xPolygon/supernets2-node/state/metrics" mock "github.com/stretchr/testify/mock" - pb "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" + pb "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" pgx "github.com/jackc/pgx/v4" - state "github.com/0xPolygonHermez/zkevm-node/state" + state "github.com/0xPolygon/supernets2-node/state" types "github.com/ethereum/go-ethereum/core/types" ) @@ -229,6 +229,32 @@ func (_m *stateMock) GetBatchByNumber(ctx context.Context, batchNumber uint64, d return r0, r1 } +// GetBatchL2DataByNumber provides a mock function with given fields: ctx, batchNumber, dbTx +func (_m *stateMock) GetBatchL2DataByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) ([]byte, error) { + ret := _m.Called(ctx, batchNumber, dbTx) + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uint64, pgx.Tx) ([]byte, error)); ok { + return rf(ctx, batchNumber, dbTx) + } + if rf, ok := ret.Get(0).(func(context.Context, uint64, pgx.Tx) []byte); ok { + r0 = rf(ctx, batchNumber, dbTx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uint64, pgx.Tx) error); ok { + r1 = rf(ctx, batchNumber, dbTx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // GetForkIDTrustedReorgCount provides a mock function with given fields: ctx, forkID, version, dbTx func (_m *stateMock) GetForkIDTrustedReorgCount(ctx context.Context, forkID uint64, version string, dbTx pgx.Tx) (uint64, error) { ret := _m.Called(ctx, forkID, version, dbTx) diff --git a/synchronizer/mock_zkevmclient.go b/synchronizer/mock_zkevmclient.go index cc65d007..22a9ae29 100644 --- a/synchronizer/mock_zkevmclient.go +++ b/synchronizer/mock_zkevmclient.go @@ -8,7 +8,7 @@ import ( mock "github.com/stretchr/testify/mock" - types "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" + types "github.com/0xPolygon/supernets2-node/jsonrpc/types" ) // zkEVMClientMock is an autogenerated mock type for the zkEVMClientInterface type diff --git a/synchronizer/synchronizer.go b/synchronizer/synchronizer.go index 54737af4..a6082d03 100644 --- a/synchronizer/synchronizer.go +++ b/synchronizer/synchronizer.go @@ -8,12 +8,13 @@ import ( "strings" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" + "github.com/0xPolygon/supernets2-data-availability/client" + "github.com/0xPolygon/supernets2-node/etherman" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/metrics" "github.com/ethereum/go-ethereum/common" "github.com/jackc/pgx/v4" ) @@ -26,16 +27,19 @@ type Synchronizer interface { // ClientSynchronizer connects L1 and L2 type ClientSynchronizer struct { - isTrustedSequencer bool - etherMan ethermanInterface - state stateInterface - pool poolInterface - ethTxManager ethTxManager - zkEVMClient zkEVMClientInterface - ctx context.Context - cancelCtx context.CancelFunc - genesis state.Genesis - cfg Config + isTrustedSequencer bool + etherMan ethermanInterface + state stateInterface + pool poolInterface + ethTxManager ethTxManager + zkEVMClient zkEVMClientInterface + ctx context.Context + cancelCtx context.CancelFunc + genesis state.Genesis + cfg Config + committeeMembers []etherman.DataCommitteeMember + selectedCommitteeMember int + dataCommitteeClientFactory client.ClientFactoryInterface } // NewSynchronizer creates and initializes an instance of Synchronizer @@ -47,21 +51,26 @@ func NewSynchronizer( ethTxManager ethTxManager, zkEVMClient zkEVMClientInterface, genesis state.Genesis, - cfg Config) (Synchronizer, error) { + cfg Config, + clientFactory client.ClientFactoryInterface, +) (Synchronizer, error) { ctx, cancel := context.WithCancel(context.Background()) - return &ClientSynchronizer{ - isTrustedSequencer: isTrustedSequencer, - state: st, - etherMan: ethMan, - pool: pool, - ctx: ctx, - cancelCtx: cancel, - ethTxManager: ethTxManager, - zkEVMClient: zkEVMClient, - genesis: genesis, - cfg: cfg, - }, nil + c := &ClientSynchronizer{ + isTrustedSequencer: isTrustedSequencer, + state: st, + etherMan: ethMan, + pool: pool, + ctx: ctx, + cancelCtx: cancel, + ethTxManager: ethTxManager, + zkEVMClient: zkEVMClient, + genesis: genesis, + cfg: cfg, + dataCommitteeClientFactory: clientFactory, + } + err := c.loadCommittee() + return c, err } var waitDuration = time.Duration(0) @@ -708,6 +717,10 @@ func (s *ClientSynchronizer) processSequenceBatches(sequencedBatches []etherman. return nil } for _, sbatch := range sequencedBatches { + batchL2Data, err := s.getBatchL2Data(sbatch.BatchNumber, sbatch.TransactionsHash) + if err != nil { + return err + } virtualBatch := state.VirtualBatch{ BatchNumber: sbatch.BatchNumber, TxHash: sbatch.TxHash, @@ -720,7 +733,7 @@ func (s *ClientSynchronizer) processSequenceBatches(sequencedBatches []etherman. GlobalExitRoot: sbatch.GlobalExitRoot, Timestamp: time.Unix(int64(sbatch.Timestamp), 0), Coinbase: sbatch.Coinbase, - BatchL2Data: sbatch.Transactions, + BatchL2Data: batchL2Data, } // ForcedBatch must be processed if sbatch.MinForcedTimestamp > 0 { // If this is true means that the batch is forced @@ -747,7 +760,7 @@ func (s *ClientSynchronizer) processSequenceBatches(sequencedBatches []etherman. } if uint64(forcedBatches[0].ForcedAt.Unix()) != sbatch.MinForcedTimestamp || forcedBatches[0].GlobalExitRoot != sbatch.GlobalExitRoot || - common.Bytes2Hex(forcedBatches[0].RawTxsData) != common.Bytes2Hex(sbatch.Transactions) { + common.Bytes2Hex(forcedBatches[0].RawTxsData) != common.Bytes2Hex(batchL2Data) { log.Warnf("ForcedBatch stored: %+v", forcedBatches) log.Warnf("ForcedBatch sequenced received: %+v", sbatch) log.Errorf("error: forcedBatch received doesn't match with the next expected forcedBatch stored in db. Expected: %+v, Synced: %+v", forcedBatches, sbatch) diff --git a/synchronizer/synchronizer_test.go b/synchronizer/synchronizer_test.go index 94d7218e..1a10d0ce 100644 --- a/synchronizer/synchronizer_test.go +++ b/synchronizer/synchronizer_test.go @@ -6,26 +6,28 @@ import ( "testing" "time" - cfgTypes "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/etherman" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" + cfgTypes "github.com/0xPolygon/supernets2-node/config/types" + "github.com/0xPolygon/supernets2-node/etherman" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/metrics" + "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" "github.com/jackc/pgx/v4" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) type mocks struct { - Etherman *ethermanMock - State *stateMock - Pool *poolMock - EthTxManager *ethTxManagerMock - DbTx *dbTxMock - ZKEVMClient *zkEVMClientMock + Etherman *ethermanMock + State *stateMock + Pool *poolMock + EthTxManager *ethTxManagerMock + DbTx *dbTxMock + ZKEVMClient *zkEVMClientMock + DataCommitteeClientFactory *dataCommitteeClientFactoryMock } // Test commented until we remove the fatal in checkTrustedReorg function @@ -84,7 +86,7 @@ type mocks struct { // BatchNumber: uint64(1), // Coinbase: common.HexToAddress("0x222"), // TxHash: common.HexToHash("0x333"), -// PolygonZkEVMBatchData: polygonzkevm.PolygonZkEVMBatchData{ +// Supernets2BatchData: supernets2.Supernets2BatchData{ // Transactions: []byte{}, // GlobalExitRoot: [32]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}, // Timestamp: uint64(t.Unix()), @@ -361,8 +363,11 @@ func TestForcedBatch(t *testing.T) { DbTx: newDbTxMock(t), ZKEVMClient: newZkEVMClientMock(t), } + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil) - sync, err := NewSynchronizer(false, m.Etherman, m.State, m.Pool, m.EthTxManager, m.ZKEVMClient, genesis, cfg) + sync, err := NewSynchronizer(false, m.Etherman, m.State, m.Pool, m.EthTxManager, m.ZKEVMClient, genesis, cfg, m.DataCommitteeClientFactory) require.NoError(t, err) // state preparation @@ -429,13 +434,14 @@ func TestForcedBatch(t *testing.T) { Once() t := time.Now() + txs := []byte{} sequencedBatch := etherman.SequencedBatch{ BatchNumber: uint64(2), Coinbase: common.HexToAddress("0x222"), SequencerAddr: common.HexToAddress("0x00"), TxHash: common.HexToHash("0x333"), - PolygonZkEVMBatchData: polygonzkevm.PolygonZkEVMBatchData{ - Transactions: []byte{}, + Supernets2BatchData: supernets2.Supernets2BatchData{ + TransactionsHash: crypto.Keccak256Hash(txs), GlobalExitRoot: [32]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}, Timestamp: uint64(t.Unix()), MinForcedTimestamp: 1000, //ForcedBatch @@ -447,7 +453,7 @@ func TestForcedBatch(t *testing.T) { ForcedBatchNumber: 1, Sequencer: sequencedBatch.Coinbase, GlobalExitRoot: sequencedBatch.GlobalExitRoot, - RawTxsData: sequencedBatch.Transactions, + RawTxsData: txs, ForcedAt: time.Unix(int64(sequencedBatch.MinForcedTimestamp), 0), }} @@ -500,12 +506,17 @@ func TestForcedBatch(t *testing.T) { Return(nil). Once() + m.State. + On("GetBatchL2DataByNumber", ctx, uint64(2), nil). + Return(txs, nil). + Once() + fb := []state.ForcedBatch{{ BlockNumber: lastBlock.BlockNumber, ForcedBatchNumber: 1, Sequencer: sequencedBatch.Coinbase, GlobalExitRoot: sequencedBatch.GlobalExitRoot, - RawTxsData: sequencedBatch.Transactions, + RawTxsData: []byte{}, ForcedAt: time.Unix(int64(sequencedBatch.MinForcedTimestamp), 0), }} @@ -520,7 +531,7 @@ func TestForcedBatch(t *testing.T) { Once() trustedBatch := &state.Batch{ - BatchL2Data: sequencedBatch.Transactions, + BatchL2Data: txs, GlobalExitRoot: sequencedBatch.GlobalExitRoot, Timestamp: time.Unix(int64(sequencedBatch.Timestamp), 0), Coinbase: sequencedBatch.Coinbase, @@ -601,8 +612,11 @@ func TestSequenceForcedBatch(t *testing.T) { DbTx: newDbTxMock(t), ZKEVMClient: newZkEVMClientMock(t), } + m.Etherman. + On("GetCurrentDataCommittee"). + Return(nil, nil) - sync, err := NewSynchronizer(true, m.Etherman, m.State, m.Pool, m.EthTxManager, m.ZKEVMClient, genesis, cfg) + sync, err := NewSynchronizer(true, m.Etherman, m.State, m.Pool, m.EthTxManager, m.ZKEVMClient, genesis, cfg, m.DataCommitteeClientFactory) require.NoError(t, err) // state preparation @@ -672,7 +686,7 @@ func TestSequenceForcedBatch(t *testing.T) { BatchNumber: uint64(2), Coinbase: common.HexToAddress("0x222"), TxHash: common.HexToHash("0x333"), - PolygonZkEVMForcedBatchData: polygonzkevm.PolygonZkEVMForcedBatchData{ + Supernets2ForcedBatchData: supernets2.Supernets2ForcedBatchData{ Transactions: []byte{}, GlobalExitRoot: [32]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}, MinForcedTimestamp: 1000, //ForcedBatch diff --git a/test/Makefile b/test/Makefile index f57bd4bf..2cf36da1 100644 --- a/test/Makefile +++ b/test/Makefile @@ -556,8 +556,8 @@ generate-mocks: ## Generates mocks for the tests, using mockery tool export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=poolInterface --dir=../synchronizer --output=../synchronizer --outpkg=synchronizer --structname=poolMock --filename=mock_pool.go export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=zkEVMClientInterface --dir=../synchronizer --output=../synchronizer --outpkg=synchronizer --structname=zkEVMClientMock --filename=mock_zkevmclient.go export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=Tx --srcpkg=github.com/jackc/pgx/v4 --output=../synchronizer --outpkg=synchronizer --structname=dbTxMock --filename=mock_dbtx.go - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=ClientFactoryInterface --srcpkg=github.com/0xPolygonHermez/zklidium-data-node/client --output=../synchronizer --outpkg=synchronizer --structname=dataCommitteeClientFactoryMock --filename=mock_datacommitteeclientfactory.go - export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=ClientInterface --srcpkg=github.com/0xPolygonHermez/zklidium-data-node/client --output=../synchronizer --outpkg=synchronizer --structname=dataCommitteeClientMock --filename=mock_datacommitteeclient.go + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=ClientFactoryInterface --srcpkg=github.com/0xPolygon/supernets2-data-availability/client --output=../synchronizer --outpkg=synchronizer --structname=dataCommitteeClientFactoryMock --filename=mock_datacommitteeclientfactory.go + export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=ClientInterface --srcpkg=github.com/0xPolygon/supernets2-data-availability/client --output=../synchronizer --outpkg=synchronizer --structname=dataCommitteeClientMock --filename=mock_datacommitteeclient.go export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=GasPricer --srcpkg=github.com/ethereum/go-ethereum --output=../etherman --outpkg=etherman --structname=etherscanMock --filename=mock_etherscan.go export "GOROOT=$$(go env GOROOT)" && $$(go env GOPATH)/bin/mockery --name=GasPricer --srcpkg=github.com/ethereum/go-ethereum --output=../etherman --outpkg=etherman --structname=ethGasStationMock --filename=mock_ethgasstation.go diff --git a/test/benchmarks/sequencer/common/metrics/metrics.go b/test/benchmarks/sequencer/common/metrics/metrics.go index 4b825b8a..ce7e8faf 100644 --- a/test/benchmarks/sequencer/common/metrics/metrics.go +++ b/test/benchmarks/sequencer/common/metrics/metrics.go @@ -6,12 +6,12 @@ import ( "os/exec" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - metricsLib "github.com/0xPolygonHermez/zkevm-node/metrics" - "github.com/0xPolygonHermez/zkevm-node/sequencer/metrics" - metricsState "github.com/0xPolygonHermez/zkevm-node/state/metrics" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/supernets2-node/log" + metricsLib "github.com/0xPolygon/supernets2-node/metrics" + "github.com/0xPolygon/supernets2-node/sequencer/metrics" + metricsState "github.com/0xPolygon/supernets2-node/state/metrics" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/supernets2-node/test/testutils" ) const ( diff --git a/test/benchmarks/sequencer/common/params/variables.go b/test/benchmarks/sequencer/common/params/variables.go index 9b12cbb9..4a7b981d 100644 --- a/test/benchmarks/sequencer/common/params/variables.go +++ b/test/benchmarks/sequencer/common/params/variables.go @@ -4,8 +4,8 @@ import ( "context" "strings" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/test/dbutils" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" ) diff --git a/test/benchmarks/sequencer/common/setup/setup.go b/test/benchmarks/sequencer/common/setup/setup.go index 6cedd0fa..d4e44efe 100644 --- a/test/benchmarks/sequencer/common/setup/setup.go +++ b/test/benchmarks/sequencer/common/setup/setup.go @@ -6,14 +6,14 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/config/types" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/pool/pgpoolstorage" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/config/types" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/event/nileventstorage" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/pool/pgpoolstorage" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" diff --git a/test/benchmarks/sequencer/common/transactions/transactions.go b/test/benchmarks/sequencer/common/transactions/transactions.go index 4ebda4cc..2cb15647 100644 --- a/test/benchmarks/sequencer/common/transactions/transactions.go +++ b/test/benchmarks/sequencer/common/transactions/transactions.go @@ -6,11 +6,11 @@ import ( "strconv" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/ethclient" ) diff --git a/test/benchmarks/sequencer/erc20-transfers/pool_processing_erc20_test.go b/test/benchmarks/sequencer/erc20-transfers/pool_processing_erc20_test.go index cfbc6446..d4eb7611 100644 --- a/test/benchmarks/sequencer/erc20-transfers/pool_processing_erc20_test.go +++ b/test/benchmarks/sequencer/erc20-transfers/pool_processing_erc20_test.go @@ -8,14 +8,14 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/metrics" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/setup" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/transactions" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/metrics" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/setup" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/transactions" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" diff --git a/test/benchmarks/sequencer/erc20-transfers/tx_sender.go b/test/benchmarks/sequencer/erc20-transfers/tx_sender.go index d0e3faa6..aee9bf44 100644 --- a/test/benchmarks/sequencer/erc20-transfers/tx_sender.go +++ b/test/benchmarks/sequencer/erc20-transfers/tx_sender.go @@ -3,9 +3,9 @@ package erc20_transfers import ( "math/big" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/ERC20" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/ethclient" ) diff --git a/test/benchmarks/sequencer/eth-transfers/pool_processing_eth_test.go b/test/benchmarks/sequencer/eth-transfers/pool_processing_eth_test.go index 129cb851..da6ed8b6 100644 --- a/test/benchmarks/sequencer/eth-transfers/pool_processing_eth_test.go +++ b/test/benchmarks/sequencer/eth-transfers/pool_processing_eth_test.go @@ -6,12 +6,12 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/metrics" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/setup" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/transactions" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/metrics" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/setup" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/transactions" "github.com/stretchr/testify/require" ) diff --git a/test/benchmarks/sequencer/eth-transfers/tx_sender.go b/test/benchmarks/sequencer/eth-transfers/tx_sender.go index 02ac3f6c..77af9181 100644 --- a/test/benchmarks/sequencer/eth-transfers/tx_sender.go +++ b/test/benchmarks/sequencer/eth-transfers/tx_sender.go @@ -5,10 +5,10 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/ERC20" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" diff --git a/test/benchmarks/sequencer/scripts/common/environment/constants.go b/test/benchmarks/sequencer/scripts/common/environment/constants.go index 13a00251..e381a09c 100644 --- a/test/benchmarks/sequencer/scripts/common/environment/constants.go +++ b/test/benchmarks/sequencer/scripts/common/environment/constants.go @@ -3,8 +3,8 @@ package environment import ( "strconv" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/supernets2-node/test/operations" + "github.com/0xPolygon/supernets2-node/test/testutils" ) var ( diff --git a/test/benchmarks/sequencer/scripts/common/environment/init.go b/test/benchmarks/sequencer/scripts/common/environment/init.go index 3d13a286..3826530b 100644 --- a/test/benchmarks/sequencer/scripts/common/environment/init.go +++ b/test/benchmarks/sequencer/scripts/common/environment/init.go @@ -6,11 +6,11 @@ import ( "strconv" "strings" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool/pgpoolstorage" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/pool/pgpoolstorage" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/params" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" diff --git a/test/benchmarks/sequencer/scripts/common/results/print.go b/test/benchmarks/sequencer/scripts/common/results/print.go index abee5152..c679a73c 100644 --- a/test/benchmarks/sequencer/scripts/common/results/print.go +++ b/test/benchmarks/sequencer/scripts/common/results/print.go @@ -3,8 +3,8 @@ package results import ( "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/params" ) // Print prints the results of the benchmark diff --git a/test/benchmarks/sequencer/scripts/erc20-transfers/main.go b/test/benchmarks/sequencer/scripts/erc20-transfers/main.go index c05f5496..85957579 100644 --- a/test/benchmarks/sequencer/scripts/erc20-transfers/main.go +++ b/test/benchmarks/sequencer/scripts/erc20-transfers/main.go @@ -3,13 +3,13 @@ package main import ( "time" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/transactions" - erc20transfers "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/erc20-transfers" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/scripts/common/environment" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/scripts/common/results" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/transactions" + erc20transfers "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/erc20-transfers" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/scripts/common/environment" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/scripts/common/results" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/ERC20" "github.com/ethereum/go-ethereum/common" ) diff --git a/test/benchmarks/sequencer/scripts/eth-transfers/main.go b/test/benchmarks/sequencer/scripts/eth-transfers/main.go index 9705a5a2..be04d709 100644 --- a/test/benchmarks/sequencer/scripts/eth-transfers/main.go +++ b/test/benchmarks/sequencer/scripts/eth-transfers/main.go @@ -3,12 +3,12 @@ package main import ( "time" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/params" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/common/transactions" - ethtransfers "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/eth-transfers" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/scripts/common/environment" - "github.com/0xPolygonHermez/zkevm-node/test/benchmarks/sequencer/scripts/common/results" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/params" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/common/transactions" + ethtransfers "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/eth-transfers" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/scripts/common/environment" + "github.com/0xPolygon/supernets2-node/test/benchmarks/sequencer/scripts/common/results" ) func main() { diff --git a/test/config/test.node.config.toml b/test/config/test.node.config.toml index 8b592225..51c5ae7d 100644 --- a/test/config/test.node.config.toml +++ b/test/config/test.node.config.toml @@ -9,7 +9,7 @@ Outputs = ["stderr"] User = "state_user" Password = "state_password" Name = "state_db" -Host = "zkevm-state-db" +Host = "supernets2-state-db" Port = "5432" EnableLog = false MaxConns = 200 @@ -26,13 +26,13 @@ PollMinAllowedGasPriceInterval = "15s" User = "pool_user" Password = "pool_password" Name = "pool_db" - Host = "zkevm-pool-db" + Host = "supernets2-pool-db" Port = "5432" EnableLog = false MaxConns = 200 [Etherman] -URL = "http://zkevm-mock-l1-network:8545" +URL = "http://supernets2-mock-l1-network:8545" MultiGasProvider = false [Etherscan] ApiKey = "" @@ -131,10 +131,10 @@ Factor = 0.5 DefaultGasPriceWei = 1000000000 [MTClient] -URI = "zkevm-prover:50061" +URI = "supernets2-prover:50061" [Executor] -URI = "zkevm-prover:50071" +URI = "supernets2-prover:50071" [Metrics] Host = "0.0.0.0" @@ -149,7 +149,7 @@ ProfilingEnabled = true User = "event_user" Password = "event_password" Name = "event_db" - Host = "zkevm-event-db" + Host = "supernets2-event-db" Port = "5432" EnableLog = false MaxConns = 200 diff --git a/test/config/test.permissionless.prover.config.json b/test/config/test.permissionless.prover.config.json index 75ea3e44..5461c189 100644 --- a/test/config/test.permissionless.prover.config.json +++ b/test/config/test.permissionless.prover.config.json @@ -56,7 +56,7 @@ "aggregatorServerPort": 50081, "aggregatorClientPort": 50081, - "aggregatorClientHost": "zkevm-aggregator", + "aggregatorClientHost": "supernets2-aggregator", "mapConstPolsFile": false, "mapConstantsTreeFile": false, @@ -69,7 +69,7 @@ "outputPath": "output", - "databaseURL": "postgresql://prover_user:prover_pass@zkevm-permissionless-db:5432/prover_db", + "databaseURL": "postgresql://prover_user:prover_pass@supernets2-permissionless-db:5432/prover_db", "dbNodesTableName": "state.nodes", "dbProgramTableName": "state.program", "dbMultiWrite": true, diff --git a/test/config/test.prover.config.json b/test/config/test.prover.config.json index bd1eb2a1..4c938822 100644 --- a/test/config/test.prover.config.json +++ b/test/config/test.prover.config.json @@ -56,7 +56,7 @@ "aggregatorServerPort": 50081, "aggregatorClientPort": 50081, - "aggregatorClientHost": "zkevm-aggregator", + "aggregatorClientHost": "supernets2-aggregator", "mapConstPolsFile": false, "mapConstantsTreeFile": false, @@ -69,7 +69,7 @@ "outputPath": "output", - "databaseURL": "postgresql://prover_user:prover_pass@zkevm-state-db:5432/prover_db", + "databaseURL": "postgresql://prover_user:prover_pass@supernets2-state-db:5432/prover_db", "dbNodesTableName": "state.nodes", "dbProgramTableName": "state.program", "dbMultiWrite": true, diff --git a/test/dbutils/dbutils.go b/test/dbutils/dbutils.go index 2db5b201..9b7df30c 100644 --- a/test/dbutils/dbutils.go +++ b/test/dbutils/dbutils.go @@ -3,9 +3,9 @@ package dbutils import ( "fmt" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/testutils" ) // InitOrResetState will initializes the State db running the migrations or diff --git a/test/e2e/datacommittee_test.go b/test/e2e/datacommittee_test.go index 168cb983..ae6b4629 100644 --- a/test/e2e/datacommittee_test.go +++ b/test/e2e/datacommittee_test.go @@ -14,13 +14,13 @@ import ( "testing" "time" + "github.com/0xPolygon/supernets2-data-availability/config" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2datacommittee" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/operations" cTypes "github.com/0xPolygonHermez/zkevm-node/config/types" "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/supernets2datacommittee" "github.com/0xPolygonHermez/zkevm-node/jsonrpc" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zklidium-data-node/config" "github.com/ethereum/go-ethereum" eTypes "github.com/ethereum/go-ethereum/core/types" @@ -109,7 +109,12 @@ func TestDataCommittee(t *testing.T) { // Spin up M DAC nodes dacNodeConfig := config.Config{ - SequencerAddr: operations.DefaultSequencerAddress, + L1: config.L1Config{ + WsURL: "ws://supernets2-mock-l1-network:8546", + Contract: "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", + Timeout: cTypes.NewDuration(time.Minute * 3), + RetryPeriod: cTypes.NewDuration(time.Second * 5), + }, PrivateKey: cTypes.KeystoreFileConfig{ Path: ksFile, Password: ksPass, @@ -169,10 +174,10 @@ func TestDataCommittee(t *testing.T) { // Run DAC node cmd := exec.Command( "docker", "run", "-d", - "--name", "zklidium-data-node-"+strconv.Itoa(m.i), + "--name", "supernets2-data-availability-"+strconv.Itoa(m.i), "-v", cfgFile+":/app/config.json", "-v", ksFile+":"+ksFile, - "--network", "zkevm", + "--network", "supernets2", dacNodeContainer, "/bin/sh", "-c", "/app/zklidium-data-node run --cfg /app/config.json", diff --git a/test/e2e/debug_calltracer_test.go b/test/e2e/debug_calltracer_test.go index 063bfd21..368236c6 100644 --- a/test/e2e/debug_calltracer_test.go +++ b/test/e2e/debug_calltracer_test.go @@ -8,11 +8,11 @@ import ( "strings" "testing" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/jsonrpc/client" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" ethTypes "github.com/ethereum/go-ethereum/core/types" diff --git a/test/e2e/debug_shared.go b/test/e2e/debug_shared.go index 55108da5..6bb5494a 100644 --- a/test/e2e/debug_shared.go +++ b/test/e2e/debug_shared.go @@ -9,20 +9,20 @@ import ( "strings" "testing" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Called" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Caller" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ChainCallLevel1" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ChainCallLevel2" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ChainCallLevel3" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ChainCallLevel4" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Counter" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Creates" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/EmitLog" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Revert2" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Called" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Caller" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/ChainCallLevel1" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/ChainCallLevel2" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/ChainCallLevel3" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/ChainCallLevel4" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Counter" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Creates" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/EmitLog" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Revert2" + "github.com/0xPolygon/supernets2-node/test/operations" + "github.com/0xPolygon/supernets2-node/test/testutils" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -505,7 +505,7 @@ func saveTraceResultToFile(t *testing.T, name, network string, signedTx *ethType if skip { return } - const path = "/Users/thiago/github.com/0xPolygonHermez/zkevm-node/dist/%v.json" + const path = "/Users/thiago/github.com/0xPolygon/supernets2-node/dist/%v.json" sanitizedNetworkName := strings.ReplaceAll(name+network+"_", " ", "_") filePath := fmt.Sprintf(path, sanitizedNetworkName) b, _ := signedTx.MarshalBinary() diff --git a/test/e2e/debug_test.go b/test/e2e/debug_test.go index 6e3022fe..9201d277 100644 --- a/test/e2e/debug_test.go +++ b/test/e2e/debug_test.go @@ -8,11 +8,11 @@ import ( "strings" "testing" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/jsonrpc/client" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/test/e2e/ethtransfer_test.go b/test/e2e/ethtransfer_test.go index e0ea4eeb..d504ffe0 100644 --- a/test/e2e/ethtransfer_test.go +++ b/test/e2e/ethtransfer_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/test/e2e/forced_batches_test.go b/test/e2e/forced_batches_test.go index 2e11150d..b2ef8ead 100644 --- a/test/e2e/forced_batches_test.go +++ b/test/e2e/forced_batches_test.go @@ -7,12 +7,12 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/supernets2" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/supernets2globalexitroot" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2globalexitroot" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/constants" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/test/e2e/forced_batches_vector_test.go b/test/e2e/forced_batches_vector_test.go index d6c20176..5dba7fac 100644 --- a/test/e2e/forced_batches_vector_test.go +++ b/test/e2e/forced_batches_vector_test.go @@ -9,13 +9,13 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/supernets2" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/vectors" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/constants" + "github.com/0xPolygon/supernets2-node/test/operations" + "github.com/0xPolygon/supernets2-node/test/vectors" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -141,7 +141,7 @@ func sendForcedBatchForVector(t *testing.T, txs []byte, opsman *operations.Manag // Create smc client zkEvmAddr := common.HexToAddress(operations.DefaultL1Supernets2SmartContract) - zkEvm, err := supernets2.NewPolygonzkevm(zkEvmAddr, ethClient) + zkEvm, err := supernets2.NewSupernets2(zkEvmAddr, ethClient) require.NoError(t, err) auth, err := operations.GetAuth(operations.DefaultSequencerPrivateKey, operations.DefaultL1ChainID) diff --git a/test/e2e/jsonrpc1_test.go b/test/e2e/jsonrpc1_test.go index a75b03a3..1a578362 100644 --- a/test/e2e/jsonrpc1_test.go +++ b/test/e2e/jsonrpc1_test.go @@ -7,14 +7,14 @@ import ( "reflect" "testing" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/pool" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Double" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/EmitLog" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/jsonrpc/client" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/pool" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Double" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/EmitLog" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/test/e2e/jsonrpc2_test.go b/test/e2e/jsonrpc2_test.go index 10b534ab..f5e22b2a 100644 --- a/test/e2e/jsonrpc2_test.go +++ b/test/e2e/jsonrpc2_test.go @@ -7,14 +7,14 @@ import ( "strings" "testing" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Revert" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Revert2" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Storage" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/jsonrpc/client" + "github.com/0xPolygon/supernets2-node/jsonrpc/types" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Revert" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Revert2" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Storage" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" diff --git a/test/e2e/permissionlessrpc_test.go b/test/e2e/permissionlessrpc_test.go index c984bf69..01a45249 100644 --- a/test/e2e/permissionlessrpc_test.go +++ b/test/e2e/permissionlessrpc_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/operations" + "github.com/0xPolygon/supernets2-node/test/testutils" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/test/e2e/pool_test.go b/test/e2e/pool_test.go index ded7a5d0..553527f0 100644 --- a/test/e2e/pool_test.go +++ b/test/e2e/pool_test.go @@ -5,8 +5,8 @@ import ( "math/big" "testing" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/test/e2e/preEIP155_test.go b/test/e2e/preEIP155_test.go index 57ce1a53..61f6d5d4 100644 --- a/test/e2e/preEIP155_test.go +++ b/test/e2e/preEIP155_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/test/e2e/sc_test.go b/test/e2e/sc_test.go index a6fb0f7f..ae464f34 100644 --- a/test/e2e/sc_test.go +++ b/test/e2e/sc_test.go @@ -5,12 +5,12 @@ import ( "math/big" "testing" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Counter" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/EmitLog2" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/FailureTest" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Read" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Counter" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/EmitLog2" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/FailureTest" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Read" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/test/e2e/shared.go b/test/e2e/shared.go index 9e464d7d..26e66374 100644 --- a/test/e2e/shared.go +++ b/test/e2e/shared.go @@ -6,9 +6,9 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/test/e2e/state_test.go b/test/e2e/state_test.go index f9555e9c..cb4b1d02 100644 --- a/test/e2e/state_test.go +++ b/test/e2e/state_test.go @@ -7,10 +7,10 @@ import ( "strconv" "testing" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/operations" - "github.com/0xPolygonHermez/zkevm-node/test/vectors" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/operations" + "github.com/0xPolygon/supernets2-node/test/vectors" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" diff --git a/test/e2e/uniswap_test.go b/test/e2e/uniswap_test.go index c35d0181..4271ae13 100644 --- a/test/e2e/uniswap_test.go +++ b/test/e2e/uniswap_test.go @@ -5,10 +5,10 @@ import ( "flag" "testing" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/config" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" "github.com/stretchr/testify/assert" diff --git a/test/operations/manager.go b/test/operations/manager.go index 23f6ad9e..d6c95d88 100644 --- a/test/operations/manager.go +++ b/test/operations/manager.go @@ -10,16 +10,16 @@ import ( "strings" "time" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/event" - "github.com/0xPolygonHermez/zkevm-node/event/nileventstorage" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/test/constants" - "github.com/0xPolygonHermez/zkevm-node/test/dbutils" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/event" + "github.com/0xPolygon/supernets2-node/event/nileventstorage" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/merkletree" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/runtime/executor" + "github.com/0xPolygon/supernets2-node/test/constants" + "github.com/0xPolygon/supernets2-node/test/dbutils" + "github.com/0xPolygon/supernets2-node/test/testutils" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" diff --git a/test/operations/wait.go b/test/operations/wait.go index 45fa56d0..cc72c240 100644 --- a/test/operations/wait.go +++ b/test/operations/wait.go @@ -13,10 +13,10 @@ import ( "os/signal" "time" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/jsonrpc/client" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/jsonrpc/client" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" diff --git a/test/scripts/batchsender/main.go b/test/scripts/batchsender/main.go index e2b04f8a..d0e097d8 100644 --- a/test/scripts/batchsender/main.go +++ b/test/scripts/batchsender/main.go @@ -9,11 +9,11 @@ import ( "strconv" "time" - "github.com/0xPolygonHermez/zkevm-node/config" - "github.com/0xPolygonHermez/zkevm-node/etherman" - ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/config" + "github.com/0xPolygon/supernets2-node/etherman" + ethmanTypes "github.com/0xPolygon/supernets2-node/etherman/types" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" ethTypes "github.com/ethereum/go-ethereum/core/types" diff --git a/test/scripts/cmd/compilesc.go b/test/scripts/cmd/compilesc.go index 61afffe5..82dd403c 100644 --- a/test/scripts/cmd/compilesc.go +++ b/test/scripts/cmd/compilesc.go @@ -1,7 +1,7 @@ package main import ( - "github.com/0xPolygonHermez/zkevm-node/test/scripts/cmd/compilesc" + "github.com/0xPolygon/supernets2-node/test/scripts/cmd/compilesc" "github.com/urfave/cli/v2" ) diff --git a/test/scripts/cmd/compilesc/manager.go b/test/scripts/cmd/compilesc/manager.go index f5a276b7..a47e3239 100644 --- a/test/scripts/cmd/compilesc/manager.go +++ b/test/scripts/cmd/compilesc/manager.go @@ -11,7 +11,7 @@ import ( "runtime" "strings" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "golang.org/x/sync/errgroup" "gopkg.in/yaml.v2" ) diff --git a/test/scripts/cmd/dependencies.go b/test/scripts/cmd/dependencies.go index 772d69e2..23b636f4 100644 --- a/test/scripts/cmd/dependencies.go +++ b/test/scripts/cmd/dependencies.go @@ -1,7 +1,7 @@ package main import ( - "github.com/0xPolygonHermez/zkevm-node/test/scripts/cmd/dependencies" + "github.com/0xPolygon/supernets2-node/test/scripts/cmd/dependencies" "github.com/urfave/cli/v2" ) diff --git a/test/scripts/cmd/dependencies/files.go b/test/scripts/cmd/dependencies/files.go index 294df645..f926ac15 100644 --- a/test/scripts/cmd/dependencies/files.go +++ b/test/scripts/cmd/dependencies/files.go @@ -7,7 +7,7 @@ import ( "runtime" "strings" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/spf13/afero" ) diff --git a/test/scripts/cmd/dependencies/files_test.go b/test/scripts/cmd/dependencies/files_test.go index cb053399..cce0ff7b 100644 --- a/test/scripts/cmd/dependencies/files_test.go +++ b/test/scripts/cmd/dependencies/files_test.go @@ -3,7 +3,7 @@ package dependencies import ( "testing" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/supernets2-node/test/testutils" "github.com/spf13/afero" "github.com/stretchr/testify/require" ) diff --git a/test/scripts/cmd/dependencies/github.go b/test/scripts/cmd/dependencies/github.go index 0dc98ef0..7fc163b8 100644 --- a/test/scripts/cmd/dependencies/github.go +++ b/test/scripts/cmd/dependencies/github.go @@ -4,7 +4,7 @@ import ( "os" "path/filepath" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/go-git/go-billy/v5" "github.com/go-git/go-billy/v5/helper/chroot" "github.com/go-git/go-git/v5" diff --git a/test/scripts/cmd/dependencies/images.go b/test/scripts/cmd/dependencies/images.go index d1bf64cf..6a849f00 100644 --- a/test/scripts/cmd/dependencies/images.go +++ b/test/scripts/cmd/dependencies/images.go @@ -9,7 +9,7 @@ import ( "os/exec" "strings" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/spf13/afero" "gopkg.in/yaml.v3" ) diff --git a/test/scripts/cmd/dependencies/images_test.go b/test/scripts/cmd/dependencies/images_test.go index 71e42a03..289937bb 100644 --- a/test/scripts/cmd/dependencies/images_test.go +++ b/test/scripts/cmd/dependencies/images_test.go @@ -3,8 +3,8 @@ package dependencies import ( "testing" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/testutils" "github.com/spf13/afero" "github.com/stretchr/testify/require" ) diff --git a/test/scripts/cmd/dependencies/protobuffers.go b/test/scripts/cmd/dependencies/protobuffers.go index 6c98794d..1634c6cd 100644 --- a/test/scripts/cmd/dependencies/protobuffers.go +++ b/test/scripts/cmd/dependencies/protobuffers.go @@ -4,7 +4,7 @@ import ( "os" "os/exec" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/spf13/afero" ) diff --git a/test/scripts/cmd/dependencies/testvectors.go b/test/scripts/cmd/dependencies/testvectors.go index 9acbcab1..bebb8185 100644 --- a/test/scripts/cmd/dependencies/testvectors.go +++ b/test/scripts/cmd/dependencies/testvectors.go @@ -3,7 +3,7 @@ package dependencies import ( "os" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/spf13/afero" ) diff --git a/test/scripts/cmd/main.go b/test/scripts/cmd/main.go index 4e5477d4..bc442070 100644 --- a/test/scripts/cmd/main.go +++ b/test/scripts/cmd/main.go @@ -3,7 +3,7 @@ package main import ( "os" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" "github.com/urfave/cli/v2" ) diff --git a/test/scripts/deploy_sc/main.go b/test/scripts/deploy_sc/main.go index 7cf5c404..0706252a 100644 --- a/test/scripts/deploy_sc/main.go +++ b/test/scripts/deploy_sc/main.go @@ -6,14 +6,14 @@ import ( "math/big" "time" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Counter" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/EmitLog" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/Storage" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Counter" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/ERC20" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/EmitLog" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/Storage" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/test/scripts/init_network/main.go b/test/scripts/init_network/main.go index 97de6e4d..b6372a35 100644 --- a/test/scripts/init_network/main.go +++ b/test/scripts/init_network/main.go @@ -5,7 +5,7 @@ package main // "log" // "time" -// NW "github.com/0xPolygonHermez/zkevm-node/tools/network" +// NW "github.com/0xPolygon/supernets2-node/tools/network" // ) // func main() { diff --git a/test/scripts/sendForcedBatch/main.go b/test/scripts/sendForcedBatch/main.go index 366c0592..4d869e0c 100644 --- a/test/scripts/sendForcedBatch/main.go +++ b/test/scripts/sendForcedBatch/main.go @@ -4,9 +4,9 @@ import ( "os" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/supernets2" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -78,7 +78,7 @@ func sendForcedBatches(cliCtx *cli.Context) error { } // Create smc client poeAddr := common.HexToAddress(cliCtx.String(flagSmcAddrName)) - poe, err := supernets2.NewPolygonzkevm(poeAddr, ethClient) + poe, err := supernets2.NewSupernets2(poeAddr, ethClient) if err != nil { return err } diff --git a/test/scripts/send_transfers/main.go b/test/scripts/send_transfers/main.go index 136252b2..67809933 100644 --- a/test/scripts/send_transfers/main.go +++ b/test/scripts/send_transfers/main.go @@ -5,9 +5,9 @@ import ( "fmt" "math/big" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" diff --git a/test/scripts/sequenceForcedBatch/main.go b/test/scripts/sequenceForcedBatch/main.go index d9f8140a..0c0c4b1e 100644 --- a/test/scripts/sequenceForcedBatch/main.go +++ b/test/scripts/sequenceForcedBatch/main.go @@ -4,10 +4,10 @@ import ( "os" "time" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/supernets2" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" @@ -99,7 +99,7 @@ func sendForcedBatches(cliCtx *cli.Context) error { } // Create smc client poeAddr := common.HexToAddress(cliCtx.String(flagSmcAddrName)) - poe, err := supernets2.NewPolygonzkevm(poeAddr, ethClient) + poe, err := supernets2.NewSupernets2(poeAddr, ethClient) if err != nil { return err } @@ -130,7 +130,7 @@ func sendForcedBatches(cliCtx *cli.Context) error { log.Error("error decoding txs. Error: ", err) return err } - fbData := []supernets2.PolygonZkEVMForcedBatchData{{ + fbData := []supernets2.Supernets2ForcedBatchData{{ Transactions: transactions, GlobalExitRoot: common.HexToHash(cliCtx.String(flagGerName)), MinForcedTimestamp: cliCtx.Uint64(flagTimestampName), diff --git a/test/scripts/txsender/main.go b/test/scripts/txsender/main.go index fabb61ce..383afd48 100644 --- a/test/scripts/txsender/main.go +++ b/test/scripts/txsender/main.go @@ -6,8 +6,8 @@ import ( "os" "strconv" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/test/scripts/uniswap/main.go b/test/scripts/uniswap/main.go index fe740d53..1f15afe9 100644 --- a/test/scripts/uniswap/main.go +++ b/test/scripts/uniswap/main.go @@ -7,15 +7,15 @@ import ( "strings" "time" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/log" - ERC20 "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/ERC20" - WETH "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/WETH" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/uniswap/v2/core/UniswapV2Factory" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/uniswap/v2/core/UniswapV2Pair" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/uniswap/v2/interface/UniswapInterfaceMulticall" - "github.com/0xPolygonHermez/zkevm-node/test/contracts/bin/uniswap/v2/periphery/UniswapV2Router02" - "github.com/0xPolygonHermez/zkevm-node/test/operations" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/log" + ERC20 "github.com/0xPolygon/supernets2-node/test/contracts/bin/ERC20" + WETH "github.com/0xPolygon/supernets2-node/test/contracts/bin/WETH" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/uniswap/v2/core/UniswapV2Factory" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/uniswap/v2/core/UniswapV2Pair" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/uniswap/v2/interface/UniswapInterfaceMulticall" + "github.com/0xPolygon/supernets2-node/test/contracts/bin/uniswap/v2/periphery/UniswapV2Router02" + "github.com/0xPolygon/supernets2-node/test/operations" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/test/testutils/utils.go b/test/testutils/utils.go index 21a321f8..2d3f927e 100644 --- a/test/testutils/utils.go +++ b/test/testutils/utils.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/0xPolygonHermez/zkevm-node/log" + "github.com/0xPolygon/supernets2-node/log" ioprometheusclient "github.com/prometheus/client_model/go" "github.com/prometheus/common/expfmt" "github.com/spf13/afero" diff --git a/test/vectors/types.go b/test/vectors/types.go index 38f87f14..136c2a07 100644 --- a/test/vectors/types.go +++ b/test/vectors/types.go @@ -4,8 +4,8 @@ import ( "math/big" "strings" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/hex" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/hex" ) type argBigInt struct { diff --git a/test/vectors/vectors_v2.go b/test/vectors/vectors_v2.go index 80638894..5d47b022 100644 --- a/test/vectors/vectors_v2.go +++ b/test/vectors/vectors_v2.go @@ -1,8 +1,8 @@ package vectors import ( - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/merkletree" + "github.com/0xPolygon/supernets2-node/state" ) // StateTransitionTestCaseV2 holds the metadata needed to run a state transition test @@ -71,7 +71,7 @@ func GenerateGenesisActions(genesis []GenesisEntity) []*state.GenesisAction { } genesisActions = append(genesisActions, action) } - + if genesisEntity.IsSmartContract && len(genesisEntity.Storage) > 0 { for storageKey, storageValue := range genesisEntity.Storage { action := &state.GenesisAction{ diff --git a/tools/executor/main.go b/tools/executor/main.go index 1ba488cb..3f5b6734 100644 --- a/tools/executor/main.go +++ b/tools/executor/main.go @@ -9,12 +9,12 @@ import ( "strings" "time" - "github.com/0xPolygonHermez/zkevm-node/db" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" - "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor/pb" - "github.com/0xPolygonHermez/zkevm-node/test/testutils" + "github.com/0xPolygon/supernets2-node/db" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" + "github.com/0xPolygon/supernets2-node/state/runtime/executor" + "github.com/0xPolygon/supernets2-node/state/runtime/executor/pb" + "github.com/0xPolygon/supernets2-node/test/testutils" ) const ( diff --git a/tools/genesis/genesisparser/genesisparser.go b/tools/genesis/genesisparser/genesisparser.go index 27a037eb..d2e681c6 100644 --- a/tools/genesis/genesisparser/genesisparser.go +++ b/tools/genesis/genesisparser/genesisparser.go @@ -1,8 +1,8 @@ package genesisparser import ( - "github.com/0xPolygonHermez/zkevm-node/merkletree" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/merkletree" + "github.com/0xPolygon/supernets2-node/state" ) // GenesisAccountTest struct diff --git a/tools/network/network.go b/tools/network/network.go index 7bda076a..8e6eadf9 100644 --- a/tools/network/network.go +++ b/tools/network/network.go @@ -7,14 +7,14 @@ package network // "strings" // "time" -// "github.com/0xPolygonHermez/zkevm-node/config" -// "github.com/0xPolygonHermez/zkevm-node/encoding" -// "github.com/0xPolygonHermez/zkevm-node/etherman" -// "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/bridge" -// "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/matic" -// "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/proofofefficiency" -// "github.com/0xPolygonHermez/zkevm-node/log" -// "github.com/0xPolygonHermez/zkevm-node/test/operations" +// "github.com/0xPolygon/supernets2-node/config" +// "github.com/0xPolygon/supernets2-node/encoding" +// "github.com/0xPolygon/supernets2-node/etherman" +// "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/bridge" +// "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/matic" +// "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/proofofefficiency" +// "github.com/0xPolygon/supernets2-node/log" +// "github.com/0xPolygon/supernets2-node/test/operations" // "github.com/ethereum/go-ethereum/accounts/abi/bind" // "github.com/ethereum/go-ethereum/common" // "github.com/ethereum/go-ethereum/core/types" diff --git a/tools/rlp/main.go b/tools/rlp/main.go index d4f00eca..a6357677 100644 --- a/tools/rlp/main.go +++ b/tools/rlp/main.go @@ -7,11 +7,11 @@ import ( "strconv" "strings" - "github.com/0xPolygonHermez/zkevm-node/encoding" - "github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/polygonzkevm" - "github.com/0xPolygonHermez/zkevm-node/hex" - "github.com/0xPolygonHermez/zkevm-node/log" - "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygon/supernets2-node/encoding" + "github.com/0xPolygon/supernets2-node/etherman/smartcontracts/supernets2" + "github.com/0xPolygon/supernets2-node/hex" + "github.com/0xPolygon/supernets2-node/log" + "github.com/0xPolygon/supernets2-node/state" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -225,7 +225,7 @@ func decodeFullCallDataToTxs(txsData []byte) ([]types.Transaction, []byte, error // Extract coded txs. // Load contract ABI - abi, err := abi.JSON(strings.NewReader(polygonzkevm.PolygonzkevmABI)) + abi, err := abi.JSON(strings.NewReader(supernets2.Supernets2ABI)) if err != nil { log.Fatal("error reading smart contract abi: ", err) } diff --git a/version.go b/version.go index 2dbd8a0c..934f0526 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ -package zkevm +package supernets2 import ( "fmt"