diff --git a/.github/workflows/guardianproverhealthcheck.yml b/.github/workflows/guardianproverhealthcheck.yml
new file mode 100644
index 00000000000..df51950dfb8
--- /dev/null
+++ b/.github/workflows/guardianproverhealthcheck.yml
@@ -0,0 +1,101 @@
+name: guardianproverhealthcheck
+
+on:
+ push:
+ branches: [main]
+ paths:
+ - "packages/guardianproverhealthcheck/**"
+ pull_request:
+ paths:
+ - "packages/guardianproverhealthcheck/**"
+
+jobs:
+ lint:
+ name: lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/setup-go@v3
+ with:
+ go-version: 1.21.0
+ - uses: actions/checkout@v3
+ - name: golangci-lint
+ uses: golangci/golangci-lint-action@v3
+ with:
+ # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
+ version: latest
+
+ # Optional: working directory, useful for monorepos
+ working-directory: ./packages/guardianproverhealthcheck
+ args: --config=.golangci.yml --timeout=4m
+
+ test:
+ runs-on: ubuntu-latest
+ needs: lint
+ steps:
+ - name: Cancel Previous Runs
+ uses: styfle/cancel-workflow-action@0.11.0
+ with:
+ access_token: ${{ github.token }}
+
+ - uses: actions/checkout@v3
+ - uses: actions/setup-go@v3
+ with:
+ go-version: "1.21.0"
+
+ - name: guardianproverhealthcheck - Unit Tests
+ working-directory: ./packages/guardianproverhealthcheck
+ run: go test `go list ./... | grep -v ./contracts | grep -v ./mock | grep -v ./cmd` -coverprofile=coverage.txt -covermode=atomic
+
+ - name: guardianproverhealthcheck - Upload coverage to Codecov
+ uses: codecov/codecov-action@v3
+ with:
+ files: ./packages/guardianproverhealthcheck/coverage.txt
+ flags: guardianproverhealthcheck
+
+ push-docker-image:
+ # only push docker image on PR merge to main
+ if: ${{ github.event }} == 'push'
+ name: Build and push docker image
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ ref: ${{ github.ref }}
+
+ - name: Login to GCR
+ uses: docker/login-action@v2
+ with:
+ registry: gcr.io
+ username: _json_key
+ password: ${{ secrets.GCR_JSON_KEY }}
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v1
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+
+ - name: Docker meta
+ id: meta
+ uses: docker/metadata-action@v4
+ with:
+ images: |
+ gcr.io/evmchain/guardianproverhealthcheck
+ tags: |
+ type=ref,event=branch
+ type=ref,event=pr
+ type=ref,event=tag
+ type=sha
+
+ - name: Build and push
+ uses: docker/build-push-action@v2
+ with:
+ platforms: linux/amd64
+ push: true
+ context: .
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+ build-args: |
+ PACKAGE=guardianproverhealthcheck
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 72a6186e788..23b42011897 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -181,7 +181,7 @@
* **pos-dashboard:** Changed font color of error message ([#14543](https://github.com/taikoxyz/taiko-mono/issues/14543)) ([279d4e9](https://github.com/taikoxyz/taiko-mono/commit/279d4e96bf378eb651b91976d7729b0675ea1368))
* **protocol:** block reward must be minted ([#14595](https://github.com/taikoxyz/taiko-mono/issues/14595)) ([e92b1da](https://github.com/taikoxyz/taiko-mono/commit/e92b1da2ced73c2b28a825fce916acededab0a39))
* **protocol:** change transition ID from uint16 to uint32 ([#14620](https://github.com/taikoxyz/taiko-mono/issues/14620)) ([c8969b6](https://github.com/taikoxyz/taiko-mono/commit/c8969b64bbaacf9ec6d239608509424fdc02ee97))
-* **protocol:** remove proof from getInstance calculation ([#14623](https://github.com/taikoxyz/taiko-mono/issues/14623)) ([2eedc33](https://github.com/taikoxyz/taiko-mono/commit/2eedc33c213cb5d0abf9daa8bc9bd21b730ae6af))
+* **protocol:** remove proof from calcInstance calculation ([#14623](https://github.com/taikoxyz/taiko-mono/issues/14623)) ([2eedc33](https://github.com/taikoxyz/taiko-mono/commit/2eedc33c213cb5d0abf9daa8bc9bd21b730ae6af))
* **protocol:** revert impl deployment V2 ([#14621](https://github.com/taikoxyz/taiko-mono/issues/14621)) ([7e59e0b](https://github.com/taikoxyz/taiko-mono/commit/7e59e0b0077e4d81bcd5333bc6f0900e0761d6ea))
* **relayer:** Eth bridge ([#14609](https://github.com/taikoxyz/taiko-mono/issues/14609)) ([f5207ae](https://github.com/taikoxyz/taiko-mono/commit/f5207ae19c48d9aaa83dab2739cd05d9c2985112))
diff --git a/package.json b/package.json
index 073d5598298..71fab5a6c9b 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"version": "0.24.0",
"private": true,
"devDependencies": {
- "lefthook": "^1.4.7",
- "prettier": "^2.8.8"
+ "lefthook": "^1.5.2",
+ "prettier": "^3.0.3"
}
}
diff --git a/packages/Unknown.pdf b/packages/Unknown.pdf
new file mode 100644
index 00000000000..39fa9b1ef66
Binary files /dev/null and b/packages/Unknown.pdf differ
diff --git a/packages/eventindexer/.gitignore b/packages/eventindexer/.gitignore
index eeedab188e5..9dbce223f63 100644
--- a/packages/eventindexer/.gitignore
+++ b/packages/eventindexer/.gitignore
@@ -43,4 +43,5 @@ terraform.rc
Bridge.json
TaikoL2.json
-IHeaderSync.json
\ No newline at end of file
+IHeaderSync.json
+AssignmentHook.json
\ No newline at end of file
diff --git a/packages/eventindexer/TaikoL1.json b/packages/eventindexer/TaikoL1.json
index 4be58e7c5b6..41f9a2af291 100644
--- a/packages/eventindexer/TaikoL1.json
+++ b/packages/eventindexer/TaikoL1.json
@@ -1,67 +1,62 @@
[
{
"inputs": [],
- "name": "L1_ALREADY_PROVEN",
+ "name": "INVALID_PAUSE_STATUS",
"type": "error"
},
{
"inputs": [],
- "name": "L1_ALREADY_PROVEN",
+ "name": "L1_ALREADY_CONTESTED",
"type": "error"
},
{
"inputs": [],
- "name": "L1_BLOCK_ID_MISMATCH",
+ "name": "L1_ALREADY_PROVED",
"type": "error"
},
{
"inputs": [],
- "name": "L1_BLOCK_ID_MISMATCH",
+ "name": "L1_ASSIGNED_PROVER_NOT_ALLOWED",
"type": "error"
},
{
"inputs": [],
- "name": "L1_BLOCK_ID_MISMATCH",
+ "name": "L1_BLOB_FOR_DA_DISABLED",
"type": "error"
},
{
"inputs": [],
- "name": "L1_EVIDENCE_MISMATCH",
+ "name": "L1_BLOB_NOT_FOUND",
"type": "error"
},
{
"inputs": [],
- "name": "L1_EVIDENCE_MISMATCH",
+ "name": "L1_BLOB_NOT_REUSEABLE",
"type": "error"
},
{
"inputs": [],
- "name": "L1_INSUFFICIENT_TOKEN",
- "type": "error"
- },
- {
- "inputs": [],
- "name": "L1_INSUFFICIENT_TOKEN",
+ "name": "L1_BLOCK_MISMATCH",
"type": "error"
},
{
"inputs": [],
- "name": "L1_INVALID_ASSIGNMENT",
+ "name": "L1_BLOCK_MISMATCH",
"type": "error"
},
{
"inputs": [],
- "name": "L1_INVALID_ASSIGNMENT",
+ "name": "L1_INSUFFICIENT_TOKEN",
"type": "error"
},
{
"inputs": [],
- "name": "L1_INVALID_BLOCK_ID",
+ "name": "L1_INVALID_ADDRESS",
"type": "error"
},
{
"inputs": [],
- "name": "L1_INVALID_BLOCK_ID",
+ "name": "L1_INVALID_AMOUNT",
"type": "error"
},
{
@@ -74,51 +69,11 @@
"name": "L1_INVALID_CONFIG",
"type": "error"
},
- {
- "inputs": [],
- "name": "L1_INVALID_CONFIG",
- "type": "error"
- },
- {
- "inputs": [],
- "name": "L1_INVALID_ETH_DEPOSIT",
- "type": "error"
- },
{
"inputs": [],
"name": "L1_INVALID_ETH_DEPOSIT",
"type": "error"
},
- {
- "inputs": [],
- "name": "L1_INVALID_EVIDENCE",
- "type": "error"
- },
- {
- "inputs": [],
- "name": "L1_INVALID_EVIDENCE",
- "type": "error"
- },
- {
- "inputs": [],
- "name": "L1_INVALID_METADATA",
- "type": "error"
- },
- {
- "inputs": [],
- "name": "L1_INVALID_METADATA",
- "type": "error"
- },
- {
- "inputs": [],
- "name": "L1_INVALID_ORACLE_PROVER",
- "type": "error"
- },
- {
- "inputs": [],
- "name": "L1_INVALID_ORACLE_PROVER",
- "type": "error"
- },
{
"inputs": [],
"name": "L1_INVALID_PARAM",
@@ -126,17 +81,12 @@
},
{
"inputs": [],
- "name": "L1_INVALID_PROOF",
- "type": "error"
- },
- {
- "inputs": [],
- "name": "L1_INVALID_PROPOSER",
+ "name": "L1_INVALID_PAUSE_STATUS",
"type": "error"
},
{
"inputs": [],
- "name": "L1_INVALID_PROPOSER",
+ "name": "L1_INVALID_PROOF",
"type": "error"
},
{
@@ -146,37 +96,37 @@
},
{
"inputs": [],
- "name": "L1_INVALID_PROVER",
+ "name": "L1_INVALID_TIER",
"type": "error"
},
{
"inputs": [],
- "name": "L1_INVALID_PROVER_SIG",
+ "name": "L1_INVALID_TRANSITION",
"type": "error"
},
{
"inputs": [],
- "name": "L1_INVALID_PROVER_SIG",
+ "name": "L1_LIVENESS_BOND_NOT_RECEIVED",
"type": "error"
},
{
"inputs": [],
- "name": "L1_NOT_PROVEABLE",
+ "name": "L1_NOT_ASSIGNED_PROVER",
"type": "error"
},
{
"inputs": [],
- "name": "L1_NOT_PROVEABLE",
+ "name": "L1_PROPOSER_NOT_EOA",
"type": "error"
},
{
"inputs": [],
- "name": "L1_SAME_PROOF",
+ "name": "L1_PROVING_PAUSED",
"type": "error"
},
{
"inputs": [],
- "name": "L1_SAME_PROOF",
+ "name": "L1_RECEIVE_DISABLED",
"type": "error"
},
{
@@ -186,106 +136,138 @@
},
{
"inputs": [],
- "name": "L1_TOO_MANY_BLOCKS",
+ "name": "L1_TOO_MANY_TIERS",
"type": "error"
},
{
"inputs": [],
- "name": "L1_TRANSITION_NOT_FOUND",
+ "name": "L1_TRANSITION_ID_ZERO",
"type": "error"
},
{
"inputs": [],
- "name": "L1_TRANSITION_NOT_FOUND",
+ "name": "L1_TRANSITION_ID_ZERO",
"type": "error"
},
{
"inputs": [],
- "name": "L1_TX_LIST",
+ "name": "L1_TRANSITION_NOT_FOUND",
"type": "error"
},
{
"inputs": [],
- "name": "L1_TX_LIST",
+ "name": "L1_TXLIST_OFFSET_SIZE",
"type": "error"
},
{
"inputs": [],
- "name": "L1_TX_LIST_HASH",
+ "name": "L1_TXLIST_TOO_LARGE",
"type": "error"
},
{
"inputs": [],
- "name": "L1_TX_LIST_HASH",
+ "name": "L1_UNAUTHORIZED",
"type": "error"
},
{
"inputs": [],
- "name": "L1_TX_LIST_NOT_EXIST",
+ "name": "L1_UNEXPECTED_PARENT",
"type": "error"
},
{
"inputs": [],
- "name": "L1_TX_LIST_NOT_EXIST",
+ "name": "L1_UNEXPECTED_TRANSITION_ID",
"type": "error"
},
{
"inputs": [],
- "name": "L1_TX_LIST_RANGE",
+ "name": "L1_UNEXPECTED_TRANSITION_ID",
"type": "error"
},
{
"inputs": [],
- "name": "L1_TX_LIST_RANGE",
+ "name": "L1_UNEXPECTED_TRANSITION_TIER",
"type": "error"
},
{
"inputs": [],
- "name": "L1_UNEXPECTED_TRANSITION_ID",
+ "name": "REENTRANT_CALL",
"type": "error"
},
{
"inputs": [],
- "name": "L1_UNEXPECTED_TRANSITION_ID",
+ "name": "RESOLVER_DENIED",
"type": "error"
},
{
"inputs": [],
- "name": "RESOLVER_DENIED",
+ "name": "RESOLVER_INVALID_MANAGER",
"type": "error"
},
{
"inputs": [],
- "name": "RESOLVER_INVALID_ADDR",
+ "name": "RESOLVER_UNEXPECTED_CHAINID",
"type": "error"
},
{
"inputs": [
{
- "internalType": "uint256",
+ "internalType": "uint64",
"name": "chainId",
- "type": "uint256"
+ "type": "uint64"
},
{
- "internalType": "bytes32",
+ "internalType": "string",
"name": "name",
- "type": "bytes32"
+ "type": "string"
}
],
"name": "RESOLVER_ZERO_ADDR",
"type": "error"
},
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "previousAdmin",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "newAdmin",
+ "type": "address"
+ }
+ ],
+ "name": "AdminChanged",
+ "type": "event"
+ },
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
- "name": "addressManager",
+ "name": "beacon",
"type": "address"
}
],
- "name": "AddressManagerChanged",
+ "name": "BeaconUpgraded",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "blobHash",
+ "type": "bytes32"
+ }
+ ],
+ "name": "BlobCached",
"type": "event"
},
{
@@ -300,32 +282,17 @@
{
"indexed": true,
"internalType": "address",
- "name": "prover",
+ "name": "assignedProver",
"type": "address"
},
{
"indexed": false,
- "internalType": "uint256",
- "name": "reward",
- "type": "uint256"
+ "internalType": "uint96",
+ "name": "livenessBond",
+ "type": "uint96"
},
{
"components": [
- {
- "internalType": "uint64",
- "name": "id",
- "type": "uint64"
- },
- {
- "internalType": "uint64",
- "name": "timestamp",
- "type": "uint64"
- },
- {
- "internalType": "uint64",
- "name": "l1Height",
- "type": "uint64"
- },
{
"internalType": "bytes32",
"name": "l1Hash",
@@ -333,94 +300,39 @@
},
{
"internalType": "bytes32",
- "name": "mixHash",
+ "name": "difficulty",
"type": "bytes32"
},
{
"internalType": "bytes32",
- "name": "txListHash",
+ "name": "blobHash",
"type": "bytes32"
},
{
- "internalType": "uint24",
- "name": "txListByteStart",
- "type": "uint24"
- },
- {
- "internalType": "uint24",
- "name": "txListByteEnd",
- "type": "uint24"
+ "internalType": "bytes32",
+ "name": "extraData",
+ "type": "bytes32"
},
{
- "internalType": "uint32",
- "name": "gasLimit",
- "type": "uint32"
+ "internalType": "bytes32",
+ "name": "depositsHash",
+ "type": "bytes32"
},
{
"internalType": "address",
- "name": "proposer",
+ "name": "coinbase",
"type": "address"
},
- {
- "components": [
- {
- "internalType": "address",
- "name": "recipient",
- "type": "address"
- },
- {
- "internalType": "uint96",
- "name": "amount",
- "type": "uint96"
- },
- {
- "internalType": "uint64",
- "name": "id",
- "type": "uint64"
- }
- ],
- "internalType": "struct TaikoData.EthDeposit[]",
- "name": "depositsProcessed",
- "type": "tuple[]"
- }
- ],
- "indexed": false,
- "internalType": "struct TaikoData.BlockMetadata",
- "name": "meta",
- "type": "tuple"
- }
- ],
- "name": "BlockProposed",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "internalType": "uint256",
- "name": "blockId",
- "type": "uint256"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "prover",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "reward",
- "type": "uint256"
- },
- {
- "components": [
{
"internalType": "uint64",
"name": "id",
"type": "uint64"
},
+ {
+ "internalType": "uint32",
+ "name": "gasLimit",
+ "type": "uint32"
+ },
{
"internalType": "uint64",
"name": "timestamp",
@@ -431,68 +343,59 @@
"name": "l1Height",
"type": "uint64"
},
- {
- "internalType": "bytes32",
- "name": "l1Hash",
- "type": "bytes32"
- },
- {
- "internalType": "bytes32",
- "name": "mixHash",
- "type": "bytes32"
- },
- {
- "internalType": "bytes32",
- "name": "txListHash",
- "type": "bytes32"
- },
{
"internalType": "uint24",
- "name": "txListByteStart",
+ "name": "txListByteOffset",
"type": "uint24"
},
{
"internalType": "uint24",
- "name": "txListByteEnd",
+ "name": "txListByteSize",
"type": "uint24"
},
{
- "internalType": "uint32",
- "name": "gasLimit",
- "type": "uint32"
+ "internalType": "uint16",
+ "name": "minTier",
+ "type": "uint16"
},
{
- "internalType": "address",
- "name": "proposer",
- "type": "address"
+ "internalType": "bool",
+ "name": "blobUsed",
+ "type": "bool"
},
{
- "components": [
- {
- "internalType": "address",
- "name": "recipient",
- "type": "address"
- },
- {
- "internalType": "uint96",
- "name": "amount",
- "type": "uint96"
- },
- {
- "internalType": "uint64",
- "name": "id",
- "type": "uint64"
- }
- ],
- "internalType": "struct TaikoData.EthDeposit[]",
- "name": "depositsProcessed",
- "type": "tuple[]"
+ "internalType": "bytes32",
+ "name": "parentMetaHash",
+ "type": "bytes32"
}
],
"indexed": false,
"internalType": "struct TaikoData.BlockMetadata",
"name": "meta",
"type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "recipient",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "amount",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint64",
+ "name": "id",
+ "type": "uint64"
+ }
+ ],
+ "indexed": false,
+ "internalType": "struct TaikoData.EthDeposit[]",
+ "name": "depositsProcessed",
+ "type": "tuple[]"
}
],
"name": "BlockProposed",
@@ -508,10 +411,16 @@
"type": "uint256"
},
{
- "indexed": false,
- "internalType": "bytes32",
- "name": "parentHash",
- "type": "bytes32"
+ "indexed": true,
+ "internalType": "address",
+ "name": "assignedProver",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "prover",
+ "type": "address"
},
{
"indexed": false,
@@ -527,12 +436,18 @@
},
{
"indexed": false,
- "internalType": "address",
- "name": "prover",
- "type": "address"
+ "internalType": "uint16",
+ "name": "tier",
+ "type": "uint16"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint8",
+ "name": "contestations",
+ "type": "uint8"
}
],
- "name": "BlockProven",
+ "name": "BlockVerified",
"type": "event"
},
{
@@ -545,10 +460,16 @@
"type": "uint256"
},
{
- "indexed": false,
- "internalType": "bytes32",
- "name": "parentHash",
- "type": "bytes32"
+ "indexed": true,
+ "internalType": "address",
+ "name": "assignedProver",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "prover",
+ "type": "address"
},
{
"indexed": false,
@@ -564,12 +485,18 @@
},
{
"indexed": false,
- "internalType": "address",
- "name": "prover",
- "type": "address"
+ "internalType": "uint16",
+ "name": "tier",
+ "type": "uint16"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint8",
+ "name": "contestations",
+ "type": "uint8"
}
],
- "name": "BlockProven",
+ "name": "BlockVerified",
"type": "event"
},
{
@@ -577,24 +504,30 @@
"inputs": [
{
"indexed": true,
- "internalType": "uint256",
- "name": "blockId",
- "type": "uint256"
+ "internalType": "uint64",
+ "name": "syncedInBlock",
+ "type": "uint64"
},
{
"indexed": true,
- "internalType": "address",
- "name": "prover",
- "type": "address"
+ "internalType": "uint64",
+ "name": "blockId",
+ "type": "uint64"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "blockHash",
"type": "bytes32"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
}
],
- "name": "BlockVerified",
+ "name": "CrossChainSynced",
"type": "event"
},
{
@@ -602,74 +535,73 @@
"inputs": [
{
"indexed": true,
- "internalType": "uint256",
- "name": "blockId",
- "type": "uint256"
+ "internalType": "uint64",
+ "name": "syncedInBlock",
+ "type": "uint64"
},
{
"indexed": true,
- "internalType": "address",
- "name": "prover",
- "type": "address"
+ "internalType": "uint64",
+ "name": "blockId",
+ "type": "uint64"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "blockHash",
"type": "bytes32"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
}
],
- "name": "BlockVerified",
+ "name": "CrossChainSynced",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
- "indexed": true,
- "internalType": "address",
- "name": "from",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint64",
- "name": "blockId",
- "type": "uint64"
- },
- {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "recipient",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "amount",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint64",
+ "name": "id",
+ "type": "uint64"
+ }
+ ],
"indexed": false,
- "internalType": "uint256",
- "name": "bond",
- "type": "uint256"
+ "internalType": "struct TaikoData.EthDeposit",
+ "name": "deposit",
+ "type": "tuple"
}
],
- "name": "BondReceived",
+ "name": "EthDeposited",
"type": "event"
},
{
"anonymous": false,
"inputs": [
- {
- "indexed": true,
- "internalType": "address",
- "name": "from",
- "type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint64",
- "name": "blockId",
- "type": "uint64"
- },
{
"indexed": false,
- "internalType": "uint256",
- "name": "bond",
- "type": "uint256"
+ "internalType": "uint8",
+ "name": "version",
+ "type": "uint8"
}
],
- "name": "BondReceived",
+ "name": "Initialized",
"type": "event"
},
{
@@ -678,208 +610,225 @@
{
"indexed": true,
"internalType": "address",
- "name": "to",
+ "name": "previousOwner",
"type": "address"
},
{
- "indexed": false,
- "internalType": "uint64",
- "name": "blockId",
- "type": "uint64"
- },
- {
- "indexed": false,
- "internalType": "uint256",
- "name": "bond",
- "type": "uint256"
+ "indexed": true,
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
}
],
- "name": "BondReturned",
+ "name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
- "indexed": true,
+ "indexed": false,
"internalType": "address",
- "name": "to",
+ "name": "account",
"type": "address"
- },
- {
- "indexed": false,
- "internalType": "uint64",
- "name": "blockId",
- "type": "uint64"
- },
+ }
+ ],
+ "name": "Paused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
{
"indexed": false,
- "internalType": "uint256",
- "name": "bond",
- "type": "uint256"
+ "internalType": "bool",
+ "name": "paused",
+ "type": "bool"
}
],
- "name": "BondReturned",
+ "name": "ProvingPaused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
- "indexed": true,
+ "indexed": false,
"internalType": "address",
"name": "to",
"type": "address"
},
- {
- "indexed": false,
- "internalType": "uint64",
- "name": "blockId",
- "type": "uint64"
- },
{
"indexed": false,
"internalType": "uint256",
- "name": "bond",
+ "name": "amount",
"type": "uint256"
}
],
- "name": "BondRewarded",
+ "name": "TokenCredited",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
- "indexed": true,
+ "indexed": false,
"internalType": "address",
- "name": "to",
+ "name": "from",
"type": "address"
},
- {
- "indexed": false,
- "internalType": "uint64",
- "name": "blockId",
- "type": "uint64"
- },
{
"indexed": false,
"internalType": "uint256",
- "name": "bond",
+ "name": "amount",
"type": "uint256"
}
],
- "name": "BondRewarded",
+ "name": "TokenDebited",
"type": "event"
},
{
"anonymous": false,
"inputs": [
- {
- "indexed": true,
- "internalType": "uint64",
- "name": "srcHeight",
- "type": "uint64"
- },
- {
- "indexed": false,
- "internalType": "bytes32",
- "name": "blockHash",
- "type": "bytes32"
- },
{
"indexed": false,
- "internalType": "bytes32",
- "name": "signalRoot",
- "type": "bytes32"
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
}
],
- "name": "CrossChainSynced",
+ "name": "TokenDeposited",
"type": "event"
},
{
"anonymous": false,
"inputs": [
- {
- "indexed": true,
- "internalType": "uint64",
- "name": "srcHeight",
- "type": "uint64"
- },
- {
- "indexed": false,
- "internalType": "bytes32",
- "name": "blockHash",
- "type": "bytes32"
- },
{
"indexed": false,
- "internalType": "bytes32",
- "name": "signalRoot",
- "type": "bytes32"
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
}
],
- "name": "CrossChainSynced",
+ "name": "TokenWithdrawn",
"type": "event"
},
{
"anonymous": false,
"inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint256",
+ "name": "blockId",
+ "type": "uint256"
+ },
{
"components": [
{
- "internalType": "address",
- "name": "recipient",
- "type": "address"
+ "internalType": "bytes32",
+ "name": "parentHash",
+ "type": "bytes32"
},
{
- "internalType": "uint96",
- "name": "amount",
- "type": "uint96"
+ "internalType": "bytes32",
+ "name": "blockHash",
+ "type": "bytes32"
},
{
- "internalType": "uint64",
- "name": "id",
- "type": "uint64"
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "graffiti",
+ "type": "bytes32"
}
],
"indexed": false,
- "internalType": "struct TaikoData.EthDeposit",
- "name": "deposit",
+ "internalType": "struct TaikoData.Transition",
+ "name": "tran",
"type": "tuple"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "contester",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint96",
+ "name": "contestBond",
+ "type": "uint96"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint16",
+ "name": "tier",
+ "type": "uint16"
}
],
- "name": "EthDeposited",
+ "name": "TransitionContested",
"type": "event"
},
{
"anonymous": false,
"inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint256",
+ "name": "blockId",
+ "type": "uint256"
+ },
{
"components": [
{
- "internalType": "address",
- "name": "recipient",
- "type": "address"
+ "internalType": "bytes32",
+ "name": "parentHash",
+ "type": "bytes32"
},
{
- "internalType": "uint96",
- "name": "amount",
- "type": "uint96"
+ "internalType": "bytes32",
+ "name": "blockHash",
+ "type": "bytes32"
},
{
- "internalType": "uint64",
- "name": "id",
- "type": "uint64"
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "graffiti",
+ "type": "bytes32"
}
],
"indexed": false,
- "internalType": "struct TaikoData.EthDeposit",
- "name": "deposit",
+ "internalType": "struct TaikoData.Transition",
+ "name": "tran",
"type": "tuple"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "prover",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint96",
+ "name": "validityBond",
+ "type": "uint96"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint16",
+ "name": "tier",
+ "type": "uint16"
}
],
- "name": "EthDeposited",
+ "name": "TransitionProved",
"type": "event"
},
{
@@ -887,12 +836,12 @@
"inputs": [
{
"indexed": false,
- "internalType": "uint8",
- "name": "version",
- "type": "uint8"
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
}
],
- "name": "Initialized",
+ "name": "Unpaused",
"type": "event"
},
{
@@ -901,17 +850,11 @@
{
"indexed": true,
"internalType": "address",
- "name": "previousOwner",
- "type": "address"
- },
- {
- "indexed": true,
- "internalType": "address",
- "name": "newOwner",
+ "name": "implementation",
"type": "address"
}
],
- "name": "OwnershipTransferred",
+ "name": "Upgraded",
"type": "event"
},
{
@@ -959,19 +902,6 @@
"stateMutability": "payable",
"type": "function"
},
- {
- "inputs": [
- {
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "depositTaikoToken",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
{
"inputs": [
{
@@ -991,12 +921,12 @@
},
{
"internalType": "address",
- "name": "prover",
+ "name": "assignedProver",
"type": "address"
},
{
"internalType": "uint96",
- "name": "proofBond",
+ "name": "livenessBond",
"type": "uint96"
},
{
@@ -1009,6 +939,11 @@
"name": "proposedAt",
"type": "uint64"
},
+ {
+ "internalType": "uint64",
+ "name": "proposedIn",
+ "type": "uint64"
+ },
{
"internalType": "uint32",
"name": "nextTransitionId",
@@ -1040,14 +975,9 @@
{
"components": [
{
- "internalType": "uint256",
+ "internalType": "uint64",
"name": "chainId",
- "type": "uint256"
- },
- {
- "internalType": "bool",
- "name": "relaySignalRoot",
- "type": "bool"
+ "type": "uint64"
},
{
"internalType": "uint64",
@@ -1061,7 +991,7 @@
},
{
"internalType": "uint64",
- "name": "blockMaxVerificationsPerTx",
+ "name": "maxBlocksToVerifyPerProposal",
"type": "uint64"
},
{
@@ -1069,56 +999,26 @@
"name": "blockMaxGasLimit",
"type": "uint32"
},
- {
- "internalType": "uint32",
- "name": "blockFeeBaseGas",
- "type": "uint32"
- },
{
"internalType": "uint24",
"name": "blockMaxTxListBytes",
"type": "uint24"
},
{
- "internalType": "uint256",
- "name": "blockTxListExpiry",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "proposerRewardPerSecond",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "proposerRewardMax",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "proofRegularCooldown",
- "type": "uint256"
- },
- {
- "internalType": "uint256",
- "name": "proofOracleCooldown",
- "type": "uint256"
+ "internalType": "uint24",
+ "name": "blobExpiry",
+ "type": "uint24"
},
{
- "internalType": "uint16",
- "name": "proofWindow",
- "type": "uint16"
+ "internalType": "bool",
+ "name": "blobAllowedForDA",
+ "type": "bool"
},
{
"internalType": "uint96",
- "name": "proofBond",
+ "name": "livenessBond",
"type": "uint96"
},
- {
- "internalType": "bool",
- "name": "skipProverAssignmentVerificaiton",
- "type": "bool"
- },
{
"internalType": "uint256",
"name": "ethDepositRingBufferSize",
@@ -1160,23 +1060,80 @@
"type": "tuple"
}
],
- "stateMutability": "pure",
+ "stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
- "internalType": "uint64",
- "name": "blockId",
- "type": "uint64"
+ "internalType": "uint256",
+ "name": "rand",
+ "type": "uint256"
}
],
- "name": "getCrossChainBlockHash",
+ "name": "getMinTier",
"outputs": [
{
- "internalType": "bytes32",
+ "internalType": "uint16",
"name": "",
- "type": "bytes32"
+ "type": "uint16"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getStateVariables",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "genesisHeight",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "genesisTimestamp",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "numEthDeposits",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "nextEthDepositToProcess",
+ "type": "uint64"
+ }
+ ],
+ "internalType": "struct TaikoData.SlotA",
+ "name": "a",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "numBlocks",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "lastVerifiedBlockId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bool",
+ "name": "provingPaused",
+ "type": "bool"
+ }
+ ],
+ "internalType": "struct TaikoData.SlotB",
+ "name": "b",
+ "type": "tuple"
}
],
"stateMutability": "view",
@@ -1190,55 +1147,83 @@
"type": "uint64"
}
],
- "name": "getCrossChainSignalRoot",
+ "name": "getSyncedSnippet",
"outputs": [
{
- "internalType": "bytes32",
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "remoteBlockId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "syncedInBlock",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "blockHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
+ }
+ ],
+ "internalType": "struct ICrossChainSync.Snippet",
"name": "",
- "type": "bytes32"
+ "type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
- "inputs": [],
- "name": "getStateVariables",
+ "inputs": [
+ {
+ "internalType": "uint16",
+ "name": "tierId",
+ "type": "uint16"
+ }
+ ],
+ "name": "getTier",
"outputs": [
{
"components": [
{
- "internalType": "uint64",
- "name": "genesisHeight",
- "type": "uint64"
+ "internalType": "bytes32",
+ "name": "verifierName",
+ "type": "bytes32"
},
{
- "internalType": "uint64",
- "name": "genesisTimestamp",
- "type": "uint64"
+ "internalType": "uint96",
+ "name": "validityBond",
+ "type": "uint96"
},
{
- "internalType": "uint64",
- "name": "numBlocks",
- "type": "uint64"
+ "internalType": "uint96",
+ "name": "contestBond",
+ "type": "uint96"
},
{
- "internalType": "uint64",
- "name": "lastVerifiedBlockId",
- "type": "uint64"
+ "internalType": "uint24",
+ "name": "cooldownWindow",
+ "type": "uint24"
},
{
- "internalType": "uint64",
- "name": "nextEthDepositToProcess",
- "type": "uint64"
+ "internalType": "uint16",
+ "name": "provingWindow",
+ "type": "uint16"
},
{
- "internalType": "uint64",
- "name": "numEthDeposits",
- "type": "uint64"
+ "internalType": "uint8",
+ "name": "maxBlocksToVerify",
+ "type": "uint8"
}
],
- "internalType": "struct TaikoData.StateVariables",
+ "internalType": "struct ITierProvider.Tier",
"name": "",
"type": "tuple"
}
@@ -1247,19 +1232,13 @@
"type": "function"
},
{
- "inputs": [
- {
- "internalType": "address",
- "name": "addr",
- "type": "address"
- }
- ],
- "name": "getTaikoTokenBalance",
+ "inputs": [],
+ "name": "getTierIds",
"outputs": [
{
- "internalType": "uint256",
- "name": "",
- "type": "uint256"
+ "internalType": "uint16[]",
+ "name": "ids",
+ "type": "uint16[]"
}
],
"stateMutability": "view",
@@ -1302,18 +1281,43 @@
"name": "prover",
"type": "address"
},
+ {
+ "internalType": "uint96",
+ "name": "validityBond",
+ "type": "uint96"
+ },
+ {
+ "internalType": "address",
+ "name": "contester",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "contestBond",
+ "type": "uint96"
+ },
{
"internalType": "uint64",
- "name": "provenAt",
+ "name": "timestamp",
"type": "uint64"
},
{
- "internalType": "bytes32[6]",
+ "internalType": "uint16",
+ "name": "tier",
+ "type": "uint16"
+ },
+ {
+ "internalType": "uint8",
+ "name": "contestations",
+ "type": "uint8"
+ },
+ {
+ "internalType": "bytes32[4]",
"name": "__reserved",
- "type": "bytes32[6]"
+ "type": "bytes32[4]"
}
],
- "internalType": "struct TaikoData.Transition",
+ "internalType": "struct TaikoData.TransitionState",
"name": "",
"type": "tuple"
}
@@ -1324,38 +1328,51 @@
{
"inputs": [
{
- "internalType": "uint16",
- "name": "id",
- "type": "uint16"
- }
- ],
- "name": "getVerifierName",
- "outputs": [
+ "internalType": "address",
+ "name": "_addressManager",
+ "type": "address"
+ },
{
"internalType": "bytes32",
- "name": "",
+ "name": "_genesisBlockHash",
"type": "bytes32"
}
],
- "stateMutability": "pure",
+ "name": "init",
+ "outputs": [],
+ "stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
- {
- "internalType": "address",
- "name": "_addressManager",
- "type": "address"
- },
{
"internalType": "bytes32",
- "name": "_genesisBlockHash",
+ "name": "blobHash",
"type": "bytes32"
}
],
- "name": "init",
- "outputs": [],
- "stateMutability": "nonpayable",
+ "name": "isBlobReusable",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "isConfigValid",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
"type": "function"
},
{
@@ -1371,16 +1388,44 @@
"stateMutability": "view",
"type": "function"
},
+ {
+ "inputs": [],
+ "name": "pause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
{
"inputs": [
{
- "internalType": "bytes",
- "name": "input",
- "type": "bytes"
- },
+ "internalType": "bool",
+ "name": "pause",
+ "type": "bool"
+ }
+ ],
+ "name": "pauseProving",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "paused",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
{
"internalType": "bytes",
- "name": "assignment",
+ "name": "params",
"type": "bytes"
},
{
@@ -1394,81 +1439,106 @@
{
"components": [
{
- "internalType": "uint64",
- "name": "id",
- "type": "uint64"
- },
- {
- "internalType": "uint64",
- "name": "timestamp",
- "type": "uint64"
+ "internalType": "bytes32",
+ "name": "l1Hash",
+ "type": "bytes32"
},
{
- "internalType": "uint64",
- "name": "l1Height",
- "type": "uint64"
+ "internalType": "bytes32",
+ "name": "difficulty",
+ "type": "bytes32"
},
{
"internalType": "bytes32",
- "name": "l1Hash",
+ "name": "blobHash",
"type": "bytes32"
},
{
"internalType": "bytes32",
- "name": "mixHash",
+ "name": "extraData",
"type": "bytes32"
},
{
"internalType": "bytes32",
- "name": "txListHash",
+ "name": "depositsHash",
"type": "bytes32"
},
+ {
+ "internalType": "address",
+ "name": "coinbase",
+ "type": "address"
+ },
+ {
+ "internalType": "uint64",
+ "name": "id",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint32",
+ "name": "gasLimit",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint64",
+ "name": "timestamp",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "l1Height",
+ "type": "uint64"
+ },
{
"internalType": "uint24",
- "name": "txListByteStart",
+ "name": "txListByteOffset",
"type": "uint24"
},
{
"internalType": "uint24",
- "name": "txListByteEnd",
+ "name": "txListByteSize",
"type": "uint24"
},
{
- "internalType": "uint32",
- "name": "gasLimit",
- "type": "uint32"
+ "internalType": "uint16",
+ "name": "minTier",
+ "type": "uint16"
},
{
- "internalType": "address",
- "name": "proposer",
- "type": "address"
+ "internalType": "bool",
+ "name": "blobUsed",
+ "type": "bool"
},
{
- "components": [
- {
- "internalType": "address",
- "name": "recipient",
- "type": "address"
- },
- {
- "internalType": "uint96",
- "name": "amount",
- "type": "uint96"
- },
- {
- "internalType": "uint64",
- "name": "id",
- "type": "uint64"
- }
- ],
- "internalType": "struct TaikoData.EthDeposit[]",
- "name": "depositsProcessed",
- "type": "tuple[]"
+ "internalType": "bytes32",
+ "name": "parentMetaHash",
+ "type": "bytes32"
}
],
"internalType": "struct TaikoData.BlockMetadata",
"name": "meta",
"type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "recipient",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "amount",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint64",
+ "name": "id",
+ "type": "uint64"
+ }
+ ],
+ "internalType": "struct TaikoData.EthDeposit[]",
+ "name": "depositsProcessed",
+ "type": "tuple[]"
}
],
"stateMutability": "payable",
@@ -1492,6 +1562,19 @@
"stateMutability": "nonpayable",
"type": "function"
},
+ {
+ "inputs": [],
+ "name": "proxiableUUID",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
{
"inputs": [],
"name": "renounceOwnership",
@@ -1502,9 +1585,9 @@
{
"inputs": [
{
- "internalType": "uint256",
+ "internalType": "uint64",
"name": "chainId",
- "type": "uint256"
+ "type": "uint64"
},
{
"internalType": "bytes32",
@@ -1552,19 +1635,6 @@
"stateMutability": "view",
"type": "function"
},
- {
- "inputs": [
- {
- "internalType": "address",
- "name": "newAddressManager",
- "type": "address"
- }
- ],
- "name": "setAddressManager",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
{
"inputs": [],
"name": "state",
@@ -1605,18 +1675,13 @@
},
{
"internalType": "uint64",
- "name": "nextEthDepositToProcess",
- "type": "uint64"
- },
- {
- "internalType": "uint64",
- "name": "lastVerifiedAt",
+ "name": "lastVerifiedBlockId",
"type": "uint64"
},
{
- "internalType": "uint64",
- "name": "lastVerifiedBlockId",
- "type": "uint64"
+ "internalType": "bool",
+ "name": "provingPaused",
+ "type": "bool"
}
],
"internalType": "struct TaikoData.SlotB",
@@ -1640,15 +1705,22 @@
"stateMutability": "nonpayable",
"type": "function"
},
+ {
+ "inputs": [],
+ "name": "unpause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
{
"inputs": [
{
- "internalType": "uint64",
- "name": "maxBlocks",
- "type": "uint64"
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
}
],
- "name": "verifyBlocks",
+ "name": "upgradeTo",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
@@ -1656,12 +1728,30 @@
{
"inputs": [
{
- "internalType": "uint256",
- "name": "amount",
- "type": "uint256"
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ }
+ ],
+ "name": "upgradeToAndCall",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "maxBlocksToVerify",
+ "type": "uint64"
}
],
- "name": "withdrawTaikoToken",
+ "name": "verifyBlocks",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
diff --git a/packages/eventindexer/abigen.sh b/packages/eventindexer/abigen.sh
index 57f5ec9205e..e61ebde29fe 100755
--- a/packages/eventindexer/abigen.sh
+++ b/packages/eventindexer/abigen.sh
@@ -5,9 +5,9 @@ if [ ! -d "../protocol/out" ]; then
exit 1
fi
-paths=("TaikoL1.sol" "Bridge.sol")
+paths=("TaikoL1.sol" "Bridge.sol" "AssignmentHook.sol")
-names=("TaikoL1" "Bridge")
+names=("TaikoL1" "Bridge" "AssignmentHook")
for (( i = 0; i < ${#paths[@]}; ++i ));
diff --git a/packages/eventindexer/chart.go b/packages/eventindexer/chart.go
index 088ecfdf203..a3ddc541026 100644
--- a/packages/eventindexer/chart.go
+++ b/packages/eventindexer/chart.go
@@ -17,5 +17,6 @@ type ChartRepository interface {
task string,
start string,
end string,
+ feeTokenAddress string,
) (*ChartResponse, error)
}
diff --git a/packages/eventindexer/cmd/flags/indexer.go b/packages/eventindexer/cmd/flags/indexer.go
index 7e4b859d28c..37f16b529d6 100644
--- a/packages/eventindexer/cmd/flags/indexer.go
+++ b/packages/eventindexer/cmd/flags/indexer.go
@@ -60,6 +60,13 @@ var (
Category: indexerCategory,
EnvVars: []string{"SWAP_ADDRESSES"},
}
+ AssignmentHookAddress = &cli.StringFlag{
+ Name: "assignmentHookAddress",
+ Usage: "Address of the AssignmentHook contract",
+ Required: false,
+ Category: indexerCategory,
+ EnvVars: []string{"ASSIGNMENT_HOOK_ADDRESS"},
+ }
CORSOrigins = &cli.StringFlag{
Name: "http.corsOrigins",
Usage: "Comma-delinated list of cors origins",
@@ -127,6 +134,7 @@ var IndexerFlags = MergeFlags(CommonFlags, []cli.Flag{
MetricsHTTPPort,
BridgeAddress,
SwapAddresses,
+ AssignmentHookAddress,
CORSOrigins,
BlockBatchSize,
SubscriptionBackoff,
diff --git a/packages/eventindexer/contracts/assignmenthook/AssignmentHook.go b/packages/eventindexer/contracts/assignmenthook/AssignmentHook.go
new file mode 100644
index 00000000000..17fb5889413
--- /dev/null
+++ b/packages/eventindexer/contracts/assignmenthook/AssignmentHook.go
@@ -0,0 +1,1770 @@
+// Code generated - DO NOT EDIT.
+// This file is a generated binding and any manual changes will be lost.
+
+package assignmenthook
+
+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
+)
+
+// AssignmentHookProverAssignment is an auto generated low-level Go binding around an user-defined struct.
+type AssignmentHookProverAssignment struct {
+ FeeToken common.Address
+ Expiry uint64
+ MaxBlockId uint64
+ MaxProposedIn uint64
+ MetaHash [32]byte
+ TierFees []TaikoDataTierFee
+ Signature []byte
+}
+
+// TaikoDataBlock is an auto generated low-level Go binding around an user-defined struct.
+type TaikoDataBlock struct {
+ MetaHash [32]byte
+ AssignedProver common.Address
+ LivenessBond *big.Int
+ BlockId uint64
+ ProposedAt uint64
+ ProposedIn uint64
+ NextTransitionId uint32
+ VerifiedTransitionId uint32
+ Reserved [7][32]byte
+}
+
+// TaikoDataBlockMetadata is an auto generated low-level Go binding around an user-defined struct.
+type TaikoDataBlockMetadata struct {
+ L1Hash [32]byte
+ Difficulty [32]byte
+ BlobHash [32]byte
+ ExtraData [32]byte
+ DepositsHash [32]byte
+ Coinbase common.Address
+ Id uint64
+ GasLimit uint32
+ Timestamp uint64
+ L1Height uint64
+ TxListByteOffset *big.Int
+ TxListByteSize *big.Int
+ MinTier uint16
+ BlobUsed bool
+ ParentMetaHash [32]byte
+}
+
+// TaikoDataTierFee is an auto generated low-level Go binding around an user-defined struct.
+type TaikoDataTierFee struct {
+ Tier uint16
+ Fee *big.Int
+}
+
+// AssignmentHookMetaData contains all meta data concerning the AssignmentHook contract.
+var AssignmentHookMetaData = &bind.MetaData{
+ ABI: "[{\"inputs\":[],\"name\":\"ETH_TRANSFER_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HOOK_ASSIGNMENT_EXPIRED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HOOK_ASSIGNMENT_INSUFFICIENT_FEE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HOOK_ASSIGNMENT_INVALID_SIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HOOK_TIER_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"difficulty\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blobHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"depositsHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint24\",\"name\":\"txListByteOffset\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteSize\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"minTier\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"blobUsed\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"parentMetaHash\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxProposedIn\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"metaHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"},{\"internalType\":\"uint128\",\"name\":\"fee\",\"type\":\"uint128\"}],\"internalType\":\"structTaikoData.TierFee[]\",\"name\":\"tierFees\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"structAssignmentHook.ProverAssignment\",\"name\":\"assignment\",\"type\":\"tuple\"}],\"name\":\"BlockAssigned\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_GAS_PAYING_PROVER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"feeToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"expiry\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxProposedIn\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"metaHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"},{\"internalType\":\"uint128\",\"name\":\"fee\",\"type\":\"uint128\"}],\"internalType\":\"structTaikoData.TierFee[]\",\"name\":\"tierFees\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"structAssignmentHook.ProverAssignment\",\"name\":\"assignment\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"taikoAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"blobHash\",\"type\":\"bytes32\"}],\"name\":\"hashAssignment\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proposedIn\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nextTransitionId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"verifiedTransitionId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[7]\",\"name\":\"__reserved\",\"type\":\"bytes32[7]\"}],\"internalType\":\"structTaikoData.Block\",\"name\":\"blk\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"difficulty\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blobHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"depositsHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint24\",\"name\":\"txListByteOffset\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteSize\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"minTier\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"blobUsed\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"parentMetaHash\",\"type\":\"bytes32\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onBlockProposed\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]",
+}
+
+// AssignmentHookABI is the input ABI used to generate the binding from.
+// Deprecated: Use AssignmentHookMetaData.ABI instead.
+var AssignmentHookABI = AssignmentHookMetaData.ABI
+
+// AssignmentHook is an auto generated Go binding around an Ethereum contract.
+type AssignmentHook struct {
+ AssignmentHookCaller // Read-only binding to the contract
+ AssignmentHookTransactor // Write-only binding to the contract
+ AssignmentHookFilterer // Log filterer for contract events
+}
+
+// AssignmentHookCaller is an auto generated read-only Go binding around an Ethereum contract.
+type AssignmentHookCaller struct {
+ contract *bind.BoundContract // Generic contract wrapper for the low level calls
+}
+
+// AssignmentHookTransactor is an auto generated write-only Go binding around an Ethereum contract.
+type AssignmentHookTransactor struct {
+ contract *bind.BoundContract // Generic contract wrapper for the low level calls
+}
+
+// AssignmentHookFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
+type AssignmentHookFilterer struct {
+ contract *bind.BoundContract // Generic contract wrapper for the low level calls
+}
+
+// AssignmentHookSession is an auto generated Go binding around an Ethereum contract,
+// with pre-set call and transact options.
+type AssignmentHookSession struct {
+ Contract *AssignmentHook // 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
+}
+
+// AssignmentHookCallerSession is an auto generated read-only Go binding around an Ethereum contract,
+// with pre-set call options.
+type AssignmentHookCallerSession struct {
+ Contract *AssignmentHookCaller // Generic contract caller binding to set the session for
+ CallOpts bind.CallOpts // Call options to use throughout this session
+}
+
+// AssignmentHookTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
+// with pre-set transact options.
+type AssignmentHookTransactorSession struct {
+ Contract *AssignmentHookTransactor // Generic contract transactor binding to set the session for
+ TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
+}
+
+// AssignmentHookRaw is an auto generated low-level Go binding around an Ethereum contract.
+type AssignmentHookRaw struct {
+ Contract *AssignmentHook // Generic contract binding to access the raw methods on
+}
+
+// AssignmentHookCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
+type AssignmentHookCallerRaw struct {
+ Contract *AssignmentHookCaller // Generic read-only contract binding to access the raw methods on
+}
+
+// AssignmentHookTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
+type AssignmentHookTransactorRaw struct {
+ Contract *AssignmentHookTransactor // Generic write-only contract binding to access the raw methods on
+}
+
+// NewAssignmentHook creates a new instance of AssignmentHook, bound to a specific deployed contract.
+func NewAssignmentHook(address common.Address, backend bind.ContractBackend) (*AssignmentHook, error) {
+ contract, err := bindAssignmentHook(address, backend, backend, backend)
+ if err != nil {
+ return nil, err
+ }
+ return &AssignmentHook{AssignmentHookCaller: AssignmentHookCaller{contract: contract}, AssignmentHookTransactor: AssignmentHookTransactor{contract: contract}, AssignmentHookFilterer: AssignmentHookFilterer{contract: contract}}, nil
+}
+
+// NewAssignmentHookCaller creates a new read-only instance of AssignmentHook, bound to a specific deployed contract.
+func NewAssignmentHookCaller(address common.Address, caller bind.ContractCaller) (*AssignmentHookCaller, error) {
+ contract, err := bindAssignmentHook(address, caller, nil, nil)
+ if err != nil {
+ return nil, err
+ }
+ return &AssignmentHookCaller{contract: contract}, nil
+}
+
+// NewAssignmentHookTransactor creates a new write-only instance of AssignmentHook, bound to a specific deployed contract.
+func NewAssignmentHookTransactor(address common.Address, transactor bind.ContractTransactor) (*AssignmentHookTransactor, error) {
+ contract, err := bindAssignmentHook(address, nil, transactor, nil)
+ if err != nil {
+ return nil, err
+ }
+ return &AssignmentHookTransactor{contract: contract}, nil
+}
+
+// NewAssignmentHookFilterer creates a new log filterer instance of AssignmentHook, bound to a specific deployed contract.
+func NewAssignmentHookFilterer(address common.Address, filterer bind.ContractFilterer) (*AssignmentHookFilterer, error) {
+ contract, err := bindAssignmentHook(address, nil, nil, filterer)
+ if err != nil {
+ return nil, err
+ }
+ return &AssignmentHookFilterer{contract: contract}, nil
+}
+
+// bindAssignmentHook binds a generic wrapper to an already deployed contract.
+func bindAssignmentHook(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
+ parsed, err := AssignmentHookMetaData.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 (_AssignmentHook *AssignmentHookRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
+ return _AssignmentHook.Contract.AssignmentHookCaller.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 (_AssignmentHook *AssignmentHookRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _AssignmentHook.Contract.AssignmentHookTransactor.contract.Transfer(opts)
+}
+
+// Transact invokes the (paid) contract method with params as input values.
+func (_AssignmentHook *AssignmentHookRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
+ return _AssignmentHook.Contract.AssignmentHookTransactor.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 (_AssignmentHook *AssignmentHookCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
+ return _AssignmentHook.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 (_AssignmentHook *AssignmentHookTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _AssignmentHook.Contract.contract.Transfer(opts)
+}
+
+// Transact invokes the (paid) contract method with params as input values.
+func (_AssignmentHook *AssignmentHookTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
+ return _AssignmentHook.Contract.contract.Transact(opts, method, params...)
+}
+
+// MAXGASPAYINGPROVER is a free data retrieval call binding the contract method 0x12925031.
+//
+// Solidity: function MAX_GAS_PAYING_PROVER() view returns(uint256)
+func (_AssignmentHook *AssignmentHookCaller) MAXGASPAYINGPROVER(opts *bind.CallOpts) (*big.Int, error) {
+ var out []interface{}
+ err := _AssignmentHook.contract.Call(opts, &out, "MAX_GAS_PAYING_PROVER")
+
+ if err != nil {
+ return *new(*big.Int), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+
+ return out0, err
+
+}
+
+// MAXGASPAYINGPROVER is a free data retrieval call binding the contract method 0x12925031.
+//
+// Solidity: function MAX_GAS_PAYING_PROVER() view returns(uint256)
+func (_AssignmentHook *AssignmentHookSession) MAXGASPAYINGPROVER() (*big.Int, error) {
+ return _AssignmentHook.Contract.MAXGASPAYINGPROVER(&_AssignmentHook.CallOpts)
+}
+
+// MAXGASPAYINGPROVER is a free data retrieval call binding the contract method 0x12925031.
+//
+// Solidity: function MAX_GAS_PAYING_PROVER() view returns(uint256)
+func (_AssignmentHook *AssignmentHookCallerSession) MAXGASPAYINGPROVER() (*big.Int, error) {
+ return _AssignmentHook.Contract.MAXGASPAYINGPROVER(&_AssignmentHook.CallOpts)
+}
+
+// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f.
+//
+// Solidity: function addressManager() view returns(address)
+func (_AssignmentHook *AssignmentHookCaller) AddressManager(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _AssignmentHook.contract.Call(opts, &out, "addressManager")
+
+ if err != nil {
+ return *new(common.Address), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+
+ return out0, err
+
+}
+
+// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f.
+//
+// Solidity: function addressManager() view returns(address)
+func (_AssignmentHook *AssignmentHookSession) AddressManager() (common.Address, error) {
+ return _AssignmentHook.Contract.AddressManager(&_AssignmentHook.CallOpts)
+}
+
+// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f.
+//
+// Solidity: function addressManager() view returns(address)
+func (_AssignmentHook *AssignmentHookCallerSession) AddressManager() (common.Address, error) {
+ return _AssignmentHook.Contract.AddressManager(&_AssignmentHook.CallOpts)
+}
+
+// HashAssignment is a free data retrieval call binding the contract method 0x9f64a349.
+//
+// Solidity: function hashAssignment((address,uint64,uint64,uint64,bytes32,(uint16,uint128)[],bytes) assignment, address taikoAddress, bytes32 blobHash) pure returns(bytes32)
+func (_AssignmentHook *AssignmentHookCaller) HashAssignment(opts *bind.CallOpts, assignment AssignmentHookProverAssignment, taikoAddress common.Address, blobHash [32]byte) ([32]byte, error) {
+ var out []interface{}
+ err := _AssignmentHook.contract.Call(opts, &out, "hashAssignment", assignment, taikoAddress, blobHash)
+
+ if err != nil {
+ return *new([32]byte), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+
+ return out0, err
+
+}
+
+// HashAssignment is a free data retrieval call binding the contract method 0x9f64a349.
+//
+// Solidity: function hashAssignment((address,uint64,uint64,uint64,bytes32,(uint16,uint128)[],bytes) assignment, address taikoAddress, bytes32 blobHash) pure returns(bytes32)
+func (_AssignmentHook *AssignmentHookSession) HashAssignment(assignment AssignmentHookProverAssignment, taikoAddress common.Address, blobHash [32]byte) ([32]byte, error) {
+ return _AssignmentHook.Contract.HashAssignment(&_AssignmentHook.CallOpts, assignment, taikoAddress, blobHash)
+}
+
+// HashAssignment is a free data retrieval call binding the contract method 0x9f64a349.
+//
+// Solidity: function hashAssignment((address,uint64,uint64,uint64,bytes32,(uint16,uint128)[],bytes) assignment, address taikoAddress, bytes32 blobHash) pure returns(bytes32)
+func (_AssignmentHook *AssignmentHookCallerSession) HashAssignment(assignment AssignmentHookProverAssignment, taikoAddress common.Address, blobHash [32]byte) ([32]byte, error) {
+ return _AssignmentHook.Contract.HashAssignment(&_AssignmentHook.CallOpts, assignment, taikoAddress, blobHash)
+}
+
+// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+//
+// Solidity: function owner() view returns(address)
+func (_AssignmentHook *AssignmentHookCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _AssignmentHook.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 (_AssignmentHook *AssignmentHookSession) Owner() (common.Address, error) {
+ return _AssignmentHook.Contract.Owner(&_AssignmentHook.CallOpts)
+}
+
+// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+//
+// Solidity: function owner() view returns(address)
+func (_AssignmentHook *AssignmentHookCallerSession) Owner() (common.Address, error) {
+ return _AssignmentHook.Contract.Owner(&_AssignmentHook.CallOpts)
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_AssignmentHook *AssignmentHookCaller) Paused(opts *bind.CallOpts) (bool, error) {
+ var out []interface{}
+ err := _AssignmentHook.contract.Call(opts, &out, "paused")
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_AssignmentHook *AssignmentHookSession) Paused() (bool, error) {
+ return _AssignmentHook.Contract.Paused(&_AssignmentHook.CallOpts)
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_AssignmentHook *AssignmentHookCallerSession) Paused() (bool, error) {
+ return _AssignmentHook.Contract.Paused(&_AssignmentHook.CallOpts)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_AssignmentHook *AssignmentHookCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) {
+ var out []interface{}
+ err := _AssignmentHook.contract.Call(opts, &out, "proxiableUUID")
+
+ if err != nil {
+ return *new([32]byte), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+
+ return out0, err
+
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_AssignmentHook *AssignmentHookSession) ProxiableUUID() ([32]byte, error) {
+ return _AssignmentHook.Contract.ProxiableUUID(&_AssignmentHook.CallOpts)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_AssignmentHook *AssignmentHookCallerSession) ProxiableUUID() ([32]byte, error) {
+ return _AssignmentHook.Contract.ProxiableUUID(&_AssignmentHook.CallOpts)
+}
+
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
+//
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_AssignmentHook *AssignmentHookCaller) Resolve(opts *bind.CallOpts, chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ var out []interface{}
+ err := _AssignmentHook.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress)
+
+ if err != nil {
+ return *new(common.Address), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+
+ return out0, err
+
+}
+
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
+//
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_AssignmentHook *AssignmentHookSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ return _AssignmentHook.Contract.Resolve(&_AssignmentHook.CallOpts, chainId, name, allowZeroAddress)
+}
+
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
+//
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_AssignmentHook *AssignmentHookCallerSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ return _AssignmentHook.Contract.Resolve(&_AssignmentHook.CallOpts, chainId, name, allowZeroAddress)
+}
+
+// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e.
+//
+// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_AssignmentHook *AssignmentHookCaller) Resolve0(opts *bind.CallOpts, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ var out []interface{}
+ err := _AssignmentHook.contract.Call(opts, &out, "resolve0", name, allowZeroAddress)
+
+ if err != nil {
+ return *new(common.Address), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+
+ return out0, err
+
+}
+
+// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e.
+//
+// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_AssignmentHook *AssignmentHookSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ return _AssignmentHook.Contract.Resolve0(&_AssignmentHook.CallOpts, name, allowZeroAddress)
+}
+
+// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e.
+//
+// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_AssignmentHook *AssignmentHookCallerSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ return _AssignmentHook.Contract.Resolve0(&_AssignmentHook.CallOpts, name, allowZeroAddress)
+}
+
+// Init is a paid mutator transaction binding the contract method 0x19ab453c.
+//
+// Solidity: function init(address _addressManager) returns()
+func (_AssignmentHook *AssignmentHookTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address) (*types.Transaction, error) {
+ return _AssignmentHook.contract.Transact(opts, "init", _addressManager)
+}
+
+// Init is a paid mutator transaction binding the contract method 0x19ab453c.
+//
+// Solidity: function init(address _addressManager) returns()
+func (_AssignmentHook *AssignmentHookSession) Init(_addressManager common.Address) (*types.Transaction, error) {
+ return _AssignmentHook.Contract.Init(&_AssignmentHook.TransactOpts, _addressManager)
+}
+
+// Init is a paid mutator transaction binding the contract method 0x19ab453c.
+//
+// Solidity: function init(address _addressManager) returns()
+func (_AssignmentHook *AssignmentHookTransactorSession) Init(_addressManager common.Address) (*types.Transaction, error) {
+ return _AssignmentHook.Contract.Init(&_AssignmentHook.TransactOpts, _addressManager)
+}
+
+// OnBlockProposed is a paid mutator transaction binding the contract method 0x6bfd8a0f.
+//
+// Solidity: function onBlockProposed((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32,bytes32[7]) blk, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, bytes data) payable returns()
+func (_AssignmentHook *AssignmentHookTransactor) OnBlockProposed(opts *bind.TransactOpts, blk TaikoDataBlock, meta TaikoDataBlockMetadata, data []byte) (*types.Transaction, error) {
+ return _AssignmentHook.contract.Transact(opts, "onBlockProposed", blk, meta, data)
+}
+
+// OnBlockProposed is a paid mutator transaction binding the contract method 0x6bfd8a0f.
+//
+// Solidity: function onBlockProposed((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32,bytes32[7]) blk, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, bytes data) payable returns()
+func (_AssignmentHook *AssignmentHookSession) OnBlockProposed(blk TaikoDataBlock, meta TaikoDataBlockMetadata, data []byte) (*types.Transaction, error) {
+ return _AssignmentHook.Contract.OnBlockProposed(&_AssignmentHook.TransactOpts, blk, meta, data)
+}
+
+// OnBlockProposed is a paid mutator transaction binding the contract method 0x6bfd8a0f.
+//
+// Solidity: function onBlockProposed((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32,bytes32[7]) blk, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, bytes data) payable returns()
+func (_AssignmentHook *AssignmentHookTransactorSession) OnBlockProposed(blk TaikoDataBlock, meta TaikoDataBlockMetadata, data []byte) (*types.Transaction, error) {
+ return _AssignmentHook.Contract.OnBlockProposed(&_AssignmentHook.TransactOpts, blk, meta, data)
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_AssignmentHook *AssignmentHookTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _AssignmentHook.contract.Transact(opts, "pause")
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_AssignmentHook *AssignmentHookSession) Pause() (*types.Transaction, error) {
+ return _AssignmentHook.Contract.Pause(&_AssignmentHook.TransactOpts)
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_AssignmentHook *AssignmentHookTransactorSession) Pause() (*types.Transaction, error) {
+ return _AssignmentHook.Contract.Pause(&_AssignmentHook.TransactOpts)
+}
+
+// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
+//
+// Solidity: function renounceOwnership() returns()
+func (_AssignmentHook *AssignmentHookTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _AssignmentHook.contract.Transact(opts, "renounceOwnership")
+}
+
+// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
+//
+// Solidity: function renounceOwnership() returns()
+func (_AssignmentHook *AssignmentHookSession) RenounceOwnership() (*types.Transaction, error) {
+ return _AssignmentHook.Contract.RenounceOwnership(&_AssignmentHook.TransactOpts)
+}
+
+// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
+//
+// Solidity: function renounceOwnership() returns()
+func (_AssignmentHook *AssignmentHookTransactorSession) RenounceOwnership() (*types.Transaction, error) {
+ return _AssignmentHook.Contract.RenounceOwnership(&_AssignmentHook.TransactOpts)
+}
+
+// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
+//
+// Solidity: function transferOwnership(address newOwner) returns()
+func (_AssignmentHook *AssignmentHookTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
+ return _AssignmentHook.contract.Transact(opts, "transferOwnership", newOwner)
+}
+
+// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
+//
+// Solidity: function transferOwnership(address newOwner) returns()
+func (_AssignmentHook *AssignmentHookSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
+ return _AssignmentHook.Contract.TransferOwnership(&_AssignmentHook.TransactOpts, newOwner)
+}
+
+// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
+//
+// Solidity: function transferOwnership(address newOwner) returns()
+func (_AssignmentHook *AssignmentHookTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
+ return _AssignmentHook.Contract.TransferOwnership(&_AssignmentHook.TransactOpts, newOwner)
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_AssignmentHook *AssignmentHookTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _AssignmentHook.contract.Transact(opts, "unpause")
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_AssignmentHook *AssignmentHookSession) Unpause() (*types.Transaction, error) {
+ return _AssignmentHook.Contract.Unpause(&_AssignmentHook.TransactOpts)
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_AssignmentHook *AssignmentHookTransactorSession) Unpause() (*types.Transaction, error) {
+ return _AssignmentHook.Contract.Unpause(&_AssignmentHook.TransactOpts)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_AssignmentHook *AssignmentHookTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) {
+ return _AssignmentHook.contract.Transact(opts, "upgradeTo", newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_AssignmentHook *AssignmentHookSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _AssignmentHook.Contract.UpgradeTo(&_AssignmentHook.TransactOpts, newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_AssignmentHook *AssignmentHookTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _AssignmentHook.Contract.UpgradeTo(&_AssignmentHook.TransactOpts, newImplementation)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_AssignmentHook *AssignmentHookTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _AssignmentHook.contract.Transact(opts, "upgradeToAndCall", newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_AssignmentHook *AssignmentHookSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _AssignmentHook.Contract.UpgradeToAndCall(&_AssignmentHook.TransactOpts, newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_AssignmentHook *AssignmentHookTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _AssignmentHook.Contract.UpgradeToAndCall(&_AssignmentHook.TransactOpts, newImplementation, data)
+}
+
+// AssignmentHookAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the AssignmentHook contract.
+type AssignmentHookAdminChangedIterator struct {
+ Event *AssignmentHookAdminChanged // 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 *AssignmentHookAdminChangedIterator) 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(AssignmentHookAdminChanged)
+ 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(AssignmentHookAdminChanged)
+ 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 *AssignmentHookAdminChangedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *AssignmentHookAdminChangedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// AssignmentHookAdminChanged represents a AdminChanged event raised by the AssignmentHook contract.
+type AssignmentHookAdminChanged struct {
+ PreviousAdmin common.Address
+ NewAdmin common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
+//
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_AssignmentHook *AssignmentHookFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*AssignmentHookAdminChangedIterator, error) {
+
+ logs, sub, err := _AssignmentHook.contract.FilterLogs(opts, "AdminChanged")
+ if err != nil {
+ return nil, err
+ }
+ return &AssignmentHookAdminChangedIterator{contract: _AssignmentHook.contract, event: "AdminChanged", logs: logs, sub: sub}, nil
+}
+
+// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
+//
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_AssignmentHook *AssignmentHookFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *AssignmentHookAdminChanged) (event.Subscription, error) {
+
+ logs, sub, err := _AssignmentHook.contract.WatchLogs(opts, "AdminChanged")
+ 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(AssignmentHookAdminChanged)
+ if err := _AssignmentHook.contract.UnpackLog(event, "AdminChanged", 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
+}
+
+// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
+//
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_AssignmentHook *AssignmentHookFilterer) ParseAdminChanged(log types.Log) (*AssignmentHookAdminChanged, error) {
+ event := new(AssignmentHookAdminChanged)
+ if err := _AssignmentHook.contract.UnpackLog(event, "AdminChanged", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// AssignmentHookBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the AssignmentHook contract.
+type AssignmentHookBeaconUpgradedIterator struct {
+ Event *AssignmentHookBeaconUpgraded // 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 *AssignmentHookBeaconUpgradedIterator) 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(AssignmentHookBeaconUpgraded)
+ 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(AssignmentHookBeaconUpgraded)
+ 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 *AssignmentHookBeaconUpgradedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *AssignmentHookBeaconUpgradedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// AssignmentHookBeaconUpgraded represents a BeaconUpgraded event raised by the AssignmentHook contract.
+type AssignmentHookBeaconUpgraded struct {
+ Beacon common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
+//
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_AssignmentHook *AssignmentHookFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*AssignmentHookBeaconUpgradedIterator, error) {
+
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
+ }
+
+ logs, sub, err := _AssignmentHook.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule)
+ if err != nil {
+ return nil, err
+ }
+ return &AssignmentHookBeaconUpgradedIterator{contract: _AssignmentHook.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil
+}
+
+// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
+//
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_AssignmentHook *AssignmentHookFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *AssignmentHookBeaconUpgraded, beacon []common.Address) (event.Subscription, error) {
+
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
+ }
+
+ logs, sub, err := _AssignmentHook.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule)
+ 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(AssignmentHookBeaconUpgraded)
+ if err := _AssignmentHook.contract.UnpackLog(event, "BeaconUpgraded", 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
+}
+
+// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
+//
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_AssignmentHook *AssignmentHookFilterer) ParseBeaconUpgraded(log types.Log) (*AssignmentHookBeaconUpgraded, error) {
+ event := new(AssignmentHookBeaconUpgraded)
+ if err := _AssignmentHook.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// AssignmentHookBlockAssignedIterator is returned from FilterBlockAssigned and is used to iterate over the raw logs and unpacked data for BlockAssigned events raised by the AssignmentHook contract.
+type AssignmentHookBlockAssignedIterator struct {
+ Event *AssignmentHookBlockAssigned // 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 *AssignmentHookBlockAssignedIterator) 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(AssignmentHookBlockAssigned)
+ 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(AssignmentHookBlockAssigned)
+ 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 *AssignmentHookBlockAssignedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *AssignmentHookBlockAssignedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// AssignmentHookBlockAssigned represents a BlockAssigned event raised by the AssignmentHook contract.
+type AssignmentHookBlockAssigned struct {
+ AssignedProver common.Address
+ Meta TaikoDataBlockMetadata
+ Assignment AssignmentHookProverAssignment
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterBlockAssigned is a free log retrieval operation binding the contract event 0xcd949933b61139cc85e76147e25c12a4fb3664bd6e1dcf9ab10e87e756e7c4a7.
+//
+// Solidity: event BlockAssigned(address indexed assignedProver, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint64,uint64,uint64,bytes32,(uint16,uint128)[],bytes) assignment)
+func (_AssignmentHook *AssignmentHookFilterer) FilterBlockAssigned(opts *bind.FilterOpts, assignedProver []common.Address) (*AssignmentHookBlockAssignedIterator, error) {
+
+ var assignedProverRule []interface{}
+ for _, assignedProverItem := range assignedProver {
+ assignedProverRule = append(assignedProverRule, assignedProverItem)
+ }
+
+ logs, sub, err := _AssignmentHook.contract.FilterLogs(opts, "BlockAssigned", assignedProverRule)
+ if err != nil {
+ return nil, err
+ }
+ return &AssignmentHookBlockAssignedIterator{contract: _AssignmentHook.contract, event: "BlockAssigned", logs: logs, sub: sub}, nil
+}
+
+// WatchBlockAssigned is a free log subscription operation binding the contract event 0xcd949933b61139cc85e76147e25c12a4fb3664bd6e1dcf9ab10e87e756e7c4a7.
+//
+// Solidity: event BlockAssigned(address indexed assignedProver, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint64,uint64,uint64,bytes32,(uint16,uint128)[],bytes) assignment)
+func (_AssignmentHook *AssignmentHookFilterer) WatchBlockAssigned(opts *bind.WatchOpts, sink chan<- *AssignmentHookBlockAssigned, assignedProver []common.Address) (event.Subscription, error) {
+
+ var assignedProverRule []interface{}
+ for _, assignedProverItem := range assignedProver {
+ assignedProverRule = append(assignedProverRule, assignedProverItem)
+ }
+
+ logs, sub, err := _AssignmentHook.contract.WatchLogs(opts, "BlockAssigned", assignedProverRule)
+ 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(AssignmentHookBlockAssigned)
+ if err := _AssignmentHook.contract.UnpackLog(event, "BlockAssigned", 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
+}
+
+// ParseBlockAssigned is a log parse operation binding the contract event 0xcd949933b61139cc85e76147e25c12a4fb3664bd6e1dcf9ab10e87e756e7c4a7.
+//
+// Solidity: event BlockAssigned(address indexed assignedProver, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint64,uint64,uint64,bytes32,(uint16,uint128)[],bytes) assignment)
+func (_AssignmentHook *AssignmentHookFilterer) ParseBlockAssigned(log types.Log) (*AssignmentHookBlockAssigned, error) {
+ event := new(AssignmentHookBlockAssigned)
+ if err := _AssignmentHook.contract.UnpackLog(event, "BlockAssigned", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// AssignmentHookInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the AssignmentHook contract.
+type AssignmentHookInitializedIterator struct {
+ Event *AssignmentHookInitialized // 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 *AssignmentHookInitializedIterator) 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(AssignmentHookInitialized)
+ 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(AssignmentHookInitialized)
+ 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 *AssignmentHookInitializedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *AssignmentHookInitializedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// AssignmentHookInitialized represents a Initialized event raised by the AssignmentHook contract.
+type AssignmentHookInitialized 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 (_AssignmentHook *AssignmentHookFilterer) FilterInitialized(opts *bind.FilterOpts) (*AssignmentHookInitializedIterator, error) {
+
+ logs, sub, err := _AssignmentHook.contract.FilterLogs(opts, "Initialized")
+ if err != nil {
+ return nil, err
+ }
+ return &AssignmentHookInitializedIterator{contract: _AssignmentHook.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 (_AssignmentHook *AssignmentHookFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *AssignmentHookInitialized) (event.Subscription, error) {
+
+ logs, sub, err := _AssignmentHook.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(AssignmentHookInitialized)
+ if err := _AssignmentHook.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 (_AssignmentHook *AssignmentHookFilterer) ParseInitialized(log types.Log) (*AssignmentHookInitialized, error) {
+ event := new(AssignmentHookInitialized)
+ if err := _AssignmentHook.contract.UnpackLog(event, "Initialized", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// AssignmentHookOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the AssignmentHook contract.
+type AssignmentHookOwnershipTransferredIterator struct {
+ Event *AssignmentHookOwnershipTransferred // 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 *AssignmentHookOwnershipTransferredIterator) 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(AssignmentHookOwnershipTransferred)
+ 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(AssignmentHookOwnershipTransferred)
+ 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 *AssignmentHookOwnershipTransferredIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *AssignmentHookOwnershipTransferredIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// AssignmentHookOwnershipTransferred represents a OwnershipTransferred event raised by the AssignmentHook contract.
+type AssignmentHookOwnershipTransferred 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 (_AssignmentHook *AssignmentHookFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*AssignmentHookOwnershipTransferredIterator, 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 := _AssignmentHook.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+ if err != nil {
+ return nil, err
+ }
+ return &AssignmentHookOwnershipTransferredIterator{contract: _AssignmentHook.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 (_AssignmentHook *AssignmentHookFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *AssignmentHookOwnershipTransferred, 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 := _AssignmentHook.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(AssignmentHookOwnershipTransferred)
+ if err := _AssignmentHook.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 (_AssignmentHook *AssignmentHookFilterer) ParseOwnershipTransferred(log types.Log) (*AssignmentHookOwnershipTransferred, error) {
+ event := new(AssignmentHookOwnershipTransferred)
+ if err := _AssignmentHook.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// AssignmentHookPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the AssignmentHook contract.
+type AssignmentHookPausedIterator struct {
+ Event *AssignmentHookPaused // 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 *AssignmentHookPausedIterator) 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(AssignmentHookPaused)
+ 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(AssignmentHookPaused)
+ 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 *AssignmentHookPausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *AssignmentHookPausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// AssignmentHookPaused represents a Paused event raised by the AssignmentHook contract.
+type AssignmentHookPaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_AssignmentHook *AssignmentHookFilterer) FilterPaused(opts *bind.FilterOpts) (*AssignmentHookPausedIterator, error) {
+
+ logs, sub, err := _AssignmentHook.contract.FilterLogs(opts, "Paused")
+ if err != nil {
+ return nil, err
+ }
+ return &AssignmentHookPausedIterator{contract: _AssignmentHook.contract, event: "Paused", logs: logs, sub: sub}, nil
+}
+
+// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_AssignmentHook *AssignmentHookFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *AssignmentHookPaused) (event.Subscription, error) {
+
+ logs, sub, err := _AssignmentHook.contract.WatchLogs(opts, "Paused")
+ 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(AssignmentHookPaused)
+ if err := _AssignmentHook.contract.UnpackLog(event, "Paused", 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
+}
+
+// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_AssignmentHook *AssignmentHookFilterer) ParsePaused(log types.Log) (*AssignmentHookPaused, error) {
+ event := new(AssignmentHookPaused)
+ if err := _AssignmentHook.contract.UnpackLog(event, "Paused", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// AssignmentHookUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the AssignmentHook contract.
+type AssignmentHookUnpausedIterator struct {
+ Event *AssignmentHookUnpaused // 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 *AssignmentHookUnpausedIterator) 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(AssignmentHookUnpaused)
+ 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(AssignmentHookUnpaused)
+ 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 *AssignmentHookUnpausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *AssignmentHookUnpausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// AssignmentHookUnpaused represents a Unpaused event raised by the AssignmentHook contract.
+type AssignmentHookUnpaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_AssignmentHook *AssignmentHookFilterer) FilterUnpaused(opts *bind.FilterOpts) (*AssignmentHookUnpausedIterator, error) {
+
+ logs, sub, err := _AssignmentHook.contract.FilterLogs(opts, "Unpaused")
+ if err != nil {
+ return nil, err
+ }
+ return &AssignmentHookUnpausedIterator{contract: _AssignmentHook.contract, event: "Unpaused", logs: logs, sub: sub}, nil
+}
+
+// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_AssignmentHook *AssignmentHookFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *AssignmentHookUnpaused) (event.Subscription, error) {
+
+ logs, sub, err := _AssignmentHook.contract.WatchLogs(opts, "Unpaused")
+ 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(AssignmentHookUnpaused)
+ if err := _AssignmentHook.contract.UnpackLog(event, "Unpaused", 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
+}
+
+// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_AssignmentHook *AssignmentHookFilterer) ParseUnpaused(log types.Log) (*AssignmentHookUnpaused, error) {
+ event := new(AssignmentHookUnpaused)
+ if err := _AssignmentHook.contract.UnpackLog(event, "Unpaused", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// AssignmentHookUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the AssignmentHook contract.
+type AssignmentHookUpgradedIterator struct {
+ Event *AssignmentHookUpgraded // 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 *AssignmentHookUpgradedIterator) 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(AssignmentHookUpgraded)
+ 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(AssignmentHookUpgraded)
+ 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 *AssignmentHookUpgradedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *AssignmentHookUpgradedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// AssignmentHookUpgraded represents a Upgraded event raised by the AssignmentHook contract.
+type AssignmentHookUpgraded struct {
+ Implementation common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_AssignmentHook *AssignmentHookFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*AssignmentHookUpgradedIterator, error) {
+
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
+ }
+
+ logs, sub, err := _AssignmentHook.contract.FilterLogs(opts, "Upgraded", implementationRule)
+ if err != nil {
+ return nil, err
+ }
+ return &AssignmentHookUpgradedIterator{contract: _AssignmentHook.contract, event: "Upgraded", logs: logs, sub: sub}, nil
+}
+
+// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_AssignmentHook *AssignmentHookFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *AssignmentHookUpgraded, implementation []common.Address) (event.Subscription, error) {
+
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
+ }
+
+ logs, sub, err := _AssignmentHook.contract.WatchLogs(opts, "Upgraded", implementationRule)
+ 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(AssignmentHookUpgraded)
+ if err := _AssignmentHook.contract.UnpackLog(event, "Upgraded", 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
+}
+
+// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_AssignmentHook *AssignmentHookFilterer) ParseUpgraded(log types.Log) (*AssignmentHookUpgraded, error) {
+ event := new(AssignmentHookUpgraded)
+ if err := _AssignmentHook.contract.UnpackLog(event, "Upgraded", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
diff --git a/packages/eventindexer/contracts/bridge/Bridge.go b/packages/eventindexer/contracts/bridge/Bridge.go
index 2313b34e13a..c7c19837e5b 100644
--- a/packages/eventindexer/contracts/bridge/Bridge.go
+++ b/packages/eventindexer/contracts/bridge/Bridge.go
@@ -33,16 +33,16 @@ var (
type IBridgeContext struct {
MsgHash [32]byte
From common.Address
- SrcChainId *big.Int
+ SrcChainId uint64
}
// IBridgeMessage is an auto generated low-level Go binding around an user-defined struct.
type IBridgeMessage struct {
Id *big.Int
From common.Address
- SrcChainId *big.Int
- DestChainId *big.Int
- User common.Address
+ SrcChainId uint64
+ DestChainId uint64
+ Owner common.Address
To common.Address
RefundTo common.Address
Value *big.Int
@@ -54,7 +54,7 @@ type IBridgeMessage struct {
// BridgeMetaData contains all meta data concerning the Bridge contract.
var BridgeMetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[],\"name\":\"B_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_ERC20_CANNOT_RECEIVE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_EV_DO_NOT_BURN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_EV_NOT_AUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_EV_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_FAILED_TRANSFER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_FORBIDDEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_FORBIDDEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_GAS_LIMIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_GAS_LIMIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INCORRECT_VALUE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INCORRECT_VALUE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INIT_PARAM_ERROR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_HASH_NULL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_HASH_NULL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_NON_RETRIABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_NON_RETRIABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_NOT_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_NOT_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_RECALLED_ALREADY\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_RECALLED_ALREADY\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_NULL_APP_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_SIGNAL_NOT_RECEIVED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_SIGNAL_NOT_RECEIVED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_STATUS_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_STATUS_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_USER_IS_NULL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_USER_IS_NULL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_WRONG_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_WRONG_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_WRONG_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_WRONG_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_WRONG_TO_ADDRESS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_WRONG_TO_ADDRESS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_ZERO_SIGNAL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"DestChainEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"MessageRecalled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"MessageRecalled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"enumLibBridgeStatus.MessageStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"transactor\",\"type\":\"address\"}],\"name\":\"MessageStatusChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"enumLibBridgeStatus.MessageStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"transactor\",\"type\":\"address\"}],\"name\":\"MessageStatusChanged\",\"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\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"SignalSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"context\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"}],\"internalType\":\"structIBridge.Context\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"getMessageStatus\",\"outputs\":[{\"internalType\":\"enumLibBridgeStatus.MessageStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"getMessageStatusSlot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"hashMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"}],\"name\":\"isDestChainEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"isMessageFailed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"isMessageRecalled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"isMessageReceived\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"isMessageSent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"processMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"recallMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"isLastAttempt\",\"type\":\"bool\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
+ ABI: "[{\"inputs\":[],\"name\":\"B_INVALID_CHAINID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INVALID_CONTEXT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INVALID_GAS_LIMIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INVALID_SIGNAL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INVALID_USER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INVALID_VALUE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_NON_RETRIABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_NOT_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_NOT_RECEIVED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_PERMISSION_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_RECALLED_ALREADY\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_STATUS_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ETH_TRANSFER_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"DestChainEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"MessageRecalled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"enumBridge.Status\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"MessageStatusChanged\",\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"SignalSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"context\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"}],\"internalType\":\"structIBridge.Context\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"hashMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"}],\"name\":\"isDestChainEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"destBridge\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"isMessageRecalled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"recalled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"isMessageSent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"messageStatus\",\"outputs\":[{\"internalType\":\"enumBridge.Status\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextMessageId\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"processMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"proveMessageFailed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"proveMessageReceived\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"recallMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"isLastAttempt\",\"type\":\"bool\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"_message\",\"type\":\"tuple\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
}
// BridgeABI is the input ABI used to generate the binding from.
@@ -236,7 +236,7 @@ func (_Bridge *BridgeCallerSession) AddressManager() (common.Address, error) {
// Context is a free data retrieval call binding the contract method 0xd0496d6a.
//
-// Solidity: function context() view returns((bytes32,address,uint256))
+// Solidity: function context() view returns((bytes32,address,uint64))
func (_Bridge *BridgeCaller) Context(opts *bind.CallOpts) (IBridgeContext, error) {
var out []interface{}
err := _Bridge.contract.Call(opts, &out, "context")
@@ -253,117 +253,131 @@ func (_Bridge *BridgeCaller) Context(opts *bind.CallOpts) (IBridgeContext, error
// Context is a free data retrieval call binding the contract method 0xd0496d6a.
//
-// Solidity: function context() view returns((bytes32,address,uint256))
+// Solidity: function context() view returns((bytes32,address,uint64))
func (_Bridge *BridgeSession) Context() (IBridgeContext, error) {
return _Bridge.Contract.Context(&_Bridge.CallOpts)
}
// Context is a free data retrieval call binding the contract method 0xd0496d6a.
//
-// Solidity: function context() view returns((bytes32,address,uint256))
+// Solidity: function context() view returns((bytes32,address,uint64))
func (_Bridge *BridgeCallerSession) Context() (IBridgeContext, error) {
return _Bridge.Contract.Context(&_Bridge.CallOpts)
}
-// GetMessageStatus is a free data retrieval call binding the contract method 0x5075a9d4.
+// HashMessage is a free data retrieval call binding the contract method 0x48c09539.
//
-// Solidity: function getMessageStatus(bytes32 msgHash) view returns(uint8)
-func (_Bridge *BridgeCaller) GetMessageStatus(opts *bind.CallOpts, msgHash [32]byte) (uint8, error) {
+// Solidity: function hashMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) pure returns(bytes32)
+func (_Bridge *BridgeCaller) HashMessage(opts *bind.CallOpts, message IBridgeMessage) ([32]byte, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "getMessageStatus", msgHash)
+ err := _Bridge.contract.Call(opts, &out, "hashMessage", message)
if err != nil {
- return *new(uint8), err
+ return *new([32]byte), err
}
- out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
-// GetMessageStatus is a free data retrieval call binding the contract method 0x5075a9d4.
+// HashMessage is a free data retrieval call binding the contract method 0x48c09539.
//
-// Solidity: function getMessageStatus(bytes32 msgHash) view returns(uint8)
-func (_Bridge *BridgeSession) GetMessageStatus(msgHash [32]byte) (uint8, error) {
- return _Bridge.Contract.GetMessageStatus(&_Bridge.CallOpts, msgHash)
+// Solidity: function hashMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) pure returns(bytes32)
+func (_Bridge *BridgeSession) HashMessage(message IBridgeMessage) ([32]byte, error) {
+ return _Bridge.Contract.HashMessage(&_Bridge.CallOpts, message)
}
-// GetMessageStatus is a free data retrieval call binding the contract method 0x5075a9d4.
+// HashMessage is a free data retrieval call binding the contract method 0x48c09539.
//
-// Solidity: function getMessageStatus(bytes32 msgHash) view returns(uint8)
-func (_Bridge *BridgeCallerSession) GetMessageStatus(msgHash [32]byte) (uint8, error) {
- return _Bridge.Contract.GetMessageStatus(&_Bridge.CallOpts, msgHash)
+// Solidity: function hashMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) pure returns(bytes32)
+func (_Bridge *BridgeCallerSession) HashMessage(message IBridgeMessage) ([32]byte, error) {
+ return _Bridge.Contract.HashMessage(&_Bridge.CallOpts, message)
}
-// GetMessageStatusSlot is a free data retrieval call binding the contract method 0x606b5b74.
+// IsDestChainEnabled is a free data retrieval call binding the contract method 0x8e3881a9.
//
-// Solidity: function getMessageStatusSlot(bytes32 msgHash) pure returns(bytes32)
-func (_Bridge *BridgeCaller) GetMessageStatusSlot(opts *bind.CallOpts, msgHash [32]byte) ([32]byte, error) {
+// Solidity: function isDestChainEnabled(uint64 chainId) view returns(bool enabled, address destBridge)
+func (_Bridge *BridgeCaller) IsDestChainEnabled(opts *bind.CallOpts, chainId uint64) (struct {
+ Enabled bool
+ DestBridge common.Address
+}, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "getMessageStatusSlot", msgHash)
+ err := _Bridge.contract.Call(opts, &out, "isDestChainEnabled", chainId)
+ outstruct := new(struct {
+ Enabled bool
+ DestBridge common.Address
+ })
if err != nil {
- return *new([32]byte), err
+ return *outstruct, err
}
- out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+ outstruct.Enabled = *abi.ConvertType(out[0], new(bool)).(*bool)
+ outstruct.DestBridge = *abi.ConvertType(out[1], new(common.Address)).(*common.Address)
- return out0, err
+ return *outstruct, err
}
-// GetMessageStatusSlot is a free data retrieval call binding the contract method 0x606b5b74.
+// IsDestChainEnabled is a free data retrieval call binding the contract method 0x8e3881a9.
//
-// Solidity: function getMessageStatusSlot(bytes32 msgHash) pure returns(bytes32)
-func (_Bridge *BridgeSession) GetMessageStatusSlot(msgHash [32]byte) ([32]byte, error) {
- return _Bridge.Contract.GetMessageStatusSlot(&_Bridge.CallOpts, msgHash)
+// Solidity: function isDestChainEnabled(uint64 chainId) view returns(bool enabled, address destBridge)
+func (_Bridge *BridgeSession) IsDestChainEnabled(chainId uint64) (struct {
+ Enabled bool
+ DestBridge common.Address
+}, error) {
+ return _Bridge.Contract.IsDestChainEnabled(&_Bridge.CallOpts, chainId)
}
-// GetMessageStatusSlot is a free data retrieval call binding the contract method 0x606b5b74.
+// IsDestChainEnabled is a free data retrieval call binding the contract method 0x8e3881a9.
//
-// Solidity: function getMessageStatusSlot(bytes32 msgHash) pure returns(bytes32)
-func (_Bridge *BridgeCallerSession) GetMessageStatusSlot(msgHash [32]byte) ([32]byte, error) {
- return _Bridge.Contract.GetMessageStatusSlot(&_Bridge.CallOpts, msgHash)
+// Solidity: function isDestChainEnabled(uint64 chainId) view returns(bool enabled, address destBridge)
+func (_Bridge *BridgeCallerSession) IsDestChainEnabled(chainId uint64) (struct {
+ Enabled bool
+ DestBridge common.Address
+}, error) {
+ return _Bridge.Contract.IsDestChainEnabled(&_Bridge.CallOpts, chainId)
}
-// HashMessage is a free data retrieval call binding the contract method 0x263463c8.
+// IsMessageRecalled is a free data retrieval call binding the contract method 0x4f5f9772.
//
-// Solidity: function hashMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) pure returns(bytes32)
-func (_Bridge *BridgeCaller) HashMessage(opts *bind.CallOpts, message IBridgeMessage) ([32]byte, error) {
+// Solidity: function isMessageRecalled(bytes32 msgHash) view returns(bool recalled)
+func (_Bridge *BridgeCaller) IsMessageRecalled(opts *bind.CallOpts, msgHash [32]byte) (bool, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "hashMessage", message)
+ err := _Bridge.contract.Call(opts, &out, "isMessageRecalled", msgHash)
if err != nil {
- return *new([32]byte), err
+ return *new(bool), err
}
- out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
-// HashMessage is a free data retrieval call binding the contract method 0x263463c8.
+// IsMessageRecalled is a free data retrieval call binding the contract method 0x4f5f9772.
//
-// Solidity: function hashMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) pure returns(bytes32)
-func (_Bridge *BridgeSession) HashMessage(message IBridgeMessage) ([32]byte, error) {
- return _Bridge.Contract.HashMessage(&_Bridge.CallOpts, message)
+// Solidity: function isMessageRecalled(bytes32 msgHash) view returns(bool recalled)
+func (_Bridge *BridgeSession) IsMessageRecalled(msgHash [32]byte) (bool, error) {
+ return _Bridge.Contract.IsMessageRecalled(&_Bridge.CallOpts, msgHash)
}
-// HashMessage is a free data retrieval call binding the contract method 0x263463c8.
+// IsMessageRecalled is a free data retrieval call binding the contract method 0x4f5f9772.
//
-// Solidity: function hashMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) pure returns(bytes32)
-func (_Bridge *BridgeCallerSession) HashMessage(message IBridgeMessage) ([32]byte, error) {
- return _Bridge.Contract.HashMessage(&_Bridge.CallOpts, message)
+// Solidity: function isMessageRecalled(bytes32 msgHash) view returns(bool recalled)
+func (_Bridge *BridgeCallerSession) IsMessageRecalled(msgHash [32]byte) (bool, error) {
+ return _Bridge.Contract.IsMessageRecalled(&_Bridge.CallOpts, msgHash)
}
-// IsDestChainEnabled is a free data retrieval call binding the contract method 0x5d0bd986.
+// IsMessageSent is a free data retrieval call binding the contract method 0x60ecbdfd.
//
-// Solidity: function isDestChainEnabled(uint256 _chainId) view returns(bool enabled)
-func (_Bridge *BridgeCaller) IsDestChainEnabled(opts *bind.CallOpts, _chainId *big.Int) (bool, error) {
+// Solidity: function isMessageSent((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) view returns(bool)
+func (_Bridge *BridgeCaller) IsMessageSent(opts *bind.CallOpts, message IBridgeMessage) (bool, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "isDestChainEnabled", _chainId)
+ err := _Bridge.contract.Call(opts, &out, "isMessageSent", message)
if err != nil {
return *new(bool), err
@@ -375,57 +389,119 @@ func (_Bridge *BridgeCaller) IsDestChainEnabled(opts *bind.CallOpts, _chainId *b
}
-// IsDestChainEnabled is a free data retrieval call binding the contract method 0x5d0bd986.
+// IsMessageSent is a free data retrieval call binding the contract method 0x60ecbdfd.
//
-// Solidity: function isDestChainEnabled(uint256 _chainId) view returns(bool enabled)
-func (_Bridge *BridgeSession) IsDestChainEnabled(_chainId *big.Int) (bool, error) {
- return _Bridge.Contract.IsDestChainEnabled(&_Bridge.CallOpts, _chainId)
+// Solidity: function isMessageSent((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) view returns(bool)
+func (_Bridge *BridgeSession) IsMessageSent(message IBridgeMessage) (bool, error) {
+ return _Bridge.Contract.IsMessageSent(&_Bridge.CallOpts, message)
}
-// IsDestChainEnabled is a free data retrieval call binding the contract method 0x5d0bd986.
+// IsMessageSent is a free data retrieval call binding the contract method 0x60ecbdfd.
//
-// Solidity: function isDestChainEnabled(uint256 _chainId) view returns(bool enabled)
-func (_Bridge *BridgeCallerSession) IsDestChainEnabled(_chainId *big.Int) (bool, error) {
- return _Bridge.Contract.IsDestChainEnabled(&_Bridge.CallOpts, _chainId)
+// Solidity: function isMessageSent((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) view returns(bool)
+func (_Bridge *BridgeCallerSession) IsMessageSent(message IBridgeMessage) (bool, error) {
+ return _Bridge.Contract.IsMessageSent(&_Bridge.CallOpts, message)
}
-// IsMessageFailed is a free data retrieval call binding the contract method 0xce70f39b.
+// MessageStatus is a free data retrieval call binding the contract method 0x3c6cf473.
//
-// Solidity: function isMessageFailed(bytes32 msgHash, uint256 destChainId, bytes proof) view returns(bool)
-func (_Bridge *BridgeCaller) IsMessageFailed(opts *bind.CallOpts, msgHash [32]byte, destChainId *big.Int, proof []byte) (bool, error) {
+// Solidity: function messageStatus(bytes32 msgHash) view returns(uint8)
+func (_Bridge *BridgeCaller) MessageStatus(opts *bind.CallOpts, msgHash [32]byte) (uint8, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "isMessageFailed", msgHash, destChainId, proof)
+ err := _Bridge.contract.Call(opts, &out, "messageStatus", msgHash)
if err != nil {
- return *new(bool), err
+ return *new(uint8), err
}
- out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+ out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
return out0, err
}
-// IsMessageFailed is a free data retrieval call binding the contract method 0xce70f39b.
+// MessageStatus is a free data retrieval call binding the contract method 0x3c6cf473.
//
-// Solidity: function isMessageFailed(bytes32 msgHash, uint256 destChainId, bytes proof) view returns(bool)
-func (_Bridge *BridgeSession) IsMessageFailed(msgHash [32]byte, destChainId *big.Int, proof []byte) (bool, error) {
- return _Bridge.Contract.IsMessageFailed(&_Bridge.CallOpts, msgHash, destChainId, proof)
+// Solidity: function messageStatus(bytes32 msgHash) view returns(uint8)
+func (_Bridge *BridgeSession) MessageStatus(msgHash [32]byte) (uint8, error) {
+ return _Bridge.Contract.MessageStatus(&_Bridge.CallOpts, msgHash)
}
-// IsMessageFailed is a free data retrieval call binding the contract method 0xce70f39b.
+// MessageStatus is a free data retrieval call binding the contract method 0x3c6cf473.
//
-// Solidity: function isMessageFailed(bytes32 msgHash, uint256 destChainId, bytes proof) view returns(bool)
-func (_Bridge *BridgeCallerSession) IsMessageFailed(msgHash [32]byte, destChainId *big.Int, proof []byte) (bool, error) {
- return _Bridge.Contract.IsMessageFailed(&_Bridge.CallOpts, msgHash, destChainId, proof)
+// Solidity: function messageStatus(bytes32 msgHash) view returns(uint8)
+func (_Bridge *BridgeCallerSession) MessageStatus(msgHash [32]byte) (uint8, error) {
+ return _Bridge.Contract.MessageStatus(&_Bridge.CallOpts, msgHash)
}
-// IsMessageRecalled is a free data retrieval call binding the contract method 0x4f5f9772.
+// NextMessageId is a free data retrieval call binding the contract method 0xeefbf17e.
//
-// Solidity: function isMessageRecalled(bytes32 msgHash) view returns(bool)
-func (_Bridge *BridgeCaller) IsMessageRecalled(opts *bind.CallOpts, msgHash [32]byte) (bool, error) {
+// Solidity: function nextMessageId() view returns(uint128)
+func (_Bridge *BridgeCaller) NextMessageId(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "isMessageRecalled", msgHash)
+ err := _Bridge.contract.Call(opts, &out, "nextMessageId")
+
+ if err != nil {
+ return *new(*big.Int), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+
+ return out0, err
+
+}
+
+// NextMessageId is a free data retrieval call binding the contract method 0xeefbf17e.
+//
+// Solidity: function nextMessageId() view returns(uint128)
+func (_Bridge *BridgeSession) NextMessageId() (*big.Int, error) {
+ return _Bridge.Contract.NextMessageId(&_Bridge.CallOpts)
+}
+
+// NextMessageId is a free data retrieval call binding the contract method 0xeefbf17e.
+//
+// Solidity: function nextMessageId() view returns(uint128)
+func (_Bridge *BridgeCallerSession) NextMessageId() (*big.Int, error) {
+ return _Bridge.Contract.NextMessageId(&_Bridge.CallOpts)
+}
+
+// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+//
+// Solidity: function owner() view returns(address)
+func (_Bridge *BridgeCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _Bridge.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 (_Bridge *BridgeSession) Owner() (common.Address, error) {
+ return _Bridge.Contract.Owner(&_Bridge.CallOpts)
+}
+
+// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+//
+// Solidity: function owner() view returns(address)
+func (_Bridge *BridgeCallerSession) Owner() (common.Address, error) {
+ return _Bridge.Contract.Owner(&_Bridge.CallOpts)
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_Bridge *BridgeCaller) Paused(opts *bind.CallOpts) (bool, error) {
+ var out []interface{}
+ err := _Bridge.contract.Call(opts, &out, "paused")
if err != nil {
return *new(bool), err
@@ -437,26 +513,26 @@ func (_Bridge *BridgeCaller) IsMessageRecalled(opts *bind.CallOpts, msgHash [32]
}
-// IsMessageRecalled is a free data retrieval call binding the contract method 0x4f5f9772.
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
//
-// Solidity: function isMessageRecalled(bytes32 msgHash) view returns(bool)
-func (_Bridge *BridgeSession) IsMessageRecalled(msgHash [32]byte) (bool, error) {
- return _Bridge.Contract.IsMessageRecalled(&_Bridge.CallOpts, msgHash)
+// Solidity: function paused() view returns(bool)
+func (_Bridge *BridgeSession) Paused() (bool, error) {
+ return _Bridge.Contract.Paused(&_Bridge.CallOpts)
}
-// IsMessageRecalled is a free data retrieval call binding the contract method 0x4f5f9772.
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
//
-// Solidity: function isMessageRecalled(bytes32 msgHash) view returns(bool)
-func (_Bridge *BridgeCallerSession) IsMessageRecalled(msgHash [32]byte) (bool, error) {
- return _Bridge.Contract.IsMessageRecalled(&_Bridge.CallOpts, msgHash)
+// Solidity: function paused() view returns(bool)
+func (_Bridge *BridgeCallerSession) Paused() (bool, error) {
+ return _Bridge.Contract.Paused(&_Bridge.CallOpts)
}
-// IsMessageReceived is a free data retrieval call binding the contract method 0xa4444efd.
+// ProveMessageFailed is a free data retrieval call binding the contract method 0x625e5b7f.
//
-// Solidity: function isMessageReceived(bytes32 msgHash, uint256 srcChainId, bytes proof) view returns(bool)
-func (_Bridge *BridgeCaller) IsMessageReceived(opts *bind.CallOpts, msgHash [32]byte, srcChainId *big.Int, proof []byte) (bool, error) {
+// Solidity: function proveMessageFailed((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) view returns(bool)
+func (_Bridge *BridgeCaller) ProveMessageFailed(opts *bind.CallOpts, message IBridgeMessage, proof []byte) (bool, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "isMessageReceived", msgHash, srcChainId, proof)
+ err := _Bridge.contract.Call(opts, &out, "proveMessageFailed", message, proof)
if err != nil {
return *new(bool), err
@@ -468,26 +544,26 @@ func (_Bridge *BridgeCaller) IsMessageReceived(opts *bind.CallOpts, msgHash [32]
}
-// IsMessageReceived is a free data retrieval call binding the contract method 0xa4444efd.
+// ProveMessageFailed is a free data retrieval call binding the contract method 0x625e5b7f.
//
-// Solidity: function isMessageReceived(bytes32 msgHash, uint256 srcChainId, bytes proof) view returns(bool)
-func (_Bridge *BridgeSession) IsMessageReceived(msgHash [32]byte, srcChainId *big.Int, proof []byte) (bool, error) {
- return _Bridge.Contract.IsMessageReceived(&_Bridge.CallOpts, msgHash, srcChainId, proof)
+// Solidity: function proveMessageFailed((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) view returns(bool)
+func (_Bridge *BridgeSession) ProveMessageFailed(message IBridgeMessage, proof []byte) (bool, error) {
+ return _Bridge.Contract.ProveMessageFailed(&_Bridge.CallOpts, message, proof)
}
-// IsMessageReceived is a free data retrieval call binding the contract method 0xa4444efd.
+// ProveMessageFailed is a free data retrieval call binding the contract method 0x625e5b7f.
//
-// Solidity: function isMessageReceived(bytes32 msgHash, uint256 srcChainId, bytes proof) view returns(bool)
-func (_Bridge *BridgeCallerSession) IsMessageReceived(msgHash [32]byte, srcChainId *big.Int, proof []byte) (bool, error) {
- return _Bridge.Contract.IsMessageReceived(&_Bridge.CallOpts, msgHash, srcChainId, proof)
+// Solidity: function proveMessageFailed((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) view returns(bool)
+func (_Bridge *BridgeCallerSession) ProveMessageFailed(message IBridgeMessage, proof []byte) (bool, error) {
+ return _Bridge.Contract.ProveMessageFailed(&_Bridge.CallOpts, message, proof)
}
-// IsMessageSent is a free data retrieval call binding the contract method 0x540be6a3.
+// ProveMessageReceived is a free data retrieval call binding the contract method 0x783f8c93.
//
-// Solidity: function isMessageSent(bytes32 msgHash) view returns(bool)
-func (_Bridge *BridgeCaller) IsMessageSent(opts *bind.CallOpts, msgHash [32]byte) (bool, error) {
+// Solidity: function proveMessageReceived((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) view returns(bool)
+func (_Bridge *BridgeCaller) ProveMessageReceived(opts *bind.CallOpts, message IBridgeMessage, proof []byte) (bool, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "isMessageSent", msgHash)
+ err := _Bridge.contract.Call(opts, &out, "proveMessageReceived", message, proof)
if err != nil {
return *new(bool), err
@@ -499,55 +575,55 @@ func (_Bridge *BridgeCaller) IsMessageSent(opts *bind.CallOpts, msgHash [32]byte
}
-// IsMessageSent is a free data retrieval call binding the contract method 0x540be6a3.
+// ProveMessageReceived is a free data retrieval call binding the contract method 0x783f8c93.
//
-// Solidity: function isMessageSent(bytes32 msgHash) view returns(bool)
-func (_Bridge *BridgeSession) IsMessageSent(msgHash [32]byte) (bool, error) {
- return _Bridge.Contract.IsMessageSent(&_Bridge.CallOpts, msgHash)
+// Solidity: function proveMessageReceived((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) view returns(bool)
+func (_Bridge *BridgeSession) ProveMessageReceived(message IBridgeMessage, proof []byte) (bool, error) {
+ return _Bridge.Contract.ProveMessageReceived(&_Bridge.CallOpts, message, proof)
}
-// IsMessageSent is a free data retrieval call binding the contract method 0x540be6a3.
+// ProveMessageReceived is a free data retrieval call binding the contract method 0x783f8c93.
//
-// Solidity: function isMessageSent(bytes32 msgHash) view returns(bool)
-func (_Bridge *BridgeCallerSession) IsMessageSent(msgHash [32]byte) (bool, error) {
- return _Bridge.Contract.IsMessageSent(&_Bridge.CallOpts, msgHash)
+// Solidity: function proveMessageReceived((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) view returns(bool)
+func (_Bridge *BridgeCallerSession) ProveMessageReceived(message IBridgeMessage, proof []byte) (bool, error) {
+ return _Bridge.Contract.ProveMessageReceived(&_Bridge.CallOpts, message, proof)
}
-// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
//
-// Solidity: function owner() view returns(address)
-func (_Bridge *BridgeCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_Bridge *BridgeCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "owner")
+ err := _Bridge.contract.Call(opts, &out, "proxiableUUID")
if err != nil {
- return *new(common.Address), err
+ return *new([32]byte), err
}
- out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
-// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
//
-// Solidity: function owner() view returns(address)
-func (_Bridge *BridgeSession) Owner() (common.Address, error) {
- return _Bridge.Contract.Owner(&_Bridge.CallOpts)
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_Bridge *BridgeSession) ProxiableUUID() ([32]byte, error) {
+ return _Bridge.Contract.ProxiableUUID(&_Bridge.CallOpts)
}
-// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
//
-// Solidity: function owner() view returns(address)
-func (_Bridge *BridgeCallerSession) Owner() (common.Address, error) {
- return _Bridge.Contract.Owner(&_Bridge.CallOpts)
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_Bridge *BridgeCallerSession) ProxiableUUID() ([32]byte, error) {
+ return _Bridge.Contract.ProxiableUUID(&_Bridge.CallOpts)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_Bridge *BridgeCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_Bridge *BridgeCaller) Resolve(opts *bind.CallOpts, chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
var out []interface{}
err := _Bridge.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress)
@@ -561,17 +637,17 @@ func (_Bridge *BridgeCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_Bridge *BridgeSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_Bridge *BridgeSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _Bridge.Contract.Resolve(&_Bridge.CallOpts, chainId, name, allowZeroAddress)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_Bridge *BridgeCallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_Bridge *BridgeCallerSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _Bridge.Contract.Resolve(&_Bridge.CallOpts, chainId, name, allowZeroAddress)
}
@@ -627,44 +703,65 @@ func (_Bridge *BridgeTransactorSession) Init(_addressManager common.Address) (*t
return _Bridge.Contract.Init(&_Bridge.TransactOpts, _addressManager)
}
-// ProcessMessage is a paid mutator transaction binding the contract method 0xec9b3121.
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_Bridge *BridgeTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _Bridge.contract.Transact(opts, "pause")
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
-// Solidity: function processMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
+// Solidity: function pause() returns()
+func (_Bridge *BridgeSession) Pause() (*types.Transaction, error) {
+ return _Bridge.Contract.Pause(&_Bridge.TransactOpts)
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_Bridge *BridgeTransactorSession) Pause() (*types.Transaction, error) {
+ return _Bridge.Contract.Pause(&_Bridge.TransactOpts)
+}
+
+// ProcessMessage is a paid mutator transaction binding the contract method 0x01382408.
+//
+// Solidity: function processMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
func (_Bridge *BridgeTransactor) ProcessMessage(opts *bind.TransactOpts, message IBridgeMessage, proof []byte) (*types.Transaction, error) {
return _Bridge.contract.Transact(opts, "processMessage", message, proof)
}
-// ProcessMessage is a paid mutator transaction binding the contract method 0xec9b3121.
+// ProcessMessage is a paid mutator transaction binding the contract method 0x01382408.
//
-// Solidity: function processMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
+// Solidity: function processMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
func (_Bridge *BridgeSession) ProcessMessage(message IBridgeMessage, proof []byte) (*types.Transaction, error) {
return _Bridge.Contract.ProcessMessage(&_Bridge.TransactOpts, message, proof)
}
-// ProcessMessage is a paid mutator transaction binding the contract method 0xec9b3121.
+// ProcessMessage is a paid mutator transaction binding the contract method 0x01382408.
//
-// Solidity: function processMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
+// Solidity: function processMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
func (_Bridge *BridgeTransactorSession) ProcessMessage(message IBridgeMessage, proof []byte) (*types.Transaction, error) {
return _Bridge.Contract.ProcessMessage(&_Bridge.TransactOpts, message, proof)
}
-// RecallMessage is a paid mutator transaction binding the contract method 0x620c23fb.
+// RecallMessage is a paid mutator transaction binding the contract method 0x1a92e520.
//
-// Solidity: function recallMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
+// Solidity: function recallMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
func (_Bridge *BridgeTransactor) RecallMessage(opts *bind.TransactOpts, message IBridgeMessage, proof []byte) (*types.Transaction, error) {
return _Bridge.contract.Transact(opts, "recallMessage", message, proof)
}
-// RecallMessage is a paid mutator transaction binding the contract method 0x620c23fb.
+// RecallMessage is a paid mutator transaction binding the contract method 0x1a92e520.
//
-// Solidity: function recallMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
+// Solidity: function recallMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
func (_Bridge *BridgeSession) RecallMessage(message IBridgeMessage, proof []byte) (*types.Transaction, error) {
return _Bridge.Contract.RecallMessage(&_Bridge.TransactOpts, message, proof)
}
-// RecallMessage is a paid mutator transaction binding the contract method 0x620c23fb.
+// RecallMessage is a paid mutator transaction binding the contract method 0x1a92e520.
//
-// Solidity: function recallMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
+// Solidity: function recallMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
func (_Bridge *BridgeTransactorSession) RecallMessage(message IBridgeMessage, proof []byte) (*types.Transaction, error) {
return _Bridge.Contract.RecallMessage(&_Bridge.TransactOpts, message, proof)
}
@@ -690,69 +787,48 @@ func (_Bridge *BridgeTransactorSession) RenounceOwnership() (*types.Transaction,
return _Bridge.Contract.RenounceOwnership(&_Bridge.TransactOpts)
}
-// RetryMessage is a paid mutator transaction binding the contract method 0xf21be36f.
+// RetryMessage is a paid mutator transaction binding the contract method 0xa24f721b.
//
-// Solidity: function retryMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bool isLastAttempt) returns()
+// Solidity: function retryMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bool isLastAttempt) returns()
func (_Bridge *BridgeTransactor) RetryMessage(opts *bind.TransactOpts, message IBridgeMessage, isLastAttempt bool) (*types.Transaction, error) {
return _Bridge.contract.Transact(opts, "retryMessage", message, isLastAttempt)
}
-// RetryMessage is a paid mutator transaction binding the contract method 0xf21be36f.
+// RetryMessage is a paid mutator transaction binding the contract method 0xa24f721b.
//
-// Solidity: function retryMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bool isLastAttempt) returns()
+// Solidity: function retryMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bool isLastAttempt) returns()
func (_Bridge *BridgeSession) RetryMessage(message IBridgeMessage, isLastAttempt bool) (*types.Transaction, error) {
return _Bridge.Contract.RetryMessage(&_Bridge.TransactOpts, message, isLastAttempt)
}
-// RetryMessage is a paid mutator transaction binding the contract method 0xf21be36f.
+// RetryMessage is a paid mutator transaction binding the contract method 0xa24f721b.
//
-// Solidity: function retryMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bool isLastAttempt) returns()
+// Solidity: function retryMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bool isLastAttempt) returns()
func (_Bridge *BridgeTransactorSession) RetryMessage(message IBridgeMessage, isLastAttempt bool) (*types.Transaction, error) {
return _Bridge.Contract.RetryMessage(&_Bridge.TransactOpts, message, isLastAttempt)
}
-// SendMessage is a paid mutator transaction binding the contract method 0x4c1888bc.
+// SendMessage is a paid mutator transaction binding the contract method 0x33bcd0cc.
//
-// Solidity: function sendMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns(bytes32 msgHash)
+// Solidity: function sendMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns(bytes32 msgHash, (uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
func (_Bridge *BridgeTransactor) SendMessage(opts *bind.TransactOpts, message IBridgeMessage) (*types.Transaction, error) {
return _Bridge.contract.Transact(opts, "sendMessage", message)
}
-// SendMessage is a paid mutator transaction binding the contract method 0x4c1888bc.
+// SendMessage is a paid mutator transaction binding the contract method 0x33bcd0cc.
//
-// Solidity: function sendMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns(bytes32 msgHash)
+// Solidity: function sendMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns(bytes32 msgHash, (uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
func (_Bridge *BridgeSession) SendMessage(message IBridgeMessage) (*types.Transaction, error) {
return _Bridge.Contract.SendMessage(&_Bridge.TransactOpts, message)
}
-// SendMessage is a paid mutator transaction binding the contract method 0x4c1888bc.
+// SendMessage is a paid mutator transaction binding the contract method 0x33bcd0cc.
//
-// Solidity: function sendMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns(bytes32 msgHash)
+// Solidity: function sendMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns(bytes32 msgHash, (uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
func (_Bridge *BridgeTransactorSession) SendMessage(message IBridgeMessage) (*types.Transaction, error) {
return _Bridge.Contract.SendMessage(&_Bridge.TransactOpts, message)
}
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_Bridge *BridgeTransactor) SetAddressManager(opts *bind.TransactOpts, newAddressManager common.Address) (*types.Transaction, error) {
- return _Bridge.contract.Transact(opts, "setAddressManager", newAddressManager)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_Bridge *BridgeSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _Bridge.Contract.SetAddressManager(&_Bridge.TransactOpts, newAddressManager)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_Bridge *BridgeTransactorSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _Bridge.Contract.SetAddressManager(&_Bridge.TransactOpts, newAddressManager)
-}
-
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
@@ -774,6 +850,69 @@ func (_Bridge *BridgeTransactorSession) TransferOwnership(newOwner common.Addres
return _Bridge.Contract.TransferOwnership(&_Bridge.TransactOpts, newOwner)
}
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_Bridge *BridgeTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _Bridge.contract.Transact(opts, "unpause")
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_Bridge *BridgeSession) Unpause() (*types.Transaction, error) {
+ return _Bridge.Contract.Unpause(&_Bridge.TransactOpts)
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_Bridge *BridgeTransactorSession) Unpause() (*types.Transaction, error) {
+ return _Bridge.Contract.Unpause(&_Bridge.TransactOpts)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_Bridge *BridgeTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) {
+ return _Bridge.contract.Transact(opts, "upgradeTo", newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_Bridge *BridgeSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _Bridge.Contract.UpgradeTo(&_Bridge.TransactOpts, newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_Bridge *BridgeTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _Bridge.Contract.UpgradeTo(&_Bridge.TransactOpts, newImplementation)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_Bridge *BridgeTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _Bridge.contract.Transact(opts, "upgradeToAndCall", newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_Bridge *BridgeSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _Bridge.Contract.UpgradeToAndCall(&_Bridge.TransactOpts, newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_Bridge *BridgeTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _Bridge.Contract.UpgradeToAndCall(&_Bridge.TransactOpts, newImplementation, data)
+}
+
// Receive is a paid mutator transaction binding the contract receive function.
//
// Solidity: receive() payable returns()
@@ -795,9 +934,9 @@ func (_Bridge *BridgeTransactorSession) Receive() (*types.Transaction, error) {
return _Bridge.Contract.Receive(&_Bridge.TransactOpts)
}
-// BridgeAddressManagerChangedIterator is returned from FilterAddressManagerChanged and is used to iterate over the raw logs and unpacked data for AddressManagerChanged events raised by the Bridge contract.
-type BridgeAddressManagerChangedIterator struct {
- Event *BridgeAddressManagerChanged // Event containing the contract specifics and raw log
+// BridgeAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the Bridge contract.
+type BridgeAdminChangedIterator struct {
+ Event *BridgeAdminChanged // 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
@@ -811,7 +950,7 @@ type BridgeAddressManagerChangedIterator struct {
// 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 *BridgeAddressManagerChangedIterator) Next() bool {
+func (it *BridgeAdminChangedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -820,7 +959,7 @@ func (it *BridgeAddressManagerChangedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeAddressManagerChanged)
+ it.Event = new(BridgeAdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -835,7 +974,7 @@ func (it *BridgeAddressManagerChangedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeAddressManagerChanged)
+ it.Event = new(BridgeAdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -851,51 +990,42 @@ func (it *BridgeAddressManagerChangedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeAddressManagerChangedIterator) Error() error {
+func (it *BridgeAdminChangedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeAddressManagerChangedIterator) Close() error {
+func (it *BridgeAdminChangedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeAddressManagerChanged represents a AddressManagerChanged event raised by the Bridge contract.
-type BridgeAddressManagerChanged struct {
- AddressManager common.Address
- Raw types.Log // Blockchain specific contextual infos
+// BridgeAdminChanged represents a AdminChanged event raised by the Bridge contract.
+type BridgeAdminChanged struct {
+ PreviousAdmin common.Address
+ NewAdmin common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterAddressManagerChanged is a free log retrieval operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_Bridge *BridgeFilterer) FilterAddressManagerChanged(opts *bind.FilterOpts, addressManager []common.Address) (*BridgeAddressManagerChangedIterator, error) {
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_Bridge *BridgeFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*BridgeAdminChangedIterator, error) {
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
- }
-
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "AdminChanged")
if err != nil {
return nil, err
}
- return &BridgeAddressManagerChangedIterator{contract: _Bridge.contract, event: "AddressManagerChanged", logs: logs, sub: sub}, nil
+ return &BridgeAdminChangedIterator{contract: _Bridge.contract, event: "AdminChanged", logs: logs, sub: sub}, nil
}
-// WatchAddressManagerChanged is a free log subscription operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_Bridge *BridgeFilterer) WatchAddressManagerChanged(opts *bind.WatchOpts, sink chan<- *BridgeAddressManagerChanged, addressManager []common.Address) (event.Subscription, error) {
-
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
- }
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_Bridge *BridgeFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *BridgeAdminChanged) (event.Subscription, error) {
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "AdminChanged")
if err != nil {
return nil, err
}
@@ -905,8 +1035,8 @@ func (_Bridge *BridgeFilterer) WatchAddressManagerChanged(opts *bind.WatchOpts,
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeAddressManagerChanged)
- if err := _Bridge.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+ event := new(BridgeAdminChanged)
+ if err := _Bridge.contract.UnpackLog(event, "AdminChanged", log); err != nil {
return err
}
event.Raw = log
@@ -927,21 +1057,21 @@ func (_Bridge *BridgeFilterer) WatchAddressManagerChanged(opts *bind.WatchOpts,
}), nil
}
-// ParseAddressManagerChanged is a log parse operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_Bridge *BridgeFilterer) ParseAddressManagerChanged(log types.Log) (*BridgeAddressManagerChanged, error) {
- event := new(BridgeAddressManagerChanged)
- if err := _Bridge.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_Bridge *BridgeFilterer) ParseAdminChanged(log types.Log) (*BridgeAdminChanged, error) {
+ event := new(BridgeAdminChanged)
+ if err := _Bridge.contract.UnpackLog(event, "AdminChanged", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeDestChainEnabledIterator is returned from FilterDestChainEnabled and is used to iterate over the raw logs and unpacked data for DestChainEnabled events raised by the Bridge contract.
-type BridgeDestChainEnabledIterator struct {
- Event *BridgeDestChainEnabled // Event containing the contract specifics and raw log
+// BridgeBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the Bridge contract.
+type BridgeBeaconUpgradedIterator struct {
+ Event *BridgeBeaconUpgraded // 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
@@ -955,7 +1085,7 @@ type BridgeDestChainEnabledIterator struct {
// 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 *BridgeDestChainEnabledIterator) Next() bool {
+func (it *BridgeBeaconUpgradedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -964,7 +1094,7 @@ func (it *BridgeDestChainEnabledIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeDestChainEnabled)
+ it.Event = new(BridgeBeaconUpgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -979,7 +1109,7 @@ func (it *BridgeDestChainEnabledIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeDestChainEnabled)
+ it.Event = new(BridgeBeaconUpgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -995,52 +1125,51 @@ func (it *BridgeDestChainEnabledIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeDestChainEnabledIterator) Error() error {
+func (it *BridgeBeaconUpgradedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeDestChainEnabledIterator) Close() error {
+func (it *BridgeBeaconUpgradedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeDestChainEnabled represents a DestChainEnabled event raised by the Bridge contract.
-type BridgeDestChainEnabled struct {
- ChainId *big.Int
- Enabled bool
- Raw types.Log // Blockchain specific contextual infos
+// BridgeBeaconUpgraded represents a BeaconUpgraded event raised by the Bridge contract.
+type BridgeBeaconUpgraded struct {
+ Beacon common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterDestChainEnabled is a free log retrieval operation binding the contract event 0x9f391218c06d4fc365ceb15f340bb3d77306b28ac0b8d4e519aec2654794536d.
+// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event DestChainEnabled(uint256 indexed chainId, bool enabled)
-func (_Bridge *BridgeFilterer) FilterDestChainEnabled(opts *bind.FilterOpts, chainId []*big.Int) (*BridgeDestChainEnabledIterator, error) {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_Bridge *BridgeFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*BridgeBeaconUpgradedIterator, error) {
- var chainIdRule []interface{}
- for _, chainIdItem := range chainId {
- chainIdRule = append(chainIdRule, chainIdItem)
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
}
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "DestChainEnabled", chainIdRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule)
if err != nil {
return nil, err
}
- return &BridgeDestChainEnabledIterator{contract: _Bridge.contract, event: "DestChainEnabled", logs: logs, sub: sub}, nil
+ return &BridgeBeaconUpgradedIterator{contract: _Bridge.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil
}
-// WatchDestChainEnabled is a free log subscription operation binding the contract event 0x9f391218c06d4fc365ceb15f340bb3d77306b28ac0b8d4e519aec2654794536d.
+// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event DestChainEnabled(uint256 indexed chainId, bool enabled)
-func (_Bridge *BridgeFilterer) WatchDestChainEnabled(opts *bind.WatchOpts, sink chan<- *BridgeDestChainEnabled, chainId []*big.Int) (event.Subscription, error) {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_Bridge *BridgeFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *BridgeBeaconUpgraded, beacon []common.Address) (event.Subscription, error) {
- var chainIdRule []interface{}
- for _, chainIdItem := range chainId {
- chainIdRule = append(chainIdRule, chainIdItem)
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
}
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "DestChainEnabled", chainIdRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule)
if err != nil {
return nil, err
}
@@ -1050,8 +1179,8 @@ func (_Bridge *BridgeFilterer) WatchDestChainEnabled(opts *bind.WatchOpts, sink
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeDestChainEnabled)
- if err := _Bridge.contract.UnpackLog(event, "DestChainEnabled", log); err != nil {
+ event := new(BridgeBeaconUpgraded)
+ if err := _Bridge.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
return err
}
event.Raw = log
@@ -1072,21 +1201,21 @@ func (_Bridge *BridgeFilterer) WatchDestChainEnabled(opts *bind.WatchOpts, sink
}), nil
}
-// ParseDestChainEnabled is a log parse operation binding the contract event 0x9f391218c06d4fc365ceb15f340bb3d77306b28ac0b8d4e519aec2654794536d.
+// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event DestChainEnabled(uint256 indexed chainId, bool enabled)
-func (_Bridge *BridgeFilterer) ParseDestChainEnabled(log types.Log) (*BridgeDestChainEnabled, error) {
- event := new(BridgeDestChainEnabled)
- if err := _Bridge.contract.UnpackLog(event, "DestChainEnabled", log); err != nil {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_Bridge *BridgeFilterer) ParseBeaconUpgraded(log types.Log) (*BridgeBeaconUpgraded, error) {
+ event := new(BridgeBeaconUpgraded)
+ if err := _Bridge.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Bridge contract.
-type BridgeInitializedIterator struct {
- Event *BridgeInitialized // Event containing the contract specifics and raw log
+// BridgeDestChainEnabledIterator is returned from FilterDestChainEnabled and is used to iterate over the raw logs and unpacked data for DestChainEnabled events raised by the Bridge contract.
+type BridgeDestChainEnabledIterator struct {
+ Event *BridgeDestChainEnabled // 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
@@ -1100,7 +1229,7 @@ type BridgeInitializedIterator struct {
// 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 *BridgeInitializedIterator) Next() bool {
+func (it *BridgeDestChainEnabledIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1109,7 +1238,7 @@ func (it *BridgeInitializedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeInitialized)
+ it.Event = new(BridgeDestChainEnabled)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1124,7 +1253,7 @@ func (it *BridgeInitializedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeInitialized)
+ it.Event = new(BridgeDestChainEnabled)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1140,41 +1269,52 @@ func (it *BridgeInitializedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeInitializedIterator) Error() error {
+func (it *BridgeDestChainEnabledIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeInitializedIterator) Close() error {
+func (it *BridgeDestChainEnabledIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeInitialized represents a Initialized event raised by the Bridge contract.
-type BridgeInitialized struct {
- Version uint8
+// BridgeDestChainEnabled represents a DestChainEnabled event raised by the Bridge contract.
+type BridgeDestChainEnabled struct {
+ ChainId uint64
+ Enabled bool
Raw types.Log // Blockchain specific contextual infos
}
-// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// FilterDestChainEnabled is a free log retrieval operation binding the contract event 0xacf89c9e8ba7f621aa9632bc23b65f5d4c7a0eacfb7bc5149c17a9dec05e89a4.
//
-// Solidity: event Initialized(uint8 version)
-func (_Bridge *BridgeFilterer) FilterInitialized(opts *bind.FilterOpts) (*BridgeInitializedIterator, error) {
+// Solidity: event DestChainEnabled(uint64 indexed chainId, bool enabled)
+func (_Bridge *BridgeFilterer) FilterDestChainEnabled(opts *bind.FilterOpts, chainId []uint64) (*BridgeDestChainEnabledIterator, error) {
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "Initialized")
+ var chainIdRule []interface{}
+ for _, chainIdItem := range chainId {
+ chainIdRule = append(chainIdRule, chainIdItem)
+ }
+
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "DestChainEnabled", chainIdRule)
if err != nil {
return nil, err
}
- return &BridgeInitializedIterator{contract: _Bridge.contract, event: "Initialized", logs: logs, sub: sub}, nil
+ return &BridgeDestChainEnabledIterator{contract: _Bridge.contract, event: "DestChainEnabled", logs: logs, sub: sub}, nil
}
-// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// WatchDestChainEnabled is a free log subscription operation binding the contract event 0xacf89c9e8ba7f621aa9632bc23b65f5d4c7a0eacfb7bc5149c17a9dec05e89a4.
//
-// Solidity: event Initialized(uint8 version)
-func (_Bridge *BridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *BridgeInitialized) (event.Subscription, error) {
+// Solidity: event DestChainEnabled(uint64 indexed chainId, bool enabled)
+func (_Bridge *BridgeFilterer) WatchDestChainEnabled(opts *bind.WatchOpts, sink chan<- *BridgeDestChainEnabled, chainId []uint64) (event.Subscription, error) {
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "Initialized")
+ var chainIdRule []interface{}
+ for _, chainIdItem := range chainId {
+ chainIdRule = append(chainIdRule, chainIdItem)
+ }
+
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "DestChainEnabled", chainIdRule)
if err != nil {
return nil, err
}
@@ -1184,8 +1324,8 @@ func (_Bridge *BridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeInitialized)
- if err := _Bridge.contract.UnpackLog(event, "Initialized", log); err != nil {
+ event := new(BridgeDestChainEnabled)
+ if err := _Bridge.contract.UnpackLog(event, "DestChainEnabled", log); err != nil {
return err
}
event.Raw = log
@@ -1206,21 +1346,21 @@ func (_Bridge *BridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<
}), nil
}
-// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// ParseDestChainEnabled is a log parse operation binding the contract event 0xacf89c9e8ba7f621aa9632bc23b65f5d4c7a0eacfb7bc5149c17a9dec05e89a4.
//
-// Solidity: event Initialized(uint8 version)
-func (_Bridge *BridgeFilterer) ParseInitialized(log types.Log) (*BridgeInitialized, error) {
- event := new(BridgeInitialized)
- if err := _Bridge.contract.UnpackLog(event, "Initialized", log); err != nil {
+// Solidity: event DestChainEnabled(uint64 indexed chainId, bool enabled)
+func (_Bridge *BridgeFilterer) ParseDestChainEnabled(log types.Log) (*BridgeDestChainEnabled, error) {
+ event := new(BridgeDestChainEnabled)
+ if err := _Bridge.contract.UnpackLog(event, "DestChainEnabled", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeMessageRecalledIterator is returned from FilterMessageRecalled and is used to iterate over the raw logs and unpacked data for MessageRecalled events raised by the Bridge contract.
-type BridgeMessageRecalledIterator struct {
- Event *BridgeMessageRecalled // Event containing the contract specifics and raw log
+// BridgeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Bridge contract.
+type BridgeInitializedIterator struct {
+ Event *BridgeInitialized // 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
@@ -1234,7 +1374,7 @@ type BridgeMessageRecalledIterator struct {
// 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 *BridgeMessageRecalledIterator) Next() bool {
+func (it *BridgeInitializedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1243,7 +1383,7 @@ func (it *BridgeMessageRecalledIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageRecalled)
+ it.Event = new(BridgeInitialized)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1258,7 +1398,7 @@ func (it *BridgeMessageRecalledIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageRecalled)
+ it.Event = new(BridgeInitialized)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1274,51 +1414,41 @@ func (it *BridgeMessageRecalledIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeMessageRecalledIterator) Error() error {
+func (it *BridgeInitializedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeMessageRecalledIterator) Close() error {
+func (it *BridgeInitializedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeMessageRecalled represents a MessageRecalled event raised by the Bridge contract.
-type BridgeMessageRecalled struct {
- MsgHash [32]byte
+// BridgeInitialized represents a Initialized event raised by the Bridge contract.
+type BridgeInitialized struct {
+ Version uint8
Raw types.Log // Blockchain specific contextual infos
}
-// FilterMessageRecalled is a free log retrieval operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
+// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
//
-// Solidity: event MessageRecalled(bytes32 indexed msgHash)
-func (_Bridge *BridgeFilterer) FilterMessageRecalled(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageRecalledIterator, error) {
-
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
- }
+// Solidity: event Initialized(uint8 version)
+func (_Bridge *BridgeFilterer) FilterInitialized(opts *bind.FilterOpts) (*BridgeInitializedIterator, error) {
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "MessageRecalled", msgHashRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "Initialized")
if err != nil {
return nil, err
}
- return &BridgeMessageRecalledIterator{contract: _Bridge.contract, event: "MessageRecalled", logs: logs, sub: sub}, nil
+ return &BridgeInitializedIterator{contract: _Bridge.contract, event: "Initialized", logs: logs, sub: sub}, nil
}
-// WatchMessageRecalled is a free log subscription operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
+// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
//
-// Solidity: event MessageRecalled(bytes32 indexed msgHash)
-func (_Bridge *BridgeFilterer) WatchMessageRecalled(opts *bind.WatchOpts, sink chan<- *BridgeMessageRecalled, msgHash [][32]byte) (event.Subscription, error) {
-
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
- }
+// Solidity: event Initialized(uint8 version)
+func (_Bridge *BridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *BridgeInitialized) (event.Subscription, error) {
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "MessageRecalled", msgHashRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "Initialized")
if err != nil {
return nil, err
}
@@ -1328,8 +1458,8 @@ func (_Bridge *BridgeFilterer) WatchMessageRecalled(opts *bind.WatchOpts, sink c
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeMessageRecalled)
- if err := _Bridge.contract.UnpackLog(event, "MessageRecalled", log); err != nil {
+ event := new(BridgeInitialized)
+ if err := _Bridge.contract.UnpackLog(event, "Initialized", log); err != nil {
return err
}
event.Raw = log
@@ -1350,21 +1480,21 @@ func (_Bridge *BridgeFilterer) WatchMessageRecalled(opts *bind.WatchOpts, sink c
}), nil
}
-// ParseMessageRecalled is a log parse operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
+// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
//
-// Solidity: event MessageRecalled(bytes32 indexed msgHash)
-func (_Bridge *BridgeFilterer) ParseMessageRecalled(log types.Log) (*BridgeMessageRecalled, error) {
- event := new(BridgeMessageRecalled)
- if err := _Bridge.contract.UnpackLog(event, "MessageRecalled", log); err != nil {
+// Solidity: event Initialized(uint8 version)
+func (_Bridge *BridgeFilterer) ParseInitialized(log types.Log) (*BridgeInitialized, error) {
+ event := new(BridgeInitialized)
+ if err := _Bridge.contract.UnpackLog(event, "Initialized", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeMessageRecalled0Iterator is returned from FilterMessageRecalled0 and is used to iterate over the raw logs and unpacked data for MessageRecalled0 events raised by the Bridge contract.
-type BridgeMessageRecalled0Iterator struct {
- Event *BridgeMessageRecalled0 // Event containing the contract specifics and raw log
+// BridgeMessageRecalledIterator is returned from FilterMessageRecalled and is used to iterate over the raw logs and unpacked data for MessageRecalled events raised by the Bridge contract.
+type BridgeMessageRecalledIterator struct {
+ Event *BridgeMessageRecalled // 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
@@ -1378,7 +1508,7 @@ type BridgeMessageRecalled0Iterator struct {
// 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 *BridgeMessageRecalled0Iterator) Next() bool {
+func (it *BridgeMessageRecalledIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1387,7 +1517,7 @@ func (it *BridgeMessageRecalled0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageRecalled0)
+ it.Event = new(BridgeMessageRecalled)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1402,7 +1532,7 @@ func (it *BridgeMessageRecalled0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageRecalled0)
+ it.Event = new(BridgeMessageRecalled)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1418,51 +1548,51 @@ func (it *BridgeMessageRecalled0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeMessageRecalled0Iterator) Error() error {
+func (it *BridgeMessageRecalledIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeMessageRecalled0Iterator) Close() error {
+func (it *BridgeMessageRecalledIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeMessageRecalled0 represents a MessageRecalled0 event raised by the Bridge contract.
-type BridgeMessageRecalled0 struct {
+// BridgeMessageRecalled represents a MessageRecalled event raised by the Bridge contract.
+type BridgeMessageRecalled struct {
MsgHash [32]byte
Raw types.Log // Blockchain specific contextual infos
}
-// FilterMessageRecalled0 is a free log retrieval operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
+// FilterMessageRecalled is a free log retrieval operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
//
// Solidity: event MessageRecalled(bytes32 indexed msgHash)
-func (_Bridge *BridgeFilterer) FilterMessageRecalled0(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageRecalled0Iterator, error) {
+func (_Bridge *BridgeFilterer) FilterMessageRecalled(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageRecalledIterator, error) {
var msgHashRule []interface{}
for _, msgHashItem := range msgHash {
msgHashRule = append(msgHashRule, msgHashItem)
}
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "MessageRecalled0", msgHashRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "MessageRecalled", msgHashRule)
if err != nil {
return nil, err
}
- return &BridgeMessageRecalled0Iterator{contract: _Bridge.contract, event: "MessageRecalled0", logs: logs, sub: sub}, nil
+ return &BridgeMessageRecalledIterator{contract: _Bridge.contract, event: "MessageRecalled", logs: logs, sub: sub}, nil
}
-// WatchMessageRecalled0 is a free log subscription operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
+// WatchMessageRecalled is a free log subscription operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
//
// Solidity: event MessageRecalled(bytes32 indexed msgHash)
-func (_Bridge *BridgeFilterer) WatchMessageRecalled0(opts *bind.WatchOpts, sink chan<- *BridgeMessageRecalled0, msgHash [][32]byte) (event.Subscription, error) {
+func (_Bridge *BridgeFilterer) WatchMessageRecalled(opts *bind.WatchOpts, sink chan<- *BridgeMessageRecalled, msgHash [][32]byte) (event.Subscription, error) {
var msgHashRule []interface{}
for _, msgHashItem := range msgHash {
msgHashRule = append(msgHashRule, msgHashItem)
}
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "MessageRecalled0", msgHashRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "MessageRecalled", msgHashRule)
if err != nil {
return nil, err
}
@@ -1472,8 +1602,8 @@ func (_Bridge *BridgeFilterer) WatchMessageRecalled0(opts *bind.WatchOpts, sink
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeMessageRecalled0)
- if err := _Bridge.contract.UnpackLog(event, "MessageRecalled0", log); err != nil {
+ event := new(BridgeMessageRecalled)
+ if err := _Bridge.contract.UnpackLog(event, "MessageRecalled", log); err != nil {
return err
}
event.Raw = log
@@ -1494,12 +1624,12 @@ func (_Bridge *BridgeFilterer) WatchMessageRecalled0(opts *bind.WatchOpts, sink
}), nil
}
-// ParseMessageRecalled0 is a log parse operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
+// ParseMessageRecalled is a log parse operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
//
// Solidity: event MessageRecalled(bytes32 indexed msgHash)
-func (_Bridge *BridgeFilterer) ParseMessageRecalled0(log types.Log) (*BridgeMessageRecalled0, error) {
- event := new(BridgeMessageRecalled0)
- if err := _Bridge.contract.UnpackLog(event, "MessageRecalled0", log); err != nil {
+func (_Bridge *BridgeFilterer) ParseMessageRecalled(log types.Log) (*BridgeMessageRecalled, error) {
+ event := new(BridgeMessageRecalled)
+ if err := _Bridge.contract.UnpackLog(event, "MessageRecalled", log); err != nil {
return nil, err
}
event.Raw = log
@@ -1580,9 +1710,9 @@ type BridgeMessageSent struct {
Raw types.Log // Blockchain specific contextual infos
}
-// FilterMessageSent is a free log retrieval operation binding the contract event 0x238646a410b383b664b8d2fe57d2895c1ecd3464a3159cae73a93a9f21a43355.
+// FilterMessageSent is a free log retrieval operation binding the contract event 0x3406baf0dfd13f7f0ce1d077c461a35b763927e1438d49749442de2eb42148ba.
//
-// Solidity: event MessageSent(bytes32 indexed msgHash, (uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message)
+// Solidity: event MessageSent(bytes32 indexed msgHash, (uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message)
func (_Bridge *BridgeFilterer) FilterMessageSent(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageSentIterator, error) {
var msgHashRule []interface{}
@@ -1597,9 +1727,9 @@ func (_Bridge *BridgeFilterer) FilterMessageSent(opts *bind.FilterOpts, msgHash
return &BridgeMessageSentIterator{contract: _Bridge.contract, event: "MessageSent", logs: logs, sub: sub}, nil
}
-// WatchMessageSent is a free log subscription operation binding the contract event 0x238646a410b383b664b8d2fe57d2895c1ecd3464a3159cae73a93a9f21a43355.
+// WatchMessageSent is a free log subscription operation binding the contract event 0x3406baf0dfd13f7f0ce1d077c461a35b763927e1438d49749442de2eb42148ba.
//
-// Solidity: event MessageSent(bytes32 indexed msgHash, (uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message)
+// Solidity: event MessageSent(bytes32 indexed msgHash, (uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message)
func (_Bridge *BridgeFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<- *BridgeMessageSent, msgHash [][32]byte) (event.Subscription, error) {
var msgHashRule []interface{}
@@ -1639,9 +1769,9 @@ func (_Bridge *BridgeFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<
}), nil
}
-// ParseMessageSent is a log parse operation binding the contract event 0x238646a410b383b664b8d2fe57d2895c1ecd3464a3159cae73a93a9f21a43355.
+// ParseMessageSent is a log parse operation binding the contract event 0x3406baf0dfd13f7f0ce1d077c461a35b763927e1438d49749442de2eb42148ba.
//
-// Solidity: event MessageSent(bytes32 indexed msgHash, (uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message)
+// Solidity: event MessageSent(bytes32 indexed msgHash, (uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message)
func (_Bridge *BridgeFilterer) ParseMessageSent(log types.Log) (*BridgeMessageSent, error) {
event := new(BridgeMessageSent)
if err := _Bridge.contract.UnpackLog(event, "MessageSent", log); err != nil {
@@ -1651,9 +1781,9 @@ func (_Bridge *BridgeFilterer) ParseMessageSent(log types.Log) (*BridgeMessageSe
return event, nil
}
-// BridgeMessageSent0Iterator is returned from FilterMessageSent0 and is used to iterate over the raw logs and unpacked data for MessageSent0 events raised by the Bridge contract.
-type BridgeMessageSent0Iterator struct {
- Event *BridgeMessageSent0 // Event containing the contract specifics and raw log
+// BridgeMessageStatusChangedIterator is returned from FilterMessageStatusChanged and is used to iterate over the raw logs and unpacked data for MessageStatusChanged events raised by the Bridge contract.
+type BridgeMessageStatusChangedIterator struct {
+ Event *BridgeMessageStatusChanged // 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
@@ -1667,7 +1797,7 @@ type BridgeMessageSent0Iterator struct {
// 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 *BridgeMessageSent0Iterator) Next() bool {
+func (it *BridgeMessageStatusChangedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1676,7 +1806,7 @@ func (it *BridgeMessageSent0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageSent0)
+ it.Event = new(BridgeMessageStatusChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1691,7 +1821,7 @@ func (it *BridgeMessageSent0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageSent0)
+ it.Event = new(BridgeMessageStatusChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1707,52 +1837,52 @@ func (it *BridgeMessageSent0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeMessageSent0Iterator) Error() error {
+func (it *BridgeMessageStatusChangedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeMessageSent0Iterator) Close() error {
+func (it *BridgeMessageStatusChangedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeMessageSent0 represents a MessageSent0 event raised by the Bridge contract.
-type BridgeMessageSent0 struct {
+// BridgeMessageStatusChanged represents a MessageStatusChanged event raised by the Bridge contract.
+type BridgeMessageStatusChanged struct {
MsgHash [32]byte
- Message IBridgeMessage
+ Status uint8
Raw types.Log // Blockchain specific contextual infos
}
-// FilterMessageSent0 is a free log retrieval operation binding the contract event 0x238646a410b383b664b8d2fe57d2895c1ecd3464a3159cae73a93a9f21a43355.
+// FilterMessageStatusChanged is a free log retrieval operation binding the contract event 0x6c51882bc2ed67617f77a1e9b9a25d2caad8448647ecb093b357a603b2575634.
//
-// Solidity: event MessageSent(bytes32 indexed msgHash, (uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message)
-func (_Bridge *BridgeFilterer) FilterMessageSent0(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageSent0Iterator, error) {
+// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status)
+func (_Bridge *BridgeFilterer) FilterMessageStatusChanged(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageStatusChangedIterator, error) {
var msgHashRule []interface{}
for _, msgHashItem := range msgHash {
msgHashRule = append(msgHashRule, msgHashItem)
}
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "MessageSent0", msgHashRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "MessageStatusChanged", msgHashRule)
if err != nil {
return nil, err
}
- return &BridgeMessageSent0Iterator{contract: _Bridge.contract, event: "MessageSent0", logs: logs, sub: sub}, nil
+ return &BridgeMessageStatusChangedIterator{contract: _Bridge.contract, event: "MessageStatusChanged", logs: logs, sub: sub}, nil
}
-// WatchMessageSent0 is a free log subscription operation binding the contract event 0x238646a410b383b664b8d2fe57d2895c1ecd3464a3159cae73a93a9f21a43355.
+// WatchMessageStatusChanged is a free log subscription operation binding the contract event 0x6c51882bc2ed67617f77a1e9b9a25d2caad8448647ecb093b357a603b2575634.
//
-// Solidity: event MessageSent(bytes32 indexed msgHash, (uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message)
-func (_Bridge *BridgeFilterer) WatchMessageSent0(opts *bind.WatchOpts, sink chan<- *BridgeMessageSent0, msgHash [][32]byte) (event.Subscription, error) {
+// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status)
+func (_Bridge *BridgeFilterer) WatchMessageStatusChanged(opts *bind.WatchOpts, sink chan<- *BridgeMessageStatusChanged, msgHash [][32]byte) (event.Subscription, error) {
var msgHashRule []interface{}
for _, msgHashItem := range msgHash {
msgHashRule = append(msgHashRule, msgHashItem)
}
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "MessageSent0", msgHashRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "MessageStatusChanged", msgHashRule)
if err != nil {
return nil, err
}
@@ -1762,8 +1892,8 @@ func (_Bridge *BridgeFilterer) WatchMessageSent0(opts *bind.WatchOpts, sink chan
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeMessageSent0)
- if err := _Bridge.contract.UnpackLog(event, "MessageSent0", log); err != nil {
+ event := new(BridgeMessageStatusChanged)
+ if err := _Bridge.contract.UnpackLog(event, "MessageStatusChanged", log); err != nil {
return err
}
event.Raw = log
@@ -1784,21 +1914,21 @@ func (_Bridge *BridgeFilterer) WatchMessageSent0(opts *bind.WatchOpts, sink chan
}), nil
}
-// ParseMessageSent0 is a log parse operation binding the contract event 0x238646a410b383b664b8d2fe57d2895c1ecd3464a3159cae73a93a9f21a43355.
+// ParseMessageStatusChanged is a log parse operation binding the contract event 0x6c51882bc2ed67617f77a1e9b9a25d2caad8448647ecb093b357a603b2575634.
//
-// Solidity: event MessageSent(bytes32 indexed msgHash, (uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message)
-func (_Bridge *BridgeFilterer) ParseMessageSent0(log types.Log) (*BridgeMessageSent0, error) {
- event := new(BridgeMessageSent0)
- if err := _Bridge.contract.UnpackLog(event, "MessageSent0", log); err != nil {
+// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status)
+func (_Bridge *BridgeFilterer) ParseMessageStatusChanged(log types.Log) (*BridgeMessageStatusChanged, error) {
+ event := new(BridgeMessageStatusChanged)
+ if err := _Bridge.contract.UnpackLog(event, "MessageStatusChanged", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeMessageStatusChangedIterator is returned from FilterMessageStatusChanged and is used to iterate over the raw logs and unpacked data for MessageStatusChanged events raised by the Bridge contract.
-type BridgeMessageStatusChangedIterator struct {
- Event *BridgeMessageStatusChanged // Event containing the contract specifics and raw log
+// BridgeOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Bridge contract.
+type BridgeOwnershipTransferredIterator struct {
+ Event *BridgeOwnershipTransferred // 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
@@ -1812,7 +1942,7 @@ type BridgeMessageStatusChangedIterator struct {
// 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 *BridgeMessageStatusChangedIterator) Next() bool {
+func (it *BridgeOwnershipTransferredIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1821,7 +1951,7 @@ func (it *BridgeMessageStatusChangedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageStatusChanged)
+ it.Event = new(BridgeOwnershipTransferred)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1836,7 +1966,7 @@ func (it *BridgeMessageStatusChangedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageStatusChanged)
+ it.Event = new(BridgeOwnershipTransferred)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1852,53 +1982,60 @@ func (it *BridgeMessageStatusChangedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeMessageStatusChangedIterator) Error() error {
+func (it *BridgeOwnershipTransferredIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeMessageStatusChangedIterator) Close() error {
+func (it *BridgeOwnershipTransferredIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeMessageStatusChanged represents a MessageStatusChanged event raised by the Bridge contract.
-type BridgeMessageStatusChanged struct {
- MsgHash [32]byte
- Status uint8
- Transactor common.Address
- Raw types.Log // Blockchain specific contextual infos
+// BridgeOwnershipTransferred represents a OwnershipTransferred event raised by the Bridge contract.
+type BridgeOwnershipTransferred struct {
+ PreviousOwner common.Address
+ NewOwner common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterMessageStatusChanged is a free log retrieval operation binding the contract event 0x0af4d5247f6a4028d6699afb62871a76b398da1d1a626c8a9b90e0bd5f54c73c.
+// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
-// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status, address transactor)
-func (_Bridge *BridgeFilterer) FilterMessageStatusChanged(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageStatusChangedIterator, error) {
+// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
+func (_Bridge *BridgeFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*BridgeOwnershipTransferredIterator, error) {
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
+ 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 := _Bridge.contract.FilterLogs(opts, "MessageStatusChanged", msgHashRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
if err != nil {
return nil, err
}
- return &BridgeMessageStatusChangedIterator{contract: _Bridge.contract, event: "MessageStatusChanged", logs: logs, sub: sub}, nil
+ return &BridgeOwnershipTransferredIterator{contract: _Bridge.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
}
-// WatchMessageStatusChanged is a free log subscription operation binding the contract event 0x0af4d5247f6a4028d6699afb62871a76b398da1d1a626c8a9b90e0bd5f54c73c.
+// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
-// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status, address transactor)
-func (_Bridge *BridgeFilterer) WatchMessageStatusChanged(opts *bind.WatchOpts, sink chan<- *BridgeMessageStatusChanged, msgHash [][32]byte) (event.Subscription, error) {
+// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
+func (_Bridge *BridgeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BridgeOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
+ 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 := _Bridge.contract.WatchLogs(opts, "MessageStatusChanged", msgHashRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
if err != nil {
return nil, err
}
@@ -1908,8 +2045,8 @@ func (_Bridge *BridgeFilterer) WatchMessageStatusChanged(opts *bind.WatchOpts, s
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeMessageStatusChanged)
- if err := _Bridge.contract.UnpackLog(event, "MessageStatusChanged", log); err != nil {
+ event := new(BridgeOwnershipTransferred)
+ if err := _Bridge.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
return err
}
event.Raw = log
@@ -1930,21 +2067,21 @@ func (_Bridge *BridgeFilterer) WatchMessageStatusChanged(opts *bind.WatchOpts, s
}), nil
}
-// ParseMessageStatusChanged is a log parse operation binding the contract event 0x0af4d5247f6a4028d6699afb62871a76b398da1d1a626c8a9b90e0bd5f54c73c.
+// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
-// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status, address transactor)
-func (_Bridge *BridgeFilterer) ParseMessageStatusChanged(log types.Log) (*BridgeMessageStatusChanged, error) {
- event := new(BridgeMessageStatusChanged)
- if err := _Bridge.contract.UnpackLog(event, "MessageStatusChanged", log); err != nil {
+// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
+func (_Bridge *BridgeFilterer) ParseOwnershipTransferred(log types.Log) (*BridgeOwnershipTransferred, error) {
+ event := new(BridgeOwnershipTransferred)
+ if err := _Bridge.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeMessageStatusChanged0Iterator is returned from FilterMessageStatusChanged0 and is used to iterate over the raw logs and unpacked data for MessageStatusChanged0 events raised by the Bridge contract.
-type BridgeMessageStatusChanged0Iterator struct {
- Event *BridgeMessageStatusChanged0 // Event containing the contract specifics and raw log
+// BridgePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Bridge contract.
+type BridgePausedIterator struct {
+ Event *BridgePaused // 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
@@ -1958,7 +2095,7 @@ type BridgeMessageStatusChanged0Iterator struct {
// 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 *BridgeMessageStatusChanged0Iterator) Next() bool {
+func (it *BridgePausedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1967,7 +2104,7 @@ func (it *BridgeMessageStatusChanged0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageStatusChanged0)
+ it.Event = new(BridgePaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1982,7 +2119,7 @@ func (it *BridgeMessageStatusChanged0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageStatusChanged0)
+ it.Event = new(BridgePaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1998,53 +2135,41 @@ func (it *BridgeMessageStatusChanged0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeMessageStatusChanged0Iterator) Error() error {
+func (it *BridgePausedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeMessageStatusChanged0Iterator) Close() error {
+func (it *BridgePausedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeMessageStatusChanged0 represents a MessageStatusChanged0 event raised by the Bridge contract.
-type BridgeMessageStatusChanged0 struct {
- MsgHash [32]byte
- Status uint8
- Transactor common.Address
- Raw types.Log // Blockchain specific contextual infos
+// BridgePaused represents a Paused event raised by the Bridge contract.
+type BridgePaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterMessageStatusChanged0 is a free log retrieval operation binding the contract event 0x0af4d5247f6a4028d6699afb62871a76b398da1d1a626c8a9b90e0bd5f54c73c.
+// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status, address transactor)
-func (_Bridge *BridgeFilterer) FilterMessageStatusChanged0(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageStatusChanged0Iterator, error) {
-
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
- }
+// Solidity: event Paused(address account)
+func (_Bridge *BridgeFilterer) FilterPaused(opts *bind.FilterOpts) (*BridgePausedIterator, error) {
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "MessageStatusChanged0", msgHashRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "Paused")
if err != nil {
return nil, err
}
- return &BridgeMessageStatusChanged0Iterator{contract: _Bridge.contract, event: "MessageStatusChanged0", logs: logs, sub: sub}, nil
+ return &BridgePausedIterator{contract: _Bridge.contract, event: "Paused", logs: logs, sub: sub}, nil
}
-// WatchMessageStatusChanged0 is a free log subscription operation binding the contract event 0x0af4d5247f6a4028d6699afb62871a76b398da1d1a626c8a9b90e0bd5f54c73c.
+// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status, address transactor)
-func (_Bridge *BridgeFilterer) WatchMessageStatusChanged0(opts *bind.WatchOpts, sink chan<- *BridgeMessageStatusChanged0, msgHash [][32]byte) (event.Subscription, error) {
+// Solidity: event Paused(address account)
+func (_Bridge *BridgeFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *BridgePaused) (event.Subscription, error) {
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
- }
-
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "MessageStatusChanged0", msgHashRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "Paused")
if err != nil {
return nil, err
}
@@ -2054,8 +2179,8 @@ func (_Bridge *BridgeFilterer) WatchMessageStatusChanged0(opts *bind.WatchOpts,
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeMessageStatusChanged0)
- if err := _Bridge.contract.UnpackLog(event, "MessageStatusChanged0", log); err != nil {
+ event := new(BridgePaused)
+ if err := _Bridge.contract.UnpackLog(event, "Paused", log); err != nil {
return err
}
event.Raw = log
@@ -2076,21 +2201,21 @@ func (_Bridge *BridgeFilterer) WatchMessageStatusChanged0(opts *bind.WatchOpts,
}), nil
}
-// ParseMessageStatusChanged0 is a log parse operation binding the contract event 0x0af4d5247f6a4028d6699afb62871a76b398da1d1a626c8a9b90e0bd5f54c73c.
+// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status, address transactor)
-func (_Bridge *BridgeFilterer) ParseMessageStatusChanged0(log types.Log) (*BridgeMessageStatusChanged0, error) {
- event := new(BridgeMessageStatusChanged0)
- if err := _Bridge.contract.UnpackLog(event, "MessageStatusChanged0", log); err != nil {
+// Solidity: event Paused(address account)
+func (_Bridge *BridgeFilterer) ParsePaused(log types.Log) (*BridgePaused, error) {
+ event := new(BridgePaused)
+ if err := _Bridge.contract.UnpackLog(event, "Paused", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Bridge contract.
-type BridgeOwnershipTransferredIterator struct {
- Event *BridgeOwnershipTransferred // Event containing the contract specifics and raw log
+// BridgeSignalSentIterator is returned from FilterSignalSent and is used to iterate over the raw logs and unpacked data for SignalSent events raised by the Bridge contract.
+type BridgeSignalSentIterator struct {
+ Event *BridgeSignalSent // 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
@@ -2104,7 +2229,7 @@ type BridgeOwnershipTransferredIterator struct {
// 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 *BridgeOwnershipTransferredIterator) Next() bool {
+func (it *BridgeSignalSentIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2113,7 +2238,7 @@ func (it *BridgeOwnershipTransferredIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeOwnershipTransferred)
+ it.Event = new(BridgeSignalSent)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2128,7 +2253,7 @@ func (it *BridgeOwnershipTransferredIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeOwnershipTransferred)
+ it.Event = new(BridgeSignalSent)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2144,60 +2269,186 @@ func (it *BridgeOwnershipTransferredIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeOwnershipTransferredIterator) Error() error {
+func (it *BridgeSignalSentIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeOwnershipTransferredIterator) Close() error {
+func (it *BridgeSignalSentIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeOwnershipTransferred represents a OwnershipTransferred event raised by the Bridge contract.
-type BridgeOwnershipTransferred struct {
- PreviousOwner common.Address
- NewOwner common.Address
- Raw types.Log // Blockchain specific contextual infos
+// BridgeSignalSent represents a SignalSent event raised by the Bridge contract.
+type BridgeSignalSent struct {
+ Sender common.Address
+ MsgHash [32]byte
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// FilterSignalSent is a free log retrieval operation binding the contract event 0xf0958489d2a32db2b0faf27a72a31fdf28f2636ca5532f1b077ddc2f51b20d1d.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_Bridge *BridgeFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*BridgeOwnershipTransferredIterator, error) {
+// Solidity: event SignalSent(address indexed sender, bytes32 msgHash)
+func (_Bridge *BridgeFilterer) FilterSignalSent(opts *bind.FilterOpts, sender []common.Address) (*BridgeSignalSentIterator, error) {
- var previousOwnerRule []interface{}
- for _, previousOwnerItem := range previousOwner {
- previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
+ var senderRule []interface{}
+ for _, senderItem := range sender {
+ senderRule = append(senderRule, senderItem)
}
- var newOwnerRule []interface{}
- for _, newOwnerItem := range newOwner {
- newOwnerRule = append(newOwnerRule, newOwnerItem)
+
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "SignalSent", senderRule)
+ if err != nil {
+ return nil, err
}
+ return &BridgeSignalSentIterator{contract: _Bridge.contract, event: "SignalSent", logs: logs, sub: sub}, nil
+}
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+// WatchSignalSent is a free log subscription operation binding the contract event 0xf0958489d2a32db2b0faf27a72a31fdf28f2636ca5532f1b077ddc2f51b20d1d.
+//
+// Solidity: event SignalSent(address indexed sender, bytes32 msgHash)
+func (_Bridge *BridgeFilterer) WatchSignalSent(opts *bind.WatchOpts, sink chan<- *BridgeSignalSent, sender []common.Address) (event.Subscription, error) {
+
+ var senderRule []interface{}
+ for _, senderItem := range sender {
+ senderRule = append(senderRule, senderItem)
+ }
+
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "SignalSent", senderRule)
if err != nil {
return nil, err
}
- return &BridgeOwnershipTransferredIterator{contract: _Bridge.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
+ 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(BridgeSignalSent)
+ if err := _Bridge.contract.UnpackLog(event, "SignalSent", 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
}
-// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// ParseSignalSent is a log parse operation binding the contract event 0xf0958489d2a32db2b0faf27a72a31fdf28f2636ca5532f1b077ddc2f51b20d1d.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_Bridge *BridgeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BridgeOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
+// Solidity: event SignalSent(address indexed sender, bytes32 msgHash)
+func (_Bridge *BridgeFilterer) ParseSignalSent(log types.Log) (*BridgeSignalSent, error) {
+ event := new(BridgeSignalSent)
+ if err := _Bridge.contract.UnpackLog(event, "SignalSent", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
- var previousOwnerRule []interface{}
- for _, previousOwnerItem := range previousOwner {
- previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
+// BridgeUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Bridge contract.
+type BridgeUnpausedIterator struct {
+ Event *BridgeUnpaused // 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 *BridgeUnpausedIterator) Next() bool {
+ // If the iterator failed, stop iterating
+ if it.fail != nil {
+ return false
}
- var newOwnerRule []interface{}
- for _, newOwnerItem := range newOwner {
- newOwnerRule = append(newOwnerRule, newOwnerItem)
+ // If the iterator completed, deliver directly whatever's available
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(BridgeUnpaused)
+ 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(BridgeUnpaused)
+ if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
+ it.fail = err
+ return false
+ }
+ it.Event.Raw = log
+ return true
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+ 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 *BridgeUnpausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *BridgeUnpausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// BridgeUnpaused represents a Unpaused event raised by the Bridge contract.
+type BridgeUnpaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_Bridge *BridgeFilterer) FilterUnpaused(opts *bind.FilterOpts) (*BridgeUnpausedIterator, error) {
+
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "Unpaused")
+ if err != nil {
+ return nil, err
+ }
+ return &BridgeUnpausedIterator{contract: _Bridge.contract, event: "Unpaused", logs: logs, sub: sub}, nil
+}
+
+// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_Bridge *BridgeFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *BridgeUnpaused) (event.Subscription, error) {
+
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "Unpaused")
if err != nil {
return nil, err
}
@@ -2207,8 +2458,8 @@ func (_Bridge *BridgeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, s
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeOwnershipTransferred)
- if err := _Bridge.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+ event := new(BridgeUnpaused)
+ if err := _Bridge.contract.UnpackLog(event, "Unpaused", log); err != nil {
return err
}
event.Raw = log
@@ -2229,21 +2480,21 @@ func (_Bridge *BridgeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, s
}), nil
}
-// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_Bridge *BridgeFilterer) ParseOwnershipTransferred(log types.Log) (*BridgeOwnershipTransferred, error) {
- event := new(BridgeOwnershipTransferred)
- if err := _Bridge.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+// Solidity: event Unpaused(address account)
+func (_Bridge *BridgeFilterer) ParseUnpaused(log types.Log) (*BridgeUnpaused, error) {
+ event := new(BridgeUnpaused)
+ if err := _Bridge.contract.UnpackLog(event, "Unpaused", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeSignalSentIterator is returned from FilterSignalSent and is used to iterate over the raw logs and unpacked data for SignalSent events raised by the Bridge contract.
-type BridgeSignalSentIterator struct {
- Event *BridgeSignalSent // Event containing the contract specifics and raw log
+// BridgeUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the Bridge contract.
+type BridgeUpgradedIterator struct {
+ Event *BridgeUpgraded // 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
@@ -2257,7 +2508,7 @@ type BridgeSignalSentIterator struct {
// 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 *BridgeSignalSentIterator) Next() bool {
+func (it *BridgeUpgradedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2266,7 +2517,7 @@ func (it *BridgeSignalSentIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeSignalSent)
+ it.Event = new(BridgeUpgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2281,7 +2532,7 @@ func (it *BridgeSignalSentIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeSignalSent)
+ it.Event = new(BridgeUpgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2297,52 +2548,51 @@ func (it *BridgeSignalSentIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeSignalSentIterator) Error() error {
+func (it *BridgeUpgradedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeSignalSentIterator) Close() error {
+func (it *BridgeUpgradedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeSignalSent represents a SignalSent event raised by the Bridge contract.
-type BridgeSignalSent struct {
- Sender common.Address
- MsgHash [32]byte
- Raw types.Log // Blockchain specific contextual infos
+// BridgeUpgraded represents a Upgraded event raised by the Bridge contract.
+type BridgeUpgraded struct {
+ Implementation common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterSignalSent is a free log retrieval operation binding the contract event 0xf0958489d2a32db2b0faf27a72a31fdf28f2636ca5532f1b077ddc2f51b20d1d.
+// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
//
-// Solidity: event SignalSent(address indexed sender, bytes32 msgHash)
-func (_Bridge *BridgeFilterer) FilterSignalSent(opts *bind.FilterOpts, sender []common.Address) (*BridgeSignalSentIterator, error) {
+// Solidity: event Upgraded(address indexed implementation)
+func (_Bridge *BridgeFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*BridgeUpgradedIterator, error) {
- var senderRule []interface{}
- for _, senderItem := range sender {
- senderRule = append(senderRule, senderItem)
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
}
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "SignalSent", senderRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "Upgraded", implementationRule)
if err != nil {
return nil, err
}
- return &BridgeSignalSentIterator{contract: _Bridge.contract, event: "SignalSent", logs: logs, sub: sub}, nil
+ return &BridgeUpgradedIterator{contract: _Bridge.contract, event: "Upgraded", logs: logs, sub: sub}, nil
}
-// WatchSignalSent is a free log subscription operation binding the contract event 0xf0958489d2a32db2b0faf27a72a31fdf28f2636ca5532f1b077ddc2f51b20d1d.
+// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
//
-// Solidity: event SignalSent(address indexed sender, bytes32 msgHash)
-func (_Bridge *BridgeFilterer) WatchSignalSent(opts *bind.WatchOpts, sink chan<- *BridgeSignalSent, sender []common.Address) (event.Subscription, error) {
+// Solidity: event Upgraded(address indexed implementation)
+func (_Bridge *BridgeFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *BridgeUpgraded, implementation []common.Address) (event.Subscription, error) {
- var senderRule []interface{}
- for _, senderItem := range sender {
- senderRule = append(senderRule, senderItem)
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
}
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "SignalSent", senderRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "Upgraded", implementationRule)
if err != nil {
return nil, err
}
@@ -2352,8 +2602,8 @@ func (_Bridge *BridgeFilterer) WatchSignalSent(opts *bind.WatchOpts, sink chan<-
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeSignalSent)
- if err := _Bridge.contract.UnpackLog(event, "SignalSent", log); err != nil {
+ event := new(BridgeUpgraded)
+ if err := _Bridge.contract.UnpackLog(event, "Upgraded", log); err != nil {
return err
}
event.Raw = log
@@ -2374,12 +2624,12 @@ func (_Bridge *BridgeFilterer) WatchSignalSent(opts *bind.WatchOpts, sink chan<-
}), nil
}
-// ParseSignalSent is a log parse operation binding the contract event 0xf0958489d2a32db2b0faf27a72a31fdf28f2636ca5532f1b077ddc2f51b20d1d.
+// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
//
-// Solidity: event SignalSent(address indexed sender, bytes32 msgHash)
-func (_Bridge *BridgeFilterer) ParseSignalSent(log types.Log) (*BridgeSignalSent, error) {
- event := new(BridgeSignalSent)
- if err := _Bridge.contract.UnpackLog(event, "SignalSent", log); err != nil {
+// Solidity: event Upgraded(address indexed implementation)
+func (_Bridge *BridgeFilterer) ParseUpgraded(log types.Log) (*BridgeUpgraded, error) {
+ event := new(BridgeUpgraded)
+ if err := _Bridge.contract.UnpackLog(event, "Upgraded", log); err != nil {
return nil, err
}
event.Raw = log
diff --git a/packages/eventindexer/contracts/taikol1/TaikoL1.go b/packages/eventindexer/contracts/taikol1/TaikoL1.go
index aac78a8a90d..100a7318744 100644
--- a/packages/eventindexer/contracts/taikol1/TaikoL1.go
+++ b/packages/eventindexer/contracts/taikol1/TaikoL1.go
@@ -29,13 +29,32 @@ var (
_ = abi.ConvertType
)
+// ICrossChainSyncSnippet is an auto generated low-level Go binding around an user-defined struct.
+type ICrossChainSyncSnippet struct {
+ RemoteBlockId uint64
+ SyncedInBlock uint64
+ BlockHash [32]byte
+ SignalRoot [32]byte
+}
+
+// ITierProviderTier is an auto generated low-level Go binding around an user-defined struct.
+type ITierProviderTier struct {
+ VerifierName [32]byte
+ ValidityBond *big.Int
+ ContestBond *big.Int
+ CooldownWindow *big.Int
+ ProvingWindow uint16
+ MaxBlocksToVerify uint8
+}
+
// TaikoDataBlock is an auto generated low-level Go binding around an user-defined struct.
type TaikoDataBlock struct {
MetaHash [32]byte
- Prover common.Address
- ProofBond *big.Int
+ AssignedProver common.Address
+ LivenessBond *big.Int
BlockId uint64
ProposedAt uint64
+ ProposedIn uint64
NextTransitionId uint32
VerifiedTransitionId uint32
Reserved [7][32]byte
@@ -43,44 +62,41 @@ type TaikoDataBlock struct {
// TaikoDataBlockMetadata is an auto generated low-level Go binding around an user-defined struct.
type TaikoDataBlockMetadata struct {
- Id uint64
- Timestamp uint64
- L1Height uint64
- L1Hash [32]byte
- MixHash [32]byte
- TxListHash [32]byte
- TxListByteStart *big.Int
- TxListByteEnd *big.Int
- GasLimit uint32
- Proposer common.Address
- DepositsProcessed []TaikoDataEthDeposit
+ L1Hash [32]byte
+ Difficulty [32]byte
+ BlobHash [32]byte
+ ExtraData [32]byte
+ DepositsHash [32]byte
+ Coinbase common.Address
+ Id uint64
+ GasLimit uint32
+ Timestamp uint64
+ L1Height uint64
+ TxListByteOffset *big.Int
+ TxListByteSize *big.Int
+ MinTier uint16
+ BlobUsed bool
+ ParentMetaHash [32]byte
}
// TaikoDataConfig is an auto generated low-level Go binding around an user-defined struct.
type TaikoDataConfig struct {
- ChainId *big.Int
- RelaySignalRoot bool
- BlockMaxProposals uint64
- BlockRingBufferSize uint64
- BlockMaxVerificationsPerTx uint64
- BlockMaxGasLimit uint32
- BlockFeeBaseGas uint32
- BlockMaxTxListBytes *big.Int
- BlockTxListExpiry *big.Int
- ProposerRewardPerSecond *big.Int
- ProposerRewardMax *big.Int
- ProofRegularCooldown *big.Int
- ProofOracleCooldown *big.Int
- ProofWindow uint16
- ProofBond *big.Int
- SkipProverAssignmentVerificaiton bool
- EthDepositRingBufferSize *big.Int
- EthDepositMinCountPerBlock uint64
- EthDepositMaxCountPerBlock uint64
- EthDepositMinAmount *big.Int
- EthDepositMaxAmount *big.Int
- EthDepositGas *big.Int
- EthDepositMaxFee *big.Int
+ ChainId uint64
+ BlockMaxProposals uint64
+ BlockRingBufferSize uint64
+ MaxBlocksToVerifyPerProposal uint64
+ BlockMaxGasLimit uint32
+ BlockMaxTxListBytes *big.Int
+ BlobExpiry *big.Int
+ BlobAllowedForDA bool
+ LivenessBond *big.Int
+ EthDepositRingBufferSize *big.Int
+ EthDepositMinCountPerBlock uint64
+ EthDepositMaxCountPerBlock uint64
+ EthDepositMinAmount *big.Int
+ EthDepositMaxAmount *big.Int
+ EthDepositGas *big.Int
+ EthDepositMaxFee *big.Int
}
// TaikoDataEthDeposit is an auto generated low-level Go binding around an user-defined struct.
@@ -100,35 +116,37 @@ type TaikoDataSlotA struct {
// TaikoDataSlotB is an auto generated low-level Go binding around an user-defined struct.
type TaikoDataSlotB struct {
- NumBlocks uint64
- NextEthDepositToProcess uint64
- LastVerifiedAt uint64
- LastVerifiedBlockId uint64
-}
-
-// TaikoDataStateVariables is an auto generated low-level Go binding around an user-defined struct.
-type TaikoDataStateVariables struct {
- GenesisHeight uint64
- GenesisTimestamp uint64
- NumBlocks uint64
- LastVerifiedBlockId uint64
- NextEthDepositToProcess uint64
- NumEthDeposits uint64
+ NumBlocks uint64
+ LastVerifiedBlockId uint64
+ ProvingPaused bool
}
// TaikoDataTransition is an auto generated low-level Go binding around an user-defined struct.
type TaikoDataTransition struct {
- Key [32]byte
+ ParentHash [32]byte
BlockHash [32]byte
SignalRoot [32]byte
- Prover common.Address
- ProvenAt uint64
- Reserved [6][32]byte
+ Graffiti [32]byte
+}
+
+// TaikoDataTransitionState is an auto generated low-level Go binding around an user-defined struct.
+type TaikoDataTransitionState struct {
+ Key [32]byte
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ Prover common.Address
+ ValidityBond *big.Int
+ Contester common.Address
+ ContestBond *big.Int
+ Timestamp uint64
+ Tier uint16
+ Contestations uint8
+ Reserved [4][32]byte
}
// TaikoL1MetaData contains all meta data concerning the TaikoL1 contract.
var TaikoL1MetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ASSIGNMENT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ASSIGNMENT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ORACLE_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ORACLE_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROPOSER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROPOSER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROVER_SIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROVER_SIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bond\",\"type\":\"uint256\"}],\"name\":\"BondReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bond\",\"type\":\"uint256\"}],\"name\":\"BondReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bond\",\"type\":\"uint256\"}],\"name\":\"BondReturned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bond\",\"type\":\"uint256\"}],\"name\":\"BondReturned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bond\",\"type\":\"uint256\"}],\"name\":\"BondRewarded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bond\",\"type\":\"uint256\"}],\"name\":\"BondRewarded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"srcHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"srcHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"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\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"canDepositEthToL2\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"proofBond\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nextTransitionId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"verifiedTransitionId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[7]\",\"name\":\"__reserved\",\"type\":\"bytes32[7]\"}],\"internalType\":\"structTaikoData.Block\",\"name\":\"blk\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"relaySignalRoot\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxProposals\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockRingBufferSize\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxVerificationsPerTx\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockFeeBaseGas\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockMaxTxListBytes\",\"type\":\"uint24\"},{\"internalType\":\"uint256\",\"name\":\"blockTxListExpiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proposerRewardPerSecond\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proposerRewardMax\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofRegularCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofOracleCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"proofBond\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"skipProverAssignmentVerificaiton\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMinCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMaxCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMinAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMaxAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getTaikoTokenBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"}],\"name\":\"getTransition\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"bytes32[6]\",\"name\":\"__reserved\",\"type\":\"bytes32[6]\"}],\"internalType\":\"structTaikoData.Transition\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"id\",\"type\":\"uint16\"}],\"name\":\"getVerifierName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"assignment\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.SlotA\",\"name\":\"slotA\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.SlotB\",\"name\":\"slotB\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"maxBlocks\",\"type\":\"uint64\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
+ ABI: "[{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_CONTESTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNED_PROVER_NOT_ALLOWED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOB_FOR_DA_DISABLED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOB_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOB_NOT_REUSEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ADDRESS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_AMOUNT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_TIER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_TRANSITION\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_LIVENESS_BOND_NOT_RECEIVED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_ASSIGNED_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_PROPOSER_NOT_EOA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_PROVING_PAUSED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_RECEIVE_DISABLED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_TIERS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_ID_ZERO\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_ID_ZERO\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TXLIST_OFFSET_SIZE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TXLIST_TOO_LARGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_PARENT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_TIER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blobHash\",\"type\":\"bytes32\"}],\"name\":\"BlobCached\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"difficulty\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blobHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"depositsHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint24\",\"name\":\"txListByteOffset\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteSize\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"minTier\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"blobUsed\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"parentMetaHash\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"contestations\",\"type\":\"uint8\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"contestations\",\"type\":\"uint8\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"syncedInBlock\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"syncedInBlock\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"ProvingPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenCredited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDebited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"graffiti\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"name\":\"tran\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"contestBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"}],\"name\":\"TransitionContested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"graffiti\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"name\":\"tran\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"validityBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"}],\"name\":\"TransitionProved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"canDepositEthToL2\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proposedIn\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nextTransitionId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"verifiedTransitionId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[7]\",\"name\":\"__reserved\",\"type\":\"bytes32[7]\"}],\"internalType\":\"structTaikoData.Block\",\"name\":\"blk\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxProposals\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockRingBufferSize\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxBlocksToVerifyPerProposal\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockMaxTxListBytes\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"blobExpiry\",\"type\":\"uint24\"},{\"internalType\":\"bool\",\"name\":\"blobAllowedForDA\",\"type\":\"bool\"},{\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMinCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMaxCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMinAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMaxAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rand\",\"type\":\"uint256\"}],\"name\":\"getMinTier\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.SlotA\",\"name\":\"a\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"provingPaused\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.SlotB\",\"name\":\"b\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getSyncedSnippet\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"syncedInBlock\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structICrossChainSync.Snippet\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"tierId\",\"type\":\"uint16\"}],\"name\":\"getTier\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"verifierName\",\"type\":\"bytes32\"},{\"internalType\":\"uint96\",\"name\":\"validityBond\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"contestBond\",\"type\":\"uint96\"},{\"internalType\":\"uint24\",\"name\":\"cooldownWindow\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"provingWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"maxBlocksToVerify\",\"type\":\"uint8\"}],\"internalType\":\"structITierProvider.Tier\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTierIds\",\"outputs\":[{\"internalType\":\"uint16[]\",\"name\":\"ids\",\"type\":\"uint16[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"}],\"name\":\"getTransition\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"validityBond\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"contester\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"contestBond\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"contestations\",\"type\":\"uint8\"},{\"internalType\":\"bytes32[4]\",\"name\":\"__reserved\",\"type\":\"bytes32[4]\"}],\"internalType\":\"structTaikoData.TransitionState\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"blobHash\",\"type\":\"bytes32\"}],\"name\":\"isBlobReusable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConfigValid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pause\",\"type\":\"bool\"}],\"name\":\"pauseProving\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"params\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"difficulty\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blobHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"depositsHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint24\",\"name\":\"txListByteOffset\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteSize\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"minTier\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"blobUsed\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"parentMetaHash\",\"type\":\"bytes32\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.SlotA\",\"name\":\"slotA\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"provingPaused\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.SlotB\",\"name\":\"slotB\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"maxBlocksToVerify\",\"type\":\"uint64\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
}
// TaikoL1ABI is the input ABI used to generate the binding from.
@@ -341,7 +359,7 @@ func (_TaikoL1 *TaikoL1CallerSession) CanDepositEthToL2(amount *big.Int) (bool,
// GetBlock is a free data retrieval call binding the contract method 0x5fa15e79.
//
-// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint96,uint64,uint64,uint32,uint32,bytes32[7]) blk)
+// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32,bytes32[7]) blk)
func (_TaikoL1 *TaikoL1Caller) GetBlock(opts *bind.CallOpts, blockId uint64) (TaikoDataBlock, error) {
var out []interface{}
err := _TaikoL1.contract.Call(opts, &out, "getBlock", blockId)
@@ -358,21 +376,21 @@ func (_TaikoL1 *TaikoL1Caller) GetBlock(opts *bind.CallOpts, blockId uint64) (Ta
// GetBlock is a free data retrieval call binding the contract method 0x5fa15e79.
//
-// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint96,uint64,uint64,uint32,uint32,bytes32[7]) blk)
+// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32,bytes32[7]) blk)
func (_TaikoL1 *TaikoL1Session) GetBlock(blockId uint64) (TaikoDataBlock, error) {
return _TaikoL1.Contract.GetBlock(&_TaikoL1.CallOpts, blockId)
}
// GetBlock is a free data retrieval call binding the contract method 0x5fa15e79.
//
-// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint96,uint64,uint64,uint32,uint32,bytes32[7]) blk)
+// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32,bytes32[7]) blk)
func (_TaikoL1 *TaikoL1CallerSession) GetBlock(blockId uint64) (TaikoDataBlock, error) {
return _TaikoL1.Contract.GetBlock(&_TaikoL1.CallOpts, blockId)
}
// GetConfig is a free data retrieval call binding the contract method 0xc3f909d4.
//
-// Solidity: function getConfig() pure returns((uint256,bool,uint64,uint64,uint64,uint32,uint32,uint24,uint256,uint256,uint256,uint256,uint256,uint16,uint96,bool,uint256,uint64,uint64,uint96,uint96,uint256,uint256))
+// Solidity: function getConfig() view returns((uint64,uint64,uint64,uint64,uint32,uint24,uint24,bool,uint96,uint256,uint64,uint64,uint96,uint96,uint256,uint256))
func (_TaikoL1 *TaikoL1Caller) GetConfig(opts *bind.CallOpts) (TaikoDataConfig, error) {
var out []interface{}
err := _TaikoL1.contract.Call(opts, &out, "getConfig")
@@ -389,154 +407,199 @@ func (_TaikoL1 *TaikoL1Caller) GetConfig(opts *bind.CallOpts) (TaikoDataConfig,
// GetConfig is a free data retrieval call binding the contract method 0xc3f909d4.
//
-// Solidity: function getConfig() pure returns((uint256,bool,uint64,uint64,uint64,uint32,uint32,uint24,uint256,uint256,uint256,uint256,uint256,uint16,uint96,bool,uint256,uint64,uint64,uint96,uint96,uint256,uint256))
+// Solidity: function getConfig() view returns((uint64,uint64,uint64,uint64,uint32,uint24,uint24,bool,uint96,uint256,uint64,uint64,uint96,uint96,uint256,uint256))
func (_TaikoL1 *TaikoL1Session) GetConfig() (TaikoDataConfig, error) {
return _TaikoL1.Contract.GetConfig(&_TaikoL1.CallOpts)
}
// GetConfig is a free data retrieval call binding the contract method 0xc3f909d4.
//
-// Solidity: function getConfig() pure returns((uint256,bool,uint64,uint64,uint64,uint32,uint32,uint24,uint256,uint256,uint256,uint256,uint256,uint16,uint96,bool,uint256,uint64,uint64,uint96,uint96,uint256,uint256))
+// Solidity: function getConfig() view returns((uint64,uint64,uint64,uint64,uint32,uint24,uint24,bool,uint96,uint256,uint64,uint64,uint96,uint96,uint256,uint256))
func (_TaikoL1 *TaikoL1CallerSession) GetConfig() (TaikoDataConfig, error) {
return _TaikoL1.Contract.GetConfig(&_TaikoL1.CallOpts)
}
-// GetCrossChainBlockHash is a free data retrieval call binding the contract method 0xbdd6bc36.
+// GetMinTier is a free data retrieval call binding the contract method 0x59ab4e23.
//
-// Solidity: function getCrossChainBlockHash(uint64 blockId) view returns(bytes32)
-func (_TaikoL1 *TaikoL1Caller) GetCrossChainBlockHash(opts *bind.CallOpts, blockId uint64) ([32]byte, error) {
+// Solidity: function getMinTier(uint256 rand) view returns(uint16)
+func (_TaikoL1 *TaikoL1Caller) GetMinTier(opts *bind.CallOpts, rand *big.Int) (uint16, error) {
var out []interface{}
- err := _TaikoL1.contract.Call(opts, &out, "getCrossChainBlockHash", blockId)
+ err := _TaikoL1.contract.Call(opts, &out, "getMinTier", rand)
if err != nil {
- return *new([32]byte), err
+ return *new(uint16), err
}
- out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+ out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16)
return out0, err
}
-// GetCrossChainBlockHash is a free data retrieval call binding the contract method 0xbdd6bc36.
+// GetMinTier is a free data retrieval call binding the contract method 0x59ab4e23.
//
-// Solidity: function getCrossChainBlockHash(uint64 blockId) view returns(bytes32)
-func (_TaikoL1 *TaikoL1Session) GetCrossChainBlockHash(blockId uint64) ([32]byte, error) {
- return _TaikoL1.Contract.GetCrossChainBlockHash(&_TaikoL1.CallOpts, blockId)
+// Solidity: function getMinTier(uint256 rand) view returns(uint16)
+func (_TaikoL1 *TaikoL1Session) GetMinTier(rand *big.Int) (uint16, error) {
+ return _TaikoL1.Contract.GetMinTier(&_TaikoL1.CallOpts, rand)
}
-// GetCrossChainBlockHash is a free data retrieval call binding the contract method 0xbdd6bc36.
+// GetMinTier is a free data retrieval call binding the contract method 0x59ab4e23.
//
-// Solidity: function getCrossChainBlockHash(uint64 blockId) view returns(bytes32)
-func (_TaikoL1 *TaikoL1CallerSession) GetCrossChainBlockHash(blockId uint64) ([32]byte, error) {
- return _TaikoL1.Contract.GetCrossChainBlockHash(&_TaikoL1.CallOpts, blockId)
+// Solidity: function getMinTier(uint256 rand) view returns(uint16)
+func (_TaikoL1 *TaikoL1CallerSession) GetMinTier(rand *big.Int) (uint16, error) {
+ return _TaikoL1.Contract.GetMinTier(&_TaikoL1.CallOpts, rand)
}
-// GetCrossChainSignalRoot is a free data retrieval call binding the contract method 0x0599d294.
+// GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5.
//
-// Solidity: function getCrossChainSignalRoot(uint64 blockId) view returns(bytes32)
-func (_TaikoL1 *TaikoL1Caller) GetCrossChainSignalRoot(opts *bind.CallOpts, blockId uint64) ([32]byte, error) {
+// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64) a, (uint64,uint64,bool) b)
+func (_TaikoL1 *TaikoL1Caller) GetStateVariables(opts *bind.CallOpts) (struct {
+ A TaikoDataSlotA
+ B TaikoDataSlotB
+}, error) {
var out []interface{}
- err := _TaikoL1.contract.Call(opts, &out, "getCrossChainSignalRoot", blockId)
+ err := _TaikoL1.contract.Call(opts, &out, "getStateVariables")
+ outstruct := new(struct {
+ A TaikoDataSlotA
+ B TaikoDataSlotB
+ })
if err != nil {
- return *new([32]byte), err
+ return *outstruct, err
}
- out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+ outstruct.A = *abi.ConvertType(out[0], new(TaikoDataSlotA)).(*TaikoDataSlotA)
+ outstruct.B = *abi.ConvertType(out[1], new(TaikoDataSlotB)).(*TaikoDataSlotB)
+
+ return *outstruct, err
+
+}
+
+// GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5.
+//
+// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64) a, (uint64,uint64,bool) b)
+func (_TaikoL1 *TaikoL1Session) GetStateVariables() (struct {
+ A TaikoDataSlotA
+ B TaikoDataSlotB
+}, error) {
+ return _TaikoL1.Contract.GetStateVariables(&_TaikoL1.CallOpts)
+}
+
+// GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5.
+//
+// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64) a, (uint64,uint64,bool) b)
+func (_TaikoL1 *TaikoL1CallerSession) GetStateVariables() (struct {
+ A TaikoDataSlotA
+ B TaikoDataSlotB
+}, error) {
+ return _TaikoL1.Contract.GetStateVariables(&_TaikoL1.CallOpts)
+}
+
+// GetSyncedSnippet is a free data retrieval call binding the contract method 0x8cfb0459.
+//
+// Solidity: function getSyncedSnippet(uint64 blockId) view returns((uint64,uint64,bytes32,bytes32))
+func (_TaikoL1 *TaikoL1Caller) GetSyncedSnippet(opts *bind.CallOpts, blockId uint64) (ICrossChainSyncSnippet, error) {
+ var out []interface{}
+ err := _TaikoL1.contract.Call(opts, &out, "getSyncedSnippet", blockId)
+
+ if err != nil {
+ return *new(ICrossChainSyncSnippet), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(ICrossChainSyncSnippet)).(*ICrossChainSyncSnippet)
return out0, err
}
-// GetCrossChainSignalRoot is a free data retrieval call binding the contract method 0x0599d294.
+// GetSyncedSnippet is a free data retrieval call binding the contract method 0x8cfb0459.
//
-// Solidity: function getCrossChainSignalRoot(uint64 blockId) view returns(bytes32)
-func (_TaikoL1 *TaikoL1Session) GetCrossChainSignalRoot(blockId uint64) ([32]byte, error) {
- return _TaikoL1.Contract.GetCrossChainSignalRoot(&_TaikoL1.CallOpts, blockId)
+// Solidity: function getSyncedSnippet(uint64 blockId) view returns((uint64,uint64,bytes32,bytes32))
+func (_TaikoL1 *TaikoL1Session) GetSyncedSnippet(blockId uint64) (ICrossChainSyncSnippet, error) {
+ return _TaikoL1.Contract.GetSyncedSnippet(&_TaikoL1.CallOpts, blockId)
}
-// GetCrossChainSignalRoot is a free data retrieval call binding the contract method 0x0599d294.
+// GetSyncedSnippet is a free data retrieval call binding the contract method 0x8cfb0459.
//
-// Solidity: function getCrossChainSignalRoot(uint64 blockId) view returns(bytes32)
-func (_TaikoL1 *TaikoL1CallerSession) GetCrossChainSignalRoot(blockId uint64) ([32]byte, error) {
- return _TaikoL1.Contract.GetCrossChainSignalRoot(&_TaikoL1.CallOpts, blockId)
+// Solidity: function getSyncedSnippet(uint64 blockId) view returns((uint64,uint64,bytes32,bytes32))
+func (_TaikoL1 *TaikoL1CallerSession) GetSyncedSnippet(blockId uint64) (ICrossChainSyncSnippet, error) {
+ return _TaikoL1.Contract.GetSyncedSnippet(&_TaikoL1.CallOpts, blockId)
}
-// GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5.
+// GetTier is a free data retrieval call binding the contract method 0x576c3de7.
//
-// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64,uint64,uint64))
-func (_TaikoL1 *TaikoL1Caller) GetStateVariables(opts *bind.CallOpts) (TaikoDataStateVariables, error) {
+// Solidity: function getTier(uint16 tierId) view returns((bytes32,uint96,uint96,uint24,uint16,uint8))
+func (_TaikoL1 *TaikoL1Caller) GetTier(opts *bind.CallOpts, tierId uint16) (ITierProviderTier, error) {
var out []interface{}
- err := _TaikoL1.contract.Call(opts, &out, "getStateVariables")
+ err := _TaikoL1.contract.Call(opts, &out, "getTier", tierId)
if err != nil {
- return *new(TaikoDataStateVariables), err
+ return *new(ITierProviderTier), err
}
- out0 := *abi.ConvertType(out[0], new(TaikoDataStateVariables)).(*TaikoDataStateVariables)
+ out0 := *abi.ConvertType(out[0], new(ITierProviderTier)).(*ITierProviderTier)
return out0, err
}
-// GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5.
+// GetTier is a free data retrieval call binding the contract method 0x576c3de7.
//
-// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64,uint64,uint64))
-func (_TaikoL1 *TaikoL1Session) GetStateVariables() (TaikoDataStateVariables, error) {
- return _TaikoL1.Contract.GetStateVariables(&_TaikoL1.CallOpts)
+// Solidity: function getTier(uint16 tierId) view returns((bytes32,uint96,uint96,uint24,uint16,uint8))
+func (_TaikoL1 *TaikoL1Session) GetTier(tierId uint16) (ITierProviderTier, error) {
+ return _TaikoL1.Contract.GetTier(&_TaikoL1.CallOpts, tierId)
}
-// GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5.
+// GetTier is a free data retrieval call binding the contract method 0x576c3de7.
//
-// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64,uint64,uint64))
-func (_TaikoL1 *TaikoL1CallerSession) GetStateVariables() (TaikoDataStateVariables, error) {
- return _TaikoL1.Contract.GetStateVariables(&_TaikoL1.CallOpts)
+// Solidity: function getTier(uint16 tierId) view returns((bytes32,uint96,uint96,uint24,uint16,uint8))
+func (_TaikoL1 *TaikoL1CallerSession) GetTier(tierId uint16) (ITierProviderTier, error) {
+ return _TaikoL1.Contract.GetTier(&_TaikoL1.CallOpts, tierId)
}
-// GetTaikoTokenBalance is a free data retrieval call binding the contract method 0x8dff9cea.
+// GetTierIds is a free data retrieval call binding the contract method 0xd8cde1c6.
//
-// Solidity: function getTaikoTokenBalance(address addr) view returns(uint256)
-func (_TaikoL1 *TaikoL1Caller) GetTaikoTokenBalance(opts *bind.CallOpts, addr common.Address) (*big.Int, error) {
+// Solidity: function getTierIds() view returns(uint16[] ids)
+func (_TaikoL1 *TaikoL1Caller) GetTierIds(opts *bind.CallOpts) ([]uint16, error) {
var out []interface{}
- err := _TaikoL1.contract.Call(opts, &out, "getTaikoTokenBalance", addr)
+ err := _TaikoL1.contract.Call(opts, &out, "getTierIds")
if err != nil {
- return *new(*big.Int), err
+ return *new([]uint16), err
}
- out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+ out0 := *abi.ConvertType(out[0], new([]uint16)).(*[]uint16)
return out0, err
}
-// GetTaikoTokenBalance is a free data retrieval call binding the contract method 0x8dff9cea.
+// GetTierIds is a free data retrieval call binding the contract method 0xd8cde1c6.
//
-// Solidity: function getTaikoTokenBalance(address addr) view returns(uint256)
-func (_TaikoL1 *TaikoL1Session) GetTaikoTokenBalance(addr common.Address) (*big.Int, error) {
- return _TaikoL1.Contract.GetTaikoTokenBalance(&_TaikoL1.CallOpts, addr)
+// Solidity: function getTierIds() view returns(uint16[] ids)
+func (_TaikoL1 *TaikoL1Session) GetTierIds() ([]uint16, error) {
+ return _TaikoL1.Contract.GetTierIds(&_TaikoL1.CallOpts)
}
-// GetTaikoTokenBalance is a free data retrieval call binding the contract method 0x8dff9cea.
+// GetTierIds is a free data retrieval call binding the contract method 0xd8cde1c6.
//
-// Solidity: function getTaikoTokenBalance(address addr) view returns(uint256)
-func (_TaikoL1 *TaikoL1CallerSession) GetTaikoTokenBalance(addr common.Address) (*big.Int, error) {
- return _TaikoL1.Contract.GetTaikoTokenBalance(&_TaikoL1.CallOpts, addr)
+// Solidity: function getTierIds() view returns(uint16[] ids)
+func (_TaikoL1 *TaikoL1CallerSession) GetTierIds() ([]uint16, error) {
+ return _TaikoL1.Contract.GetTierIds(&_TaikoL1.CallOpts)
}
// GetTransition is a free data retrieval call binding the contract method 0xfd257e29.
//
-// Solidity: function getTransition(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint64,bytes32[6]))
-func (_TaikoL1 *TaikoL1Caller) GetTransition(opts *bind.CallOpts, blockId uint64, parentHash [32]byte) (TaikoDataTransition, error) {
+// Solidity: function getTransition(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint96,address,uint96,uint64,uint16,uint8,bytes32[4]))
+func (_TaikoL1 *TaikoL1Caller) GetTransition(opts *bind.CallOpts, blockId uint64, parentHash [32]byte) (TaikoDataTransitionState, error) {
var out []interface{}
err := _TaikoL1.contract.Call(opts, &out, "getTransition", blockId, parentHash)
if err != nil {
- return *new(TaikoDataTransition), err
+ return *new(TaikoDataTransitionState), err
}
- out0 := *abi.ConvertType(out[0], new(TaikoDataTransition)).(*TaikoDataTransition)
+ out0 := *abi.ConvertType(out[0], new(TaikoDataTransitionState)).(*TaikoDataTransitionState)
return out0, err
@@ -544,47 +607,78 @@ func (_TaikoL1 *TaikoL1Caller) GetTransition(opts *bind.CallOpts, blockId uint64
// GetTransition is a free data retrieval call binding the contract method 0xfd257e29.
//
-// Solidity: function getTransition(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint64,bytes32[6]))
-func (_TaikoL1 *TaikoL1Session) GetTransition(blockId uint64, parentHash [32]byte) (TaikoDataTransition, error) {
+// Solidity: function getTransition(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint96,address,uint96,uint64,uint16,uint8,bytes32[4]))
+func (_TaikoL1 *TaikoL1Session) GetTransition(blockId uint64, parentHash [32]byte) (TaikoDataTransitionState, error) {
return _TaikoL1.Contract.GetTransition(&_TaikoL1.CallOpts, blockId, parentHash)
}
// GetTransition is a free data retrieval call binding the contract method 0xfd257e29.
//
-// Solidity: function getTransition(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint64,bytes32[6]))
-func (_TaikoL1 *TaikoL1CallerSession) GetTransition(blockId uint64, parentHash [32]byte) (TaikoDataTransition, error) {
+// Solidity: function getTransition(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint96,address,uint96,uint64,uint16,uint8,bytes32[4]))
+func (_TaikoL1 *TaikoL1CallerSession) GetTransition(blockId uint64, parentHash [32]byte) (TaikoDataTransitionState, error) {
return _TaikoL1.Contract.GetTransition(&_TaikoL1.CallOpts, blockId, parentHash)
}
-// GetVerifierName is a free data retrieval call binding the contract method 0x0372303d.
+// IsBlobReusable is a free data retrieval call binding the contract method 0xb67d7638.
//
-// Solidity: function getVerifierName(uint16 id) pure returns(bytes32)
-func (_TaikoL1 *TaikoL1Caller) GetVerifierName(opts *bind.CallOpts, id uint16) ([32]byte, error) {
+// Solidity: function isBlobReusable(bytes32 blobHash) view returns(bool)
+func (_TaikoL1 *TaikoL1Caller) IsBlobReusable(opts *bind.CallOpts, blobHash [32]byte) (bool, error) {
var out []interface{}
- err := _TaikoL1.contract.Call(opts, &out, "getVerifierName", id)
+ err := _TaikoL1.contract.Call(opts, &out, "isBlobReusable", blobHash)
if err != nil {
- return *new([32]byte), err
+ return *new(bool), err
}
- out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// IsBlobReusable is a free data retrieval call binding the contract method 0xb67d7638.
+//
+// Solidity: function isBlobReusable(bytes32 blobHash) view returns(bool)
+func (_TaikoL1 *TaikoL1Session) IsBlobReusable(blobHash [32]byte) (bool, error) {
+ return _TaikoL1.Contract.IsBlobReusable(&_TaikoL1.CallOpts, blobHash)
+}
+
+// IsBlobReusable is a free data retrieval call binding the contract method 0xb67d7638.
+//
+// Solidity: function isBlobReusable(bytes32 blobHash) view returns(bool)
+func (_TaikoL1 *TaikoL1CallerSession) IsBlobReusable(blobHash [32]byte) (bool, error) {
+ return _TaikoL1.Contract.IsBlobReusable(&_TaikoL1.CallOpts, blobHash)
+}
+
+// IsConfigValid is a free data retrieval call binding the contract method 0xe3f1bdc5.
+//
+// Solidity: function isConfigValid() view returns(bool)
+func (_TaikoL1 *TaikoL1Caller) IsConfigValid(opts *bind.CallOpts) (bool, error) {
+ var out []interface{}
+ err := _TaikoL1.contract.Call(opts, &out, "isConfigValid")
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
-// GetVerifierName is a free data retrieval call binding the contract method 0x0372303d.
+// IsConfigValid is a free data retrieval call binding the contract method 0xe3f1bdc5.
//
-// Solidity: function getVerifierName(uint16 id) pure returns(bytes32)
-func (_TaikoL1 *TaikoL1Session) GetVerifierName(id uint16) ([32]byte, error) {
- return _TaikoL1.Contract.GetVerifierName(&_TaikoL1.CallOpts, id)
+// Solidity: function isConfigValid() view returns(bool)
+func (_TaikoL1 *TaikoL1Session) IsConfigValid() (bool, error) {
+ return _TaikoL1.Contract.IsConfigValid(&_TaikoL1.CallOpts)
}
-// GetVerifierName is a free data retrieval call binding the contract method 0x0372303d.
+// IsConfigValid is a free data retrieval call binding the contract method 0xe3f1bdc5.
//
-// Solidity: function getVerifierName(uint16 id) pure returns(bytes32)
-func (_TaikoL1 *TaikoL1CallerSession) GetVerifierName(id uint16) ([32]byte, error) {
- return _TaikoL1.Contract.GetVerifierName(&_TaikoL1.CallOpts, id)
+// Solidity: function isConfigValid() view returns(bool)
+func (_TaikoL1 *TaikoL1CallerSession) IsConfigValid() (bool, error) {
+ return _TaikoL1.Contract.IsConfigValid(&_TaikoL1.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
@@ -618,10 +712,72 @@ func (_TaikoL1 *TaikoL1CallerSession) Owner() (common.Address, error) {
return _TaikoL1.Contract.Owner(&_TaikoL1.CallOpts)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_TaikoL1 *TaikoL1Caller) Paused(opts *bind.CallOpts) (bool, error) {
+ var out []interface{}
+ err := _TaikoL1.contract.Call(opts, &out, "paused")
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_TaikoL1 *TaikoL1Session) Paused() (bool, error) {
+ return _TaikoL1.Contract.Paused(&_TaikoL1.CallOpts)
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_TaikoL1 *TaikoL1CallerSession) Paused() (bool, error) {
+ return _TaikoL1.Contract.Paused(&_TaikoL1.CallOpts)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_TaikoL1 *TaikoL1Caller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_TaikoL1 *TaikoL1Caller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) {
+ var out []interface{}
+ err := _TaikoL1.contract.Call(opts, &out, "proxiableUUID")
+
+ if err != nil {
+ return *new([32]byte), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+
+ return out0, err
+
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_TaikoL1 *TaikoL1Session) ProxiableUUID() ([32]byte, error) {
+ return _TaikoL1.Contract.ProxiableUUID(&_TaikoL1.CallOpts)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_TaikoL1 *TaikoL1CallerSession) ProxiableUUID() ([32]byte, error) {
+ return _TaikoL1.Contract.ProxiableUUID(&_TaikoL1.CallOpts)
+}
+
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
+//
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_TaikoL1 *TaikoL1Caller) Resolve(opts *bind.CallOpts, chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
var out []interface{}
err := _TaikoL1.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress)
@@ -635,17 +791,17 @@ func (_TaikoL1 *TaikoL1Caller) Resolve(opts *bind.CallOpts, chainId *big.Int, na
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_TaikoL1 *TaikoL1Session) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_TaikoL1 *TaikoL1Session) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _TaikoL1.Contract.Resolve(&_TaikoL1.CallOpts, chainId, name, allowZeroAddress)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_TaikoL1 *TaikoL1CallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_TaikoL1 *TaikoL1CallerSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _TaikoL1.Contract.Resolve(&_TaikoL1.CallOpts, chainId, name, allowZeroAddress)
}
@@ -682,7 +838,7 @@ func (_TaikoL1 *TaikoL1CallerSession) Resolve0(name [32]byte, allowZeroAddress b
// State is a free data retrieval call binding the contract method 0xc19d93fb.
//
-// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,uint64,uint64) slotB)
+// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,bool) slotB)
func (_TaikoL1 *TaikoL1Caller) State(opts *bind.CallOpts) (struct {
SlotA TaikoDataSlotA
SlotB TaikoDataSlotB
@@ -707,7 +863,7 @@ func (_TaikoL1 *TaikoL1Caller) State(opts *bind.CallOpts) (struct {
// State is a free data retrieval call binding the contract method 0xc19d93fb.
//
-// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,uint64,uint64) slotB)
+// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,bool) slotB)
func (_TaikoL1 *TaikoL1Session) State() (struct {
SlotA TaikoDataSlotA
SlotB TaikoDataSlotB
@@ -717,7 +873,7 @@ func (_TaikoL1 *TaikoL1Session) State() (struct {
// State is a free data retrieval call binding the contract method 0xc19d93fb.
//
-// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,uint64,uint64) slotB)
+// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,bool) slotB)
func (_TaikoL1 *TaikoL1CallerSession) State() (struct {
SlotA TaikoDataSlotA
SlotB TaikoDataSlotB
@@ -746,27 +902,6 @@ func (_TaikoL1 *TaikoL1TransactorSession) DepositEtherToL2(recipient common.Addr
return _TaikoL1.Contract.DepositEtherToL2(&_TaikoL1.TransactOpts, recipient)
}
-// DepositTaikoToken is a paid mutator transaction binding the contract method 0x98f39aba.
-//
-// Solidity: function depositTaikoToken(uint256 amount) returns()
-func (_TaikoL1 *TaikoL1Transactor) DepositTaikoToken(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) {
- return _TaikoL1.contract.Transact(opts, "depositTaikoToken", amount)
-}
-
-// DepositTaikoToken is a paid mutator transaction binding the contract method 0x98f39aba.
-//
-// Solidity: function depositTaikoToken(uint256 amount) returns()
-func (_TaikoL1 *TaikoL1Session) DepositTaikoToken(amount *big.Int) (*types.Transaction, error) {
- return _TaikoL1.Contract.DepositTaikoToken(&_TaikoL1.TransactOpts, amount)
-}
-
-// DepositTaikoToken is a paid mutator transaction binding the contract method 0x98f39aba.
-//
-// Solidity: function depositTaikoToken(uint256 amount) returns()
-func (_TaikoL1 *TaikoL1TransactorSession) DepositTaikoToken(amount *big.Int) (*types.Transaction, error) {
- return _TaikoL1.Contract.DepositTaikoToken(&_TaikoL1.TransactOpts, amount)
-}
-
// Init is a paid mutator transaction binding the contract method 0x2cc0b254.
//
// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash) returns()
@@ -788,25 +923,67 @@ func (_TaikoL1 *TaikoL1TransactorSession) Init(_addressManager common.Address, _
return _TaikoL1.Contract.Init(&_TaikoL1.TransactOpts, _addressManager, _genesisBlockHash)
}
-// ProposeBlock is a paid mutator transaction binding the contract method 0xb6d5a397.
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_TaikoL1 *TaikoL1Transactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "pause")
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_TaikoL1 *TaikoL1Session) Pause() (*types.Transaction, error) {
+ return _TaikoL1.Contract.Pause(&_TaikoL1.TransactOpts)
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_TaikoL1 *TaikoL1TransactorSession) Pause() (*types.Transaction, error) {
+ return _TaikoL1.Contract.Pause(&_TaikoL1.TransactOpts)
+}
+
+// PauseProving is a paid mutator transaction binding the contract method 0xff00c391.
+//
+// Solidity: function pauseProving(bool pause) returns()
+func (_TaikoL1 *TaikoL1Transactor) PauseProving(opts *bind.TransactOpts, pause bool) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "pauseProving", pause)
+}
+
+// PauseProving is a paid mutator transaction binding the contract method 0xff00c391.
//
-// Solidity: function proposeBlock(bytes input, bytes assignment, bytes txList) payable returns((uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Transactor) ProposeBlock(opts *bind.TransactOpts, input []byte, assignment []byte, txList []byte) (*types.Transaction, error) {
- return _TaikoL1.contract.Transact(opts, "proposeBlock", input, assignment, txList)
+// Solidity: function pauseProving(bool pause) returns()
+func (_TaikoL1 *TaikoL1Session) PauseProving(pause bool) (*types.Transaction, error) {
+ return _TaikoL1.Contract.PauseProving(&_TaikoL1.TransactOpts, pause)
}
-// ProposeBlock is a paid mutator transaction binding the contract method 0xb6d5a397.
+// PauseProving is a paid mutator transaction binding the contract method 0xff00c391.
//
-// Solidity: function proposeBlock(bytes input, bytes assignment, bytes txList) payable returns((uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Session) ProposeBlock(input []byte, assignment []byte, txList []byte) (*types.Transaction, error) {
- return _TaikoL1.Contract.ProposeBlock(&_TaikoL1.TransactOpts, input, assignment, txList)
+// Solidity: function pauseProving(bool pause) returns()
+func (_TaikoL1 *TaikoL1TransactorSession) PauseProving(pause bool) (*types.Transaction, error) {
+ return _TaikoL1.Contract.PauseProving(&_TaikoL1.TransactOpts, pause)
}
-// ProposeBlock is a paid mutator transaction binding the contract method 0xb6d5a397.
+// ProposeBlock is a paid mutator transaction binding the contract method 0xef16e845.
//
-// Solidity: function proposeBlock(bytes input, bytes assignment, bytes txList) payable returns((uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1TransactorSession) ProposeBlock(input []byte, assignment []byte, txList []byte) (*types.Transaction, error) {
- return _TaikoL1.Contract.ProposeBlock(&_TaikoL1.TransactOpts, input, assignment, txList)
+// Solidity: function proposeBlock(bytes params, bytes txList) payable returns((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint96,uint64)[] depositsProcessed)
+func (_TaikoL1 *TaikoL1Transactor) ProposeBlock(opts *bind.TransactOpts, params []byte, txList []byte) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "proposeBlock", params, txList)
+}
+
+// ProposeBlock is a paid mutator transaction binding the contract method 0xef16e845.
+//
+// Solidity: function proposeBlock(bytes params, bytes txList) payable returns((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint96,uint64)[] depositsProcessed)
+func (_TaikoL1 *TaikoL1Session) ProposeBlock(params []byte, txList []byte) (*types.Transaction, error) {
+ return _TaikoL1.Contract.ProposeBlock(&_TaikoL1.TransactOpts, params, txList)
+}
+
+// ProposeBlock is a paid mutator transaction binding the contract method 0xef16e845.
+//
+// Solidity: function proposeBlock(bytes params, bytes txList) payable returns((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint96,uint64)[] depositsProcessed)
+func (_TaikoL1 *TaikoL1TransactorSession) ProposeBlock(params []byte, txList []byte) (*types.Transaction, error) {
+ return _TaikoL1.Contract.ProposeBlock(&_TaikoL1.TransactOpts, params, txList)
}
// ProveBlock is a paid mutator transaction binding the contract method 0x10d008bd.
@@ -851,27 +1028,6 @@ func (_TaikoL1 *TaikoL1TransactorSession) RenounceOwnership() (*types.Transactio
return _TaikoL1.Contract.RenounceOwnership(&_TaikoL1.TransactOpts)
}
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_TaikoL1 *TaikoL1Transactor) SetAddressManager(opts *bind.TransactOpts, newAddressManager common.Address) (*types.Transaction, error) {
- return _TaikoL1.contract.Transact(opts, "setAddressManager", newAddressManager)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_TaikoL1 *TaikoL1Session) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _TaikoL1.Contract.SetAddressManager(&_TaikoL1.TransactOpts, newAddressManager)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_TaikoL1 *TaikoL1TransactorSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _TaikoL1.Contract.SetAddressManager(&_TaikoL1.TransactOpts, newAddressManager)
-}
-
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
@@ -893,46 +1049,88 @@ func (_TaikoL1 *TaikoL1TransactorSession) TransferOwnership(newOwner common.Addr
return _TaikoL1.Contract.TransferOwnership(&_TaikoL1.TransactOpts, newOwner)
}
-// VerifyBlocks is a paid mutator transaction binding the contract method 0x8778209d.
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
//
-// Solidity: function verifyBlocks(uint64 maxBlocks) returns()
-func (_TaikoL1 *TaikoL1Transactor) VerifyBlocks(opts *bind.TransactOpts, maxBlocks uint64) (*types.Transaction, error) {
- return _TaikoL1.contract.Transact(opts, "verifyBlocks", maxBlocks)
+// Solidity: function unpause() returns()
+func (_TaikoL1 *TaikoL1Transactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "unpause")
}
-// VerifyBlocks is a paid mutator transaction binding the contract method 0x8778209d.
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
//
-// Solidity: function verifyBlocks(uint64 maxBlocks) returns()
-func (_TaikoL1 *TaikoL1Session) VerifyBlocks(maxBlocks uint64) (*types.Transaction, error) {
- return _TaikoL1.Contract.VerifyBlocks(&_TaikoL1.TransactOpts, maxBlocks)
+// Solidity: function unpause() returns()
+func (_TaikoL1 *TaikoL1Session) Unpause() (*types.Transaction, error) {
+ return _TaikoL1.Contract.Unpause(&_TaikoL1.TransactOpts)
}
-// VerifyBlocks is a paid mutator transaction binding the contract method 0x8778209d.
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_TaikoL1 *TaikoL1TransactorSession) Unpause() (*types.Transaction, error) {
+ return _TaikoL1.Contract.Unpause(&_TaikoL1.TransactOpts)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_TaikoL1 *TaikoL1Transactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "upgradeTo", newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
//
-// Solidity: function verifyBlocks(uint64 maxBlocks) returns()
-func (_TaikoL1 *TaikoL1TransactorSession) VerifyBlocks(maxBlocks uint64) (*types.Transaction, error) {
- return _TaikoL1.Contract.VerifyBlocks(&_TaikoL1.TransactOpts, maxBlocks)
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_TaikoL1 *TaikoL1Session) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _TaikoL1.Contract.UpgradeTo(&_TaikoL1.TransactOpts, newImplementation)
}
-// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x5043f059.
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
//
-// Solidity: function withdrawTaikoToken(uint256 amount) returns()
-func (_TaikoL1 *TaikoL1Transactor) WithdrawTaikoToken(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) {
- return _TaikoL1.contract.Transact(opts, "withdrawTaikoToken", amount)
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_TaikoL1 *TaikoL1TransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _TaikoL1.Contract.UpgradeTo(&_TaikoL1.TransactOpts, newImplementation)
}
-// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x5043f059.
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
//
-// Solidity: function withdrawTaikoToken(uint256 amount) returns()
-func (_TaikoL1 *TaikoL1Session) WithdrawTaikoToken(amount *big.Int) (*types.Transaction, error) {
- return _TaikoL1.Contract.WithdrawTaikoToken(&_TaikoL1.TransactOpts, amount)
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_TaikoL1 *TaikoL1Transactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "upgradeToAndCall", newImplementation, data)
}
-// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x5043f059.
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
//
-// Solidity: function withdrawTaikoToken(uint256 amount) returns()
-func (_TaikoL1 *TaikoL1TransactorSession) WithdrawTaikoToken(amount *big.Int) (*types.Transaction, error) {
- return _TaikoL1.Contract.WithdrawTaikoToken(&_TaikoL1.TransactOpts, amount)
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_TaikoL1 *TaikoL1Session) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _TaikoL1.Contract.UpgradeToAndCall(&_TaikoL1.TransactOpts, newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_TaikoL1 *TaikoL1TransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _TaikoL1.Contract.UpgradeToAndCall(&_TaikoL1.TransactOpts, newImplementation, data)
+}
+
+// VerifyBlocks is a paid mutator transaction binding the contract method 0x8778209d.
+//
+// Solidity: function verifyBlocks(uint64 maxBlocksToVerify) returns()
+func (_TaikoL1 *TaikoL1Transactor) VerifyBlocks(opts *bind.TransactOpts, maxBlocksToVerify uint64) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "verifyBlocks", maxBlocksToVerify)
+}
+
+// VerifyBlocks is a paid mutator transaction binding the contract method 0x8778209d.
+//
+// Solidity: function verifyBlocks(uint64 maxBlocksToVerify) returns()
+func (_TaikoL1 *TaikoL1Session) VerifyBlocks(maxBlocksToVerify uint64) (*types.Transaction, error) {
+ return _TaikoL1.Contract.VerifyBlocks(&_TaikoL1.TransactOpts, maxBlocksToVerify)
+}
+
+// VerifyBlocks is a paid mutator transaction binding the contract method 0x8778209d.
+//
+// Solidity: function verifyBlocks(uint64 maxBlocksToVerify) returns()
+func (_TaikoL1 *TaikoL1TransactorSession) VerifyBlocks(maxBlocksToVerify uint64) (*types.Transaction, error) {
+ return _TaikoL1.Contract.VerifyBlocks(&_TaikoL1.TransactOpts, maxBlocksToVerify)
}
// Receive is a paid mutator transaction binding the contract receive function.
@@ -956,9 +1154,9 @@ func (_TaikoL1 *TaikoL1TransactorSession) Receive() (*types.Transaction, error)
return _TaikoL1.Contract.Receive(&_TaikoL1.TransactOpts)
}
-// TaikoL1AddressManagerChangedIterator is returned from FilterAddressManagerChanged and is used to iterate over the raw logs and unpacked data for AddressManagerChanged events raised by the TaikoL1 contract.
-type TaikoL1AddressManagerChangedIterator struct {
- Event *TaikoL1AddressManagerChanged // Event containing the contract specifics and raw log
+// TaikoL1AdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the TaikoL1 contract.
+type TaikoL1AdminChangedIterator struct {
+ Event *TaikoL1AdminChanged // 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
@@ -972,7 +1170,7 @@ type TaikoL1AddressManagerChangedIterator struct {
// 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 *TaikoL1AddressManagerChangedIterator) Next() bool {
+func (it *TaikoL1AdminChangedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -981,7 +1179,7 @@ func (it *TaikoL1AddressManagerChangedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1AddressManagerChanged)
+ it.Event = new(TaikoL1AdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -996,7 +1194,7 @@ func (it *TaikoL1AddressManagerChangedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1AddressManagerChanged)
+ it.Event = new(TaikoL1AdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1012,51 +1210,42 @@ func (it *TaikoL1AddressManagerChangedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1AddressManagerChangedIterator) Error() error {
+func (it *TaikoL1AdminChangedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1AddressManagerChangedIterator) Close() error {
+func (it *TaikoL1AdminChangedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1AddressManagerChanged represents a AddressManagerChanged event raised by the TaikoL1 contract.
-type TaikoL1AddressManagerChanged struct {
- AddressManager common.Address
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1AdminChanged represents a AdminChanged event raised by the TaikoL1 contract.
+type TaikoL1AdminChanged struct {
+ PreviousAdmin common.Address
+ NewAdmin common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterAddressManagerChanged is a free log retrieval operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_TaikoL1 *TaikoL1Filterer) FilterAddressManagerChanged(opts *bind.FilterOpts, addressManager []common.Address) (*TaikoL1AddressManagerChangedIterator, error) {
-
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
- }
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_TaikoL1 *TaikoL1Filterer) FilterAdminChanged(opts *bind.FilterOpts) (*TaikoL1AdminChangedIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "AdminChanged")
if err != nil {
return nil, err
}
- return &TaikoL1AddressManagerChangedIterator{contract: _TaikoL1.contract, event: "AddressManagerChanged", logs: logs, sub: sub}, nil
+ return &TaikoL1AdminChangedIterator{contract: _TaikoL1.contract, event: "AdminChanged", logs: logs, sub: sub}, nil
}
-// WatchAddressManagerChanged is a free log subscription operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_TaikoL1 *TaikoL1Filterer) WatchAddressManagerChanged(opts *bind.WatchOpts, sink chan<- *TaikoL1AddressManagerChanged, addressManager []common.Address) (event.Subscription, error) {
-
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
- }
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_TaikoL1 *TaikoL1Filterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *TaikoL1AdminChanged) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "AdminChanged")
if err != nil {
return nil, err
}
@@ -1066,8 +1255,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchAddressManagerChanged(opts *bind.WatchOpts
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1AddressManagerChanged)
- if err := _TaikoL1.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+ event := new(TaikoL1AdminChanged)
+ if err := _TaikoL1.contract.UnpackLog(event, "AdminChanged", log); err != nil {
return err
}
event.Raw = log
@@ -1088,21 +1277,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchAddressManagerChanged(opts *bind.WatchOpts
}), nil
}
-// ParseAddressManagerChanged is a log parse operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_TaikoL1 *TaikoL1Filterer) ParseAddressManagerChanged(log types.Log) (*TaikoL1AddressManagerChanged, error) {
- event := new(TaikoL1AddressManagerChanged)
- if err := _TaikoL1.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_TaikoL1 *TaikoL1Filterer) ParseAdminChanged(log types.Log) (*TaikoL1AdminChanged, error) {
+ event := new(TaikoL1AdminChanged)
+ if err := _TaikoL1.contract.UnpackLog(event, "AdminChanged", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BlockProposedIterator is returned from FilterBlockProposed and is used to iterate over the raw logs and unpacked data for BlockProposed events raised by the TaikoL1 contract.
-type TaikoL1BlockProposedIterator struct {
- Event *TaikoL1BlockProposed // Event containing the contract specifics and raw log
+// TaikoL1BeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the TaikoL1 contract.
+type TaikoL1BeaconUpgradedIterator struct {
+ Event *TaikoL1BeaconUpgraded // 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
@@ -1116,7 +1305,7 @@ type TaikoL1BlockProposedIterator struct {
// 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 *TaikoL1BlockProposedIterator) Next() bool {
+func (it *TaikoL1BeaconUpgradedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1125,7 +1314,7 @@ func (it *TaikoL1BlockProposedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProposed)
+ it.Event = new(TaikoL1BeaconUpgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1140,7 +1329,7 @@ func (it *TaikoL1BlockProposedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProposed)
+ it.Event = new(TaikoL1BeaconUpgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1156,62 +1345,51 @@ func (it *TaikoL1BlockProposedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BlockProposedIterator) Error() error {
+func (it *TaikoL1BeaconUpgradedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BlockProposedIterator) Close() error {
+func (it *TaikoL1BeaconUpgradedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BlockProposed represents a BlockProposed event raised by the TaikoL1 contract.
-type TaikoL1BlockProposed struct {
- BlockId *big.Int
- Prover common.Address
- Reward *big.Int
- Meta TaikoDataBlockMetadata
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1BeaconUpgraded represents a BeaconUpgraded event raised by the TaikoL1 contract.
+type TaikoL1BeaconUpgraded struct {
+ Beacon common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBlockProposed is a free log retrieval operation binding the contract event 0xe3713939242e9072c6fbb16f90e98d4b583d66b9fae9208ba2148aa8d6e82af6.
+// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event BlockProposed(uint256 indexed blockId, address indexed prover, uint256 reward, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Filterer) FilterBlockProposed(opts *bind.FilterOpts, blockId []*big.Int, prover []common.Address) (*TaikoL1BlockProposedIterator, error) {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_TaikoL1 *TaikoL1Filterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*TaikoL1BeaconUpgradedIterator, error) {
- var blockIdRule []interface{}
- for _, blockIdItem := range blockId {
- blockIdRule = append(blockIdRule, blockIdItem)
- }
- var proverRule []interface{}
- for _, proverItem := range prover {
- proverRule = append(proverRule, proverItem)
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
}
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProposed", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule)
if err != nil {
return nil, err
}
- return &TaikoL1BlockProposedIterator{contract: _TaikoL1.contract, event: "BlockProposed", logs: logs, sub: sub}, nil
+ return &TaikoL1BeaconUpgradedIterator{contract: _TaikoL1.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil
}
-// WatchBlockProposed is a free log subscription operation binding the contract event 0xe3713939242e9072c6fbb16f90e98d4b583d66b9fae9208ba2148aa8d6e82af6.
+// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event BlockProposed(uint256 indexed blockId, address indexed prover, uint256 reward, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProposed, blockId []*big.Int, prover []common.Address) (event.Subscription, error) {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_TaikoL1 *TaikoL1Filterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *TaikoL1BeaconUpgraded, beacon []common.Address) (event.Subscription, error) {
- var blockIdRule []interface{}
- for _, blockIdItem := range blockId {
- blockIdRule = append(blockIdRule, blockIdItem)
- }
- var proverRule []interface{}
- for _, proverItem := range prover {
- proverRule = append(proverRule, proverItem)
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
}
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProposed", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule)
if err != nil {
return nil, err
}
@@ -1221,8 +1399,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed(opts *bind.WatchOpts, sink c
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BlockProposed)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed", log); err != nil {
+ event := new(TaikoL1BeaconUpgraded)
+ if err := _TaikoL1.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
return err
}
event.Raw = log
@@ -1243,21 +1421,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed(opts *bind.WatchOpts, sink c
}), nil
}
-// ParseBlockProposed is a log parse operation binding the contract event 0xe3713939242e9072c6fbb16f90e98d4b583d66b9fae9208ba2148aa8d6e82af6.
+// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event BlockProposed(uint256 indexed blockId, address indexed prover, uint256 reward, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Filterer) ParseBlockProposed(log types.Log) (*TaikoL1BlockProposed, error) {
- event := new(TaikoL1BlockProposed)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed", log); err != nil {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_TaikoL1 *TaikoL1Filterer) ParseBeaconUpgraded(log types.Log) (*TaikoL1BeaconUpgraded, error) {
+ event := new(TaikoL1BeaconUpgraded)
+ if err := _TaikoL1.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BlockProposed0Iterator is returned from FilterBlockProposed0 and is used to iterate over the raw logs and unpacked data for BlockProposed0 events raised by the TaikoL1 contract.
-type TaikoL1BlockProposed0Iterator struct {
- Event *TaikoL1BlockProposed0 // Event containing the contract specifics and raw log
+// TaikoL1BlobCachedIterator is returned from FilterBlobCached and is used to iterate over the raw logs and unpacked data for BlobCached events raised by the TaikoL1 contract.
+type TaikoL1BlobCachedIterator struct {
+ Event *TaikoL1BlobCached // 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
@@ -1271,7 +1449,7 @@ type TaikoL1BlockProposed0Iterator struct {
// 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 *TaikoL1BlockProposed0Iterator) Next() bool {
+func (it *TaikoL1BlobCachedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1280,7 +1458,7 @@ func (it *TaikoL1BlockProposed0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProposed0)
+ it.Event = new(TaikoL1BlobCached)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1295,7 +1473,7 @@ func (it *TaikoL1BlockProposed0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProposed0)
+ it.Event = new(TaikoL1BlobCached)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1311,62 +1489,41 @@ func (it *TaikoL1BlockProposed0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BlockProposed0Iterator) Error() error {
+func (it *TaikoL1BlobCachedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BlockProposed0Iterator) Close() error {
+func (it *TaikoL1BlobCachedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BlockProposed0 represents a BlockProposed0 event raised by the TaikoL1 contract.
-type TaikoL1BlockProposed0 struct {
- BlockId *big.Int
- Prover common.Address
- Reward *big.Int
- Meta TaikoDataBlockMetadata
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1BlobCached represents a BlobCached event raised by the TaikoL1 contract.
+type TaikoL1BlobCached struct {
+ BlobHash [32]byte
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBlockProposed0 is a free log retrieval operation binding the contract event 0xe3713939242e9072c6fbb16f90e98d4b583d66b9fae9208ba2148aa8d6e82af6.
+// FilterBlobCached is a free log retrieval operation binding the contract event 0xb303828b7c63a3e480df6d8239eb7be1d4a1eb1c8878d6fa461103b94f4ce852.
//
-// Solidity: event BlockProposed(uint256 indexed blockId, address indexed prover, uint256 reward, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Filterer) FilterBlockProposed0(opts *bind.FilterOpts, blockId []*big.Int, prover []common.Address) (*TaikoL1BlockProposed0Iterator, error) {
-
- var blockIdRule []interface{}
- for _, blockIdItem := range blockId {
- blockIdRule = append(blockIdRule, blockIdItem)
- }
- var proverRule []interface{}
- for _, proverItem := range prover {
- proverRule = append(proverRule, proverItem)
- }
+// Solidity: event BlobCached(bytes32 blobHash)
+func (_TaikoL1 *TaikoL1Filterer) FilterBlobCached(opts *bind.FilterOpts) (*TaikoL1BlobCachedIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProposed0", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlobCached")
if err != nil {
return nil, err
}
- return &TaikoL1BlockProposed0Iterator{contract: _TaikoL1.contract, event: "BlockProposed0", logs: logs, sub: sub}, nil
+ return &TaikoL1BlobCachedIterator{contract: _TaikoL1.contract, event: "BlobCached", logs: logs, sub: sub}, nil
}
-// WatchBlockProposed0 is a free log subscription operation binding the contract event 0xe3713939242e9072c6fbb16f90e98d4b583d66b9fae9208ba2148aa8d6e82af6.
+// WatchBlobCached is a free log subscription operation binding the contract event 0xb303828b7c63a3e480df6d8239eb7be1d4a1eb1c8878d6fa461103b94f4ce852.
//
-// Solidity: event BlockProposed(uint256 indexed blockId, address indexed prover, uint256 reward, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed0(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProposed0, blockId []*big.Int, prover []common.Address) (event.Subscription, error) {
-
- var blockIdRule []interface{}
- for _, blockIdItem := range blockId {
- blockIdRule = append(blockIdRule, blockIdItem)
- }
- var proverRule []interface{}
- for _, proverItem := range prover {
- proverRule = append(proverRule, proverItem)
- }
+// Solidity: event BlobCached(bytes32 blobHash)
+func (_TaikoL1 *TaikoL1Filterer) WatchBlobCached(opts *bind.WatchOpts, sink chan<- *TaikoL1BlobCached) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProposed0", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlobCached")
if err != nil {
return nil, err
}
@@ -1376,8 +1533,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed0(opts *bind.WatchOpts, sink
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BlockProposed0)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed0", log); err != nil {
+ event := new(TaikoL1BlobCached)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlobCached", log); err != nil {
return err
}
event.Raw = log
@@ -1398,21 +1555,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed0(opts *bind.WatchOpts, sink
}), nil
}
-// ParseBlockProposed0 is a log parse operation binding the contract event 0xe3713939242e9072c6fbb16f90e98d4b583d66b9fae9208ba2148aa8d6e82af6.
+// ParseBlobCached is a log parse operation binding the contract event 0xb303828b7c63a3e480df6d8239eb7be1d4a1eb1c8878d6fa461103b94f4ce852.
//
-// Solidity: event BlockProposed(uint256 indexed blockId, address indexed prover, uint256 reward, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Filterer) ParseBlockProposed0(log types.Log) (*TaikoL1BlockProposed0, error) {
- event := new(TaikoL1BlockProposed0)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed0", log); err != nil {
+// Solidity: event BlobCached(bytes32 blobHash)
+func (_TaikoL1 *TaikoL1Filterer) ParseBlobCached(log types.Log) (*TaikoL1BlobCached, error) {
+ event := new(TaikoL1BlobCached)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlobCached", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BlockProvenIterator is returned from FilterBlockProven and is used to iterate over the raw logs and unpacked data for BlockProven events raised by the TaikoL1 contract.
-type TaikoL1BlockProvenIterator struct {
- Event *TaikoL1BlockProven // Event containing the contract specifics and raw log
+// TaikoL1BlockProposedIterator is returned from FilterBlockProposed and is used to iterate over the raw logs and unpacked data for BlockProposed events raised by the TaikoL1 contract.
+type TaikoL1BlockProposedIterator struct {
+ Event *TaikoL1BlockProposed // 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
@@ -1426,7 +1583,7 @@ type TaikoL1BlockProvenIterator struct {
// 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 *TaikoL1BlockProvenIterator) Next() bool {
+func (it *TaikoL1BlockProposedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1435,7 +1592,7 @@ func (it *TaikoL1BlockProvenIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProven)
+ it.Event = new(TaikoL1BlockProposed)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1450,7 +1607,7 @@ func (it *TaikoL1BlockProvenIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProven)
+ it.Event = new(TaikoL1BlockProposed)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1466,55 +1623,63 @@ func (it *TaikoL1BlockProvenIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BlockProvenIterator) Error() error {
+func (it *TaikoL1BlockProposedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BlockProvenIterator) Close() error {
+func (it *TaikoL1BlockProposedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BlockProven represents a BlockProven event raised by the TaikoL1 contract.
-type TaikoL1BlockProven struct {
- BlockId *big.Int
- ParentHash [32]byte
- BlockHash [32]byte
- SignalRoot [32]byte
- Prover common.Address
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1BlockProposed represents a BlockProposed event raised by the TaikoL1 contract.
+type TaikoL1BlockProposed struct {
+ BlockId *big.Int
+ AssignedProver common.Address
+ LivenessBond *big.Int
+ Meta TaikoDataBlockMetadata
+ DepositsProcessed []TaikoDataEthDeposit
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBlockProven is a free log retrieval operation binding the contract event 0xd93fde3ea1bb11dcd7a4e66320a05fc5aa63983b6447eff660084c4b1b1b499b.
+// FilterBlockProposed is a free log retrieval operation binding the contract event 0xa62cea5af360b010ef0d23472a2a7493b54175fd9fd2f9c2aa2bb427d2f4d3ca.
//
-// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover)
-func (_TaikoL1 *TaikoL1Filterer) FilterBlockProven(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1BlockProvenIterator, error) {
+// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint96,uint64)[] depositsProcessed)
+func (_TaikoL1 *TaikoL1Filterer) FilterBlockProposed(opts *bind.FilterOpts, blockId []*big.Int, assignedProver []common.Address) (*TaikoL1BlockProposedIterator, error) {
var blockIdRule []interface{}
for _, blockIdItem := range blockId {
blockIdRule = append(blockIdRule, blockIdItem)
}
+ var assignedProverRule []interface{}
+ for _, assignedProverItem := range assignedProver {
+ assignedProverRule = append(assignedProverRule, assignedProverItem)
+ }
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProven", blockIdRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProposed", blockIdRule, assignedProverRule)
if err != nil {
return nil, err
}
- return &TaikoL1BlockProvenIterator{contract: _TaikoL1.contract, event: "BlockProven", logs: logs, sub: sub}, nil
+ return &TaikoL1BlockProposedIterator{contract: _TaikoL1.contract, event: "BlockProposed", logs: logs, sub: sub}, nil
}
-// WatchBlockProven is a free log subscription operation binding the contract event 0xd93fde3ea1bb11dcd7a4e66320a05fc5aa63983b6447eff660084c4b1b1b499b.
+// WatchBlockProposed is a free log subscription operation binding the contract event 0xa62cea5af360b010ef0d23472a2a7493b54175fd9fd2f9c2aa2bb427d2f4d3ca.
//
-// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover)
-func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProven, blockId []*big.Int) (event.Subscription, error) {
+// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint96,uint64)[] depositsProcessed)
+func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProposed, blockId []*big.Int, assignedProver []common.Address) (event.Subscription, error) {
var blockIdRule []interface{}
for _, blockIdItem := range blockId {
blockIdRule = append(blockIdRule, blockIdItem)
}
+ var assignedProverRule []interface{}
+ for _, assignedProverItem := range assignedProver {
+ assignedProverRule = append(assignedProverRule, assignedProverItem)
+ }
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProven", blockIdRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProposed", blockIdRule, assignedProverRule)
if err != nil {
return nil, err
}
@@ -1524,8 +1689,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven(opts *bind.WatchOpts, sink cha
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BlockProven)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProven", log); err != nil {
+ event := new(TaikoL1BlockProposed)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed", log); err != nil {
return err
}
event.Raw = log
@@ -1546,21 +1711,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven(opts *bind.WatchOpts, sink cha
}), nil
}
-// ParseBlockProven is a log parse operation binding the contract event 0xd93fde3ea1bb11dcd7a4e66320a05fc5aa63983b6447eff660084c4b1b1b499b.
+// ParseBlockProposed is a log parse operation binding the contract event 0xa62cea5af360b010ef0d23472a2a7493b54175fd9fd2f9c2aa2bb427d2f4d3ca.
//
-// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover)
-func (_TaikoL1 *TaikoL1Filterer) ParseBlockProven(log types.Log) (*TaikoL1BlockProven, error) {
- event := new(TaikoL1BlockProven)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProven", log); err != nil {
+// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint96,uint64)[] depositsProcessed)
+func (_TaikoL1 *TaikoL1Filterer) ParseBlockProposed(log types.Log) (*TaikoL1BlockProposed, error) {
+ event := new(TaikoL1BlockProposed)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BlockProven0Iterator is returned from FilterBlockProven0 and is used to iterate over the raw logs and unpacked data for BlockProven0 events raised by the TaikoL1 contract.
-type TaikoL1BlockProven0Iterator struct {
- Event *TaikoL1BlockProven0 // Event containing the contract specifics and raw log
+// TaikoL1BlockVerifiedIterator is returned from FilterBlockVerified and is used to iterate over the raw logs and unpacked data for BlockVerified events raised by the TaikoL1 contract.
+type TaikoL1BlockVerifiedIterator struct {
+ Event *TaikoL1BlockVerified // 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
@@ -1574,7 +1739,7 @@ type TaikoL1BlockProven0Iterator struct {
// 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 *TaikoL1BlockProven0Iterator) Next() bool {
+func (it *TaikoL1BlockVerifiedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1583,7 +1748,7 @@ func (it *TaikoL1BlockProven0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProven0)
+ it.Event = new(TaikoL1BlockVerified)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1598,7 +1763,7 @@ func (it *TaikoL1BlockProven0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProven0)
+ it.Event = new(TaikoL1BlockVerified)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1614,55 +1779,73 @@ func (it *TaikoL1BlockProven0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BlockProven0Iterator) Error() error {
+func (it *TaikoL1BlockVerifiedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BlockProven0Iterator) Close() error {
+func (it *TaikoL1BlockVerifiedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BlockProven0 represents a BlockProven0 event raised by the TaikoL1 contract.
-type TaikoL1BlockProven0 struct {
- BlockId *big.Int
- ParentHash [32]byte
- BlockHash [32]byte
- SignalRoot [32]byte
- Prover common.Address
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1BlockVerified represents a BlockVerified event raised by the TaikoL1 contract.
+type TaikoL1BlockVerified struct {
+ BlockId *big.Int
+ AssignedProver common.Address
+ Prover common.Address
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ Tier uint16
+ Contestations uint8
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBlockProven0 is a free log retrieval operation binding the contract event 0xd93fde3ea1bb11dcd7a4e66320a05fc5aa63983b6447eff660084c4b1b1b499b.
+// FilterBlockVerified is a free log retrieval operation binding the contract event 0xaeba6e73abba9419294b1017075cf8dc2e7de6f2d7fd3b336b3ba882a2acfca5.
//
-// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover)
-func (_TaikoL1 *TaikoL1Filterer) FilterBlockProven0(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1BlockProven0Iterator, error) {
+// Solidity: event BlockVerified(uint256 indexed blockId, address indexed assignedProver, address indexed prover, bytes32 blockHash, bytes32 signalRoot, uint16 tier, uint8 contestations)
+func (_TaikoL1 *TaikoL1Filterer) FilterBlockVerified(opts *bind.FilterOpts, blockId []*big.Int, assignedProver []common.Address, prover []common.Address) (*TaikoL1BlockVerifiedIterator, error) {
var blockIdRule []interface{}
for _, blockIdItem := range blockId {
blockIdRule = append(blockIdRule, blockIdItem)
}
+ var assignedProverRule []interface{}
+ for _, assignedProverItem := range assignedProver {
+ assignedProverRule = append(assignedProverRule, assignedProverItem)
+ }
+ var proverRule []interface{}
+ for _, proverItem := range prover {
+ proverRule = append(proverRule, proverItem)
+ }
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProven0", blockIdRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockVerified", blockIdRule, assignedProverRule, proverRule)
if err != nil {
return nil, err
}
- return &TaikoL1BlockProven0Iterator{contract: _TaikoL1.contract, event: "BlockProven0", logs: logs, sub: sub}, nil
+ return &TaikoL1BlockVerifiedIterator{contract: _TaikoL1.contract, event: "BlockVerified", logs: logs, sub: sub}, nil
}
-// WatchBlockProven0 is a free log subscription operation binding the contract event 0xd93fde3ea1bb11dcd7a4e66320a05fc5aa63983b6447eff660084c4b1b1b499b.
+// WatchBlockVerified is a free log subscription operation binding the contract event 0xaeba6e73abba9419294b1017075cf8dc2e7de6f2d7fd3b336b3ba882a2acfca5.
//
-// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover)
-func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven0(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProven0, blockId []*big.Int) (event.Subscription, error) {
+// Solidity: event BlockVerified(uint256 indexed blockId, address indexed assignedProver, address indexed prover, bytes32 blockHash, bytes32 signalRoot, uint16 tier, uint8 contestations)
+func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockVerified, blockId []*big.Int, assignedProver []common.Address, prover []common.Address) (event.Subscription, error) {
var blockIdRule []interface{}
for _, blockIdItem := range blockId {
blockIdRule = append(blockIdRule, blockIdItem)
}
+ var assignedProverRule []interface{}
+ for _, assignedProverItem := range assignedProver {
+ assignedProverRule = append(assignedProverRule, assignedProverItem)
+ }
+ var proverRule []interface{}
+ for _, proverItem := range prover {
+ proverRule = append(proverRule, proverItem)
+ }
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProven0", blockIdRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockVerified", blockIdRule, assignedProverRule, proverRule)
if err != nil {
return nil, err
}
@@ -1672,8 +1855,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven0(opts *bind.WatchOpts, sink ch
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BlockProven0)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProven0", log); err != nil {
+ event := new(TaikoL1BlockVerified)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified", log); err != nil {
return err
}
event.Raw = log
@@ -1694,21 +1877,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven0(opts *bind.WatchOpts, sink ch
}), nil
}
-// ParseBlockProven0 is a log parse operation binding the contract event 0xd93fde3ea1bb11dcd7a4e66320a05fc5aa63983b6447eff660084c4b1b1b499b.
+// ParseBlockVerified is a log parse operation binding the contract event 0xaeba6e73abba9419294b1017075cf8dc2e7de6f2d7fd3b336b3ba882a2acfca5.
//
-// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover)
-func (_TaikoL1 *TaikoL1Filterer) ParseBlockProven0(log types.Log) (*TaikoL1BlockProven0, error) {
- event := new(TaikoL1BlockProven0)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProven0", log); err != nil {
+// Solidity: event BlockVerified(uint256 indexed blockId, address indexed assignedProver, address indexed prover, bytes32 blockHash, bytes32 signalRoot, uint16 tier, uint8 contestations)
+func (_TaikoL1 *TaikoL1Filterer) ParseBlockVerified(log types.Log) (*TaikoL1BlockVerified, error) {
+ event := new(TaikoL1BlockVerified)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BlockVerifiedIterator is returned from FilterBlockVerified and is used to iterate over the raw logs and unpacked data for BlockVerified events raised by the TaikoL1 contract.
-type TaikoL1BlockVerifiedIterator struct {
- Event *TaikoL1BlockVerified // Event containing the contract specifics and raw log
+// TaikoL1BlockVerified0Iterator is returned from FilterBlockVerified0 and is used to iterate over the raw logs and unpacked data for BlockVerified0 events raised by the TaikoL1 contract.
+type TaikoL1BlockVerified0Iterator struct {
+ Event *TaikoL1BlockVerified0 // 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
@@ -1722,7 +1905,7 @@ type TaikoL1BlockVerifiedIterator struct {
// 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 *TaikoL1BlockVerifiedIterator) Next() bool {
+func (it *TaikoL1BlockVerified0Iterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1731,7 +1914,7 @@ func (it *TaikoL1BlockVerifiedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockVerified)
+ it.Event = new(TaikoL1BlockVerified0)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1746,7 +1929,7 @@ func (it *TaikoL1BlockVerifiedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockVerified)
+ it.Event = new(TaikoL1BlockVerified0)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1762,61 +1945,73 @@ func (it *TaikoL1BlockVerifiedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BlockVerifiedIterator) Error() error {
+func (it *TaikoL1BlockVerified0Iterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BlockVerifiedIterator) Close() error {
+func (it *TaikoL1BlockVerified0Iterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BlockVerified represents a BlockVerified event raised by the TaikoL1 contract.
-type TaikoL1BlockVerified struct {
- BlockId *big.Int
- Prover common.Address
- BlockHash [32]byte
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1BlockVerified0 represents a BlockVerified0 event raised by the TaikoL1 contract.
+type TaikoL1BlockVerified0 struct {
+ BlockId *big.Int
+ AssignedProver common.Address
+ Prover common.Address
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ Tier uint16
+ Contestations uint8
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBlockVerified is a free log retrieval operation binding the contract event 0xb2fa36cea736414fca28c5aca50d94c59d740984c4c878c3dd8ba26791309b1a.
+// FilterBlockVerified0 is a free log retrieval operation binding the contract event 0xaeba6e73abba9419294b1017075cf8dc2e7de6f2d7fd3b336b3ba882a2acfca5.
//
-// Solidity: event BlockVerified(uint256 indexed blockId, address indexed prover, bytes32 blockHash)
-func (_TaikoL1 *TaikoL1Filterer) FilterBlockVerified(opts *bind.FilterOpts, blockId []*big.Int, prover []common.Address) (*TaikoL1BlockVerifiedIterator, error) {
+// Solidity: event BlockVerified(uint256 indexed blockId, address indexed assignedProver, address indexed prover, bytes32 blockHash, bytes32 signalRoot, uint16 tier, uint8 contestations)
+func (_TaikoL1 *TaikoL1Filterer) FilterBlockVerified0(opts *bind.FilterOpts, blockId []*big.Int, assignedProver []common.Address, prover []common.Address) (*TaikoL1BlockVerified0Iterator, error) {
var blockIdRule []interface{}
for _, blockIdItem := range blockId {
blockIdRule = append(blockIdRule, blockIdItem)
}
+ var assignedProverRule []interface{}
+ for _, assignedProverItem := range assignedProver {
+ assignedProverRule = append(assignedProverRule, assignedProverItem)
+ }
var proverRule []interface{}
for _, proverItem := range prover {
proverRule = append(proverRule, proverItem)
}
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockVerified", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockVerified0", blockIdRule, assignedProverRule, proverRule)
if err != nil {
return nil, err
}
- return &TaikoL1BlockVerifiedIterator{contract: _TaikoL1.contract, event: "BlockVerified", logs: logs, sub: sub}, nil
+ return &TaikoL1BlockVerified0Iterator{contract: _TaikoL1.contract, event: "BlockVerified0", logs: logs, sub: sub}, nil
}
-// WatchBlockVerified is a free log subscription operation binding the contract event 0xb2fa36cea736414fca28c5aca50d94c59d740984c4c878c3dd8ba26791309b1a.
+// WatchBlockVerified0 is a free log subscription operation binding the contract event 0xaeba6e73abba9419294b1017075cf8dc2e7de6f2d7fd3b336b3ba882a2acfca5.
//
-// Solidity: event BlockVerified(uint256 indexed blockId, address indexed prover, bytes32 blockHash)
-func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockVerified, blockId []*big.Int, prover []common.Address) (event.Subscription, error) {
+// Solidity: event BlockVerified(uint256 indexed blockId, address indexed assignedProver, address indexed prover, bytes32 blockHash, bytes32 signalRoot, uint16 tier, uint8 contestations)
+func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified0(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockVerified0, blockId []*big.Int, assignedProver []common.Address, prover []common.Address) (event.Subscription, error) {
var blockIdRule []interface{}
for _, blockIdItem := range blockId {
blockIdRule = append(blockIdRule, blockIdItem)
}
+ var assignedProverRule []interface{}
+ for _, assignedProverItem := range assignedProver {
+ assignedProverRule = append(assignedProverRule, assignedProverItem)
+ }
var proverRule []interface{}
for _, proverItem := range prover {
proverRule = append(proverRule, proverItem)
}
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockVerified", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockVerified0", blockIdRule, assignedProverRule, proverRule)
if err != nil {
return nil, err
}
@@ -1826,8 +2021,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified(opts *bind.WatchOpts, sink c
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BlockVerified)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified", log); err != nil {
+ event := new(TaikoL1BlockVerified0)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified0", log); err != nil {
return err
}
event.Raw = log
@@ -1848,21 +2043,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified(opts *bind.WatchOpts, sink c
}), nil
}
-// ParseBlockVerified is a log parse operation binding the contract event 0xb2fa36cea736414fca28c5aca50d94c59d740984c4c878c3dd8ba26791309b1a.
+// ParseBlockVerified0 is a log parse operation binding the contract event 0xaeba6e73abba9419294b1017075cf8dc2e7de6f2d7fd3b336b3ba882a2acfca5.
//
-// Solidity: event BlockVerified(uint256 indexed blockId, address indexed prover, bytes32 blockHash)
-func (_TaikoL1 *TaikoL1Filterer) ParseBlockVerified(log types.Log) (*TaikoL1BlockVerified, error) {
- event := new(TaikoL1BlockVerified)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified", log); err != nil {
+// Solidity: event BlockVerified(uint256 indexed blockId, address indexed assignedProver, address indexed prover, bytes32 blockHash, bytes32 signalRoot, uint16 tier, uint8 contestations)
+func (_TaikoL1 *TaikoL1Filterer) ParseBlockVerified0(log types.Log) (*TaikoL1BlockVerified0, error) {
+ event := new(TaikoL1BlockVerified0)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified0", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BlockVerified0Iterator is returned from FilterBlockVerified0 and is used to iterate over the raw logs and unpacked data for BlockVerified0 events raised by the TaikoL1 contract.
-type TaikoL1BlockVerified0Iterator struct {
- Event *TaikoL1BlockVerified0 // Event containing the contract specifics and raw log
+// TaikoL1CrossChainSyncedIterator is returned from FilterCrossChainSynced and is used to iterate over the raw logs and unpacked data for CrossChainSynced events raised by the TaikoL1 contract.
+type TaikoL1CrossChainSyncedIterator struct {
+ Event *TaikoL1CrossChainSynced // 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
@@ -1876,7 +2071,7 @@ type TaikoL1BlockVerified0Iterator struct {
// 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 *TaikoL1BlockVerified0Iterator) Next() bool {
+func (it *TaikoL1CrossChainSyncedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1885,7 +2080,7 @@ func (it *TaikoL1BlockVerified0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockVerified0)
+ it.Event = new(TaikoL1CrossChainSynced)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1900,7 +2095,7 @@ func (it *TaikoL1BlockVerified0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockVerified0)
+ it.Event = new(TaikoL1CrossChainSynced)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1916,61 +2111,217 @@ func (it *TaikoL1BlockVerified0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BlockVerified0Iterator) Error() error {
+func (it *TaikoL1CrossChainSyncedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BlockVerified0Iterator) Close() error {
+func (it *TaikoL1CrossChainSyncedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BlockVerified0 represents a BlockVerified0 event raised by the TaikoL1 contract.
-type TaikoL1BlockVerified0 struct {
- BlockId *big.Int
- Prover common.Address
- BlockHash [32]byte
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1CrossChainSynced represents a CrossChainSynced event raised by the TaikoL1 contract.
+type TaikoL1CrossChainSynced struct {
+ SyncedInBlock uint64
+ BlockId uint64
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBlockVerified0 is a free log retrieval operation binding the contract event 0xb2fa36cea736414fca28c5aca50d94c59d740984c4c878c3dd8ba26791309b1a.
+// FilterCrossChainSynced is a free log retrieval operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
//
-// Solidity: event BlockVerified(uint256 indexed blockId, address indexed prover, bytes32 blockHash)
-func (_TaikoL1 *TaikoL1Filterer) FilterBlockVerified0(opts *bind.FilterOpts, blockId []*big.Int, prover []common.Address) (*TaikoL1BlockVerified0Iterator, error) {
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL1 *TaikoL1Filterer) FilterCrossChainSynced(opts *bind.FilterOpts, syncedInBlock []uint64, blockId []uint64) (*TaikoL1CrossChainSyncedIterator, error) {
+ var syncedInBlockRule []interface{}
+ for _, syncedInBlockItem := range syncedInBlock {
+ syncedInBlockRule = append(syncedInBlockRule, syncedInBlockItem)
+ }
var blockIdRule []interface{}
for _, blockIdItem := range blockId {
blockIdRule = append(blockIdRule, blockIdItem)
}
- var proverRule []interface{}
- for _, proverItem := range prover {
- proverRule = append(proverRule, proverItem)
+
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "CrossChainSynced", syncedInBlockRule, blockIdRule)
+ if err != nil {
+ return nil, err
+ }
+ return &TaikoL1CrossChainSyncedIterator{contract: _TaikoL1.contract, event: "CrossChainSynced", logs: logs, sub: sub}, nil
+}
+
+// WatchCrossChainSynced is a free log subscription operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
+//
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sink chan<- *TaikoL1CrossChainSynced, syncedInBlock []uint64, blockId []uint64) (event.Subscription, error) {
+
+ var syncedInBlockRule []interface{}
+ for _, syncedInBlockItem := range syncedInBlock {
+ syncedInBlockRule = append(syncedInBlockRule, syncedInBlockItem)
+ }
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
}
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockVerified0", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "CrossChainSynced", syncedInBlockRule, blockIdRule)
if err != nil {
return nil, err
}
- return &TaikoL1BlockVerified0Iterator{contract: _TaikoL1.contract, event: "BlockVerified0", logs: logs, sub: sub}, nil
+ 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(TaikoL1CrossChainSynced)
+ if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced", 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
+}
+
+// ParseCrossChainSynced is a log parse operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
+//
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL1 *TaikoL1Filterer) ParseCrossChainSynced(log types.Log) (*TaikoL1CrossChainSynced, error) {
+ event := new(TaikoL1CrossChainSynced)
+ if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// TaikoL1CrossChainSynced0Iterator is returned from FilterCrossChainSynced0 and is used to iterate over the raw logs and unpacked data for CrossChainSynced0 events raised by the TaikoL1 contract.
+type TaikoL1CrossChainSynced0Iterator struct {
+ Event *TaikoL1CrossChainSynced0 // 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 *TaikoL1CrossChainSynced0Iterator) 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(TaikoL1CrossChainSynced0)
+ 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(TaikoL1CrossChainSynced0)
+ 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 *TaikoL1CrossChainSynced0Iterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *TaikoL1CrossChainSynced0Iterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// TaikoL1CrossChainSynced0 represents a CrossChainSynced0 event raised by the TaikoL1 contract.
+type TaikoL1CrossChainSynced0 struct {
+ SyncedInBlock uint64
+ BlockId uint64
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ Raw types.Log // Blockchain specific contextual infos
}
-// WatchBlockVerified0 is a free log subscription operation binding the contract event 0xb2fa36cea736414fca28c5aca50d94c59d740984c4c878c3dd8ba26791309b1a.
+// FilterCrossChainSynced0 is a free log retrieval operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
//
-// Solidity: event BlockVerified(uint256 indexed blockId, address indexed prover, bytes32 blockHash)
-func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified0(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockVerified0, blockId []*big.Int, prover []common.Address) (event.Subscription, error) {
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL1 *TaikoL1Filterer) FilterCrossChainSynced0(opts *bind.FilterOpts, syncedInBlock []uint64, blockId []uint64) (*TaikoL1CrossChainSynced0Iterator, error) {
+ var syncedInBlockRule []interface{}
+ for _, syncedInBlockItem := range syncedInBlock {
+ syncedInBlockRule = append(syncedInBlockRule, syncedInBlockItem)
+ }
var blockIdRule []interface{}
for _, blockIdItem := range blockId {
blockIdRule = append(blockIdRule, blockIdItem)
}
- var proverRule []interface{}
- for _, proverItem := range prover {
- proverRule = append(proverRule, proverItem)
+
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "CrossChainSynced0", syncedInBlockRule, blockIdRule)
+ if err != nil {
+ return nil, err
}
+ return &TaikoL1CrossChainSynced0Iterator{contract: _TaikoL1.contract, event: "CrossChainSynced0", logs: logs, sub: sub}, nil
+}
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockVerified0", blockIdRule, proverRule)
+// WatchCrossChainSynced0 is a free log subscription operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
+//
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced0(opts *bind.WatchOpts, sink chan<- *TaikoL1CrossChainSynced0, syncedInBlock []uint64, blockId []uint64) (event.Subscription, error) {
+
+ var syncedInBlockRule []interface{}
+ for _, syncedInBlockItem := range syncedInBlock {
+ syncedInBlockRule = append(syncedInBlockRule, syncedInBlockItem)
+ }
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "CrossChainSynced0", syncedInBlockRule, blockIdRule)
if err != nil {
return nil, err
}
@@ -1980,8 +2331,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified0(opts *bind.WatchOpts, sink
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BlockVerified0)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified0", log); err != nil {
+ event := new(TaikoL1CrossChainSynced0)
+ if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced0", log); err != nil {
return err
}
event.Raw = log
@@ -2002,21 +2353,155 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified0(opts *bind.WatchOpts, sink
}), nil
}
-// ParseBlockVerified0 is a log parse operation binding the contract event 0xb2fa36cea736414fca28c5aca50d94c59d740984c4c878c3dd8ba26791309b1a.
+// ParseCrossChainSynced0 is a log parse operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
//
-// Solidity: event BlockVerified(uint256 indexed blockId, address indexed prover, bytes32 blockHash)
-func (_TaikoL1 *TaikoL1Filterer) ParseBlockVerified0(log types.Log) (*TaikoL1BlockVerified0, error) {
- event := new(TaikoL1BlockVerified0)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified0", log); err != nil {
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL1 *TaikoL1Filterer) ParseCrossChainSynced0(log types.Log) (*TaikoL1CrossChainSynced0, error) {
+ event := new(TaikoL1CrossChainSynced0)
+ if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced0", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// TaikoL1EthDepositedIterator is returned from FilterEthDeposited and is used to iterate over the raw logs and unpacked data for EthDeposited events raised by the TaikoL1 contract.
+type TaikoL1EthDepositedIterator struct {
+ Event *TaikoL1EthDeposited // 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 *TaikoL1EthDepositedIterator) 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(TaikoL1EthDeposited)
+ 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(TaikoL1EthDeposited)
+ 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 *TaikoL1EthDepositedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *TaikoL1EthDepositedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// TaikoL1EthDeposited represents a EthDeposited event raised by the TaikoL1 contract.
+type TaikoL1EthDeposited struct {
+ Deposit TaikoDataEthDeposit
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterEthDeposited is a free log retrieval operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+//
+// Solidity: event EthDeposited((address,uint96,uint64) deposit)
+func (_TaikoL1 *TaikoL1Filterer) FilterEthDeposited(opts *bind.FilterOpts) (*TaikoL1EthDepositedIterator, error) {
+
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "EthDeposited")
+ if err != nil {
+ return nil, err
+ }
+ return &TaikoL1EthDepositedIterator{contract: _TaikoL1.contract, event: "EthDeposited", logs: logs, sub: sub}, nil
+}
+
+// WatchEthDeposited is a free log subscription operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+//
+// Solidity: event EthDeposited((address,uint96,uint64) deposit)
+func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited(opts *bind.WatchOpts, sink chan<- *TaikoL1EthDeposited) (event.Subscription, error) {
+
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "EthDeposited")
+ 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(TaikoL1EthDeposited)
+ if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited", 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
+}
+
+// ParseEthDeposited is a log parse operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+//
+// Solidity: event EthDeposited((address,uint96,uint64) deposit)
+func (_TaikoL1 *TaikoL1Filterer) ParseEthDeposited(log types.Log) (*TaikoL1EthDeposited, error) {
+ event := new(TaikoL1EthDeposited)
+ if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BondReceivedIterator is returned from FilterBondReceived and is used to iterate over the raw logs and unpacked data for BondReceived events raised by the TaikoL1 contract.
-type TaikoL1BondReceivedIterator struct {
- Event *TaikoL1BondReceived // Event containing the contract specifics and raw log
+// TaikoL1InitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TaikoL1 contract.
+type TaikoL1InitializedIterator struct {
+ Event *TaikoL1Initialized // 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
@@ -2030,7 +2515,7 @@ type TaikoL1BondReceivedIterator struct {
// 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 *TaikoL1BondReceivedIterator) Next() bool {
+func (it *TaikoL1InitializedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2039,7 +2524,7 @@ func (it *TaikoL1BondReceivedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BondReceived)
+ it.Event = new(TaikoL1Initialized)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2054,7 +2539,7 @@ func (it *TaikoL1BondReceivedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BondReceived)
+ it.Event = new(TaikoL1Initialized)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2070,53 +2555,41 @@ func (it *TaikoL1BondReceivedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BondReceivedIterator) Error() error {
+func (it *TaikoL1InitializedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BondReceivedIterator) Close() error {
+func (it *TaikoL1InitializedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BondReceived represents a BondReceived event raised by the TaikoL1 contract.
-type TaikoL1BondReceived struct {
- From common.Address
- BlockId uint64
- Bond *big.Int
+// TaikoL1Initialized represents a Initialized event raised by the TaikoL1 contract.
+type TaikoL1Initialized struct {
+ Version uint8
Raw types.Log // Blockchain specific contextual infos
}
-// FilterBondReceived is a free log retrieval operation binding the contract event 0xbb2d4a4c4a679d81940f242e401d2b2cc3383dbcb0ae798c14bd7905b1f6cae2.
+// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
//
-// Solidity: event BondReceived(address indexed from, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) FilterBondReceived(opts *bind.FilterOpts, from []common.Address) (*TaikoL1BondReceivedIterator, error) {
-
- var fromRule []interface{}
- for _, fromItem := range from {
- fromRule = append(fromRule, fromItem)
- }
+// Solidity: event Initialized(uint8 version)
+func (_TaikoL1 *TaikoL1Filterer) FilterInitialized(opts *bind.FilterOpts) (*TaikoL1InitializedIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BondReceived", fromRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "Initialized")
if err != nil {
return nil, err
}
- return &TaikoL1BondReceivedIterator{contract: _TaikoL1.contract, event: "BondReceived", logs: logs, sub: sub}, nil
+ return &TaikoL1InitializedIterator{contract: _TaikoL1.contract, event: "Initialized", logs: logs, sub: sub}, nil
}
-// WatchBondReceived is a free log subscription operation binding the contract event 0xbb2d4a4c4a679d81940f242e401d2b2cc3383dbcb0ae798c14bd7905b1f6cae2.
+// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
//
-// Solidity: event BondReceived(address indexed from, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) WatchBondReceived(opts *bind.WatchOpts, sink chan<- *TaikoL1BondReceived, from []common.Address) (event.Subscription, error) {
-
- var fromRule []interface{}
- for _, fromItem := range from {
- fromRule = append(fromRule, fromItem)
- }
+// Solidity: event Initialized(uint8 version)
+func (_TaikoL1 *TaikoL1Filterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *TaikoL1Initialized) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BondReceived", fromRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "Initialized")
if err != nil {
return nil, err
}
@@ -2126,8 +2599,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBondReceived(opts *bind.WatchOpts, sink ch
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BondReceived)
- if err := _TaikoL1.contract.UnpackLog(event, "BondReceived", log); err != nil {
+ event := new(TaikoL1Initialized)
+ if err := _TaikoL1.contract.UnpackLog(event, "Initialized", log); err != nil {
return err
}
event.Raw = log
@@ -2148,21 +2621,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBondReceived(opts *bind.WatchOpts, sink ch
}), nil
}
-// ParseBondReceived is a log parse operation binding the contract event 0xbb2d4a4c4a679d81940f242e401d2b2cc3383dbcb0ae798c14bd7905b1f6cae2.
+// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
//
-// Solidity: event BondReceived(address indexed from, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) ParseBondReceived(log types.Log) (*TaikoL1BondReceived, error) {
- event := new(TaikoL1BondReceived)
- if err := _TaikoL1.contract.UnpackLog(event, "BondReceived", log); err != nil {
+// Solidity: event Initialized(uint8 version)
+func (_TaikoL1 *TaikoL1Filterer) ParseInitialized(log types.Log) (*TaikoL1Initialized, error) {
+ event := new(TaikoL1Initialized)
+ if err := _TaikoL1.contract.UnpackLog(event, "Initialized", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BondReceived0Iterator is returned from FilterBondReceived0 and is used to iterate over the raw logs and unpacked data for BondReceived0 events raised by the TaikoL1 contract.
-type TaikoL1BondReceived0Iterator struct {
- Event *TaikoL1BondReceived0 // Event containing the contract specifics and raw log
+// TaikoL1OwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoL1 contract.
+type TaikoL1OwnershipTransferredIterator struct {
+ Event *TaikoL1OwnershipTransferred // 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
@@ -2176,7 +2649,7 @@ type TaikoL1BondReceived0Iterator struct {
// 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 *TaikoL1BondReceived0Iterator) Next() bool {
+func (it *TaikoL1OwnershipTransferredIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2185,7 +2658,7 @@ func (it *TaikoL1BondReceived0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BondReceived0)
+ it.Event = new(TaikoL1OwnershipTransferred)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2200,7 +2673,7 @@ func (it *TaikoL1BondReceived0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BondReceived0)
+ it.Event = new(TaikoL1OwnershipTransferred)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2216,53 +2689,60 @@ func (it *TaikoL1BondReceived0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BondReceived0Iterator) Error() error {
+func (it *TaikoL1OwnershipTransferredIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BondReceived0Iterator) Close() error {
+func (it *TaikoL1OwnershipTransferredIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BondReceived0 represents a BondReceived0 event raised by the TaikoL1 contract.
-type TaikoL1BondReceived0 struct {
- From common.Address
- BlockId uint64
- Bond *big.Int
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1OwnershipTransferred represents a OwnershipTransferred event raised by the TaikoL1 contract.
+type TaikoL1OwnershipTransferred struct {
+ PreviousOwner common.Address
+ NewOwner common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBondReceived0 is a free log retrieval operation binding the contract event 0xbb2d4a4c4a679d81940f242e401d2b2cc3383dbcb0ae798c14bd7905b1f6cae2.
+// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
-// Solidity: event BondReceived(address indexed from, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) FilterBondReceived0(opts *bind.FilterOpts, from []common.Address) (*TaikoL1BondReceived0Iterator, error) {
+// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
+func (_TaikoL1 *TaikoL1Filterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoL1OwnershipTransferredIterator, error) {
- var fromRule []interface{}
- for _, fromItem := range from {
- fromRule = append(fromRule, fromItem)
+ 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 := _TaikoL1.contract.FilterLogs(opts, "BondReceived0", fromRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
if err != nil {
return nil, err
}
- return &TaikoL1BondReceived0Iterator{contract: _TaikoL1.contract, event: "BondReceived0", logs: logs, sub: sub}, nil
+ return &TaikoL1OwnershipTransferredIterator{contract: _TaikoL1.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
}
-// WatchBondReceived0 is a free log subscription operation binding the contract event 0xbb2d4a4c4a679d81940f242e401d2b2cc3383dbcb0ae798c14bd7905b1f6cae2.
+// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
-// Solidity: event BondReceived(address indexed from, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) WatchBondReceived0(opts *bind.WatchOpts, sink chan<- *TaikoL1BondReceived0, from []common.Address) (event.Subscription, error) {
+// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
+func (_TaikoL1 *TaikoL1Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TaikoL1OwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
- var fromRule []interface{}
- for _, fromItem := range from {
- fromRule = append(fromRule, fromItem)
+ 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 := _TaikoL1.contract.WatchLogs(opts, "BondReceived0", fromRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
if err != nil {
return nil, err
}
@@ -2272,8 +2752,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBondReceived0(opts *bind.WatchOpts, sink c
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BondReceived0)
- if err := _TaikoL1.contract.UnpackLog(event, "BondReceived0", log); err != nil {
+ event := new(TaikoL1OwnershipTransferred)
+ if err := _TaikoL1.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
return err
}
event.Raw = log
@@ -2294,21 +2774,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBondReceived0(opts *bind.WatchOpts, sink c
}), nil
}
-// ParseBondReceived0 is a log parse operation binding the contract event 0xbb2d4a4c4a679d81940f242e401d2b2cc3383dbcb0ae798c14bd7905b1f6cae2.
+// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
-// Solidity: event BondReceived(address indexed from, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) ParseBondReceived0(log types.Log) (*TaikoL1BondReceived0, error) {
- event := new(TaikoL1BondReceived0)
- if err := _TaikoL1.contract.UnpackLog(event, "BondReceived0", log); err != nil {
+// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
+func (_TaikoL1 *TaikoL1Filterer) ParseOwnershipTransferred(log types.Log) (*TaikoL1OwnershipTransferred, error) {
+ event := new(TaikoL1OwnershipTransferred)
+ if err := _TaikoL1.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BondReturnedIterator is returned from FilterBondReturned and is used to iterate over the raw logs and unpacked data for BondReturned events raised by the TaikoL1 contract.
-type TaikoL1BondReturnedIterator struct {
- Event *TaikoL1BondReturned // Event containing the contract specifics and raw log
+// TaikoL1PausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the TaikoL1 contract.
+type TaikoL1PausedIterator struct {
+ Event *TaikoL1Paused // 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
@@ -2322,7 +2802,7 @@ type TaikoL1BondReturnedIterator struct {
// 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 *TaikoL1BondReturnedIterator) Next() bool {
+func (it *TaikoL1PausedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2331,7 +2811,7 @@ func (it *TaikoL1BondReturnedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BondReturned)
+ it.Event = new(TaikoL1Paused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2346,7 +2826,7 @@ func (it *TaikoL1BondReturnedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BondReturned)
+ it.Event = new(TaikoL1Paused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2362,53 +2842,41 @@ func (it *TaikoL1BondReturnedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BondReturnedIterator) Error() error {
+func (it *TaikoL1PausedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BondReturnedIterator) Close() error {
+func (it *TaikoL1PausedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BondReturned represents a BondReturned event raised by the TaikoL1 contract.
-type TaikoL1BondReturned struct {
- To common.Address
- BlockId uint64
- Bond *big.Int
+// TaikoL1Paused represents a Paused event raised by the TaikoL1 contract.
+type TaikoL1Paused struct {
+ Account common.Address
Raw types.Log // Blockchain specific contextual infos
}
-// FilterBondReturned is a free log retrieval operation binding the contract event 0xb14706301de9c688dd040a2ac19fc629179149bb39b0765094ef833e7bd907b2.
+// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event BondReturned(address indexed to, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) FilterBondReturned(opts *bind.FilterOpts, to []common.Address) (*TaikoL1BondReturnedIterator, error) {
-
- var toRule []interface{}
- for _, toItem := range to {
- toRule = append(toRule, toItem)
- }
+// Solidity: event Paused(address account)
+func (_TaikoL1 *TaikoL1Filterer) FilterPaused(opts *bind.FilterOpts) (*TaikoL1PausedIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BondReturned", toRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "Paused")
if err != nil {
return nil, err
}
- return &TaikoL1BondReturnedIterator{contract: _TaikoL1.contract, event: "BondReturned", logs: logs, sub: sub}, nil
+ return &TaikoL1PausedIterator{contract: _TaikoL1.contract, event: "Paused", logs: logs, sub: sub}, nil
}
-// WatchBondReturned is a free log subscription operation binding the contract event 0xb14706301de9c688dd040a2ac19fc629179149bb39b0765094ef833e7bd907b2.
+// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event BondReturned(address indexed to, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) WatchBondReturned(opts *bind.WatchOpts, sink chan<- *TaikoL1BondReturned, to []common.Address) (event.Subscription, error) {
-
- var toRule []interface{}
- for _, toItem := range to {
- toRule = append(toRule, toItem)
- }
+// Solidity: event Paused(address account)
+func (_TaikoL1 *TaikoL1Filterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *TaikoL1Paused) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BondReturned", toRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "Paused")
if err != nil {
return nil, err
}
@@ -2418,8 +2886,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBondReturned(opts *bind.WatchOpts, sink ch
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BondReturned)
- if err := _TaikoL1.contract.UnpackLog(event, "BondReturned", log); err != nil {
+ event := new(TaikoL1Paused)
+ if err := _TaikoL1.contract.UnpackLog(event, "Paused", log); err != nil {
return err
}
event.Raw = log
@@ -2440,21 +2908,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBondReturned(opts *bind.WatchOpts, sink ch
}), nil
}
-// ParseBondReturned is a log parse operation binding the contract event 0xb14706301de9c688dd040a2ac19fc629179149bb39b0765094ef833e7bd907b2.
+// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event BondReturned(address indexed to, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) ParseBondReturned(log types.Log) (*TaikoL1BondReturned, error) {
- event := new(TaikoL1BondReturned)
- if err := _TaikoL1.contract.UnpackLog(event, "BondReturned", log); err != nil {
+// Solidity: event Paused(address account)
+func (_TaikoL1 *TaikoL1Filterer) ParsePaused(log types.Log) (*TaikoL1Paused, error) {
+ event := new(TaikoL1Paused)
+ if err := _TaikoL1.contract.UnpackLog(event, "Paused", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BondReturned0Iterator is returned from FilterBondReturned0 and is used to iterate over the raw logs and unpacked data for BondReturned0 events raised by the TaikoL1 contract.
-type TaikoL1BondReturned0Iterator struct {
- Event *TaikoL1BondReturned0 // Event containing the contract specifics and raw log
+// TaikoL1ProvingPausedIterator is returned from FilterProvingPaused and is used to iterate over the raw logs and unpacked data for ProvingPaused events raised by the TaikoL1 contract.
+type TaikoL1ProvingPausedIterator struct {
+ Event *TaikoL1ProvingPaused // 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
@@ -2468,7 +2936,7 @@ type TaikoL1BondReturned0Iterator struct {
// 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 *TaikoL1BondReturned0Iterator) Next() bool {
+func (it *TaikoL1ProvingPausedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2477,7 +2945,7 @@ func (it *TaikoL1BondReturned0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BondReturned0)
+ it.Event = new(TaikoL1ProvingPaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2492,7 +2960,7 @@ func (it *TaikoL1BondReturned0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BondReturned0)
+ it.Event = new(TaikoL1ProvingPaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2508,53 +2976,41 @@ func (it *TaikoL1BondReturned0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BondReturned0Iterator) Error() error {
+func (it *TaikoL1ProvingPausedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BondReturned0Iterator) Close() error {
+func (it *TaikoL1ProvingPausedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BondReturned0 represents a BondReturned0 event raised by the TaikoL1 contract.
-type TaikoL1BondReturned0 struct {
- To common.Address
- BlockId uint64
- Bond *big.Int
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1ProvingPaused represents a ProvingPaused event raised by the TaikoL1 contract.
+type TaikoL1ProvingPaused struct {
+ Paused bool
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBondReturned0 is a free log retrieval operation binding the contract event 0xb14706301de9c688dd040a2ac19fc629179149bb39b0765094ef833e7bd907b2.
+// FilterProvingPaused is a free log retrieval operation binding the contract event 0xed64db85835d07c3c990b8ebdd55e32d64e5ed53143b6ef2179e7bfaf17ddc3b.
//
-// Solidity: event BondReturned(address indexed to, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) FilterBondReturned0(opts *bind.FilterOpts, to []common.Address) (*TaikoL1BondReturned0Iterator, error) {
-
- var toRule []interface{}
- for _, toItem := range to {
- toRule = append(toRule, toItem)
- }
+// Solidity: event ProvingPaused(bool paused)
+func (_TaikoL1 *TaikoL1Filterer) FilterProvingPaused(opts *bind.FilterOpts) (*TaikoL1ProvingPausedIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BondReturned0", toRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "ProvingPaused")
if err != nil {
return nil, err
}
- return &TaikoL1BondReturned0Iterator{contract: _TaikoL1.contract, event: "BondReturned0", logs: logs, sub: sub}, nil
+ return &TaikoL1ProvingPausedIterator{contract: _TaikoL1.contract, event: "ProvingPaused", logs: logs, sub: sub}, nil
}
-// WatchBondReturned0 is a free log subscription operation binding the contract event 0xb14706301de9c688dd040a2ac19fc629179149bb39b0765094ef833e7bd907b2.
+// WatchProvingPaused is a free log subscription operation binding the contract event 0xed64db85835d07c3c990b8ebdd55e32d64e5ed53143b6ef2179e7bfaf17ddc3b.
//
-// Solidity: event BondReturned(address indexed to, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) WatchBondReturned0(opts *bind.WatchOpts, sink chan<- *TaikoL1BondReturned0, to []common.Address) (event.Subscription, error) {
+// Solidity: event ProvingPaused(bool paused)
+func (_TaikoL1 *TaikoL1Filterer) WatchProvingPaused(opts *bind.WatchOpts, sink chan<- *TaikoL1ProvingPaused) (event.Subscription, error) {
- var toRule []interface{}
- for _, toItem := range to {
- toRule = append(toRule, toItem)
- }
-
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BondReturned0", toRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "ProvingPaused")
if err != nil {
return nil, err
}
@@ -2564,8 +3020,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBondReturned0(opts *bind.WatchOpts, sink c
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BondReturned0)
- if err := _TaikoL1.contract.UnpackLog(event, "BondReturned0", log); err != nil {
+ event := new(TaikoL1ProvingPaused)
+ if err := _TaikoL1.contract.UnpackLog(event, "ProvingPaused", log); err != nil {
return err
}
event.Raw = log
@@ -2586,21 +3042,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBondReturned0(opts *bind.WatchOpts, sink c
}), nil
}
-// ParseBondReturned0 is a log parse operation binding the contract event 0xb14706301de9c688dd040a2ac19fc629179149bb39b0765094ef833e7bd907b2.
+// ParseProvingPaused is a log parse operation binding the contract event 0xed64db85835d07c3c990b8ebdd55e32d64e5ed53143b6ef2179e7bfaf17ddc3b.
//
-// Solidity: event BondReturned(address indexed to, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) ParseBondReturned0(log types.Log) (*TaikoL1BondReturned0, error) {
- event := new(TaikoL1BondReturned0)
- if err := _TaikoL1.contract.UnpackLog(event, "BondReturned0", log); err != nil {
+// Solidity: event ProvingPaused(bool paused)
+func (_TaikoL1 *TaikoL1Filterer) ParseProvingPaused(log types.Log) (*TaikoL1ProvingPaused, error) {
+ event := new(TaikoL1ProvingPaused)
+ if err := _TaikoL1.contract.UnpackLog(event, "ProvingPaused", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BondRewardedIterator is returned from FilterBondRewarded and is used to iterate over the raw logs and unpacked data for BondRewarded events raised by the TaikoL1 contract.
-type TaikoL1BondRewardedIterator struct {
- Event *TaikoL1BondRewarded // Event containing the contract specifics and raw log
+// TaikoL1TokenCreditedIterator is returned from FilterTokenCredited and is used to iterate over the raw logs and unpacked data for TokenCredited events raised by the TaikoL1 contract.
+type TaikoL1TokenCreditedIterator struct {
+ Event *TaikoL1TokenCredited // 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
@@ -2614,7 +3070,7 @@ type TaikoL1BondRewardedIterator struct {
// 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 *TaikoL1BondRewardedIterator) Next() bool {
+func (it *TaikoL1TokenCreditedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2623,7 +3079,7 @@ func (it *TaikoL1BondRewardedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BondRewarded)
+ it.Event = new(TaikoL1TokenCredited)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2638,7 +3094,7 @@ func (it *TaikoL1BondRewardedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BondRewarded)
+ it.Event = new(TaikoL1TokenCredited)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2654,53 +3110,42 @@ func (it *TaikoL1BondRewardedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BondRewardedIterator) Error() error {
+func (it *TaikoL1TokenCreditedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BondRewardedIterator) Close() error {
+func (it *TaikoL1TokenCreditedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BondRewarded represents a BondRewarded event raised by the TaikoL1 contract.
-type TaikoL1BondRewarded struct {
- To common.Address
- BlockId uint64
- Bond *big.Int
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1TokenCredited represents a TokenCredited event raised by the TaikoL1 contract.
+type TaikoL1TokenCredited struct {
+ To common.Address
+ Amount *big.Int
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBondRewarded is a free log retrieval operation binding the contract event 0x428d08856cfebcae4c1b981318595cf05b757406a9c92c9bffd3ebb9a10023a6.
+// FilterTokenCredited is a free log retrieval operation binding the contract event 0xcc91b0b567e69e32d26830c50d1078f0baec319d458fa847f2633c1c2f71dd74.
//
-// Solidity: event BondRewarded(address indexed to, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) FilterBondRewarded(opts *bind.FilterOpts, to []common.Address) (*TaikoL1BondRewardedIterator, error) {
-
- var toRule []interface{}
- for _, toItem := range to {
- toRule = append(toRule, toItem)
- }
+// Solidity: event TokenCredited(address to, uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) FilterTokenCredited(opts *bind.FilterOpts) (*TaikoL1TokenCreditedIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BondRewarded", toRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "TokenCredited")
if err != nil {
return nil, err
}
- return &TaikoL1BondRewardedIterator{contract: _TaikoL1.contract, event: "BondRewarded", logs: logs, sub: sub}, nil
+ return &TaikoL1TokenCreditedIterator{contract: _TaikoL1.contract, event: "TokenCredited", logs: logs, sub: sub}, nil
}
-// WatchBondRewarded is a free log subscription operation binding the contract event 0x428d08856cfebcae4c1b981318595cf05b757406a9c92c9bffd3ebb9a10023a6.
+// WatchTokenCredited is a free log subscription operation binding the contract event 0xcc91b0b567e69e32d26830c50d1078f0baec319d458fa847f2633c1c2f71dd74.
//
-// Solidity: event BondRewarded(address indexed to, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) WatchBondRewarded(opts *bind.WatchOpts, sink chan<- *TaikoL1BondRewarded, to []common.Address) (event.Subscription, error) {
-
- var toRule []interface{}
- for _, toItem := range to {
- toRule = append(toRule, toItem)
- }
+// Solidity: event TokenCredited(address to, uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) WatchTokenCredited(opts *bind.WatchOpts, sink chan<- *TaikoL1TokenCredited) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BondRewarded", toRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "TokenCredited")
if err != nil {
return nil, err
}
@@ -2710,8 +3155,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBondRewarded(opts *bind.WatchOpts, sink ch
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BondRewarded)
- if err := _TaikoL1.contract.UnpackLog(event, "BondRewarded", log); err != nil {
+ event := new(TaikoL1TokenCredited)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenCredited", log); err != nil {
return err
}
event.Raw = log
@@ -2732,21 +3177,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBondRewarded(opts *bind.WatchOpts, sink ch
}), nil
}
-// ParseBondRewarded is a log parse operation binding the contract event 0x428d08856cfebcae4c1b981318595cf05b757406a9c92c9bffd3ebb9a10023a6.
+// ParseTokenCredited is a log parse operation binding the contract event 0xcc91b0b567e69e32d26830c50d1078f0baec319d458fa847f2633c1c2f71dd74.
//
-// Solidity: event BondRewarded(address indexed to, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) ParseBondRewarded(log types.Log) (*TaikoL1BondRewarded, error) {
- event := new(TaikoL1BondRewarded)
- if err := _TaikoL1.contract.UnpackLog(event, "BondRewarded", log); err != nil {
+// Solidity: event TokenCredited(address to, uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) ParseTokenCredited(log types.Log) (*TaikoL1TokenCredited, error) {
+ event := new(TaikoL1TokenCredited)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenCredited", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BondRewarded0Iterator is returned from FilterBondRewarded0 and is used to iterate over the raw logs and unpacked data for BondRewarded0 events raised by the TaikoL1 contract.
-type TaikoL1BondRewarded0Iterator struct {
- Event *TaikoL1BondRewarded0 // Event containing the contract specifics and raw log
+// TaikoL1TokenDebitedIterator is returned from FilterTokenDebited and is used to iterate over the raw logs and unpacked data for TokenDebited events raised by the TaikoL1 contract.
+type TaikoL1TokenDebitedIterator struct {
+ Event *TaikoL1TokenDebited // 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
@@ -2760,7 +3205,7 @@ type TaikoL1BondRewarded0Iterator struct {
// 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 *TaikoL1BondRewarded0Iterator) Next() bool {
+func (it *TaikoL1TokenDebitedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2769,7 +3214,7 @@ func (it *TaikoL1BondRewarded0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BondRewarded0)
+ it.Event = new(TaikoL1TokenDebited)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2784,7 +3229,7 @@ func (it *TaikoL1BondRewarded0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BondRewarded0)
+ it.Event = new(TaikoL1TokenDebited)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2800,53 +3245,42 @@ func (it *TaikoL1BondRewarded0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BondRewarded0Iterator) Error() error {
+func (it *TaikoL1TokenDebitedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BondRewarded0Iterator) Close() error {
+func (it *TaikoL1TokenDebitedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BondRewarded0 represents a BondRewarded0 event raised by the TaikoL1 contract.
-type TaikoL1BondRewarded0 struct {
- To common.Address
- BlockId uint64
- Bond *big.Int
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1TokenDebited represents a TokenDebited event raised by the TaikoL1 contract.
+type TaikoL1TokenDebited struct {
+ From common.Address
+ Amount *big.Int
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBondRewarded0 is a free log retrieval operation binding the contract event 0x428d08856cfebcae4c1b981318595cf05b757406a9c92c9bffd3ebb9a10023a6.
+// FilterTokenDebited is a free log retrieval operation binding the contract event 0x9414c932608e522aea77e1b5fd1cdb441e5d57daf49d9a9a0b7409ef8d9e0070.
//
-// Solidity: event BondRewarded(address indexed to, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) FilterBondRewarded0(opts *bind.FilterOpts, to []common.Address) (*TaikoL1BondRewarded0Iterator, error) {
+// Solidity: event TokenDebited(address from, uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) FilterTokenDebited(opts *bind.FilterOpts) (*TaikoL1TokenDebitedIterator, error) {
- var toRule []interface{}
- for _, toItem := range to {
- toRule = append(toRule, toItem)
- }
-
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BondRewarded0", toRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "TokenDebited")
if err != nil {
return nil, err
}
- return &TaikoL1BondRewarded0Iterator{contract: _TaikoL1.contract, event: "BondRewarded0", logs: logs, sub: sub}, nil
+ return &TaikoL1TokenDebitedIterator{contract: _TaikoL1.contract, event: "TokenDebited", logs: logs, sub: sub}, nil
}
-// WatchBondRewarded0 is a free log subscription operation binding the contract event 0x428d08856cfebcae4c1b981318595cf05b757406a9c92c9bffd3ebb9a10023a6.
+// WatchTokenDebited is a free log subscription operation binding the contract event 0x9414c932608e522aea77e1b5fd1cdb441e5d57daf49d9a9a0b7409ef8d9e0070.
//
-// Solidity: event BondRewarded(address indexed to, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) WatchBondRewarded0(opts *bind.WatchOpts, sink chan<- *TaikoL1BondRewarded0, to []common.Address) (event.Subscription, error) {
-
- var toRule []interface{}
- for _, toItem := range to {
- toRule = append(toRule, toItem)
- }
+// Solidity: event TokenDebited(address from, uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) WatchTokenDebited(opts *bind.WatchOpts, sink chan<- *TaikoL1TokenDebited) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BondRewarded0", toRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "TokenDebited")
if err != nil {
return nil, err
}
@@ -2856,8 +3290,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBondRewarded0(opts *bind.WatchOpts, sink c
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BondRewarded0)
- if err := _TaikoL1.contract.UnpackLog(event, "BondRewarded0", log); err != nil {
+ event := new(TaikoL1TokenDebited)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenDebited", log); err != nil {
return err
}
event.Raw = log
@@ -2878,21 +3312,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBondRewarded0(opts *bind.WatchOpts, sink c
}), nil
}
-// ParseBondRewarded0 is a log parse operation binding the contract event 0x428d08856cfebcae4c1b981318595cf05b757406a9c92c9bffd3ebb9a10023a6.
+// ParseTokenDebited is a log parse operation binding the contract event 0x9414c932608e522aea77e1b5fd1cdb441e5d57daf49d9a9a0b7409ef8d9e0070.
//
-// Solidity: event BondRewarded(address indexed to, uint64 blockId, uint256 bond)
-func (_TaikoL1 *TaikoL1Filterer) ParseBondRewarded0(log types.Log) (*TaikoL1BondRewarded0, error) {
- event := new(TaikoL1BondRewarded0)
- if err := _TaikoL1.contract.UnpackLog(event, "BondRewarded0", log); err != nil {
+// Solidity: event TokenDebited(address from, uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) ParseTokenDebited(log types.Log) (*TaikoL1TokenDebited, error) {
+ event := new(TaikoL1TokenDebited)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenDebited", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1CrossChainSyncedIterator is returned from FilterCrossChainSynced and is used to iterate over the raw logs and unpacked data for CrossChainSynced events raised by the TaikoL1 contract.
-type TaikoL1CrossChainSyncedIterator struct {
- Event *TaikoL1CrossChainSynced // Event containing the contract specifics and raw log
+// TaikoL1TokenDepositedIterator is returned from FilterTokenDeposited and is used to iterate over the raw logs and unpacked data for TokenDeposited events raised by the TaikoL1 contract.
+type TaikoL1TokenDepositedIterator struct {
+ Event *TaikoL1TokenDeposited // 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
@@ -2906,7 +3340,7 @@ type TaikoL1CrossChainSyncedIterator struct {
// 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 *TaikoL1CrossChainSyncedIterator) Next() bool {
+func (it *TaikoL1TokenDepositedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2915,7 +3349,7 @@ func (it *TaikoL1CrossChainSyncedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1CrossChainSynced)
+ it.Event = new(TaikoL1TokenDeposited)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2930,7 +3364,7 @@ func (it *TaikoL1CrossChainSyncedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1CrossChainSynced)
+ it.Event = new(TaikoL1TokenDeposited)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2946,53 +3380,41 @@ func (it *TaikoL1CrossChainSyncedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1CrossChainSyncedIterator) Error() error {
+func (it *TaikoL1TokenDepositedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1CrossChainSyncedIterator) Close() error {
+func (it *TaikoL1TokenDepositedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1CrossChainSynced represents a CrossChainSynced event raised by the TaikoL1 contract.
-type TaikoL1CrossChainSynced struct {
- SrcHeight uint64
- BlockHash [32]byte
- SignalRoot [32]byte
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1TokenDeposited represents a TokenDeposited event raised by the TaikoL1 contract.
+type TaikoL1TokenDeposited struct {
+ Amount *big.Int
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterCrossChainSynced is a free log retrieval operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// FilterTokenDeposited is a free log retrieval operation binding the contract event 0x26a49ee784523ce049bcbe276a63c7c9dbd9f428b1aa53633e679c9c046e8858.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_TaikoL1 *TaikoL1Filterer) FilterCrossChainSynced(opts *bind.FilterOpts, srcHeight []uint64) (*TaikoL1CrossChainSyncedIterator, error) {
+// Solidity: event TokenDeposited(uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) FilterTokenDeposited(opts *bind.FilterOpts) (*TaikoL1TokenDepositedIterator, error) {
- var srcHeightRule []interface{}
- for _, srcHeightItem := range srcHeight {
- srcHeightRule = append(srcHeightRule, srcHeightItem)
- }
-
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "CrossChainSynced", srcHeightRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "TokenDeposited")
if err != nil {
return nil, err
}
- return &TaikoL1CrossChainSyncedIterator{contract: _TaikoL1.contract, event: "CrossChainSynced", logs: logs, sub: sub}, nil
+ return &TaikoL1TokenDepositedIterator{contract: _TaikoL1.contract, event: "TokenDeposited", logs: logs, sub: sub}, nil
}
-// WatchCrossChainSynced is a free log subscription operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// WatchTokenDeposited is a free log subscription operation binding the contract event 0x26a49ee784523ce049bcbe276a63c7c9dbd9f428b1aa53633e679c9c046e8858.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sink chan<- *TaikoL1CrossChainSynced, srcHeight []uint64) (event.Subscription, error) {
-
- var srcHeightRule []interface{}
- for _, srcHeightItem := range srcHeight {
- srcHeightRule = append(srcHeightRule, srcHeightItem)
- }
+// Solidity: event TokenDeposited(uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) WatchTokenDeposited(opts *bind.WatchOpts, sink chan<- *TaikoL1TokenDeposited) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "CrossChainSynced", srcHeightRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "TokenDeposited")
if err != nil {
return nil, err
}
@@ -3002,8 +3424,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sin
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1CrossChainSynced)
- if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced", log); err != nil {
+ event := new(TaikoL1TokenDeposited)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenDeposited", log); err != nil {
return err
}
event.Raw = log
@@ -3024,21 +3446,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sin
}), nil
}
-// ParseCrossChainSynced is a log parse operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// ParseTokenDeposited is a log parse operation binding the contract event 0x26a49ee784523ce049bcbe276a63c7c9dbd9f428b1aa53633e679c9c046e8858.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_TaikoL1 *TaikoL1Filterer) ParseCrossChainSynced(log types.Log) (*TaikoL1CrossChainSynced, error) {
- event := new(TaikoL1CrossChainSynced)
- if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced", log); err != nil {
+// Solidity: event TokenDeposited(uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) ParseTokenDeposited(log types.Log) (*TaikoL1TokenDeposited, error) {
+ event := new(TaikoL1TokenDeposited)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenDeposited", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1CrossChainSynced0Iterator is returned from FilterCrossChainSynced0 and is used to iterate over the raw logs and unpacked data for CrossChainSynced0 events raised by the TaikoL1 contract.
-type TaikoL1CrossChainSynced0Iterator struct {
- Event *TaikoL1CrossChainSynced0 // Event containing the contract specifics and raw log
+// TaikoL1TokenWithdrawnIterator is returned from FilterTokenWithdrawn and is used to iterate over the raw logs and unpacked data for TokenWithdrawn events raised by the TaikoL1 contract.
+type TaikoL1TokenWithdrawnIterator struct {
+ Event *TaikoL1TokenWithdrawn // 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
@@ -3052,7 +3474,7 @@ type TaikoL1CrossChainSynced0Iterator struct {
// 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 *TaikoL1CrossChainSynced0Iterator) Next() bool {
+func (it *TaikoL1TokenWithdrawnIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -3061,7 +3483,7 @@ func (it *TaikoL1CrossChainSynced0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1CrossChainSynced0)
+ it.Event = new(TaikoL1TokenWithdrawn)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -3076,7 +3498,7 @@ func (it *TaikoL1CrossChainSynced0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1CrossChainSynced0)
+ it.Event = new(TaikoL1TokenWithdrawn)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -3092,53 +3514,41 @@ func (it *TaikoL1CrossChainSynced0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1CrossChainSynced0Iterator) Error() error {
+func (it *TaikoL1TokenWithdrawnIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1CrossChainSynced0Iterator) Close() error {
+func (it *TaikoL1TokenWithdrawnIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1CrossChainSynced0 represents a CrossChainSynced0 event raised by the TaikoL1 contract.
-type TaikoL1CrossChainSynced0 struct {
- SrcHeight uint64
- BlockHash [32]byte
- SignalRoot [32]byte
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1TokenWithdrawn represents a TokenWithdrawn event raised by the TaikoL1 contract.
+type TaikoL1TokenWithdrawn struct {
+ Amount *big.Int
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterCrossChainSynced0 is a free log retrieval operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// FilterTokenWithdrawn is a free log retrieval operation binding the contract event 0xc172f6497c150fc242267f743e8e4034b31b16ee123408d6d5f75a81128de114.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_TaikoL1 *TaikoL1Filterer) FilterCrossChainSynced0(opts *bind.FilterOpts, srcHeight []uint64) (*TaikoL1CrossChainSynced0Iterator, error) {
-
- var srcHeightRule []interface{}
- for _, srcHeightItem := range srcHeight {
- srcHeightRule = append(srcHeightRule, srcHeightItem)
- }
+// Solidity: event TokenWithdrawn(uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) FilterTokenWithdrawn(opts *bind.FilterOpts) (*TaikoL1TokenWithdrawnIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "CrossChainSynced0", srcHeightRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "TokenWithdrawn")
if err != nil {
return nil, err
}
- return &TaikoL1CrossChainSynced0Iterator{contract: _TaikoL1.contract, event: "CrossChainSynced0", logs: logs, sub: sub}, nil
+ return &TaikoL1TokenWithdrawnIterator{contract: _TaikoL1.contract, event: "TokenWithdrawn", logs: logs, sub: sub}, nil
}
-// WatchCrossChainSynced0 is a free log subscription operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// WatchTokenWithdrawn is a free log subscription operation binding the contract event 0xc172f6497c150fc242267f743e8e4034b31b16ee123408d6d5f75a81128de114.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced0(opts *bind.WatchOpts, sink chan<- *TaikoL1CrossChainSynced0, srcHeight []uint64) (event.Subscription, error) {
-
- var srcHeightRule []interface{}
- for _, srcHeightItem := range srcHeight {
- srcHeightRule = append(srcHeightRule, srcHeightItem)
- }
+// Solidity: event TokenWithdrawn(uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) WatchTokenWithdrawn(opts *bind.WatchOpts, sink chan<- *TaikoL1TokenWithdrawn) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "CrossChainSynced0", srcHeightRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "TokenWithdrawn")
if err != nil {
return nil, err
}
@@ -3148,8 +3558,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced0(opts *bind.WatchOpts, si
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1CrossChainSynced0)
- if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced0", log); err != nil {
+ event := new(TaikoL1TokenWithdrawn)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenWithdrawn", log); err != nil {
return err
}
event.Raw = log
@@ -3170,21 +3580,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced0(opts *bind.WatchOpts, si
}), nil
}
-// ParseCrossChainSynced0 is a log parse operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// ParseTokenWithdrawn is a log parse operation binding the contract event 0xc172f6497c150fc242267f743e8e4034b31b16ee123408d6d5f75a81128de114.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_TaikoL1 *TaikoL1Filterer) ParseCrossChainSynced0(log types.Log) (*TaikoL1CrossChainSynced0, error) {
- event := new(TaikoL1CrossChainSynced0)
- if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced0", log); err != nil {
+// Solidity: event TokenWithdrawn(uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) ParseTokenWithdrawn(log types.Log) (*TaikoL1TokenWithdrawn, error) {
+ event := new(TaikoL1TokenWithdrawn)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenWithdrawn", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1EthDepositedIterator is returned from FilterEthDeposited and is used to iterate over the raw logs and unpacked data for EthDeposited events raised by the TaikoL1 contract.
-type TaikoL1EthDepositedIterator struct {
- Event *TaikoL1EthDeposited // Event containing the contract specifics and raw log
+// TaikoL1TransitionContestedIterator is returned from FilterTransitionContested and is used to iterate over the raw logs and unpacked data for TransitionContested events raised by the TaikoL1 contract.
+type TaikoL1TransitionContestedIterator struct {
+ Event *TaikoL1TransitionContested // 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
@@ -3198,7 +3608,7 @@ type TaikoL1EthDepositedIterator struct {
// 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 *TaikoL1EthDepositedIterator) Next() bool {
+func (it *TaikoL1TransitionContestedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -3207,7 +3617,7 @@ func (it *TaikoL1EthDepositedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1EthDeposited)
+ it.Event = new(TaikoL1TransitionContested)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -3222,7 +3632,7 @@ func (it *TaikoL1EthDepositedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1EthDeposited)
+ it.Event = new(TaikoL1TransitionContested)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -3238,41 +3648,55 @@ func (it *TaikoL1EthDepositedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1EthDepositedIterator) Error() error {
+func (it *TaikoL1TransitionContestedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1EthDepositedIterator) Close() error {
+func (it *TaikoL1TransitionContestedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1EthDeposited represents a EthDeposited event raised by the TaikoL1 contract.
-type TaikoL1EthDeposited struct {
- Deposit TaikoDataEthDeposit
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1TransitionContested represents a TransitionContested event raised by the TaikoL1 contract.
+type TaikoL1TransitionContested struct {
+ BlockId *big.Int
+ Tran TaikoDataTransition
+ Contester common.Address
+ ContestBond *big.Int
+ Tier uint16
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterEthDeposited is a free log retrieval operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+// FilterTransitionContested is a free log retrieval operation binding the contract event 0xb4c0a86c1ff239277697775b1e91d3375fd3a5ef6b345aa4e2f6001c890558f6.
//
-// Solidity: event EthDeposited((address,uint96,uint64) deposit)
-func (_TaikoL1 *TaikoL1Filterer) FilterEthDeposited(opts *bind.FilterOpts) (*TaikoL1EthDepositedIterator, error) {
+// Solidity: event TransitionContested(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address contester, uint96 contestBond, uint16 tier)
+func (_TaikoL1 *TaikoL1Filterer) FilterTransitionContested(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1TransitionContestedIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "EthDeposited")
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "TransitionContested", blockIdRule)
if err != nil {
return nil, err
}
- return &TaikoL1EthDepositedIterator{contract: _TaikoL1.contract, event: "EthDeposited", logs: logs, sub: sub}, nil
+ return &TaikoL1TransitionContestedIterator{contract: _TaikoL1.contract, event: "TransitionContested", logs: logs, sub: sub}, nil
}
-// WatchEthDeposited is a free log subscription operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+// WatchTransitionContested is a free log subscription operation binding the contract event 0xb4c0a86c1ff239277697775b1e91d3375fd3a5ef6b345aa4e2f6001c890558f6.
//
-// Solidity: event EthDeposited((address,uint96,uint64) deposit)
-func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited(opts *bind.WatchOpts, sink chan<- *TaikoL1EthDeposited) (event.Subscription, error) {
+// Solidity: event TransitionContested(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address contester, uint96 contestBond, uint16 tier)
+func (_TaikoL1 *TaikoL1Filterer) WatchTransitionContested(opts *bind.WatchOpts, sink chan<- *TaikoL1TransitionContested, blockId []*big.Int) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "EthDeposited")
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "TransitionContested", blockIdRule)
if err != nil {
return nil, err
}
@@ -3282,8 +3706,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited(opts *bind.WatchOpts, sink ch
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1EthDeposited)
- if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited", log); err != nil {
+ event := new(TaikoL1TransitionContested)
+ if err := _TaikoL1.contract.UnpackLog(event, "TransitionContested", log); err != nil {
return err
}
event.Raw = log
@@ -3304,21 +3728,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited(opts *bind.WatchOpts, sink ch
}), nil
}
-// ParseEthDeposited is a log parse operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+// ParseTransitionContested is a log parse operation binding the contract event 0xb4c0a86c1ff239277697775b1e91d3375fd3a5ef6b345aa4e2f6001c890558f6.
//
-// Solidity: event EthDeposited((address,uint96,uint64) deposit)
-func (_TaikoL1 *TaikoL1Filterer) ParseEthDeposited(log types.Log) (*TaikoL1EthDeposited, error) {
- event := new(TaikoL1EthDeposited)
- if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited", log); err != nil {
+// Solidity: event TransitionContested(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address contester, uint96 contestBond, uint16 tier)
+func (_TaikoL1 *TaikoL1Filterer) ParseTransitionContested(log types.Log) (*TaikoL1TransitionContested, error) {
+ event := new(TaikoL1TransitionContested)
+ if err := _TaikoL1.contract.UnpackLog(event, "TransitionContested", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1EthDeposited0Iterator is returned from FilterEthDeposited0 and is used to iterate over the raw logs and unpacked data for EthDeposited0 events raised by the TaikoL1 contract.
-type TaikoL1EthDeposited0Iterator struct {
- Event *TaikoL1EthDeposited0 // Event containing the contract specifics and raw log
+// TaikoL1TransitionProvedIterator is returned from FilterTransitionProved and is used to iterate over the raw logs and unpacked data for TransitionProved events raised by the TaikoL1 contract.
+type TaikoL1TransitionProvedIterator struct {
+ Event *TaikoL1TransitionProved // 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
@@ -3332,7 +3756,7 @@ type TaikoL1EthDeposited0Iterator struct {
// 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 *TaikoL1EthDeposited0Iterator) Next() bool {
+func (it *TaikoL1TransitionProvedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -3341,7 +3765,7 @@ func (it *TaikoL1EthDeposited0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1EthDeposited0)
+ it.Event = new(TaikoL1TransitionProved)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -3356,7 +3780,7 @@ func (it *TaikoL1EthDeposited0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1EthDeposited0)
+ it.Event = new(TaikoL1TransitionProved)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -3372,41 +3796,55 @@ func (it *TaikoL1EthDeposited0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1EthDeposited0Iterator) Error() error {
+func (it *TaikoL1TransitionProvedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1EthDeposited0Iterator) Close() error {
+func (it *TaikoL1TransitionProvedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1EthDeposited0 represents a EthDeposited0 event raised by the TaikoL1 contract.
-type TaikoL1EthDeposited0 struct {
- Deposit TaikoDataEthDeposit
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1TransitionProved represents a TransitionProved event raised by the TaikoL1 contract.
+type TaikoL1TransitionProved struct {
+ BlockId *big.Int
+ Tran TaikoDataTransition
+ Prover common.Address
+ ValidityBond *big.Int
+ Tier uint16
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterEthDeposited0 is a free log retrieval operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+// FilterTransitionProved is a free log retrieval operation binding the contract event 0xc195e4be3b936845492b8be4b1cf604db687a4d79ad84d979499c136f8e6701f.
//
-// Solidity: event EthDeposited((address,uint96,uint64) deposit)
-func (_TaikoL1 *TaikoL1Filterer) FilterEthDeposited0(opts *bind.FilterOpts) (*TaikoL1EthDeposited0Iterator, error) {
+// Solidity: event TransitionProved(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address prover, uint96 validityBond, uint16 tier)
+func (_TaikoL1 *TaikoL1Filterer) FilterTransitionProved(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1TransitionProvedIterator, error) {
+
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "EthDeposited0")
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "TransitionProved", blockIdRule)
if err != nil {
return nil, err
}
- return &TaikoL1EthDeposited0Iterator{contract: _TaikoL1.contract, event: "EthDeposited0", logs: logs, sub: sub}, nil
+ return &TaikoL1TransitionProvedIterator{contract: _TaikoL1.contract, event: "TransitionProved", logs: logs, sub: sub}, nil
}
-// WatchEthDeposited0 is a free log subscription operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+// WatchTransitionProved is a free log subscription operation binding the contract event 0xc195e4be3b936845492b8be4b1cf604db687a4d79ad84d979499c136f8e6701f.
//
-// Solidity: event EthDeposited((address,uint96,uint64) deposit)
-func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited0(opts *bind.WatchOpts, sink chan<- *TaikoL1EthDeposited0) (event.Subscription, error) {
+// Solidity: event TransitionProved(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address prover, uint96 validityBond, uint16 tier)
+func (_TaikoL1 *TaikoL1Filterer) WatchTransitionProved(opts *bind.WatchOpts, sink chan<- *TaikoL1TransitionProved, blockId []*big.Int) (event.Subscription, error) {
+
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "EthDeposited0")
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "TransitionProved", blockIdRule)
if err != nil {
return nil, err
}
@@ -3416,8 +3854,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited0(opts *bind.WatchOpts, sink c
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1EthDeposited0)
- if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited0", log); err != nil {
+ event := new(TaikoL1TransitionProved)
+ if err := _TaikoL1.contract.UnpackLog(event, "TransitionProved", log); err != nil {
return err
}
event.Raw = log
@@ -3438,21 +3876,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited0(opts *bind.WatchOpts, sink c
}), nil
}
-// ParseEthDeposited0 is a log parse operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+// ParseTransitionProved is a log parse operation binding the contract event 0xc195e4be3b936845492b8be4b1cf604db687a4d79ad84d979499c136f8e6701f.
//
-// Solidity: event EthDeposited((address,uint96,uint64) deposit)
-func (_TaikoL1 *TaikoL1Filterer) ParseEthDeposited0(log types.Log) (*TaikoL1EthDeposited0, error) {
- event := new(TaikoL1EthDeposited0)
- if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited0", log); err != nil {
+// Solidity: event TransitionProved(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address prover, uint96 validityBond, uint16 tier)
+func (_TaikoL1 *TaikoL1Filterer) ParseTransitionProved(log types.Log) (*TaikoL1TransitionProved, error) {
+ event := new(TaikoL1TransitionProved)
+ if err := _TaikoL1.contract.UnpackLog(event, "TransitionProved", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1InitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TaikoL1 contract.
-type TaikoL1InitializedIterator struct {
- Event *TaikoL1Initialized // Event containing the contract specifics and raw log
+// TaikoL1UnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the TaikoL1 contract.
+type TaikoL1UnpausedIterator struct {
+ Event *TaikoL1Unpaused // 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
@@ -3466,7 +3904,7 @@ type TaikoL1InitializedIterator struct {
// 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 *TaikoL1InitializedIterator) Next() bool {
+func (it *TaikoL1UnpausedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -3475,7 +3913,7 @@ func (it *TaikoL1InitializedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1Initialized)
+ it.Event = new(TaikoL1Unpaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -3490,7 +3928,7 @@ func (it *TaikoL1InitializedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1Initialized)
+ it.Event = new(TaikoL1Unpaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -3506,41 +3944,41 @@ func (it *TaikoL1InitializedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1InitializedIterator) Error() error {
+func (it *TaikoL1UnpausedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1InitializedIterator) Close() error {
+func (it *TaikoL1UnpausedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1Initialized represents a Initialized event raised by the TaikoL1 contract.
-type TaikoL1Initialized struct {
- Version uint8
+// TaikoL1Unpaused represents a Unpaused event raised by the TaikoL1 contract.
+type TaikoL1Unpaused struct {
+ Account common.Address
Raw types.Log // Blockchain specific contextual infos
}
-// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
//
-// Solidity: event Initialized(uint8 version)
-func (_TaikoL1 *TaikoL1Filterer) FilterInitialized(opts *bind.FilterOpts) (*TaikoL1InitializedIterator, error) {
+// Solidity: event Unpaused(address account)
+func (_TaikoL1 *TaikoL1Filterer) FilterUnpaused(opts *bind.FilterOpts) (*TaikoL1UnpausedIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "Initialized")
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "Unpaused")
if err != nil {
return nil, err
}
- return &TaikoL1InitializedIterator{contract: _TaikoL1.contract, event: "Initialized", logs: logs, sub: sub}, nil
+ return &TaikoL1UnpausedIterator{contract: _TaikoL1.contract, event: "Unpaused", logs: logs, sub: sub}, nil
}
-// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
//
-// Solidity: event Initialized(uint8 version)
-func (_TaikoL1 *TaikoL1Filterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *TaikoL1Initialized) (event.Subscription, error) {
+// Solidity: event Unpaused(address account)
+func (_TaikoL1 *TaikoL1Filterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *TaikoL1Unpaused) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "Initialized")
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "Unpaused")
if err != nil {
return nil, err
}
@@ -3550,8 +3988,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchInitialized(opts *bind.WatchOpts, sink cha
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1Initialized)
- if err := _TaikoL1.contract.UnpackLog(event, "Initialized", log); err != nil {
+ event := new(TaikoL1Unpaused)
+ if err := _TaikoL1.contract.UnpackLog(event, "Unpaused", log); err != nil {
return err
}
event.Raw = log
@@ -3572,21 +4010,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchInitialized(opts *bind.WatchOpts, sink cha
}), nil
}
-// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
//
-// Solidity: event Initialized(uint8 version)
-func (_TaikoL1 *TaikoL1Filterer) ParseInitialized(log types.Log) (*TaikoL1Initialized, error) {
- event := new(TaikoL1Initialized)
- if err := _TaikoL1.contract.UnpackLog(event, "Initialized", log); err != nil {
+// Solidity: event Unpaused(address account)
+func (_TaikoL1 *TaikoL1Filterer) ParseUnpaused(log types.Log) (*TaikoL1Unpaused, error) {
+ event := new(TaikoL1Unpaused)
+ if err := _TaikoL1.contract.UnpackLog(event, "Unpaused", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1OwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoL1 contract.
-type TaikoL1OwnershipTransferredIterator struct {
- Event *TaikoL1OwnershipTransferred // Event containing the contract specifics and raw log
+// TaikoL1UpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the TaikoL1 contract.
+type TaikoL1UpgradedIterator struct {
+ Event *TaikoL1Upgraded // 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
@@ -3600,7 +4038,7 @@ type TaikoL1OwnershipTransferredIterator struct {
// 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 *TaikoL1OwnershipTransferredIterator) Next() bool {
+func (it *TaikoL1UpgradedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -3609,7 +4047,7 @@ func (it *TaikoL1OwnershipTransferredIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1OwnershipTransferred)
+ it.Event = new(TaikoL1Upgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -3624,7 +4062,7 @@ func (it *TaikoL1OwnershipTransferredIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1OwnershipTransferred)
+ it.Event = new(TaikoL1Upgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -3640,60 +4078,51 @@ func (it *TaikoL1OwnershipTransferredIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1OwnershipTransferredIterator) Error() error {
+func (it *TaikoL1UpgradedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1OwnershipTransferredIterator) Close() error {
+func (it *TaikoL1UpgradedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1OwnershipTransferred represents a OwnershipTransferred event raised by the TaikoL1 contract.
-type TaikoL1OwnershipTransferred struct {
- PreviousOwner common.Address
- NewOwner common.Address
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1Upgraded represents a Upgraded event raised by the TaikoL1 contract.
+type TaikoL1Upgraded struct {
+ Implementation common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_TaikoL1 *TaikoL1Filterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoL1OwnershipTransferredIterator, error) {
+// Solidity: event Upgraded(address indexed implementation)
+func (_TaikoL1 *TaikoL1Filterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*TaikoL1UpgradedIterator, error) {
- var previousOwnerRule []interface{}
- for _, previousOwnerItem := range previousOwner {
- previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
- }
- var newOwnerRule []interface{}
- for _, newOwnerItem := range newOwner {
- newOwnerRule = append(newOwnerRule, newOwnerItem)
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
}
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "Upgraded", implementationRule)
if err != nil {
return nil, err
}
- return &TaikoL1OwnershipTransferredIterator{contract: _TaikoL1.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
+ return &TaikoL1UpgradedIterator{contract: _TaikoL1.contract, event: "Upgraded", logs: logs, sub: sub}, nil
}
-// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_TaikoL1 *TaikoL1Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TaikoL1OwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
+// Solidity: event Upgraded(address indexed implementation)
+func (_TaikoL1 *TaikoL1Filterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *TaikoL1Upgraded, implementation []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)
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
}
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "Upgraded", implementationRule)
if err != nil {
return nil, err
}
@@ -3703,8 +4132,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts,
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1OwnershipTransferred)
- if err := _TaikoL1.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+ event := new(TaikoL1Upgraded)
+ if err := _TaikoL1.contract.UnpackLog(event, "Upgraded", log); err != nil {
return err
}
event.Raw = log
@@ -3725,12 +4154,12 @@ func (_TaikoL1 *TaikoL1Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts,
}), nil
}
-// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_TaikoL1 *TaikoL1Filterer) ParseOwnershipTransferred(log types.Log) (*TaikoL1OwnershipTransferred, error) {
- event := new(TaikoL1OwnershipTransferred)
- if err := _TaikoL1.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+// Solidity: event Upgraded(address indexed implementation)
+func (_TaikoL1 *TaikoL1Filterer) ParseUpgraded(log types.Log) (*TaikoL1Upgraded, error) {
+ event := new(TaikoL1Upgraded)
+ if err := _TaikoL1.contract.UnpackLog(event, "Upgraded", log); err != nil {
return nil, err
}
event.Raw = log
diff --git a/packages/eventindexer/event.go b/packages/eventindexer/event.go
index 8fd589ae4b0..c21496d28b8 100644
--- a/packages/eventindexer/event.go
+++ b/packages/eventindexer/event.go
@@ -13,13 +13,15 @@ import (
)
var (
- EventNameBlockProven = "BlockProven"
- EventNameBlockProposed = "BlockProposed"
- EventNameBlockVerified = "BlockVerified"
- EventNameMessageSent = "MessageSent"
- EventNameSwap = "Swap"
- EventNameMint = "Mint"
- EventNameNFTTransfer = "Transfer"
+ EventNameTransitionProved = "TransitionProved"
+ EventNameTransitionContested = "TransitionContested"
+ EventNameBlockProposed = "BlockProposed"
+ EventNameBlockAssigned = "BlockAssigned"
+ EventNameBlockVerified = "BlockVerified"
+ EventNameMessageSent = "MessageSent"
+ EventNameSwap = "Swap"
+ EventNameMint = "Mint"
+ EventNameNFTTransfer = "Transfer"
)
// Event represents a stored EVM event. The fields will be serialized
@@ -40,6 +42,7 @@ type Event struct {
To string `json:"to"`
TokenID sql.NullInt64 `json:"tokenID"`
ContractAddress string `json:"contractAddress"`
+ FeeTokenAddress string `json:"feeTokenAddress"`
TransactedAt time.Time `json:"transactedAt"`
}
@@ -58,6 +61,7 @@ type SaveEventOpts struct {
To *string
TokenID *int64
ContractAddress *string
+ FeeTokenAddress *string
TransactedAt time.Time
}
diff --git a/packages/eventindexer/generator/generator.go b/packages/eventindexer/generator/generator.go
index b60228f9b4c..d0b937f659e 100644
--- a/packages/eventindexer/generator/generator.go
+++ b/packages/eventindexer/generator/generator.go
@@ -11,6 +11,7 @@ import (
"github.com/taikoxyz/taiko-mono/packages/eventindexer"
"github.com/taikoxyz/taiko-mono/packages/eventindexer/tasks"
"github.com/urfave/cli/v2"
+ "gorm.io/gorm"
)
var (
@@ -77,7 +78,7 @@ func (g *Generator) Close(ctx context.Context) {
}
if err := sqlDB.Close(); err != nil {
- slog.Error("error closing sqlbd connecting", "err", err.Error())
+ slog.Error("error closing sqlbd connection", "err", err.Error())
}
}
@@ -128,24 +129,12 @@ func (g *Generator) generateByTask(ctx context.Context, task string) error {
for d := startingDate; d.Before(currentDate); d = d.AddDate(0, 0, 1) {
slog.Info("Processing", "task", task, "date", d.Format("2006-01-02"), "currentDate", currentDate.Format("2006-01-02"))
- result, err := g.queryByTask(task, d)
+ err := g.queryByTask(task, d)
if err != nil {
slog.Info("Query failed", "task", task, "date", d.Format("2006-01-02"), "error", err.Error())
return err
}
- slog.Info("Query successful", "task", task, "date", d.Format("2006-01-02"), "result", result.String())
-
- insertStmt := `
- INSERT INTO time_series_data(task, value, date)
- VALUES (?, ?, ?)`
-
- err = g.db.GormDB().Exec(insertStmt, task, result, d.Format("2006-01-02")).Error
- if err != nil {
- slog.Info("Insert failed", "task", task, "date", d.Format("2006-01-02"), "error", err.Error())
- return err
- }
-
slog.Info("Processed", "task", task, "date", d.Format("2006-01-02"))
}
@@ -193,7 +182,7 @@ func (g *Generator) getCurrentDate() time.Time {
// nolint: funlen, gocognit
// queryByTask runs a database query which should return result data based on the
// task
-func (g *Generator) queryByTask(task string, date time.Time) (decimal.Decimal, error) {
+func (g *Generator) queryByTask(task string, date time.Time) error {
dateString := date.Format("2006-01-02")
var result decimal.Decimal
@@ -201,46 +190,108 @@ func (g *Generator) queryByTask(task string, date time.Time) (decimal.Decimal, e
var err error
switch task {
- case tasks.ProposerRewardsPerDay:
- query := "SELECT COALESCE(SUM(proposer_reward), 0) FROM events WHERE event = ? AND DATE(transacted_at) = ?"
- err = g.db.GormDB().
- Raw(query, eventindexer.EventNameBlockProposed, dateString).
- Scan(&result).Error
-
- case tasks.TotalProposerRewards:
- var dailyProposerRewards decimal.NullDecimal
+ case tasks.TotalProofRewards:
+ var feeTokenAddresses []string = make([]string, 0)
+ // get unique fee token addresses
+ query := "SELECT DISTINCT(fee_token_address) FROM stats WHERE stat_type = ?"
- query := "SELECT COALESCE(SUM(proposer_reward), 0) FROM events WHERE event = ? AND DATE(transacted_at) = ?"
err = g.db.GormDB().
- Raw(query, eventindexer.EventNameBlockProposed, dateString).
- Scan(&dailyProposerRewards).Error
-
- tsdResult, err := g.previousDayTsdResultByTask(task, date)
+ Raw(query, eventindexer.EventNameBlockAssigned).
+ Scan(&feeTokenAddresses).Error
if err != nil {
- return result, err
+ return err
}
- result = tsdResult.Decimal.Add(dailyProposerRewards.Decimal)
+ for _, feeTokenAddress := range feeTokenAddresses {
+ f := feeTokenAddress
- case tasks.TotalProofRewards:
- var dailyProofRewards decimal.NullDecimal
+ var dailyProofRewards decimal.NullDecimal
- query := "SELECT COALESCE(SUM(proof_reward), 0) FROM events WHERE event = ? AND DATE(transacted_at) = ?"
- err = g.db.GormDB().
- Raw(query, eventindexer.EventNameBlockProposed, dateString).
- Scan(&dailyProofRewards).Error
+ // nolint: lll
+ query := "SELECT COALESCE(SUM(proof_reward), 0) FROM events WHERE event = ? AND DATE(transacted_at) = ? AND fee_token_address = ?"
+ err = g.db.GormDB().
+ Raw(query, eventindexer.EventNameBlockAssigned, dateString, f).
+ Scan(&dailyProofRewards).Error
- tsdResult, err := g.previousDayTsdResultByTask(task, date)
- if err != nil {
- return result, err
+ if err != nil {
+ return err
+ }
+
+ tsdResult, err := g.previousDayTsdResultByTask(task, date, &f)
+ if err != nil {
+ return err
+ }
+
+ result := tsdResult.Decimal.Add(dailyProofRewards.Decimal)
+
+ slog.Info("Query successful",
+ "task", task,
+ "date", dateString,
+ "result", result.String(),
+ "feeTokenAddress", f,
+ )
+
+ insertStmt := `
+ INSERT INTO time_series_data(task, value, date, fee_token_address)
+ VALUES (?, ?, ?, ?)`
+
+ err = g.db.GormDB().Exec(insertStmt, task, result, dateString, f).Error
+ if err != nil {
+ slog.Info("Insert failed", "task", task, "date", dateString, "error", err.Error())
+ return err
+ }
}
- result = tsdResult.Decimal.Add(dailyProofRewards.Decimal)
+ // return early for array processing data
+ return nil
case tasks.ProofRewardsPerDay:
- query := "SELECT COALESCE(SUM(proof_reward), 0) FROM events WHERE event = ? AND DATE(transacted_at) = ?"
+ var feeTokenAddresses []string = make([]string, 0)
+ // get unique fee token addresses
+ query := "SELECT DISTINCT(fee_token_address) FROM stats WHERE stat_type = ?"
+
err = g.db.GormDB().
- Raw(query, eventindexer.EventNameBlockProposed, dateString).
- Scan(&result).Error
+ Raw(query, eventindexer.EventNameBlockAssigned).
+ Scan(&feeTokenAddresses).Error
+ if err != nil {
+ return err
+ }
+
+ for _, feeTokenAddress := range feeTokenAddresses {
+ f := feeTokenAddress
+
+ var result decimal.Decimal
+
+ // nolint: lll
+ query := `SELECT COALESCE(SUM(proof_reward), 0) FROM events WHERE event = ? AND DATE(transacted_at) = ? AND fee_token_address = ?`
+ err = g.db.GormDB().
+ Raw(query, eventindexer.EventNameBlockAssigned, dateString, f).
+ Scan(&result).Error
+
+ if err != nil {
+ return err
+ }
+
+ slog.Info("Query successful",
+ "task", task,
+ "date", dateString,
+ "result", result.String(),
+ "feeTokenAddress", f,
+ )
+
+ insertStmt := `
+ INSERT INTO time_series_data(task, value, date, fee_token_address)
+ VALUES (?, ?, ?, ?)`
+
+ err = g.db.GormDB().Exec(insertStmt, task, result, dateString, f).Error
+ if err != nil {
+ slog.Info("Insert failed", "task", task, "date", dateString, "error", err.Error())
+ return err
+ }
+ }
+
+ // return early for array processing data
+ return nil
+
case tasks.BridgeMessagesSentPerDay:
err = g.eventCount(task, date, eventindexer.EventNameMessageSent, &result)
case tasks.TotalBridgeMessagesSent:
@@ -248,12 +299,12 @@ func (g *Generator) queryByTask(task string, date time.Time) (decimal.Decimal, e
err = g.eventCount(task, date, eventindexer.EventNameMessageSent, &dailyMsgSentCount)
if err != nil {
- return result, err
+ return err
}
- tsdResult, err := g.previousDayTsdResultByTask(task, date)
+ tsdResult, err := g.previousDayTsdResultByTask(task, date, nil)
if err != nil {
- return result, err
+ return err
}
result = tsdResult.Decimal.Add(dailyMsgSentCount.Decimal)
@@ -264,12 +315,12 @@ func (g *Generator) queryByTask(task string, date time.Time) (decimal.Decimal, e
err = g.eventCount(task, date, eventindexer.EventNameBlockProposed, &dailyProposerCount)
if err != nil {
- return result, err
+ return err
}
- tsdResult, err := g.previousDayTsdResultByTask(task, date)
+ tsdResult, err := g.previousDayTsdResultByTask(task, date, nil)
if err != nil {
- return result, err
+ return err
}
result = tsdResult.Decimal.Add(dailyProposerCount.Decimal)
@@ -286,44 +337,73 @@ func (g *Generator) queryByTask(task string, date time.Time) (decimal.Decimal, e
eventindexer.EventNameBlockProposed,
).Scan(&result).Error
if err != nil {
- return result, err
+ return err
}
case tasks.UniqueProversPerDay:
query := "SELECT COUNT(DISTINCT address) FROM events WHERE event = ? AND DATE(transacted_at) = ?"
err = g.db.GormDB().
- Raw(query, eventindexer.EventNameBlockProven, dateString).
+ Raw(query, eventindexer.EventNameTransitionProved, dateString).
Scan(&result).Error
case tasks.TotalUniqueProvers:
query := `SELECT COUNT(DISTINCT address) FROM events WHERE event = ?`
err = g.db.GormDB().Raw(
query,
- eventindexer.EventNameBlockProven,
+ eventindexer.EventNameTransitionProved,
).Scan(&result).Error
if err != nil {
- return result, err
+ return err
}
- case tasks.ProveBlockTxPerDay:
+ case tasks.TransitionProvedTxPerDay:
query := "SELECT COUNT(*) FROM events WHERE event = ? AND DATE(transacted_at) = ?"
err = g.db.GormDB().
- Raw(query, eventindexer.EventNameBlockProven, dateString).
+ Raw(query, eventindexer.EventNameTransitionProved, dateString).
Scan(&result).Error
- case tasks.TotalProveBlockTx:
- var dailyProveBlockCount decimal.NullDecimal
+ case tasks.TotalTransitionProvedTx:
+ var dailyTransitionProvedCount decimal.NullDecimal
query := `SELECT COUNT(*) FROM events WHERE event = ? AND DATE(transacted_at) = ?`
- err = g.db.GormDB().Raw(query, eventindexer.EventNameBlockProven, dateString).Scan(&dailyProveBlockCount).Error
+ err = g.db.GormDB().Raw(
+ query,
+ eventindexer.EventNameTransitionProved,
+ dateString,
+ ).Scan(&dailyTransitionProvedCount).Error
if err != nil {
- return result, err
+ return err
}
- tsdResult, err := g.previousDayTsdResultByTask(task, date)
+ tsdResult, err := g.previousDayTsdResultByTask(task, date, nil)
if err != nil {
- return result, err
+ return err
+ }
+
+ result = tsdResult.Decimal.Add(dailyTransitionProvedCount.Decimal)
+ case tasks.TransitionContestedTxPerDay:
+ query := "SELECT COUNT(*) FROM events WHERE event = ? AND DATE(transacted_at) = ?"
+ err = g.db.GormDB().
+ Raw(query, eventindexer.EventNameTransitionContested, dateString).
+ Scan(&result).Error
+ case tasks.TotalTransitionContestedTx:
+ var dailyTransitionContestedCount decimal.NullDecimal
+
+ query := `SELECT COUNT(*) FROM events WHERE event = ? AND DATE(transacted_at) = ?`
+
+ err = g.db.GormDB().Raw(
+ query,
+ eventindexer.EventNameTransitionContested,
+ dateString,
+ ).Scan(&dailyTransitionContestedCount).Error
+ if err != nil {
+ return err
+ }
+
+ tsdResult, err := g.previousDayTsdResultByTask(task, date, nil)
+ if err != nil {
+ return err
}
- result = tsdResult.Decimal.Add(dailyProveBlockCount.Decimal)
+ result = tsdResult.Decimal.Add(dailyTransitionContestedCount.Decimal)
case tasks.AccountsPerDay:
query := `SELECT COUNT(*) FROM accounts WHERE DATE(transacted_at) = ?`
err = g.db.GormDB().Raw(query, dateString).Scan(&result).Error
@@ -334,12 +414,12 @@ func (g *Generator) queryByTask(task string, date time.Time) (decimal.Decimal, e
err = g.db.GormDB().Raw(query, dateString).Scan(&dailyAccountsCount).Error
if err != nil {
- return result, err
+ return err
}
- tsdResult, err := g.previousDayTsdResultByTask(task, date)
+ tsdResult, err := g.previousDayTsdResultByTask(task, date, nil)
if err != nil {
- return result, err
+ return err
}
result = tsdResult.Decimal.Add(dailyAccountsCount.Decimal)
@@ -353,12 +433,12 @@ func (g *Generator) queryByTask(task string, date time.Time) (decimal.Decimal, e
err = g.db.GormDB().Raw(query, dateString).Scan(&dailyBlockCount).Error
if err != nil {
- return result, err
+ return err
}
- tsdResult, err := g.previousDayTsdResultByTask(task, date)
+ tsdResult, err := g.previousDayTsdResultByTask(task, date, nil)
if err != nil {
- return result, err
+ return err
}
result = tsdResult.Decimal.Add(dailyBlockCount.Decimal)
@@ -374,12 +454,12 @@ func (g *Generator) queryByTask(task string, date time.Time) (decimal.Decimal, e
err = g.db.GormDB().Raw(query, dateString).Scan(&dailyTxCount).Error
if err != nil {
- return result, err
+ return err
}
- tsdResult, err := g.previousDayTsdResultByTask(task, date)
+ tsdResult, err := g.previousDayTsdResultByTask(task, date, nil)
if err != nil {
- return result, err
+ return err
}
result = tsdResult.Decimal.Add(dailyTxCount.Decimal)
@@ -394,34 +474,60 @@ func (g *Generator) queryByTask(task string, date time.Time) (decimal.Decimal, e
err = g.db.GormDB().Raw(query, dateString, ZeroAddress.Hex()).Scan(&dailyContractCount).Error
if err != nil {
- return result, err
+ return err
}
- tsdResult, err := g.previousDayTsdResultByTask(task, date)
+ tsdResult, err := g.previousDayTsdResultByTask(task, date, nil)
if err != nil {
- return result, err
+ return err
}
result = tsdResult.Decimal.Add(dailyContractCount.Decimal)
default:
- return result, errors.New("task not supported")
+ return errors.New("task not supported")
}
if err != nil {
- return result, err
+ return err
}
- return result, nil
+ slog.Info("Query successful", "task", task, "date", dateString, "result", result.String())
+
+ insertStmt := `
+ INSERT INTO time_series_data(task, value, date)
+ VALUES (?, ?, ?)`
+
+ err = g.db.GormDB().Exec(insertStmt, task, result, dateString).Error
+ if err != nil {
+ slog.Info("Insert failed", "task", task, "date", dateString, "error", err.Error())
+ return err
+ }
+
+ return nil
}
// previousDayTsdResultByTask returns the previous day's time series data, based on
// task and time passed in.
-func (g *Generator) previousDayTsdResultByTask(task string, date time.Time) (decimal.NullDecimal, error) {
+func (g *Generator) previousDayTsdResultByTask(
+ task string,
+ date time.Time,
+ feeTokenAddress *string,
+) (decimal.NullDecimal, error) {
var tsdResult decimal.NullDecimal
- tsdQuery := `SELECT value FROM time_series_data WHERE task = ? AND date = ?`
+ var tsdQuery string = `SELECT value FROM time_series_data WHERE task = ? AND date = ?`
+
+ var q *gorm.DB = g.db.GormDB().
+ Raw(tsdQuery, task, date.AddDate(0, 0, -1).Format("2006-01-02"))
+
+ if feeTokenAddress != nil {
+ tsdQuery = `SELECT value FROM time_series_data WHERE task = ? AND date = ? AND fee_token_address = ?`
+ q = g.db.GormDB().
+ Raw(tsdQuery, task, date.AddDate(0, 0, -1).Format("2006-01-02"), *feeTokenAddress)
+ }
- err := g.db.GormDB().Raw(tsdQuery, task, date.AddDate(0, 0, -1).Format("2006-01-02")).Scan(&tsdResult).Error
+ err := q.
+ Scan(&tsdResult).Error
if err != nil {
return tsdResult, err
}
diff --git a/packages/eventindexer/http/get_chart_by_task.go b/packages/eventindexer/http/get_chart_by_task.go
index 3c97450df90..33e3e905f98 100644
--- a/packages/eventindexer/http/get_chart_by_task.go
+++ b/packages/eventindexer/http/get_chart_by_task.go
@@ -21,7 +21,7 @@ import (
// @Success 200 {object} eventindexer.ChartResponse
// @Router /chartByTask [get]
func (srv *Server) GetChartByTask(c echo.Context) error {
- cached, found := srv.cache.Get(c.QueryParam("task"))
+ cached, found := srv.cache.Get(c.QueryParam("task") + c.QueryParam("fee_token_address"))
var chart *eventindexer.ChartResponse
@@ -35,12 +35,13 @@ func (srv *Server) GetChartByTask(c echo.Context) error {
c.QueryParam("task"),
c.QueryParam("start"),
c.QueryParam("end"),
+ c.QueryParam("fee_token_address"),
)
if err != nil {
return webutils.LogAndRenderErrors(c, http.StatusUnprocessableEntity, err)
}
- srv.cache.Set(c.QueryParam("task"), chart, cache.DefaultExpiration)
+ srv.cache.Set(c.QueryParam("task")+c.QueryParam("fee_token_address"), chart, cache.DefaultExpiration)
}
return c.JSON(http.StatusOK, chart)
diff --git a/packages/eventindexer/http/get_stats.go b/packages/eventindexer/http/get_stats.go
index 8746b07724a..f031c800ce2 100644
--- a/packages/eventindexer/http/get_stats.go
+++ b/packages/eventindexer/http/get_stats.go
@@ -9,6 +9,17 @@ import (
"github.com/taikoxyz/taiko-mono/packages/eventindexer"
)
+type proofRewardStatResponse struct {
+ AverageProofReward string `json:"averageProofReward"`
+ FeeTokenAddress string `json:"feeTokenAddress"`
+ NumBlocksAssigned uint64 `json:"numBlocksAssigned"`
+}
+type statsResponse struct {
+ AverageProofTime string `json:"averageProofTime"`
+ NumProofs uint64 `json:"numProofs"`
+ AverageProofRewards []proofRewardStatResponse `json:"averageProofRewards"`
+}
+
// GetStats returns the current computed stats for the deployed network.
//
// @Summary Get stats
@@ -20,22 +31,37 @@ import (
func (srv *Server) GetStats(c echo.Context) error {
cached, found := srv.cache.Get(CacheKeyStats)
- var stats *eventindexer.Stat
-
- var err error
+ var statsResp *statsResponse = &statsResponse{
+ AverageProofRewards: make([]proofRewardStatResponse, 0),
+ }
if found {
- stats = cached.(*eventindexer.Stat)
+ statsResp = cached.(*statsResponse)
} else {
- stats, err = srv.statRepo.Find(
+ stats, err := srv.statRepo.FindAll(
c.Request().Context(),
)
if err != nil {
return webutils.LogAndRenderErrors(c, http.StatusUnprocessableEntity, err)
}
- srv.cache.Set(CacheKeyStats, stats, 1*time.Minute)
+ for _, s := range stats {
+ if s.StatType == eventindexer.StatTypeProofTime {
+ statsResp.AverageProofTime = s.AverageProofTime
+ statsResp.NumProofs = s.NumProofs
+ }
+
+ if s.StatType == eventindexer.StatTypeProofReward {
+ statsResp.AverageProofRewards = append(statsResp.AverageProofRewards, proofRewardStatResponse{
+ AverageProofReward: s.AverageProofReward,
+ FeeTokenAddress: s.FeeTokenAddress,
+ NumBlocksAssigned: s.NumBlocksAssigned,
+ })
+ }
+ }
+
+ srv.cache.Set(CacheKeyStats, statsResp, 1*time.Minute)
}
- return c.JSON(http.StatusOK, stats)
+ return c.JSON(http.StatusOK, statsResp)
}
diff --git a/packages/eventindexer/http/get_stats_test.go b/packages/eventindexer/http/get_stats_test.go
index 9926d1f9a25..5af0728b3c0 100644
--- a/packages/eventindexer/http/get_stats_test.go
+++ b/packages/eventindexer/http/get_stats_test.go
@@ -16,13 +16,23 @@ import (
func Test_GetStats(t *testing.T) {
srv := newTestServer("")
- var proofTime = big.NewInt(5)
-
var proofReward = big.NewInt(7)
+ var proofTime = big.NewInt(1)
+
+ feeTokenAddress := "0x01"
+
_, err := srv.statRepo.Save(context.Background(), eventindexer.SaveStatOpts{
- ProofTime: proofTime,
- ProofReward: proofReward,
+ ProofReward: proofReward,
+ StatType: eventindexer.StatTypeProofReward,
+ FeeTokenAddress: &feeTokenAddress,
+ })
+
+ assert.Equal(t, nil, err)
+
+ _, err = srv.statRepo.Save(context.Background(), eventindexer.SaveStatOpts{
+ ProofTime: proofTime,
+ StatType: eventindexer.StatTypeProofTime,
})
assert.Equal(t, nil, err)
@@ -38,7 +48,7 @@ func Test_GetStats(t *testing.T) {
"0x123",
http.StatusOK,
// nolint: lll
- []string{`{"id":1,"averageProofTime":"5","averageProofReward":"7","averageProposerReward":"","numProposerRewards":0,"numProofs":1,"numVerifiedBlocks":1}`},
+ []string{`{"averageProofTime":"1","numProofs":1,"averageProofRewards":\[{"averageProofReward":"7","feeTokenAddress":"0x01","numBlocksAssigned":1}\]}`},
},
}
diff --git a/packages/eventindexer/http/get_unique_provers_test.go b/packages/eventindexer/http/get_unique_provers_test.go
index e0927b648be..a8a586fe1a2 100644
--- a/packages/eventindexer/http/get_unique_provers_test.go
+++ b/packages/eventindexer/http/get_unique_provers_test.go
@@ -22,7 +22,7 @@ func Test_GetUniqueProvers(t *testing.T) {
Data: `{"Owner": "0x0000000000000000000000000000000000000123"}`,
ChainID: big.NewInt(167001),
Address: "0x123",
- Event: eventindexer.EventNameBlockProven,
+ Event: eventindexer.EventNameTransitionProved,
TransactedAt: time.Now(),
})
diff --git a/packages/eventindexer/http/user_proved_block.go b/packages/eventindexer/http/user_proved_block.go
index 0687eb85256..35598877d87 100644
--- a/packages/eventindexer/http/user_proved_block.go
+++ b/packages/eventindexer/http/user_proved_block.go
@@ -12,7 +12,7 @@ func (srv *Server) UserProvedBlock(c echo.Context) error {
event, err := srv.eventRepo.FirstByAddressAndEventName(
c.Request().Context(),
c.QueryParam("address"),
- eventindexer.EventNameBlockProven,
+ eventindexer.EventNameTransitionProved,
)
if err != nil {
return webutils.LogAndRenderErrors(c, http.StatusUnprocessableEntity, err)
diff --git a/packages/eventindexer/indexer/config.go b/packages/eventindexer/indexer/config.go
index a46bd5c4afe..32ff034db0a 100644
--- a/packages/eventindexer/indexer/config.go
+++ b/packages/eventindexer/indexer/config.go
@@ -33,6 +33,7 @@ type Config struct {
ETHClientTimeout uint64
L1TaikoAddress common.Address
BridgeAddress common.Address
+ AssignmentHookAddress common.Address
SwapAddresses []common.Address
CORSOrigins []string
BlockBatchSize uint64
@@ -75,6 +76,7 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) {
ETHClientTimeout: c.Uint64(flags.ETHClientTimeout.Name),
L1TaikoAddress: common.HexToAddress(c.String(flags.L1TaikoAddress.Name)),
BridgeAddress: common.HexToAddress(c.String(flags.BridgeAddress.Name)),
+ AssignmentHookAddress: common.HexToAddress(c.String(flags.AssignmentHookAddress.Name)),
SwapAddresses: swaps,
CORSOrigins: cors,
BlockBatchSize: c.Uint64(flags.BlockBatchSize.Name),
diff --git a/packages/eventindexer/indexer/config_test.go b/packages/eventindexer/indexer/config_test.go
index 2e026fa4f45..1b86d67b635 100644
--- a/packages/eventindexer/indexer/config_test.go
+++ b/packages/eventindexer/indexer/config_test.go
@@ -14,6 +14,7 @@ var (
metricsHttpPort = "1001"
l1TaikoAddress = "0x63FaC9201494f0bd17B9892B9fae4d52fe3BD377"
bridgeAddress = "0x73FaC9201494f0bd17B9892B9fae4d52fe3BD377"
+ assignmentHookAddress = "0x83FaC9201494f0bd17B9892B9fae4d52fe3BD377"
swapAddresses = "0x33FaC9201494f0bd17B9892B9fae4d52fe3BD377,0x13FaC9201494f0bd17B9892B9fae4d52fe3BD377"
corsOrigins = "http://localhost:3000,http://localhost:3001"
databaseMaxIdleConns = "10"
@@ -54,6 +55,7 @@ func TestNewConfigFromCliContext(t *testing.T) {
assert.Equal(t, uint64(1001), c.MetricsHTTPPort)
assert.Equal(t, common.HexToAddress(l1TaikoAddress), c.L1TaikoAddress)
assert.Equal(t, common.HexToAddress(bridgeAddress), c.BridgeAddress)
+ assert.Equal(t, common.HexToAddress(assignmentHookAddress), c.AssignmentHookAddress)
assert.Equal(t, uint64(10), c.DatabaseMaxIdleConns)
assert.Equal(t, uint64(10), c.DatabaseMaxOpenConns)
assert.Equal(t, uint64(30), c.DatabaseMaxConnLifetime)
@@ -81,6 +83,7 @@ func TestNewConfigFromCliContext(t *testing.T) {
"--" + flags.L1TaikoAddress.Name, l1TaikoAddress,
"--" + flags.BridgeAddress.Name, bridgeAddress,
"--" + flags.SwapAddresses.Name, swapAddresses,
+ "--" + flags.AssignmentHookAddress.Name, assignmentHookAddress,
"--" + flags.HTTPPort.Name, httpPort,
"--" + flags.MetricsHTTPPort.Name, metricsHttpPort,
"--" + flags.CORSOrigins.Name, corsOrigins,
diff --git a/packages/eventindexer/indexer/filter.go b/packages/eventindexer/indexer/filter.go
index 8fe6a80fb9a..0c752aa7732 100644
--- a/packages/eventindexer/indexer/filter.go
+++ b/packages/eventindexer/indexer/filter.go
@@ -29,12 +29,12 @@ func filterFunc(
if indxr.taikol1 != nil {
wg.Go(func() error {
- blockProvenEvents, err := indxr.taikol1.FilterBlockProven(filterOpts, nil)
+ transitionProvedEvents, err := indxr.taikol1.FilterTransitionProved(filterOpts, nil)
if err != nil {
- return errors.Wrap(err, "indxr.taikol1.FilterBlockProven")
+ return errors.Wrap(err, "indxr.taikol1.FilterTransitionProved")
}
- err = indxr.saveBlockProvenEvents(ctx, chainID, blockProvenEvents)
+ err = indxr.saveTransitionProvedEvents(ctx, chainID, transitionProvedEvents)
if err != nil {
return errors.Wrap(err, "indxr.saveBlockProvenEvents")
}
@@ -42,6 +42,20 @@ func filterFunc(
return nil
})
+ wg.Go(func() error {
+ transitionContestedEvents, err := indxr.taikol1.FilterTransitionContested(filterOpts, nil)
+ if err != nil {
+ return errors.Wrap(err, "indxr.taikol1.FilterTransitionContested")
+ }
+
+ err = indxr.saveTransitionContestedEvents(ctx, chainID, transitionContestedEvents)
+ if err != nil {
+ return errors.Wrap(err, "indxr.saveTransitionContestedEvents")
+ }
+
+ return nil
+ })
+
wg.Go(func() error {
blockProposedEvents, err := indxr.taikol1.FilterBlockProposed(filterOpts, nil, nil)
if err != nil {
@@ -57,7 +71,7 @@ func filterFunc(
})
wg.Go(func() error {
- blockVerifiedEvents, err := indxr.taikol1.FilterBlockVerified(filterOpts, nil, nil)
+ blockVerifiedEvents, err := indxr.taikol1.FilterBlockVerified(filterOpts, nil, nil, nil)
if err != nil {
return errors.Wrap(err, "indxr.taikol1.FilterBlockVerified")
}
@@ -87,6 +101,22 @@ func filterFunc(
})
}
+ if indxr.assignmentHook != nil {
+ wg.Go(func() error {
+ blocksAssigned, err := indxr.assignmentHook.FilterBlockAssigned(filterOpts, nil)
+ if err != nil {
+ return errors.Wrap(err, "indxr.assignmentHook.FilterBlockAssigned")
+ }
+
+ err = indxr.saveBlockAssignedEvents(ctx, chainID, blocksAssigned)
+ if err != nil {
+ return errors.Wrap(err, "indxr.saveBlockAssignedEvents")
+ }
+
+ return nil
+ })
+ }
+
if indxr.swaps != nil {
for _, s := range indxr.swaps {
swap := s
diff --git a/packages/eventindexer/indexer/indexer.go b/packages/eventindexer/indexer/indexer.go
index 31d6ca2a6fe..1af622dfa2c 100644
--- a/packages/eventindexer/indexer/indexer.go
+++ b/packages/eventindexer/indexer/indexer.go
@@ -14,6 +14,7 @@ import (
"github.com/ethereum/go-ethereum/ethclient"
"github.com/labstack/echo/v4"
"github.com/taikoxyz/taiko-mono/packages/eventindexer"
+ "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/assignmenthook"
"github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/bridge"
"github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/swap"
"github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/taikol1"
@@ -64,9 +65,10 @@ type Indexer struct {
blockBatchSize uint64
subscriptionBackoff time.Duration
- taikol1 *taikol1.TaikoL1
- bridge *bridge.Bridge
- swaps []*swap.Swap
+ taikol1 *taikol1.TaikoL1
+ bridge *bridge.Bridge
+ assignmentHook *assignmenthook.AssignmentHook
+ swaps []*swap.Swap
httpPort uint64
srv *http.Server
@@ -79,6 +81,8 @@ type Indexer struct {
watchMode WatchMode
syncMode SyncMode
+
+ blockSaveMutex *sync.Mutex
}
func (indxr *Indexer) Start() error {
@@ -190,6 +194,15 @@ func InitFromConfig(ctx context.Context, i *Indexer, cfg *Config) error {
}
}
+ var assignmentHookContract *assignmenthook.AssignmentHook
+
+ if cfg.AssignmentHookAddress.Hex() != ZeroAddress.Hex() {
+ assignmentHookContract, err = assignmenthook.NewAssignmentHook(cfg.AssignmentHookAddress, ethClient)
+ if err != nil {
+ return errors.Wrap(err, "contracts.NewBridge")
+ }
+ }
+
var swapContracts []*swap.Swap
if cfg.SwapAddresses != nil && len(cfg.SwapAddresses) > 0 {
@@ -216,6 +229,7 @@ func InitFromConfig(ctx context.Context, i *Indexer, cfg *Config) error {
return err
}
+ i.blockSaveMutex = &sync.Mutex{}
i.accountRepo = accountRepository
i.eventRepo = eventRepository
i.processedBlockRepo = processedBlockRepository
@@ -227,6 +241,7 @@ func InitFromConfig(ctx context.Context, i *Indexer, cfg *Config) error {
i.ethClient = ethClient
i.taikol1 = taikoL1
i.bridge = bridgeContract
+ i.assignmentHook = assignmentHookContract
i.swaps = swapContracts
i.blockBatchSize = cfg.BlockBatchSize
i.subscriptionBackoff = time.Duration(cfg.SubscriptionBackoff) * time.Second
diff --git a/packages/eventindexer/indexer/save_block_assigned_event.go b/packages/eventindexer/indexer/save_block_assigned_event.go
new file mode 100644
index 00000000000..954b692d71c
--- /dev/null
+++ b/packages/eventindexer/indexer/save_block_assigned_event.go
@@ -0,0 +1,147 @@
+package indexer
+
+import (
+ "context"
+ "encoding/json"
+ "math/big"
+ "time"
+
+ "log/slog"
+
+ "github.com/pkg/errors"
+ "github.com/taikoxyz/taiko-mono/packages/eventindexer"
+ "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/assignmenthook"
+)
+
+func (indxr *Indexer) saveBlockAssignedEvents(
+ ctx context.Context,
+ chainID *big.Int,
+ events *assignmenthook.AssignmentHookBlockAssignedIterator,
+) error {
+ if !events.Next() || events.Event == nil {
+ slog.Info("no blockAssigned events")
+ return nil
+ }
+
+ for {
+ event := events.Event
+
+ if err := indxr.saveBlockAssignedEvent(ctx, chainID, event); err != nil {
+ eventindexer.BlockAssignedEventsProcessedError.Inc()
+
+ return errors.Wrap(err, "indxr.saveBlockAssignedEvent")
+ }
+
+ if !events.Next() {
+ return nil
+ }
+ }
+}
+
+func (indxr *Indexer) saveBlockAssignedEvent(
+ ctx context.Context,
+ chainID *big.Int,
+ event *assignmenthook.AssignmentHookBlockAssigned,
+) error {
+ slog.Info("blockAssigned", "prover", event.AssignedProver.Hex())
+
+ marshaled, err := json.Marshal(event)
+ if err != nil {
+ return errors.Wrap(err, "json.Marshal(event)")
+ }
+
+ assignedProver := event.AssignedProver.Hex()
+
+ block, err := indxr.ethClient.BlockByNumber(ctx, new(big.Int).SetUint64(event.Raw.BlockNumber))
+ if err != nil {
+ return errors.Wrap(err, "indxr.ethClient.BlockByNumber")
+ }
+
+ proverReward, err := indxr.updateAverageProverReward(ctx, event)
+ if err != nil {
+ return errors.Wrap(err, "indxr.updateAverageProverReward")
+ }
+
+ feeToken := event.Assignment.FeeToken.Hex()
+
+ _, err = indxr.eventRepo.Save(ctx, eventindexer.SaveEventOpts{
+ Name: eventindexer.EventNameBlockAssigned,
+ Data: string(marshaled),
+ ChainID: chainID,
+ Event: eventindexer.EventNameBlockAssigned,
+ Address: "",
+ AssignedProver: &assignedProver,
+ TransactedAt: time.Unix(int64(block.Time()), 0).UTC(),
+ Amount: proverReward,
+ ProofReward: proverReward,
+ FeeTokenAddress: &feeToken,
+ })
+ if err != nil {
+ return errors.Wrap(err, "indxr.eventRepo.Save")
+ }
+
+ eventindexer.BlockProposedEventsProcessed.Inc()
+
+ return nil
+}
+
+func (indxr *Indexer) updateAverageProverReward(
+ ctx context.Context,
+ event *assignmenthook.AssignmentHookBlockAssigned,
+) (*big.Int, error) {
+ feeToken := event.Assignment.FeeToken.Hex()
+
+ stat, err := indxr.statRepo.Find(ctx, eventindexer.StatTypeProofReward, &feeToken)
+ if err != nil {
+ return nil, errors.Wrap(err, "indxr.statRepo.Find")
+ }
+
+ avg, ok := new(big.Int).SetString(stat.AverageProofReward, 10)
+ if !ok {
+ return nil, errors.New("unable to convert average proof time to string")
+ }
+
+ var proverFee *big.Int
+
+ tiers := event.Assignment.TierFees
+ minTier := event.Meta.MinTier
+
+ for _, tier := range tiers {
+ if tier.Tier == minTier {
+ proverFee = tier.Fee
+ break
+ }
+ }
+
+ newAverageProofReward := calcNewAverage(
+ avg,
+ new(big.Int).SetUint64(stat.NumProofs),
+ proverFee,
+ )
+
+ slog.Info("newAverageProofReward update",
+ "prover",
+ event.AssignedProver.Hex(),
+ "proverFee",
+ proverFee.String(),
+ "tiers",
+ event.Assignment.TierFees,
+ "minTier",
+ event.Meta.MinTier,
+ "avg",
+ avg.String(),
+ "newAvg",
+ newAverageProofReward.String(),
+ )
+
+ _, err = indxr.statRepo.Save(ctx, eventindexer.SaveStatOpts{
+ ProofReward: newAverageProofReward,
+ StatType: eventindexer.StatTypeProofReward,
+ FeeTokenAddress: &feeToken,
+ })
+ if err != nil {
+ return nil, errors.Wrap(err, "indxr.statRepo.Save")
+ }
+
+ return big.NewInt(0), nil
+}
diff --git a/packages/eventindexer/indexer/save_block_proposed_event.go b/packages/eventindexer/indexer/save_block_proposed_event.go
index 6564efcef1f..1f41c6656a8 100644
--- a/packages/eventindexer/indexer/save_block_proposed_event.go
+++ b/packages/eventindexer/indexer/save_block_proposed_event.go
@@ -68,23 +68,13 @@ func (indxr *Indexer) saveBlockProposedEvent(
blockID := event.BlockId.Int64()
- assignedProver := event.Prover.Hex()
+ assignedProver := event.AssignedProver.Hex()
block, err := indxr.ethClient.BlockByNumber(ctx, new(big.Int).SetUint64(event.Raw.BlockNumber))
if err != nil {
return errors.Wrap(err, "indxr.ethClient.BlockByNumber")
}
- proposerReward, err := indxr.updateAverageProposerReward(ctx, event)
- if err != nil {
- return errors.Wrap(err, "indxr.updateAverageProposerReward")
- }
-
- proverReward, err := indxr.updateAverageProverReward(ctx, event)
- if err != nil {
- return errors.Wrap(err, "indxr.updateAverageProposerReward")
- }
-
_, err = indxr.eventRepo.Save(ctx, eventindexer.SaveEventOpts{
Name: eventindexer.EventNameBlockProposed,
Data: string(marshaled),
@@ -94,9 +84,6 @@ func (indxr *Indexer) saveBlockProposedEvent(
BlockID: &blockID,
AssignedProver: &assignedProver,
TransactedAt: time.Unix(int64(block.Time()), 0).UTC(),
- Amount: event.Reward,
- ProposerReward: proposerReward,
- ProofReward: proverReward,
})
if err != nil {
return errors.Wrap(err, "indxr.eventRepo.Save")
@@ -106,94 +93,3 @@ func (indxr *Indexer) saveBlockProposedEvent(
return nil
}
-
-func (indxr *Indexer) updateAverageProposerReward(
- ctx context.Context,
- event *taikol1.TaikoL1BlockProposed,
-) (*big.Int, error) {
- stat, err := indxr.statRepo.Find(ctx)
- if err != nil {
- return nil, errors.Wrap(err, "indxr.statRepo.Find")
- }
-
- reward := event.Reward
-
- avg, ok := new(big.Int).SetString(stat.AverageProposerReward, 10)
- if !ok {
- return nil, errors.New("unable to convert average proposer to string")
- }
-
- newAverageProposerReward := calcNewAverage(
- avg,
- new(big.Int).SetUint64(stat.NumProposerRewards),
- reward,
- )
-
- slog.Info("newAverageProposerReward update",
- "id",
- event.BlockId.Int64(),
- "prover",
- event.Prover.Hex(),
- "avg",
- avg.String(),
- "newAvg",
- newAverageProposerReward.String(),
- )
-
- _, err = indxr.statRepo.Save(ctx, eventindexer.SaveStatOpts{
- ProposerReward: newAverageProposerReward,
- })
- if err != nil {
- return nil, errors.Wrap(err, "indxr.statRepo.Save")
- }
-
- return reward, err
-}
-
-func (indxr *Indexer) updateAverageProverReward(
- ctx context.Context,
- event *taikol1.TaikoL1BlockProposed,
-) (*big.Int, error) {
- stat, err := indxr.statRepo.Find(ctx)
- if err != nil {
- return nil, errors.Wrap(err, "indxr.statRepo.Find")
- }
-
- tx, _, err := indxr.ethClient.TransactionByHash(ctx, event.Raw.TxHash)
- if err != nil {
- return nil, errors.Wrap(err, "indxr.ethClient.TransactionByHash")
- }
-
- reward := tx.Value()
-
- avg, ok := new(big.Int).SetString(stat.AverageProofReward, 10)
- if !ok {
- return nil, errors.New("unable to convert average proof time to string")
- }
-
- newAverageProofReward := calcNewAverage(
- avg,
- new(big.Int).SetUint64(stat.NumProofs),
- reward,
- )
-
- slog.Info("newAverageProofReward update",
- "id",
- event.BlockId.Int64(),
- "prover",
- event.Prover.Hex(),
- "avg",
- avg.String(),
- "newAvg",
- newAverageProofReward.String(),
- )
-
- _, err = indxr.statRepo.Save(ctx, eventindexer.SaveStatOpts{
- ProofReward: newAverageProofReward,
- })
- if err != nil {
- return nil, errors.Wrap(err, "indxr.statRepo.Save")
- }
-
- return reward, nil
-}
diff --git a/packages/eventindexer/indexer/save_transition_contested_event.go b/packages/eventindexer/indexer/save_transition_contested_event.go
new file mode 100644
index 00000000000..a721bccba4b
--- /dev/null
+++ b/packages/eventindexer/indexer/save_transition_contested_event.go
@@ -0,0 +1,89 @@
+package indexer
+
+import (
+ "context"
+ "encoding/json"
+ "math/big"
+ "time"
+
+ "log/slog"
+
+ "github.com/pkg/errors"
+ "github.com/taikoxyz/taiko-mono/packages/eventindexer"
+ "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/taikol1"
+)
+
+func (indxr *Indexer) saveTransitionContestedEvents(
+ ctx context.Context,
+ chainID *big.Int,
+ events *taikol1.TaikoL1TransitionContestedIterator,
+) error {
+ if !events.Next() || events.Event == nil {
+ slog.Info("no transitionContested events")
+ return nil
+ }
+
+ for {
+ event := events.Event
+
+ if err := indxr.detectAndHandleReorg(
+ ctx,
+ eventindexer.EventNameTransitionContested,
+ event.BlockId.Int64(),
+ ); err != nil {
+ return errors.Wrap(err, "indxr.detectAndHandleReorg")
+ }
+
+ if err := indxr.saveTransitionContestedEvent(ctx, chainID, event); err != nil {
+ eventindexer.TransitionContestedEventsProcessedError.Inc()
+
+ return errors.Wrap(err, "indxr.saveBlockProvenEvent")
+ }
+
+ if !events.Next() {
+ return nil
+ }
+ }
+}
+
+func (indxr *Indexer) saveTransitionContestedEvent(
+ ctx context.Context,
+ chainID *big.Int,
+ event *taikol1.TaikoL1TransitionContested,
+) error {
+ slog.Info("transitionContested event found",
+ "blockID", event.BlockId.Int64(),
+ "contestBond", event.ContestBond.String(),
+ "contester", event.Contester.Hex(),
+ "tier", event.Tier,
+ )
+
+ marshaled, err := json.Marshal(event)
+ if err != nil {
+ return errors.Wrap(err, "json.Marshal(event)")
+ }
+
+ blockID := event.BlockId.Int64()
+
+ block, err := indxr.ethClient.BlockByNumber(ctx, new(big.Int).SetUint64(event.Raw.BlockNumber))
+ if err != nil {
+ return errors.Wrap(err, "indxr.ethClient.BlockByNumber")
+ }
+
+ _, err = indxr.eventRepo.Save(ctx, eventindexer.SaveEventOpts{
+ Name: eventindexer.EventNameTransitionContested,
+ Data: string(marshaled),
+ ChainID: chainID,
+ Event: eventindexer.EventNameTransitionContested,
+ Address: event.Contester.Hex(),
+ BlockID: &blockID,
+ TransactedAt: time.Unix(int64(block.Time()), 0),
+ })
+ if err != nil {
+ return errors.Wrap(err, "indxr.eventRepo.Save")
+ }
+
+ eventindexer.TransitionContestedEventsProcessed.Inc()
+
+ return nil
+}
diff --git a/packages/eventindexer/indexer/save_block_proven_event.go b/packages/eventindexer/indexer/save_transition_proved_event.go
similarity index 80%
rename from packages/eventindexer/indexer/save_block_proven_event.go
rename to packages/eventindexer/indexer/save_transition_proved_event.go
index 6bdebe599e1..31e17caf871 100644
--- a/packages/eventindexer/indexer/save_block_proven_event.go
+++ b/packages/eventindexer/indexer/save_transition_proved_event.go
@@ -19,25 +19,25 @@ var (
oracleProver = common.HexToAddress("0x0000000000000000000000000000000000000000")
)
-func (indxr *Indexer) saveBlockProvenEvents(
+func (indxr *Indexer) saveTransitionProvedEvents(
ctx context.Context,
chainID *big.Int,
- events *taikol1.TaikoL1BlockProvenIterator,
+ events *taikol1.TaikoL1TransitionProvedIterator,
) error {
if !events.Next() || events.Event == nil {
- slog.Info("no blockProven events")
+ slog.Info("no transitionProved events")
return nil
}
for {
event := events.Event
- if err := indxr.detectAndHandleReorg(ctx, eventindexer.EventNameBlockProven, event.BlockId.Int64()); err != nil {
+ if err := indxr.detectAndHandleReorg(ctx, eventindexer.EventNameTransitionProved, event.BlockId.Int64()); err != nil {
return errors.Wrap(err, "indxr.detectAndHandleReorg")
}
- if err := indxr.saveBlockProvenEvent(ctx, chainID, event); err != nil {
- eventindexer.BlockProvenEventsProcessedError.Inc()
+ if err := indxr.saveTransitionProvedEvent(ctx, chainID, event); err != nil {
+ eventindexer.TransitionProvedEventsProcessedError.Inc()
return errors.Wrap(err, "indxr.saveBlockProvenEvent")
}
@@ -48,12 +48,12 @@ func (indxr *Indexer) saveBlockProvenEvents(
}
}
-func (indxr *Indexer) saveBlockProvenEvent(
+func (indxr *Indexer) saveTransitionProvedEvent(
ctx context.Context,
chainID *big.Int,
- event *taikol1.TaikoL1BlockProven,
+ event *taikol1.TaikoL1TransitionProved,
) error {
- slog.Info("blockProven event found",
+ slog.Info("transitionProved event found",
"blockID", event.BlockId.Int64(),
"prover", event.Prover.Hex())
@@ -70,10 +70,10 @@ func (indxr *Indexer) saveBlockProvenEvent(
}
_, err = indxr.eventRepo.Save(ctx, eventindexer.SaveEventOpts{
- Name: eventindexer.EventNameBlockProven,
+ Name: eventindexer.EventNameTransitionProved,
Data: string(marshaled),
ChainID: chainID,
- Event: eventindexer.EventNameBlockProven,
+ Event: eventindexer.EventNameTransitionProved,
Address: event.Prover.Hex(),
BlockID: &blockID,
TransactedAt: time.Unix(int64(block.Time()), 0),
@@ -82,7 +82,7 @@ func (indxr *Indexer) saveBlockProvenEvent(
return errors.Wrap(err, "indxr.eventRepo.Save")
}
- eventindexer.BlockProvenEventsProcessed.Inc()
+ eventindexer.TransitionProvedEventsProcessed.Inc()
if event.Prover.Hex() != systemProver.Hex() && event.Prover.Hex() != oracleProver.Hex() {
if err := indxr.updateAverageProofTime(ctx, event); err != nil {
@@ -93,7 +93,7 @@ func (indxr *Indexer) saveBlockProvenEvent(
return nil
}
-func (indxr *Indexer) updateAverageProofTime(ctx context.Context, event *taikol1.TaikoL1BlockProven) error {
+func (indxr *Indexer) updateAverageProofTime(ctx context.Context, event *taikol1.TaikoL1TransitionProved) error {
block, err := indxr.taikol1.GetBlock(nil, event.BlockId.Uint64())
// will be unable to GetBlock for older blocks, just return nil, we dont
// care about averageProofTime that much to be honest for older blocks
@@ -108,7 +108,7 @@ func (indxr *Indexer) updateAverageProofTime(ctx context.Context, event *taikol1
return errors.Wrap(err, "indxr.ethClient.BlockByHash")
}
- stat, err := indxr.statRepo.Find(ctx)
+ stat, err := indxr.statRepo.Find(ctx, eventindexer.StatTypeProofTime, nil)
if err != nil {
return errors.Wrap(err, "indxr.statRepo.Find")
}
@@ -149,6 +149,7 @@ func (indxr *Indexer) updateAverageProofTime(ctx context.Context, event *taikol1
_, err = indxr.statRepo.Save(ctx, eventindexer.SaveStatOpts{
ProofTime: newAverageProofTime,
+ StatType: eventindexer.StatTypeProofTime,
})
if err != nil {
return errors.Wrap(err, "indxr.statRepo.Save")
diff --git a/packages/eventindexer/indexer/set_initial_processing_block_height.go b/packages/eventindexer/indexer/set_initial_processing_block_height.go
index 2f2f9d16121..978b6f0cde6 100644
--- a/packages/eventindexer/indexer/set_initial_processing_block_height.go
+++ b/packages/eventindexer/indexer/set_initial_processing_block_height.go
@@ -22,7 +22,7 @@ func (indxr *Indexer) setInitialProcessingBlockByMode(
return errors.Wrap(err, "indxr.taikoL1.GetStateVariables")
}
- startingBlock = stateVars.GenesisHeight
+ startingBlock = stateVars.A.GenesisHeight
}
switch mode {
diff --git a/packages/eventindexer/indexer/subscribe.go b/packages/eventindexer/indexer/subscribe.go
index 36db09e2e4d..80397d82f1c 100644
--- a/packages/eventindexer/indexer/subscribe.go
+++ b/packages/eventindexer/indexer/subscribe.go
@@ -7,11 +7,13 @@ import (
"log/slog"
"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"
"github.com/labstack/gommon/log"
"github.com/pkg/errors"
"github.com/taikoxyz/taiko-mono/packages/eventindexer"
+ "github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/assignmenthook"
"github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/bridge"
"github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/swap"
"github.com/taikoxyz/taiko-mono/packages/eventindexer/contracts/taikol1"
@@ -24,7 +26,8 @@ func (indxr *Indexer) subscribe(ctx context.Context, chainID *big.Int) error {
errChan := make(chan error)
if indxr.taikol1 != nil {
- go indxr.subscribeBlockProven(ctx, chainID, errChan)
+ go indxr.subscribeTransitionProved(ctx, chainID, errChan)
+ go indxr.subscribeTransitionContested(ctx, chainID, errChan)
go indxr.subscribeBlockProposed(ctx, chainID, errChan)
go indxr.subscribeBlockVerified(ctx, chainID, errChan)
}
@@ -40,6 +43,10 @@ func (indxr *Indexer) subscribe(ctx context.Context, chainID *big.Int) error {
}
}
+ if indxr.assignmentHook != nil {
+ go indxr.subscribeBlockAssigned(ctx, chainID, errChan)
+ }
+
go indxr.subscribeRawBlockData(ctx, chainID, errChan)
// nolint: gosimple
@@ -94,18 +101,18 @@ func (indxr *Indexer) subscribeRawBlockData(
}
}
-func (indxr *Indexer) subscribeBlockProven(ctx context.Context, chainID *big.Int, errChan chan error) {
- sink := make(chan *taikol1.TaikoL1BlockProven)
+func (indxr *Indexer) subscribeTransitionProved(ctx context.Context, chainID *big.Int, errChan chan error) {
+ sink := make(chan *taikol1.TaikoL1TransitionProved)
sub := event.ResubscribeErr(
indxr.subscriptionBackoff,
func(ctx context.Context, err error) (event.Subscription, error) {
if err != nil {
- log.Error("indxr.taikoL1.WatchBlockProven", "error", err)
+ log.Error("indxr.taikoL1.WatchTransitionProved", "error", err)
}
- log.Info("resubscribing to BlockProven events")
+ log.Info("resubscribing to TransitionProved events")
- return indxr.taikol1.WatchBlockProven(&bind.WatchOpts{
+ return indxr.taikol1.WatchTransitionProved(&bind.WatchOpts{
Context: ctx,
}, sink, nil)
})
@@ -122,36 +129,72 @@ func (indxr *Indexer) subscribeBlockProven(ctx context.Context, chainID *big.Int
errChan <- errors.Wrap(err, "sub.Err()")
case event := <-sink:
go func() {
- log.Info("blockProvenEvent from subscription for prover",
+ log.Info("transitionProvenEvent from subscription for prover",
"prover", event.Prover.Hex(),
+ "blockId", event.BlockId.String(),
)
- if err := indxr.saveBlockProvenEvent(ctx, chainID, event); err != nil {
- eventindexer.BlockProvenEventsProcessedError.Inc()
+ if err := indxr.saveTransitionProvedEvent(ctx, chainID, event); err != nil {
+ eventindexer.TransitionProvedEventsProcessedError.Inc()
- log.Error("indxr.subscribe, indxr.saveBlockProvenEvent", "error", err)
+ log.Error("indxr.subscribe, indxr.saveTransitionProvedEvent", "error", err)
return
}
- block, err := indxr.processedBlockRepo.GetLatestBlockProcessed(chainID)
- if err != nil {
- slog.Error("indxr.subscribe, indxr.processedBlockRepo.GetLatestBlockProcessed", "error", err)
+ if err := indxr.saveLatestBlockSeen(ctx, chainID, event.Raw.BlockNumber, event.Raw.BlockHash); err != nil {
+ log.Error("indxr.subscribe, indxr.saveLatestBlockSeen", "error", err)
+ }
+ }()
+ }
+ }
+}
+
+func (indxr *Indexer) subscribeTransitionContested(ctx context.Context, chainID *big.Int, errChan chan error) {
+ sink := make(chan *taikol1.TaikoL1TransitionContested)
+
+ sub := event.ResubscribeErr(
+ indxr.subscriptionBackoff,
+ func(ctx context.Context, err error) (event.Subscription, error) {
+ if err != nil {
+ log.Error("indxr.taikoL1.WatchTransitionContested", "error", err)
+ }
+ log.Info("resubscribing to TransitionContested events")
+
+ return indxr.taikol1.WatchTransitionContested(&bind.WatchOpts{
+ Context: ctx,
+ }, sink, nil)
+ })
+
+ defer sub.Unsubscribe()
+
+ for {
+ select {
+ case <-ctx.Done():
+ slog.Info("context finished")
+ return
+ case err := <-sub.Err():
+ slog.Error("sub.Err()", "error", err)
+ errChan <- errors.Wrap(err, "sub.Err()")
+ case event := <-sink:
+ go func() {
+ log.Info("transitionContestedEvent from subscription for prover",
+ "contester", event.Contester.Hex(),
+ "blockId", event.BlockId.String(),
+ "contestBond", event.ContestBond.String(),
+ "tier", event.Tier,
+ )
+
+ if err := indxr.saveTransitionContestedEvent(ctx, chainID, event); err != nil {
+ eventindexer.TransitionContestedEventsProcessedError.Inc()
+
+ log.Error("indxr.subscribe, indxr.saveTransitionContestedEvent", "error", err)
+
return
}
- if block.Height < event.Raw.BlockNumber {
- err = indxr.processedBlockRepo.Save(eventindexer.SaveProcessedBlockOpts{
- Height: event.Raw.BlockNumber,
- Hash: event.Raw.BlockHash,
- ChainID: chainID,
- })
- if err != nil {
- slog.Error("indxr.subscribe, blockRepo.save", "error", err)
- return
- }
-
- eventindexer.BlocksProcessed.Inc()
+ if err := indxr.saveLatestBlockSeen(ctx, chainID, event.Raw.BlockNumber, event.Raw.BlockHash); err != nil {
+ log.Error("indxr.subscribe, indxr.saveLatestBlockSeen", "error", err)
}
}()
}
@@ -212,26 +255,8 @@ func (indxr *Indexer) subscribeBlockProposed(ctx context.Context, chainID *big.I
return
}
- block, err := indxr.processedBlockRepo.GetLatestBlockProcessed(chainID)
- if err != nil {
- slog.Error("indxr.subscribe, indxr.processedBlockRepo.GetLatestBlockProcessed", "error", err)
-
- return
- }
-
- if block.Height < event.Raw.BlockNumber {
- err = indxr.processedBlockRepo.Save(eventindexer.SaveProcessedBlockOpts{
- Height: event.Raw.BlockNumber,
- Hash: event.Raw.BlockHash,
- ChainID: chainID,
- })
- if err != nil {
- slog.Error("indxr.subscribe, blockRepo.save", "error", err)
-
- return
- }
-
- eventindexer.BlocksProcessed.Inc()
+ if err := indxr.saveLatestBlockSeen(ctx, chainID, event.Raw.BlockNumber, event.Raw.BlockHash); err != nil {
+ log.Error("indxr.subscribe, indxr.saveLatestBlockSeen", "error", err)
}
}()
}
@@ -252,7 +277,7 @@ func (indxr *Indexer) subscribeBlockVerified(ctx context.Context, chainID *big.I
return indxr.taikol1.WatchBlockVerified(&bind.WatchOpts{
Context: ctx,
- }, sink, nil, nil)
+ }, sink, nil, nil, nil)
})
defer sub.Unsubscribe()
@@ -276,24 +301,8 @@ func (indxr *Indexer) subscribeBlockVerified(ctx context.Context, chainID *big.I
return
}
- block, err := indxr.processedBlockRepo.GetLatestBlockProcessed(chainID)
- if err != nil {
- slog.Error("indxr.subscribe, indxr.processedBlockRepo.GetLatestBlockProcessed", "error", err)
- return
- }
-
- if block.Height < event.Raw.BlockNumber {
- err = indxr.processedBlockRepo.Save(eventindexer.SaveProcessedBlockOpts{
- Height: event.Raw.BlockNumber,
- Hash: event.Raw.BlockHash,
- ChainID: chainID,
- })
- if err != nil {
- slog.Error("indxr.subscribe, blockRepo.save", "error", err)
- return
- }
-
- eventindexer.BlocksProcessed.Inc()
+ if err := indxr.saveLatestBlockSeen(ctx, chainID, event.Raw.BlockNumber, event.Raw.BlockHash); err != nil {
+ log.Error("indxr.subscribe, indxr.saveLatestBlockSeen", "error", err)
}
}()
}
@@ -339,24 +348,8 @@ func (indxr *Indexer) subscribeMessageSent(ctx context.Context, chainID *big.Int
return
}
- block, err := indxr.processedBlockRepo.GetLatestBlockProcessed(chainID)
- if err != nil {
- slog.Error("indxr.subscribe, indxr.processedBlockRepo.GetLatestBlockProcessed", "error", err)
- return
- }
-
- if block.Height < event.Raw.BlockNumber {
- err = indxr.processedBlockRepo.Save(eventindexer.SaveProcessedBlockOpts{
- Height: event.Raw.BlockNumber,
- Hash: event.Raw.BlockHash,
- ChainID: chainID,
- })
- if err != nil {
- slog.Error("indxr.subscribe, blockRepo.save", "error", err)
- return
- }
-
- eventindexer.BlocksProcessed.Inc()
+ if err := indxr.saveLatestBlockSeen(ctx, chainID, event.Raw.BlockNumber, event.Raw.BlockHash); err != nil {
+ log.Error("indxr.subscribe, indxr.saveLatestBlockSeen", "error", err)
}
}()
}
@@ -399,24 +392,8 @@ func (indxr *Indexer) subscribeSwap(ctx context.Context, s *swap.Swap, chainID *
return
}
- block, err := indxr.processedBlockRepo.GetLatestBlockProcessed(chainID)
- if err != nil {
- slog.Error("indxr.subscribe, indxr.processedBlockRepo.GetLatestBlockProcessed", "error", err)
- return
- }
-
- if block.Height < event.Raw.BlockNumber {
- err = indxr.processedBlockRepo.Save(eventindexer.SaveProcessedBlockOpts{
- Height: event.Raw.BlockNumber,
- Hash: event.Raw.BlockHash,
- ChainID: chainID,
- })
- if err != nil {
- slog.Error("indxr.subscribe, blockRepo.save", "error", err)
- return
- }
-
- eventindexer.BlocksProcessed.Inc()
+ if err := indxr.saveLatestBlockSeen(ctx, chainID, event.Raw.BlockNumber, event.Raw.BlockHash); err != nil {
+ log.Error("indxr.subscribe, indxr.saveLatestBlockSeen", "error", err)
}
}()
}
@@ -459,26 +436,91 @@ func (indxr *Indexer) subscribeLiquidityAdded(ctx context.Context, s *swap.Swap,
return
}
- block, err := indxr.processedBlockRepo.GetLatestBlockProcessed(chainID)
- if err != nil {
- slog.Error("indxr.subscribe, blockRepo.GetLatestBlockProcessed", "error", err)
+ if err := indxr.saveLatestBlockSeen(ctx, chainID, event.Raw.BlockNumber, event.Raw.BlockHash); err != nil {
+ log.Error("indxr.subscribe, indxr.saveLatestBlockSeen", "error", err)
+ }
+ }()
+ }
+ }
+}
+
+func (indxr *Indexer) subscribeBlockAssigned(ctx context.Context, chainID *big.Int, errChan chan error) {
+ sink := make(chan *assignmenthook.AssignmentHookBlockAssigned)
+
+ sub := event.ResubscribeErr(
+ indxr.subscriptionBackoff,
+ func(ctx context.Context, err error) (event.Subscription, error) {
+ if err != nil {
+ log.Error("assignmenthook.AssignmentHookBlockAssignedd", "error", err)
+ }
+ log.Info("resubscribing to TransitionProved events")
+
+ return indxr.assignmentHook.WatchBlockAssigned(&bind.WatchOpts{
+ Context: ctx,
+ }, sink, nil)
+ })
+
+ defer sub.Unsubscribe()
+
+ for {
+ select {
+ case <-ctx.Done():
+ slog.Info("context finished")
+ return
+ case err := <-sub.Err():
+ slog.Error("sub.Err()", "error", err)
+ errChan <- errors.Wrap(err, "sub.Err()")
+ case event := <-sink:
+ go func() {
+ log.Info("blockAssigned event from subscription",
+ "prover", event.AssignedProver.Hex(),
+ "metaId", event.Meta.Id,
+ )
+
+ if err := indxr.saveBlockAssignedEvent(ctx, chainID, event); err != nil {
+ eventindexer.TransitionProvedEventsProcessedError.Inc()
+
+ log.Error("indxr.subscribe, indxr.saveBlockAssignedEvent", "error", err)
+
return
}
- if block.Height < event.Raw.BlockNumber {
- err = indxr.processedBlockRepo.Save(eventindexer.SaveProcessedBlockOpts{
- Height: event.Raw.BlockNumber,
- Hash: event.Raw.BlockHash,
- ChainID: chainID,
- })
- if err != nil {
- slog.Error("indxr.subscribe, indxr.processedBlockRepo.Save", "error", err)
- return
- }
-
- eventindexer.BlocksProcessed.Inc()
+ if err := indxr.saveLatestBlockSeen(ctx, chainID, event.Raw.BlockNumber, event.Raw.BlockHash); err != nil {
+ log.Error("indxr.subscribe, indxr.saveLatestBlockSeen", "error", err)
}
}()
}
}
}
+
+func (indxr *Indexer) saveLatestBlockSeen(
+ ctx context.Context,
+ chainID *big.Int,
+ blockNumber uint64,
+ blockHash common.Hash,
+) error {
+ indxr.blockSaveMutex.Lock()
+ defer indxr.blockSaveMutex.Unlock()
+
+ block, err := indxr.processedBlockRepo.GetLatestBlockProcessed(chainID)
+ if err != nil {
+ slog.Error("indxr.subscribe, indxr.processedBlockRepo.GetLatestBlockProcessed", "error", err)
+ return err
+ }
+
+ if block.Height < blockNumber {
+ err = indxr.processedBlockRepo.Save(eventindexer.SaveProcessedBlockOpts{
+ Height: blockNumber,
+ Hash: blockHash,
+ ChainID: chainID,
+ })
+ if err != nil {
+ slog.Error("indxr.subscribe, blockRepo.save", "error", err)
+ return err
+ }
+
+ eventindexer.BlocksProcessed.Inc()
+ }
+
+ return nil
+}
diff --git a/packages/eventindexer/migrations/1666650599_create_events_table.sql b/packages/eventindexer/migrations/1666650599_create_events_table.sql
index 40fe273e1f1..8075afc911f 100644
--- a/packages/eventindexer/migrations/1666650599_create_events_table.sql
+++ b/packages/eventindexer/migrations/1666650599_create_events_table.sql
@@ -2,8 +2,8 @@
-- +goose StatementBegin
CREATE TABLE IF NOT EXISTS events (
id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
- name VARCHAR(15) NOT NULL,
- event VARCHAR(15) NOT NULL DEFAULT "",
+ name VARCHAR(24) NOT NULL,
+ event VARCHAR(24) NOT NULL DEFAULT "",
chain_id int NOT NULL,
data JSON NOT NULL,
address VARCHAR(42) NOT NULL DEFAULT "",
@@ -12,6 +12,7 @@ CREATE TABLE IF NOT EXISTS events (
proof_reward VARCHAR(255) DEFAULT NULL,
proposer_reward VARCHAR(255) DEFAULT NULL,
assigned_prover VARCHAR(42) NOT NULL DEFAULT "",
+ fee_token_address varchar(42) DEFAULT "",
transacted_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
diff --git a/packages/eventindexer/migrations/1666650701_create_stats_table.sql b/packages/eventindexer/migrations/1666650701_create_stats_table.sql
index 60bbbeea6fc..2cc76773d09 100644
--- a/packages/eventindexer/migrations/1666650701_create_stats_table.sql
+++ b/packages/eventindexer/migrations/1666650701_create_stats_table.sql
@@ -2,12 +2,13 @@
-- +goose StatementBegin
CREATE TABLE IF NOT EXISTS stats (
id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
- average_proof_time VARCHAR(255) NOT NULL DEFAULT "0",
- average_proof_reward VARCHAR(255) NOT NULL DEFAULT "0",
- average_proposer_reward VARCHAR(255) NOT NULL DEFAULT "0",
- num_proposer_rewards int NOT NULL default 0,
- num_proofs int NOT NULL default 0,
- num_verified_blocks int NOT NULL default 0,
+ average_proof_time VARCHAR(255) DEFAULT "0",
+ average_proof_reward VARCHAR(255) DEFAULT "0",
+ stat_type varchar(22) NOT NULL,
+ num_proofs int default 0,
+ num_verified_blocks int default 0,
+ num_blocks_assigned int default 0,
+ fee_token_address VARCHAR(42) DEFAULT "",
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
diff --git a/packages/eventindexer/migrations/20230906203931_create_time_series_data_table.sql b/packages/eventindexer/migrations/20230906203931_create_time_series_data_table.sql
index b41b7cf0bcc..90dda4e4d44 100644
--- a/packages/eventindexer/migrations/20230906203931_create_time_series_data_table.sql
+++ b/packages/eventindexer/migrations/20230906203931_create_time_series_data_table.sql
@@ -5,6 +5,7 @@ CREATE TABLE IF NOT EXISTS time_series_data (
task VARCHAR(40) NOT NULL,
value DECIMAL(65, 0) NOT NULL,
date VARCHAR(20) NOT NULL,
+ fee_token_address varchar(42) DEFAULT "",
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
UNIQUE key `task_date` (`task`, `date`)
diff --git a/packages/eventindexer/mock/stat_repository.go b/packages/eventindexer/mock/stat_repository.go
index f49d29b01f2..8754fa8a781 100644
--- a/packages/eventindexer/mock/stat_repository.go
+++ b/packages/eventindexer/mock/stat_repository.go
@@ -7,36 +7,60 @@ import (
)
type StatRepository struct {
- stats *eventindexer.Stat
+ stats []*eventindexer.Stat
}
func NewStatRepository() *StatRepository {
- return &StatRepository{}
+ return &StatRepository{
+ stats: make([]*eventindexer.Stat, 0),
+ }
}
func (r *StatRepository) Save(ctx context.Context, opts eventindexer.SaveStatOpts) (*eventindexer.Stat, error) {
proofReward := ""
- if opts.ProofReward != nil {
+ if opts.StatType == eventindexer.StatTypeProofReward && opts.ProofReward != nil {
proofReward = opts.ProofReward.String()
}
proofTime := ""
- if opts.ProofTime != nil {
+ if opts.StatType == eventindexer.StatTypeProofTime && opts.ProofTime != nil {
proofTime = opts.ProofTime.String()
}
- r.stats = &eventindexer.Stat{
+ stat := &eventindexer.Stat{
ID: 1,
AverageProofTime: proofTime,
AverageProofReward: proofReward,
NumProofs: 1,
- NumVerifiedBlocks: 1,
+ NumBlocksAssigned: 1,
+ StatType: opts.StatType,
+ }
+
+ if opts.FeeTokenAddress != nil {
+ stat.FeeTokenAddress = *opts.FeeTokenAddress
}
+ r.stats = append(r.stats, stat)
+
+ return stat, nil
+}
+
+// FindAll finds each type of unique stat and merges them together
+func (r *StatRepository) FindAll(
+ ctx context.Context,
+) ([]*eventindexer.Stat, error) {
return r.stats, nil
}
func (r *StatRepository) Find(
ctx context.Context,
+ statType string,
+ feeTokenAddress *string,
) (*eventindexer.Stat, error) {
- return r.stats, nil
+ for _, s := range r.stats {
+ if s.StatType == statType {
+ return s, nil
+ }
+ }
+
+ return nil, nil
}
diff --git a/packages/eventindexer/prometheus.go b/packages/eventindexer/prometheus.go
index ea95653d7d2..578db75e2b4 100644
--- a/packages/eventindexer/prometheus.go
+++ b/packages/eventindexer/prometheus.go
@@ -10,18 +10,34 @@ var (
Name: "block_proposed_events_processed_ops_total",
Help: "The total number of processed BlockProposed events",
})
+ BlockAssignedEventsProcessed = promauto.NewCounter(prometheus.CounterOpts{
+ Name: "block_assigned_events_processed_ops_total",
+ Help: "The total number of processed BlockAssigned events",
+ })
BlockProposedEventsProcessedError = promauto.NewCounter(prometheus.CounterOpts{
Name: "block_proposed_events_processed_error_ops_total",
Help: "The total number of processed BlockProposed event errors encountered",
})
- BlockProvenEventsProcessed = promauto.NewCounter(prometheus.CounterOpts{
+ BlockAssignedEventsProcessedError = promauto.NewCounter(prometheus.CounterOpts{
+ Name: "block_assigned_events_processed_error_ops_total",
+ Help: "The total number of processed BlockAssigned event errors encountered",
+ })
+ TransitionProvedEventsProcessed = promauto.NewCounter(prometheus.CounterOpts{
Name: "block_proven_events_processed_ops_total",
Help: "The total number of processed BlockProven events",
})
- BlockProvenEventsProcessedError = promauto.NewCounter(prometheus.CounterOpts{
+ TransitionProvedEventsProcessedError = promauto.NewCounter(prometheus.CounterOpts{
Name: "block_proven_events_processed_error_ops_total",
Help: "The total number of processed BlockProven event errors encountered",
})
+ TransitionContestedEventsProcessed = promauto.NewCounter(prometheus.CounterOpts{
+ Name: "block_contested_events_processed_ops_total",
+ Help: "The total number of processed BlockContested events",
+ })
+ TransitionContestedEventsProcessedError = promauto.NewCounter(prometheus.CounterOpts{
+ Name: "block_contested_events_processed_error_ops_total",
+ Help: "The total number of processed BlockContested event errors encountered",
+ })
BlockVerifiedEventsProcessed = promauto.NewCounter(prometheus.CounterOpts{
Name: "block_verified_events_processed_ops_total",
Help: "The total number of processed BlockVerified events",
diff --git a/packages/eventindexer/repo/chart.go b/packages/eventindexer/repo/chart.go
index 590ed4e92f5..2e91afa45cb 100644
--- a/packages/eventindexer/repo/chart.go
+++ b/packages/eventindexer/repo/chart.go
@@ -30,9 +30,11 @@ func (r *ChartRepository) Find(
task string,
start string,
end string,
+ feeTokenAddress string,
) (*eventindexer.ChartResponse, error) {
q := `SELECT * FROM time_series_data
WHERE task = ? AND date BETWEEN ? AND ?
+ AND fee_token_address = ""
ORDER BY date;`
var tsd []*eventindexer.TimeSeriesData
diff --git a/packages/eventindexer/repo/chart_test.go b/packages/eventindexer/repo/chart_test.go
index a8dfadd73f0..6a1bdcfa1a2 100644
--- a/packages/eventindexer/repo/chart_test.go
+++ b/packages/eventindexer/repo/chart_test.go
@@ -60,6 +60,7 @@ func Test_Integration_FindChart(t *testing.T) {
"test",
"2023-09-08",
"2023-09-09",
+ "0x01",
)
assert.Equal(t, nil, err)
assert.Equal(t, 0, len(chart.Chart))
diff --git a/packages/eventindexer/repo/event.go b/packages/eventindexer/repo/event.go
index cb28860426a..64d0b609177 100644
--- a/packages/eventindexer/repo/event.go
+++ b/packages/eventindexer/repo/event.go
@@ -99,6 +99,10 @@ func (r *EventRepository) Save(ctx context.Context, opts eventindexer.SaveEventO
e.ContractAddress = *opts.ContractAddress
}
+ if opts.FeeTokenAddress != nil {
+ e.FeeTokenAddress = *opts.FeeTokenAddress
+ }
+
if err := r.db.GormDB().Create(e).Error; err != nil {
return nil, errors.Wrap(err, "r.db.Create")
}
@@ -141,7 +145,7 @@ func (r *EventRepository) FindUniqueProvers(
if err := r.db.GormDB().
Raw("SELECT address, count(*) AS count FROM events WHERE event = ? GROUP BY address",
- eventindexer.EventNameBlockProven).
+ eventindexer.EventNameTransitionProved).
FirstOrInit(&addrs).Error; err != nil {
return nil, errors.Wrap(err, "r.db.FirstOrInit")
}
diff --git a/packages/eventindexer/repo/event_test.go b/packages/eventindexer/repo/event_test.go
index 1b1897de18a..a05967ec34a 100644
--- a/packages/eventindexer/repo/event_test.go
+++ b/packages/eventindexer/repo/event_test.go
@@ -14,10 +14,10 @@ import (
var (
blockID int64 = 1
dummyProveEventOpts = eventindexer.SaveEventOpts{
- Name: eventindexer.EventNameBlockProven,
+ Name: eventindexer.EventNameTransitionProved,
Address: "0x123",
Data: "{\"data\":\"something\"}",
- Event: eventindexer.EventNameBlockProven,
+ Event: eventindexer.EventNameTransitionProved,
ChainID: big.NewInt(1),
BlockID: &blockID,
TransactedAt: time.Now(),
diff --git a/packages/eventindexer/repo/stat.go b/packages/eventindexer/repo/stat.go
index 82a5efd31b4..5742c72e1c8 100644
--- a/packages/eventindexer/repo/stat.go
+++ b/packages/eventindexer/repo/stat.go
@@ -24,28 +24,32 @@ func NewStatRepository(db eventindexer.DB) (*StatRepository, error) {
func (r *StatRepository) Save(ctx context.Context, opts eventindexer.SaveStatOpts) (*eventindexer.Stat, error) {
s := &eventindexer.Stat{}
- if err := r.db.
- GormDB().
+ q := r.db.
+ GormDB().Where("stat_type = ?", opts.StatType)
+
+ if opts.FeeTokenAddress != nil {
+ q.Where("fee_token_address = ?", *opts.FeeTokenAddress)
+ }
+
+ if err := q.
FirstOrCreate(s).
Error; err != nil {
return nil, errors.Wrap(err, "r.db.gormDB.FirstOrCreate")
}
- if opts.ProofReward != nil {
- s.NumVerifiedBlocks++
+ if opts.StatType == eventindexer.StatTypeProofReward && opts.ProofReward != nil {
+ s.NumBlocksAssigned++
+ s.FeeTokenAddress = *opts.FeeTokenAddress
+ s.StatType = opts.StatType
s.AverageProofReward = opts.ProofReward.String()
}
- if opts.ProofTime != nil {
+ if opts.StatType == eventindexer.StatTypeProofTime && opts.ProofTime != nil {
s.NumProofs++
+ s.StatType = opts.StatType
s.AverageProofTime = opts.ProofTime.String()
}
- if opts.ProposerReward != nil {
- s.NumProposerRewards++
- s.AverageProposerReward = opts.ProposerReward.String()
- }
-
if err := r.db.GormDB().Save(s).Error; err != nil {
return nil, errors.Wrap(err, "r.db.Save")
}
@@ -53,27 +57,62 @@ func (r *StatRepository) Save(ctx context.Context, opts eventindexer.SaveStatOpt
return s, nil
}
-func (r *StatRepository) Find(ctx context.Context) (*eventindexer.Stat, error) {
+// FindAll finds each type of unique stat and merges them together
+func (r *StatRepository) FindAll(
+ ctx context.Context,
+) ([]*eventindexer.Stat, error) {
+ // first find all unique proof reward stats by fee token address
+ var proofRewardStats []*eventindexer.Stat
+
+ err := r.db.
+ GormDB().Where("stat_type = ?", eventindexer.StatTypeProofReward).
+ Scan(&proofRewardStats).
+ Error
+ if err != nil {
+ return nil, err
+ }
+
+ // then find the average proof time stats
+ var proofTimeStat *eventindexer.Stat
+
+ err = r.db.
+ GormDB().Where("stat_type = ?", eventindexer.StatTypeProofTime).
+ Scan(&proofTimeStat).
+ Error
+ if err != nil {
+ return nil, err
+ }
+
+ return append(proofRewardStats, proofTimeStat), nil
+}
+
+func (r *StatRepository) Find(
+ ctx context.Context,
+ statType string,
+ feeTokenAddress *string,
+) (*eventindexer.Stat, error) {
s := &eventindexer.Stat{}
- if err := r.db.
- GormDB().
+ q := r.db.
+ GormDB().Where("stat_type = ?", statType)
+
+ if feeTokenAddress != nil {
+ q.Where("fee_token_address = ?", *feeTokenAddress)
+ }
+
+ if err := q.
FirstOrCreate(s).
Error; err != nil {
return nil, errors.Wrap(err, "r.db.gormDB.FirstOrCreate")
}
- if s.AverageProofReward == "" {
+ if statType == eventindexer.StatTypeProofReward && s.AverageProofReward == "" {
s.AverageProofReward = "0"
}
- if s.AverageProofTime == "" {
+ if statType == eventindexer.StatTypeProofTime && s.AverageProofTime == "" {
s.AverageProofTime = "0"
}
- if s.AverageProposerReward == "" {
- s.AverageProposerReward = "0"
- }
-
return s, nil
}
diff --git a/packages/eventindexer/repo/stat_test.go b/packages/eventindexer/repo/stat_test.go
index 37abb5b81cf..f07c36115ca 100644
--- a/packages/eventindexer/repo/stat_test.go
+++ b/packages/eventindexer/repo/stat_test.go
@@ -20,6 +20,8 @@ func TestIntegration_Stat_Save(t *testing.T) {
var proofReward = big.NewInt(4)
+ feeTokenAddress := "0x01"
+
tests := []struct {
name string
opts eventindexer.SaveStatOpts
@@ -28,7 +30,9 @@ func TestIntegration_Stat_Save(t *testing.T) {
{
"successProofReward",
eventindexer.SaveStatOpts{
- ProofReward: proofReward,
+ ProofReward: proofReward,
+ StatType: eventindexer.StatTypeProofReward,
+ FeeTokenAddress: &feeTokenAddress,
},
nil,
},
@@ -53,32 +57,49 @@ func TestIntegration_Stat_Find(t *testing.T) {
var proofReward = big.NewInt(4)
- var proposerReward = big.NewInt(7)
+ var proofTime = big.NewInt(7)
- for i := 0; i < 3; i++ {
- _, err = statRepo.Save(context.Background(), eventindexer.SaveStatOpts{
- ProofReward: proofReward,
- ProposerReward: proposerReward,
- })
- }
+ feeTokenAddress := "0x01"
+
+ _, err = statRepo.Save(context.Background(), eventindexer.SaveStatOpts{
+ StatType: eventindexer.StatTypeProofReward,
+ ProofReward: proofReward,
+ FeeTokenAddress: &feeTokenAddress,
+ })
+
+ assert.Equal(t, nil, err)
+
+ _, err = statRepo.Save(context.Background(), eventindexer.SaveStatOpts{
+ StatType: eventindexer.StatTypeProofTime,
+ ProofTime: proofTime,
+ })
assert.Equal(t, nil, err)
tests := []struct {
- name string
- wantResp *eventindexer.Stat
- wantErr error
+ name string
+ statType string
+ feeTokenAddress string
+ wantResp *eventindexer.Stat
+ wantErr error
}{
{
- "success",
+ "successStatTypeProofReward",
+ eventindexer.StatTypeProofReward,
+ "0x01",
+ &eventindexer.Stat{
+ ID: 1,
+ AverageProofReward: proofReward.String(),
+ },
+ nil,
+ },
+ {
+ "successStatTypeProofTime",
+ eventindexer.StatTypeProofTime,
+ "",
&eventindexer.Stat{
- ID: 1,
- AverageProofReward: proofReward.String(),
- AverageProofTime: "0",
- AverageProposerReward: proposerReward.String(),
- NumProposerRewards: 3,
- NumProofs: 0,
- NumVerifiedBlocks: 3,
+ ID: 1,
+ AverageProofTime: proofTime.String(),
},
nil,
},
@@ -86,10 +107,11 @@ func TestIntegration_Stat_Find(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
- resp, err := statRepo.Find(context.Background())
+ f := tt.feeTokenAddress
+ resp, err := statRepo.Find(context.Background(), tt.statType, &f)
assert.Equal(t, tt.wantErr, err)
- assert.Equal(t, *tt.wantResp, *resp)
+ assert.Equal(t, tt.wantResp.AverageProofReward, resp.AverageProofReward)
})
}
}
diff --git a/packages/eventindexer/stat.go b/packages/eventindexer/stat.go
index 0734ca64def..f5344c5c849 100644
--- a/packages/eventindexer/stat.go
+++ b/packages/eventindexer/stat.go
@@ -5,28 +5,35 @@ import (
"math/big"
)
+var (
+ StatTypeProofTime = "proofTime"
+ StatTypeProofReward = "proofReward"
+)
+
// Event represents a stored EVM event. The fields will be serialized
// into the Data field to be unmarshalled into a concrete struct
// dependant on the name of the event
type Stat struct {
- ID int `json:"id"`
- AverageProofTime string `json:"averageProofTime"`
- AverageProofReward string `json:"averageProofReward"`
- AverageProposerReward string `json:"averageProposerReward"`
- NumProposerRewards uint64 `json:"numProposerRewards"`
- NumProofs uint64 `json:"numProofs"`
- NumVerifiedBlocks uint64 `json:"numVerifiedBlocks"`
+ ID int `json:"id"`
+ AverageProofTime string `json:"averageProofTime"`
+ AverageProofReward string `json:"averageProofReward"`
+ NumProofs uint64 `json:"numProofs"`
+ NumBlocksAssigned uint64 `json:"numBlocksAssigned"`
+ FeeTokenAddress string `json:"feeTokenAddress"`
+ StatType string `json:"statType"`
}
// SaveStatOpts
type SaveStatOpts struct {
- ProofTime *big.Int
- ProofReward *big.Int
- ProposerReward *big.Int
+ ProofTime *big.Int
+ ProofReward *big.Int
+ FeeTokenAddress *string
+ StatType string
}
// StatRepository is used to interact with stats in the store
type StatRepository interface {
Save(ctx context.Context, opts SaveStatOpts) (*Stat, error)
- Find(ctx context.Context) (*Stat, error)
+ Find(ctx context.Context, statType string, feeTokenAddress *string) (*Stat, error)
+ FindAll(ctx context.Context) ([]*Stat, error)
}
diff --git a/packages/eventindexer/tasks/tasks.go b/packages/eventindexer/tasks/tasks.go
index 62e4bc5cab5..623b2ac0472 100644
--- a/packages/eventindexer/tasks/tasks.go
+++ b/packages/eventindexer/tasks/tasks.go
@@ -1,28 +1,28 @@
package tasks
var (
- TotalTransactions = "total-transactions"
- TransactionsPerDay = "transactions-per-day"
- TotalBlocks = "total-blocks"
- BlocksPerDay = "blocks-per-day"
- TotalAccounts = "total-accounts"
- AccountsPerDay = "accounts-per-day"
- UniqueProposersPerDay = "unique-proposers-per-day"
- TotalUniqueProposers = "total-proposers"
- UniqueProversPerDay = "unique-provers-per-day"
- TotalUniqueProvers = "total-provers"
- TotalContractDeployments = "total-contract-deployments"
- ContractDeploymentsPerDay = "contract-deployments-per-day"
- ProveBlockTxPerDay = "prove-block-tx-per-day"
- TotalProveBlockTx = "total-prove-block-tx"
- ProposeBlockTxPerDay = "propose-block-tx-per-day"
- TotalProposeBlockTx = "total-propose-block-tx"
- BridgeMessagesSentPerDay = "bridge-messages-sent-per-day"
- TotalBridgeMessagesSent = "total-bridge-messages-sent"
- TotalProofRewards = "total-proof-rewards"
- ProofRewardsPerDay = "proof-rewards-per-day"
- TotalProposerRewards = "total-proposer-rewards"
- ProposerRewardsPerDay = "proposer-rewards-per-day"
+ TotalTransactions = "total-transactions"
+ TransactionsPerDay = "transactions-per-day"
+ TotalBlocks = "total-blocks"
+ BlocksPerDay = "blocks-per-day"
+ TotalAccounts = "total-accounts"
+ AccountsPerDay = "accounts-per-day"
+ UniqueProposersPerDay = "unique-proposers-per-day"
+ TotalUniqueProposers = "total-proposers"
+ UniqueProversPerDay = "unique-provers-per-day"
+ TotalUniqueProvers = "total-provers"
+ TotalContractDeployments = "total-contract-deployments"
+ ContractDeploymentsPerDay = "contract-deployments-per-day"
+ TransitionProvedTxPerDay = "transition-proved-tx-per-day"
+ TotalTransitionProvedTx = "total-transition-proved-tx"
+ TransitionContestedTxPerDay = "transition-contested-tx-per-day"
+ TotalTransitionContestedTx = "total-transition-contested-tx"
+ ProposeBlockTxPerDay = "propose-block-tx-per-day"
+ TotalProposeBlockTx = "total-propose-block-tx"
+ BridgeMessagesSentPerDay = "bridge-messages-sent-per-day"
+ TotalBridgeMessagesSent = "total-bridge-messages-sent"
+ TotalProofRewards = "total-proof-rewards"
+ ProofRewardsPerDay = "proof-rewards-per-day"
)
var Tasks = []string{
@@ -38,14 +38,14 @@ var Tasks = []string{
TotalUniqueProvers,
TotalContractDeployments,
ContractDeploymentsPerDay,
- ProveBlockTxPerDay,
- TotalProveBlockTx,
+ TransitionProvedTxPerDay,
+ TotalTransitionProvedTx,
+ TransitionContestedTxPerDay,
+ TotalTransitionContestedTx,
ProposeBlockTxPerDay,
TotalProposeBlockTx,
BridgeMessagesSentPerDay,
TotalBridgeMessagesSent,
TotalProofRewards,
ProofRewardsPerDay,
- TotalProposerRewards,
- ProposerRewardsPerDay,
}
diff --git a/packages/fork-diff/index.html b/packages/fork-diff/index.html
index 67f5feee5a1..7ea4dc7b02a 100755
--- a/packages/fork-diff/index.html
+++ b/packages/fork-diff/index.html
@@ -5937,7 +5937,7 @@
+ "balance": "0xffffffffffffff21f494c589bfffffff"
+ },
+ "0x0000777700000000000000000000000000000007": {
-+ "contractName": "ProxiedSignalService",
++ "contractName": "ProxiedSingletonSignalService",
+ "storage": {},
+ "code": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80636c6563f6116100715780636c6563f614610162578063715018a6146101755780638da5cb5b1461017d578063a86f9d9e1461018e578063f2fde38b146101a1578063f8f3f844146101b457600080fd5b80630652b57a146100b957806319ab453c146100ce57806332676bc6146100e15780633ab76e9f146101095780635221f6131461012e57806366ca2bc014610141575b600080fd5b6100cc6100c7366004611a18565b6101e0565b005b6100cc6100dc366004611a18565b610263565b6100f46100ef366004611a35565b61037b565b60405190151581526020015b60405180910390f35b6097546001600160a01b03165b6040516001600160a01b039091168152602001610100565b6100f461013c366004611a61565b6103ed565b61015461014f366004611af7565b61055d565b604051908152602001610100565b610116610170366004611b25565b6105a2565b6100cc6105b9565b6065546001600160a01b0316610116565b61011661019c366004611b5a565b6105cd565b6100cc6101af366004611a18565b6105da565b6101546101c2366004611a35565b6040805192835260208301919091526034600c830120918101905290565b6101e8610653565b6001600160a01b03811661020f57604051634d084d8560e11b815260040160405180910390fd5b609780546001600160a01b0319166001600160a01b0383169081179091556040519081527f399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b9060200160405180910390a150565b600054610100900460ff16158080156102835750600054600160ff909116105b8061029d5750303b15801561029d575060005460ff166001145b6103055760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff191660011790558015610328576000805461ff0019166101001790555b610331826106ad565b8015610377576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b60006001600160a01b0383166103a4576040516354cdfc8d60e11b815260040160405180910390fd5b60008290036103c65760405163014f1da760e21b815260040160405180910390fd5b5060408051838152602081018390526034600c820120908201909152546001145b92915050565b600046860361040f5760405163e822b48d60e01b815260040160405180910390fd5b6001600160a01b038516610436576040516354cdfc8d60e11b815260040160405180910390fd5b60008490036104585760405163014f1da760e21b815260040160405180910390fd5b600061046683850185611bf6565b9050600061047d647461696b6f60d81b60006105cd565b8251604051632e24533960e21b81526001600160a01b03929092169163b8914ce4916104af9160040190815260200190565b602060405180830381865afa1580156104cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f09190611cbd565b60408051898152602081018990526034600c820120818301909252606081019190915290915061055190608001604051602081830303815290604052604051806040016040528060018152602001600160f81b8152508460200151846106c6565b98975050505050505050565b600081810361057f5760405163014f1da760e21b815260040160405180910390fd5b506040805133815260208101929092526034600c83012091810190526001815590565b60006105af8484846106ea565b90505b9392505050565b6105c1610653565b6105cb600061079e565b565b60006105b24684846106ea565b6105e2610653565b6001600160a01b0381166106475760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102fc565b6106508161079e565b50565b6065546001600160a01b031633146105cb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102fc565b6106b56107f0565b6106bd61081f565b6106508161084e565b6000806106d286610897565b90506106e0818686866108c9565b9695505050505050565b60975460405163195ac1a960e21b815260048101859052602481018490526000916001600160a01b03169063656b06a490604401602060405180830381865afa15801561073b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075f9190611cd6565b90508115801561077657506001600160a01b038116155b156105b257604051631467050360e21b815260048101859052602481018490526044016102fc565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166108175760405162461bcd60e51b81526004016102fc90611cf3565b6105cb610906565b600054610100900460ff166108465760405162461bcd60e51b81526004016102fc90611cf3565b6105cb610933565b6001600160a01b03811661087557604051634d084d8560e11b815260040160405180910390fd5b609780546001600160a01b0319166001600160a01b0392909216919091179055565b606081805190602001206040516020016108b391815260200190565b6040516020818303038152906040529050919050565b60008060006108d9878686610963565b915091508180156108fb57508051602080830191909120875191880191909120145b979650505050505050565b600054610100900460ff1661092d5760405162461bcd60e51b81526004016102fc90611cf3565b60018055565b600054610100900460ff1661095a5760405162461bcd60e51b81526004016102fc90611cf3565b6105cb3361079e565b60006060600061097285610a3e565b90506000806000610984848a89610b37565b815192955090935091501580806109985750815b6109e45760405162461bcd60e51b815260206004820152601a60248201527f50726f76696465642070726f6f6620697320696e76616c69642e00000000000060448201526064016102fc565b600081610a005760405180602001604052806000815250610a2c565b610a2c86610a0f600188611d54565b81518110610a1f57610a1f611d67565b6020026020010151610f57565b919b919a509098505050505050505050565b60606000610a4b83610f7e565b90506000815167ffffffffffffffff811115610a6957610a69611b86565b604051908082528060200260200182016040528015610aae57816020015b6040805180820190915260608082526020820152815260200190600190039081610a875790505b50905060005b8251811015610b2f576000610ae1848381518110610ad457610ad4611d67565b6020026020010151610fb1565b90506040518060400160405280610af783610f7e565b815260200182815250838381518110610b1257610b12611d67565b60200260200101819052505080610b2890611d7d565b9050610ab4565b509392505050565b600060606000806000610b4987611041565b90506000869050600080610b70604051806040016040528060608152602001606081525090565b60005b8c51811015610f2f578c8181518110610b8e57610b8e611d67565b602002602001015191508284610ba49190611d96565b9350610bb1600188611d96565b965083600003610c0e578482602001518051906020012014610c095760405162461bcd60e51b8152602060048201526011602482015270092dcecc2d8d2c840e4dedee840d0c2e6d607b1b60448201526064016102fc565b610cd0565b602082602001515110610c75578482602001518051906020012014610c095760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964206c6172676520696e7465726e616c2068617368000000000060448201526064016102fc565b84610c83836020015161117a565b14610cd05760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420696e7465726e616c206e6f6465206861736800000000000060448201526064016102fc565b610cdc60106001611da9565b60ff1682600001515103610d4a5785518414610f2f576000868581518110610d0657610d06611d67565b01602001518351805160f89290921c925060009183908110610d2a57610d2a611d67565b60200260200101519050610d3d816111a2565b9650600194505050610f1f565b81515160011901610ed7576000610d60836111d8565b9050600081600081518110610d7757610d77611d67565b016020015160f81c90506000610d8e600283611dc2565b610d99906002611df2565b90506000610daa848360ff166111fc565b90506000610db88b8a6111fc565b90506000610dc68383611232565b905060ff851660021480610ddd575060ff85166003145b15610e1757808351148015610df25750808251145b15610e0457610e01818b611d96565b99505b50600160ff1b9950610f2f945050505050565b60ff85161580610e2a575060ff85166001145b15610e805782518114610e4a5750600160ff1b9950610f2f945050505050565b610e718860000151600181518110610e6457610e64611d67565b60200260200101516111a2565b9a509750610f1f945050505050565b60405162461bcd60e51b815260206004820152602660248201527f52656365697665642061206e6f6465207769746820616e20756e6b6e6f776e206044820152650e0e4caccd2f60d31b60648201526084016102fc565b60405162461bcd60e51b815260206004820152601d60248201527f526563656976656420616e20756e706172736561626c65206e6f64652e00000060448201526064016102fc565b610f2881611d7d565b9050610b73565b50600160ff1b841486610f4287866111fc565b909e909d50909b509950505050505050505050565b805180516060916103e791610f6e90600190611d54565b81518110610ad457610ad4611d67565b6040805180820182526000808252602091820152815180830190925282518252808301908201526060906103e7906112ac565b60606000806000610fc185611498565b919450925090506000816001811115610fdc57610fdc611e0b565b146110295760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420524c502062797465732076616c75652e000000000000000060448201526064016102fc565b611038856020015184846117e2565b95945050505050565b60606000825160026110539190611e21565b67ffffffffffffffff81111561106b5761106b611b86565b6040519080825280601f01601f191660200182016040528015611095576020820181803683370190505b50905060005b83518110156111735760048482815181106110b8576110b8611d67565b01602001516001600160f81b031916901c826110d5836002611e21565b815181106110e5576110e5611d67565b60200101906001600160f81b031916908160001a905350601084828151811061111057611110611d67565b0160200151611122919060f81c611dc2565b60f81b82611131836002611e21565b61113c906001611d96565b8151811061114c5761114c611d67565b60200101906001600160f81b031916908160001a90535061116c81611d7d565b905061109b565b5092915050565b600060208251101561118e57506020015190565b818060200190518101906103e79190611cbd565b600060606020836000015110156111c3576111bc8361188b565b90506111cf565b6111cc83610fb1565b90505b6105b28161117a565b60606103e76111f78360000151600081518110610ad457610ad4611d67565b611041565b60608251821061121b57506040805160208101909152600081526103e7565b6105b2838384865161122d9190611d54565b611896565b6000805b8084511180156112465750808351115b8015611297575082818151811061125f5761125f611d67565b602001015160f81c60f81b6001600160f81b03191684828151811061128657611286611d67565b01602001516001600160f81b031916145b156105b2576112a581611d7d565b9050611236565b60606000806112ba84611498565b919350909150600190508160018111156112d6576112d6611e0b565b146113235760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420524c50206c6973742076616c75652e00000000000000000060448201526064016102fc565b6040805160208082526104208201909252600091816020015b604080518082019091526000808252602082015281526020019060019003908161133c5790505090506000835b865181101561148d57602082106113d55760405162461bcd60e51b815260206004820152602a60248201527f50726f766964656420524c50206c6973742065786365656473206d6178206c6960448201526939ba103632b733ba341760b11b60648201526084016102fc565b6000806114126040518060400160405280858c600001516113f69190611d54565b8152602001858c6020015161140b9190611d96565b9052611498565b50915091506040518060400160405280838361142e9190611d96565b8152602001848b602001516114439190611d96565b81525085858151811061145857611458611d67565b602090810291909101015261146e600185611d96565b935061147a8183611d96565b6114849084611d96565b92505050611369565b508152949350505050565b6000806000808460000151116114f05760405162461bcd60e51b815260206004820152601860248201527f524c50206974656d2063616e6e6f74206265206e756c6c2e000000000000000060448201526064016102fc565b6020840151805160001a607f81116115155760006001600094509450945050506117db565b60b7811161159157600061152a608083611d54565b90508087600001511161157f5760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420524c502073686f727420737472696e672e0000000000000060448201526064016102fc565b600195509350600092506117db915050565b60bf81116116805760006115a660b783611d54565b9050808760000151116115fb5760405162461bcd60e51b815260206004820152601f60248201527f496e76616c696420524c50206c6f6e6720737472696e67206c656e6774682e0060448201526064016102fc565b600183015160208290036101000a90046116158183611d96565b8851116116645760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420524c50206c6f6e6720737472696e672e000000000000000060448201526064016102fc565b61166f826001611d96565b96509450600093506117db92505050565b60f781116116fb57600061169560c083611d54565b9050808760000151116116ea5760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420524c502073686f7274206c6973742e00000000000000000060448201526064016102fc565b6001955093508492506117db915050565b600061170860f783611d54565b90508087600001511161175d5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c696420524c50206c6f6e67206c697374206c656e6774682e00000060448201526064016102fc565b600183015160208290036101000a90046117778183611d96565b8851116117bf5760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b210292628103637b733903634b9ba1760511b60448201526064016102fc565b6117ca826001611d96565b96509450600193506117db92505050565b9193909250565b606060008267ffffffffffffffff8111156117ff576117ff611b86565b6040519080825280601f01601f191660200182016040528015611829576020820181803683370190505b509050805160000361183c5790506105b2565b8484016020820160005b8581101561185e578281015182820152602001611846565b5060006001602087066020036101000a039050808251168119845116178252839450505050509392505050565b60606103e7826119ed565b6060816118a481601f611d96565b10156118e35760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016102fc565b826118ee8382611d96565b101561192d5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016102fc565b6119378284611d96565b8451101561197b5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b60448201526064016102fc565b60608215801561199a57604051915060008252602082016040526119e4565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156119d35780518352602092830192016119bb565b5050858452601f01601f1916604052505b50949350505050565b60606103e78260200151600084600001516117e2565b6001600160a01b038116811461065057600080fd5b600060208284031215611a2a57600080fd5b81356105b281611a03565b60008060408385031215611a4857600080fd5b8235611a5381611a03565b946020939093013593505050565b600080600080600060808688031215611a7957600080fd5b853594506020860135611a8b81611a03565b935060408601359250606086013567ffffffffffffffff80821115611aaf57600080fd5b818801915088601f830112611ac357600080fd5b813581811115611ad257600080fd5b896020828501011115611ae457600080fd5b9699959850939650602001949392505050565b600060208284031215611b0957600080fd5b5035919050565b80358015158114611b2057600080fd5b919050565b600080600060608486031215611b3a57600080fd5b8335925060208401359150611b5160408501611b10565b90509250925092565b60008060408385031215611b6d57600080fd5b82359150611b7d60208401611b10565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611bbf57611bbf611b86565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611bee57611bee611b86565b604052919050565b60006020808385031215611c0957600080fd5b823567ffffffffffffffff80821115611c2157600080fd5b9084019060408287031215611c3557600080fd5b611c3d611b9c565b823581528383013582811115611c5257600080fd5b80840193505086601f840112611c6757600080fd5b823582811115611c7957611c79611b86565b611c8b601f8201601f19168601611bc5565b92508083528785828601011115611ca157600080fd5b8085850186850137600090830185015292830152509392505050565b600060208284031215611ccf57600080fd5b5051919050565b600060208284031215611ce857600080fd5b81516105b281611a03565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b818103818111156103e7576103e7611d3e565b634e487b7160e01b600052603260045260246000fd5b600060018201611d8f57611d8f611d3e565b5060010190565b808201808211156103e7576103e7611d3e565b60ff81811683821601908111156103e7576103e7611d3e565b600060ff831680611de357634e487b7160e01b600052601260045260246000fd5b8060ff84160691505092915050565b60ff82811682821603908111156103e7576103e7611d3e565b634e487b7160e01b600052602160045260246000fd5b80820281158282048414176103e7576103e7611d3e56fea2646970667358221220727b3b71bb6428f2b0ff827ceeabefd08ed4c1ffd6ad882c5d137fbe8f96be8064736f6c63430008140033",
+ "balance": "0x0"
@@ -6143,7 +6143,7 @@
+ "balance": "0xffffffffffffff21f494c589bfffffff"
+ },
+ "0x0000777700000000000000000000000000000007": {
-+ "contractName": "ProxiedSignalService",
++ "contractName": "ProxiedSingletonSignalService",
+ "storage": {},
+ "code": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80636c6563f6116100715780636c6563f614610162578063715018a6146101755780638da5cb5b1461017d578063a86f9d9e1461018e578063f2fde38b146101a1578063f8f3f844146101b457600080fd5b80630652b57a146100b957806319ab453c146100ce57806332676bc6146100e15780633ab76e9f146101095780635221f6131461012e57806366ca2bc014610141575b600080fd5b6100cc6100c7366004611a18565b6101e0565b005b6100cc6100dc366004611a18565b610263565b6100f46100ef366004611a35565b61037b565b60405190151581526020015b60405180910390f35b6097546001600160a01b03165b6040516001600160a01b039091168152602001610100565b6100f461013c366004611a61565b6103ed565b61015461014f366004611af7565b61055d565b604051908152602001610100565b610116610170366004611b25565b6105a2565b6100cc6105b9565b6065546001600160a01b0316610116565b61011661019c366004611b5a565b6105cd565b6100cc6101af366004611a18565b6105da565b6101546101c2366004611a35565b6040805192835260208301919091526034600c830120918101905290565b6101e8610653565b6001600160a01b03811661020f57604051634d084d8560e11b815260040160405180910390fd5b609780546001600160a01b0319166001600160a01b0383169081179091556040519081527f399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b9060200160405180910390a150565b600054610100900460ff16158080156102835750600054600160ff909116105b8061029d5750303b15801561029d575060005460ff166001145b6103055760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff191660011790558015610328576000805461ff0019166101001790555b610331826106ad565b8015610377576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b60006001600160a01b0383166103a4576040516354cdfc8d60e11b815260040160405180910390fd5b60008290036103c65760405163014f1da760e21b815260040160405180910390fd5b5060408051838152602081018390526034600c820120908201909152546001145b92915050565b600046860361040f5760405163e822b48d60e01b815260040160405180910390fd5b6001600160a01b038516610436576040516354cdfc8d60e11b815260040160405180910390fd5b60008490036104585760405163014f1da760e21b815260040160405180910390fd5b600061046683850185611bf6565b9050600061047d647461696b6f60d81b60006105cd565b8251604051632e24533960e21b81526001600160a01b03929092169163b8914ce4916104af9160040190815260200190565b602060405180830381865afa1580156104cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f09190611cbd565b60408051898152602081018990526034600c820120818301909252606081019190915290915061055190608001604051602081830303815290604052604051806040016040528060018152602001600160f81b8152508460200151846106c6565b98975050505050505050565b600081810361057f5760405163014f1da760e21b815260040160405180910390fd5b506040805133815260208101929092526034600c83012091810190526001815590565b60006105af8484846106ea565b90505b9392505050565b6105c1610653565b6105cb600061079e565b565b60006105b24684846106ea565b6105e2610653565b6001600160a01b0381166106475760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102fc565b6106508161079e565b50565b6065546001600160a01b031633146105cb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102fc565b6106b56107f0565b6106bd61081f565b6106508161084e565b6000806106d286610897565b90506106e0818686866108c9565b9695505050505050565b60975460405163195ac1a960e21b815260048101859052602481018490526000916001600160a01b03169063656b06a490604401602060405180830381865afa15801561073b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075f9190611cd6565b90508115801561077657506001600160a01b038116155b156105b257604051631467050360e21b815260048101859052602481018490526044016102fc565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166108175760405162461bcd60e51b81526004016102fc90611cf3565b6105cb610906565b600054610100900460ff166108465760405162461bcd60e51b81526004016102fc90611cf3565b6105cb610933565b6001600160a01b03811661087557604051634d084d8560e11b815260040160405180910390fd5b609780546001600160a01b0319166001600160a01b0392909216919091179055565b606081805190602001206040516020016108b391815260200190565b6040516020818303038152906040529050919050565b60008060006108d9878686610963565b915091508180156108fb57508051602080830191909120875191880191909120145b979650505050505050565b600054610100900460ff1661092d5760405162461bcd60e51b81526004016102fc90611cf3565b60018055565b600054610100900460ff1661095a5760405162461bcd60e51b81526004016102fc90611cf3565b6105cb3361079e565b60006060600061097285610a3e565b90506000806000610984848a89610b37565b815192955090935091501580806109985750815b6109e45760405162461bcd60e51b815260206004820152601a60248201527f50726f76696465642070726f6f6620697320696e76616c69642e00000000000060448201526064016102fc565b600081610a005760405180602001604052806000815250610a2c565b610a2c86610a0f600188611d54565b81518110610a1f57610a1f611d67565b6020026020010151610f57565b919b919a509098505050505050505050565b60606000610a4b83610f7e565b90506000815167ffffffffffffffff811115610a6957610a69611b86565b604051908082528060200260200182016040528015610aae57816020015b6040805180820190915260608082526020820152815260200190600190039081610a875790505b50905060005b8251811015610b2f576000610ae1848381518110610ad457610ad4611d67565b6020026020010151610fb1565b90506040518060400160405280610af783610f7e565b815260200182815250838381518110610b1257610b12611d67565b60200260200101819052505080610b2890611d7d565b9050610ab4565b509392505050565b600060606000806000610b4987611041565b90506000869050600080610b70604051806040016040528060608152602001606081525090565b60005b8c51811015610f2f578c8181518110610b8e57610b8e611d67565b602002602001015191508284610ba49190611d96565b9350610bb1600188611d96565b965083600003610c0e578482602001518051906020012014610c095760405162461bcd60e51b8152602060048201526011602482015270092dcecc2d8d2c840e4dedee840d0c2e6d607b1b60448201526064016102fc565b610cd0565b602082602001515110610c75578482602001518051906020012014610c095760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964206c6172676520696e7465726e616c2068617368000000000060448201526064016102fc565b84610c83836020015161117a565b14610cd05760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420696e7465726e616c206e6f6465206861736800000000000060448201526064016102fc565b610cdc60106001611da9565b60ff1682600001515103610d4a5785518414610f2f576000868581518110610d0657610d06611d67565b01602001518351805160f89290921c925060009183908110610d2a57610d2a611d67565b60200260200101519050610d3d816111a2565b9650600194505050610f1f565b81515160011901610ed7576000610d60836111d8565b9050600081600081518110610d7757610d77611d67565b016020015160f81c90506000610d8e600283611dc2565b610d99906002611df2565b90506000610daa848360ff166111fc565b90506000610db88b8a6111fc565b90506000610dc68383611232565b905060ff851660021480610ddd575060ff85166003145b15610e1757808351148015610df25750808251145b15610e0457610e01818b611d96565b99505b50600160ff1b9950610f2f945050505050565b60ff85161580610e2a575060ff85166001145b15610e805782518114610e4a5750600160ff1b9950610f2f945050505050565b610e718860000151600181518110610e6457610e64611d67565b60200260200101516111a2565b9a509750610f1f945050505050565b60405162461bcd60e51b815260206004820152602660248201527f52656365697665642061206e6f6465207769746820616e20756e6b6e6f776e206044820152650e0e4caccd2f60d31b60648201526084016102fc565b60405162461bcd60e51b815260206004820152601d60248201527f526563656976656420616e20756e706172736561626c65206e6f64652e00000060448201526064016102fc565b610f2881611d7d565b9050610b73565b50600160ff1b841486610f4287866111fc565b909e909d50909b509950505050505050505050565b805180516060916103e791610f6e90600190611d54565b81518110610ad457610ad4611d67565b6040805180820182526000808252602091820152815180830190925282518252808301908201526060906103e7906112ac565b60606000806000610fc185611498565b919450925090506000816001811115610fdc57610fdc611e0b565b146110295760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420524c502062797465732076616c75652e000000000000000060448201526064016102fc565b611038856020015184846117e2565b95945050505050565b60606000825160026110539190611e21565b67ffffffffffffffff81111561106b5761106b611b86565b6040519080825280601f01601f191660200182016040528015611095576020820181803683370190505b50905060005b83518110156111735760048482815181106110b8576110b8611d67565b01602001516001600160f81b031916901c826110d5836002611e21565b815181106110e5576110e5611d67565b60200101906001600160f81b031916908160001a905350601084828151811061111057611110611d67565b0160200151611122919060f81c611dc2565b60f81b82611131836002611e21565b61113c906001611d96565b8151811061114c5761114c611d67565b60200101906001600160f81b031916908160001a90535061116c81611d7d565b905061109b565b5092915050565b600060208251101561118e57506020015190565b818060200190518101906103e79190611cbd565b600060606020836000015110156111c3576111bc8361188b565b90506111cf565b6111cc83610fb1565b90505b6105b28161117a565b60606103e76111f78360000151600081518110610ad457610ad4611d67565b611041565b60608251821061121b57506040805160208101909152600081526103e7565b6105b2838384865161122d9190611d54565b611896565b6000805b8084511180156112465750808351115b8015611297575082818151811061125f5761125f611d67565b602001015160f81c60f81b6001600160f81b03191684828151811061128657611286611d67565b01602001516001600160f81b031916145b156105b2576112a581611d7d565b9050611236565b60606000806112ba84611498565b919350909150600190508160018111156112d6576112d6611e0b565b146113235760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420524c50206c6973742076616c75652e00000000000000000060448201526064016102fc565b6040805160208082526104208201909252600091816020015b604080518082019091526000808252602082015281526020019060019003908161133c5790505090506000835b865181101561148d57602082106113d55760405162461bcd60e51b815260206004820152602a60248201527f50726f766964656420524c50206c6973742065786365656473206d6178206c6960448201526939ba103632b733ba341760b11b60648201526084016102fc565b6000806114126040518060400160405280858c600001516113f69190611d54565b8152602001858c6020015161140b9190611d96565b9052611498565b50915091506040518060400160405280838361142e9190611d96565b8152602001848b602001516114439190611d96565b81525085858151811061145857611458611d67565b602090810291909101015261146e600185611d96565b935061147a8183611d96565b6114849084611d96565b92505050611369565b508152949350505050565b6000806000808460000151116114f05760405162461bcd60e51b815260206004820152601860248201527f524c50206974656d2063616e6e6f74206265206e756c6c2e000000000000000060448201526064016102fc565b6020840151805160001a607f81116115155760006001600094509450945050506117db565b60b7811161159157600061152a608083611d54565b90508087600001511161157f5760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420524c502073686f727420737472696e672e0000000000000060448201526064016102fc565b600195509350600092506117db915050565b60bf81116116805760006115a660b783611d54565b9050808760000151116115fb5760405162461bcd60e51b815260206004820152601f60248201527f496e76616c696420524c50206c6f6e6720737472696e67206c656e6774682e0060448201526064016102fc565b600183015160208290036101000a90046116158183611d96565b8851116116645760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420524c50206c6f6e6720737472696e672e000000000000000060448201526064016102fc565b61166f826001611d96565b96509450600093506117db92505050565b60f781116116fb57600061169560c083611d54565b9050808760000151116116ea5760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420524c502073686f7274206c6973742e00000000000000000060448201526064016102fc565b6001955093508492506117db915050565b600061170860f783611d54565b90508087600001511161175d5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c696420524c50206c6f6e67206c697374206c656e6774682e00000060448201526064016102fc565b600183015160208290036101000a90046117778183611d96565b8851116117bf5760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b210292628103637b733903634b9ba1760511b60448201526064016102fc565b6117ca826001611d96565b96509450600193506117db92505050565b9193909250565b606060008267ffffffffffffffff8111156117ff576117ff611b86565b6040519080825280601f01601f191660200182016040528015611829576020820181803683370190505b509050805160000361183c5790506105b2565b8484016020820160005b8581101561185e578281015182820152602001611846565b5060006001602087066020036101000a039050808251168119845116178252839450505050509392505050565b60606103e7826119ed565b6060816118a481601f611d96565b10156118e35760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016102fc565b826118ee8382611d96565b101561192d5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016102fc565b6119378284611d96565b8451101561197b5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b60448201526064016102fc565b60608215801561199a57604051915060008252602082016040526119e4565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156119d35780518352602092830192016119bb565b5050858452601f01601f1916604052505b50949350505050565b60606103e78260200151600084600001516117e2565b6001600160a01b038116811461065057600080fd5b600060208284031215611a2a57600080fd5b81356105b281611a03565b60008060408385031215611a4857600080fd5b8235611a5381611a03565b946020939093013593505050565b600080600080600060808688031215611a7957600080fd5b853594506020860135611a8b81611a03565b935060408601359250606086013567ffffffffffffffff80821115611aaf57600080fd5b818801915088601f830112611ac357600080fd5b813581811115611ad257600080fd5b896020828501011115611ae457600080fd5b9699959850939650602001949392505050565b600060208284031215611b0957600080fd5b5035919050565b80358015158114611b2057600080fd5b919050565b600080600060608486031215611b3a57600080fd5b8335925060208401359150611b5160408501611b10565b90509250925092565b60008060408385031215611b6d57600080fd5b82359150611b7d60208401611b10565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611bbf57611bbf611b86565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611bee57611bee611b86565b604052919050565b60006020808385031215611c0957600080fd5b823567ffffffffffffffff80821115611c2157600080fd5b9084019060408287031215611c3557600080fd5b611c3d611b9c565b823581528383013582811115611c5257600080fd5b80840193505086601f840112611c6757600080fd5b823582811115611c7957611c79611b86565b611c8b601f8201601f19168601611bc5565b92508083528785828601011115611ca157600080fd5b8085850186850137600090830185015292830152509392505050565b600060208284031215611ccf57600080fd5b5051919050565b600060208284031215611ce857600080fd5b81516105b281611a03565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b818103818111156103e7576103e7611d3e565b634e487b7160e01b600052603260045260246000fd5b600060018201611d8f57611d8f611d3e565b5060010190565b808201808211156103e7576103e7611d3e565b60ff81811683821601908111156103e7576103e7611d3e565b600060ff831680611de357634e487b7160e01b600052601260045260246000fd5b8060ff84160691505092915050565b60ff82811682821603908111156103e7576103e7611d3e565b634e487b7160e01b600052602160045260246000fd5b80820281158282048414176103e7576103e7611d3e56fea2646970667358221220914fd418156d9d9a0e4aa8f2d563552ff29aa367381c04f0e5db5dcc63b0ce7264736f6c63430008120033",
+ "balance": "0x0"
@@ -6480,7 +6480,13 @@
+ "0xb887a34826f1328bb9ac00c7935db6dda0965df2b949ede3b5a32c932af8e648": "0x0000000000000000000000000000000000000000000000000000000000028c59",
+ "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0167001000000000000000000000000000000005"
+ },
-+ "code": "0x608060405236601057600e6013565b005b600e5b601f601b6021565b6058565b565b600060537f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156076573d6000f35b3d6000fdfea2646970667358221220d069871beb2c6edcfa3f383349b676a9e2ff21f2489a6e021395a444755306d264736f6c63430008140033",
++ "code": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b3565b610118565b61005b6100933660046106ce565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b3565b6101ed565b3480156100f557600080fd5b506100ad61020d565b61010661022e565b6101166101116102c3565b6102cd565b565b6101206102f1565b6001600160a01b0316330361014d5761014a81604051806020016040528060008152506000610324565b50565b61014a6100fe565b61015d6102f1565b6001600160a01b031633036101b4576101af8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610324915050565b505050565b6101af6100fe565b60006101c66102f1565b6001600160a01b031633036101e2576101dd6102c3565b905090565b6101ea6100fe565b90565b6101f56102f1565b6001600160a01b0316330361014d5761014a8161034f565b60006102176102f1565b6001600160a01b031633036101e2576101dd6102f1565b6102366102f1565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6103a3565b3660008037600080366000845af43d6000803e8080156102ec573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61032d836103cb565b60008251118061033a5750805b156101af57610349838361040b565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103786102f1565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610437565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610315565b6103d4816104e0565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061043083836040518060600160405280602781526020016107c560279139610574565b9392505050565b6001600160a01b03811661049c5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ba565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b61054d5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102ba565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6104bf565b6060600080856001600160a01b0316856040516105919190610775565b600060405180830381855af49150503d80600081146105cc576040519150601f19603f3d011682016040523d82523d6000602084013e6105d1565b606091505b50915091506105e2868383876105ec565b9695505050505050565b6060831561065b578251600003610654576001600160a01b0385163b6106545760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102ba565b5081610665565b610665838361066d565b949350505050565b81511561067d5781518083602001fd5b8060405162461bcd60e51b81526004016102ba9190610791565b80356001600160a01b03811681146106ae57600080fd5b919050565b6000602082840312156106c557600080fd5b61043082610697565b6000806000604084860312156106e357600080fd5b6106ec84610697565b9250602084013567ffffffffffffffff8082111561070957600080fd5b818601915086601f83011261071d57600080fd5b81358181111561072c57600080fd5b87602082850101111561073e57600080fd5b6020830194508093505050509250925092565b60005b8381101561076c578181015183820152602001610754565b50506000910152565b60008251610787818460208701610751565b9190910192915050565b60208152600082518060208401526107b0816040850160208701610751565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122013e4be7fbb9448379ca283101ef1037ca99a17f6ad00269fe32f79bcefab6e1864736f6c63430008140033",
++ "balance": "0xfffffffffffffba9c6e7dbb0bfffffff"
++ },
++ "0x0000777700000000000000000000000000000007": {
++ "contractName": "ProxiedSingletonSignalService",
++ "storage": {},
++ "code": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80636c6563f6116100715780636c6563f614610162578063715018a6146101755780638da5cb5b1461017d578063a86f9d9e1461018e578063f2fde38b146101a1578063f8f3f844146101b457600080fd5b80630652b57a146100b957806319ab453c146100ce57806332676bc6146100e15780633ab76e9f146101095780635221f6131461012e57806366ca2bc014610141575b600080fd5b6100cc6100c7366004611a23565b6101e0565b005b6100cc6100dc366004611a23565b610259565b6100f46100ef366004611a40565b610371565b60405190151581526020015b60405180910390f35b6097546001600160a01b03165b6040516001600160a01b039091168152602001610100565b6100f461013c366004611a6c565b6103e3565b61015461014f366004611b02565b61055d565b604051908152602001610100565b610116610170366004611b30565b6105a4565b6100cc6105bb565b6065546001600160a01b0316610116565b61011661019c366004611b65565b6105cf565b6100cc6101af366004611a23565b6105e5565b6101546101c2366004611a40565b6040805192835260208301919091526034600c830120918101905290565b6101e861065e565b6001600160a01b03811661020f57604051634d084d8560e11b815260040160405180910390fd5b609780546001600160a01b0319166001600160a01b0383169081179091556040517f399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b90600090a250565b600054610100900460ff16158080156102795750600054600160ff909116105b806102935750303b158015610293575060005460ff166001145b6102fb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801561031e576000805461ff0019166101001790555b610327826106b8565b801561036d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6000826001600160a01b03811661039b576040516354cdfc8d60e11b815260040160405180910390fd5b8260008190036103be5760405163014f1da760e21b815260040160405180910390fd5b5050604080519384526020840192909252506034600c83012091810190525460011490565b6000854681036104065760405163e822b48d60e01b815260040160405180910390fd5b856001600160a01b03811661042e576040516354cdfc8d60e11b815260040160405180910390fd5b8560008190036104515760405163014f1da760e21b815260040160405180910390fd5b600061045f86880188611c01565b90506000610476647461696b6f60d81b60006105cf565b825160405163016674a560e21b815267ffffffffffffffff90911660048201526001600160a01b039190911690630599d29490602401602060405180830381865afa1580156104c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ed9190611cd6565b604080518c8152602081018c90526034600c820120818301909252606081019190915290915061054e90608001604051602081830303815290604052604051806040016040528060018152602001600160f81b8152508460200151846106d1565b9b9a5050505050505050505050565b6000818082036105805760405163014f1da760e21b815260040160405180910390fd5b50506040805133815260208101929092526034600c83012091810190526001815590565b60006105b18484846106f5565b90505b9392505050565b6105c361065e565b6105cd60006107a9565b565b60006105dc4684846106f5565b90505b92915050565b6105ed61065e565b6001600160a01b0381166106525760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f2565b61065b816107a9565b50565b6065546001600160a01b031633146105cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102f2565b6106c06107fb565b6106c861082a565b61065b81610859565b6000806106dd866108a2565b90506106eb818686866108d4565b9695505050505050565b60975460405163195ac1a960e21b815260048101859052602481018490526000916001600160a01b03169063656b06a490604401602060405180830381865afa158015610746573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076a9190611cef565b90508115801561078157506001600160a01b038116155b156105b457604051631467050360e21b815260048101859052602481018490526044016102f2565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166108225760405162461bcd60e51b81526004016102f290611d0c565b6105cd610911565b600054610100900460ff166108515760405162461bcd60e51b81526004016102f290611d0c565b6105cd61093e565b6001600160a01b03811661088057604051634d084d8560e11b815260040160405180910390fd5b609780546001600160a01b0319166001600160a01b0392909216919091179055565b606081805190602001206040516020016108be91815260200190565b6040516020818303038152906040529050919050565b60008060006108e487868661096e565b9150915081801561090657508051602080830191909120875191880191909120145b979650505050505050565b600054610100900460ff166109385760405162461bcd60e51b81526004016102f290611d0c565b60018055565b600054610100900460ff166109655760405162461bcd60e51b81526004016102f290611d0c565b6105cd336107a9565b60006060600061097d85610a49565b9050600080600061098f848a89610b42565b815192955090935091501580806109a35750815b6109ef5760405162461bcd60e51b815260206004820152601a60248201527f50726f76696465642070726f6f6620697320696e76616c69642e00000000000060448201526064016102f2565b600081610a0b5760405180602001604052806000815250610a37565b610a3786610a1a600188611d6d565b81518110610a2a57610a2a611d80565b6020026020010151610f62565b919b919a509098505050505050505050565b60606000610a5683610f89565b90506000815167ffffffffffffffff811115610a7457610a74611b91565b604051908082528060200260200182016040528015610ab957816020015b6040805180820190915260608082526020820152815260200190600190039081610a925790505b50905060005b8251811015610b3a576000610aec848381518110610adf57610adf611d80565b6020026020010151610fbc565b90506040518060400160405280610b0283610f89565b815260200182815250838381518110610b1d57610b1d611d80565b60200260200101819052505080610b3390611d96565b9050610abf565b509392505050565b600060606000806000610b548761104c565b90506000869050600080610b7b604051806040016040528060608152602001606081525090565b60005b8c51811015610f3a578c8181518110610b9957610b99611d80565b602002602001015191508284610baf9190611daf565b9350610bbc600188611daf565b965083600003610c19578482602001518051906020012014610c145760405162461bcd60e51b8152602060048201526011602482015270092dcecc2d8d2c840e4dedee840d0c2e6d607b1b60448201526064016102f2565b610cdb565b602082602001515110610c80578482602001518051906020012014610c145760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964206c6172676520696e7465726e616c2068617368000000000060448201526064016102f2565b84610c8e8360200151611185565b14610cdb5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420696e7465726e616c206e6f6465206861736800000000000060448201526064016102f2565b610ce760106001611dc2565b60ff1682600001515103610d555785518414610f3a576000868581518110610d1157610d11611d80565b01602001518351805160f89290921c925060009183908110610d3557610d35611d80565b60200260200101519050610d48816111ad565b9650600194505050610f2a565b81515160011901610ee2576000610d6b836111e3565b9050600081600081518110610d8257610d82611d80565b016020015160f81c90506000610d99600283611ddb565b610da4906002611e0b565b90506000610db5848360ff16611207565b90506000610dc38b8a611207565b90506000610dd1838361123d565b905060ff851660021480610de8575060ff85166003145b15610e2257808351148015610dfd5750808251145b15610e0f57610e0c818b611daf565b99505b50600160ff1b9950610f3a945050505050565b60ff85161580610e35575060ff85166001145b15610e8b5782518114610e555750600160ff1b9950610f3a945050505050565b610e7c8860000151600181518110610e6f57610e6f611d80565b60200260200101516111ad565b9a509750610f2a945050505050565b60405162461bcd60e51b815260206004820152602660248201527f52656365697665642061206e6f6465207769746820616e20756e6b6e6f776e206044820152650e0e4caccd2f60d31b60648201526084016102f2565b60405162461bcd60e51b815260206004820152601d60248201527f526563656976656420616e20756e706172736561626c65206e6f64652e00000060448201526064016102f2565b610f3381611d96565b9050610b7e565b50600160ff1b841486610f4d8786611207565b909e909d50909b509950505050505050505050565b805180516060916105df91610f7990600190611d6d565b81518110610adf57610adf611d80565b6040805180820182526000808252602091820152815180830190925282518252808301908201526060906105df906112b7565b60606000806000610fcc856114a3565b919450925090506000816001811115610fe757610fe7611e24565b146110345760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420524c502062797465732076616c75652e000000000000000060448201526064016102f2565b611043856020015184846117ed565b95945050505050565b606060008251600261105e9190611e3a565b67ffffffffffffffff81111561107657611076611b91565b6040519080825280601f01601f1916602001820160405280156110a0576020820181803683370190505b50905060005b835181101561117e5760048482815181106110c3576110c3611d80565b01602001516001600160f81b031916901c826110e0836002611e3a565b815181106110f0576110f0611d80565b60200101906001600160f81b031916908160001a905350601084828151811061111b5761111b611d80565b016020015161112d919060f81c611ddb565b60f81b8261113c836002611e3a565b611147906001611daf565b8151811061115757611157611d80565b60200101906001600160f81b031916908160001a90535061117781611d96565b90506110a6565b5092915050565b600060208251101561119957506020015190565b818060200190518101906105df9190611cd6565b600060606020836000015110156111ce576111c783611896565b90506111da565b6111d783610fbc565b90505b6105b481611185565b60606105df6112028360000151600081518110610adf57610adf611d80565b61104c565b60608251821061122657506040805160208101909152600081526105df565b6105dc83838486516112389190611d6d565b6118a1565b6000805b8084511180156112515750808351115b80156112a2575082818151811061126a5761126a611d80565b602001015160f81c60f81b6001600160f81b03191684828151811061129157611291611d80565b01602001516001600160f81b031916145b156105dc576112b081611d96565b9050611241565b60606000806112c5846114a3565b919350909150600190508160018111156112e1576112e1611e24565b1461132e5760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420524c50206c6973742076616c75652e00000000000000000060448201526064016102f2565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816113475790505090506000835b865181101561149857602082106113e05760405162461bcd60e51b815260206004820152602a60248201527f50726f766964656420524c50206c6973742065786365656473206d6178206c6960448201526939ba103632b733ba341760b11b60648201526084016102f2565b60008061141d6040518060400160405280858c600001516114019190611d6d565b8152602001858c602001516114169190611daf565b90526114a3565b5091509150604051806040016040528083836114399190611daf565b8152602001848b6020015161144e9190611daf565b81525085858151811061146357611463611d80565b6020908102919091010152611479600185611daf565b93506114858183611daf565b61148f9084611daf565b92505050611374565b508152949350505050565b6000806000808460000151116114fb5760405162461bcd60e51b815260206004820152601860248201527f524c50206974656d2063616e6e6f74206265206e756c6c2e000000000000000060448201526064016102f2565b6020840151805160001a607f81116115205760006001600094509450945050506117e6565b60b7811161159c576000611535608083611d6d565b90508087600001511161158a5760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420524c502073686f727420737472696e672e0000000000000060448201526064016102f2565b600195509350600092506117e6915050565b60bf811161168b5760006115b160b783611d6d565b9050808760000151116116065760405162461bcd60e51b815260206004820152601f60248201527f496e76616c696420524c50206c6f6e6720737472696e67206c656e6774682e0060448201526064016102f2565b600183015160208290036101000a90046116208183611daf565b88511161166f5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420524c50206c6f6e6720737472696e672e000000000000000060448201526064016102f2565b61167a826001611daf565b96509450600093506117e692505050565b60f781116117065760006116a060c083611d6d565b9050808760000151116116f55760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420524c502073686f7274206c6973742e00000000000000000060448201526064016102f2565b6001955093508492506117e6915050565b600061171360f783611d6d565b9050808760000151116117685760405162461bcd60e51b815260206004820152601d60248201527f496e76616c696420524c50206c6f6e67206c697374206c656e6774682e00000060448201526064016102f2565b600183015160208290036101000a90046117828183611daf565b8851116117ca5760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b210292628103637b733903634b9ba1760511b60448201526064016102f2565b6117d5826001611daf565b96509450600193506117e692505050565b9193909250565b606060008267ffffffffffffffff81111561180a5761180a611b91565b6040519080825280601f01601f191660200182016040528015611834576020820181803683370190505b50905080516000036118475790506105b4565b8484016020820160005b85811015611869578281015182820152602001611851565b5060006001602087066020036101000a039050808251168119845116178252839450505050509392505050565b60606105df826119f8565b6060816118af81601f611daf565b10156118ee5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016102f2565b826118f98382611daf565b10156119385760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016102f2565b6119428284611daf565b845110156119865760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b60448201526064016102f2565b6060821580156119a557604051915060008252602082016040526119ef565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156119de5780518352602092830192016119c6565b5050858452601f01601f1916604052505b50949350505050565b60606105df8260200151600084600001516117ed565b6001600160a01b038116811461065b57600080fd5b600060208284031215611a3557600080fd5b81356105dc81611a0e565b60008060408385031215611a5357600080fd5b8235611a5e81611a0e565b946020939093013593505050565b600080600080600060808688031215611a8457600080fd5b853594506020860135611a9681611a0e565b935060408601359250606086013567ffffffffffffffff80821115611aba57600080fd5b818801915088601f830112611ace57600080fd5b813581811115611add57600080fd5b896020828501011115611aef57600080fd5b9699959850939650602001949392505050565b600060208284031215611b1457600080fd5b5035919050565b80358015158114611b2b57600080fd5b919050565b600080600060608486031215611b4557600080fd5b8335925060208401359150611b5c60408501611b1b565b90509250925092565b60008060408385031215611b7857600080fd5b82359150611b8860208401611b1b565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611bca57611bca611b91565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611bf957611bf9611b91565b604052919050565b60006020808385031215611c1457600080fd5b823567ffffffffffffffff80821115611c2c57600080fd5b9084019060408287031215611c4057600080fd5b611c48611ba7565b82358281168114611c5857600080fd5b81528284013582811115611c6b57600080fd5b80840193505086601f840112611c8057600080fd5b823582811115611c9257611c92611b91565b611ca4601f8201601f19168601611bd0565b92508083528785828601011115611cba57600080fd5b8085850186850137600090830185015292830152509392505050565b600060208284031215611ce857600080fd5b5051919050565b600060208284031215611d0157600080fd5b81516105dc81611a0e565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b818103818111156105df576105df611d57565b634e487b7160e01b600052603260045260246000fd5b600060018201611da857611da8611d57565b5060010190565b808201808211156105df576105df611d57565b60ff81811683821601908111156105df576105df611d57565b600060ff831680611dfc57634e487b7160e01b600052601260045260246000fd5b8060ff84160691505092915050565b60ff82811682821603908111156105df576105df611d57565b634e487b7160e01b600052602160045260246000fd5b80820281158282048414176105df576105df611d5756fea2646970667358221220151fc91dac790a2ffff3f5862cbc56fc2ca0ee6980528cb06692174bd7c2d26064736f6c63430008140033",
+ "balance": "0x0"
+ },
+ "0x0167001000000000000000000000000000010001": {
@@ -6880,7 +6886,13 @@
+ "0xae7265e8339453e4f286592643e47e0cecce92a71c8b854c4e0838831272c54b": "0x0000000000000000000000000000000000000000000000000000000000028c5a",
+ "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x0167002000000000000000000000000000000005"
+ },
-+ "code": "0x608060405236601057600e6013565b005b600e5b601f601b6021565b6058565b565b600060537f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156076573d6000f35b3d6000fdfea2646970667358221220d069871beb2c6edcfa3f383349b676a9e2ff21f2489a6e021395a444755306d264736f6c63430008140033",
++ "code": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b3565b610118565b61005b6100933660046106ce565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b3565b6101ed565b3480156100f557600080fd5b506100ad61020d565b61010661022e565b6101166101116102c3565b6102cd565b565b6101206102f1565b6001600160a01b0316330361014d5761014a81604051806020016040528060008152506000610324565b50565b61014a6100fe565b61015d6102f1565b6001600160a01b031633036101b4576101af8383838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250610324915050565b505050565b6101af6100fe565b60006101c66102f1565b6001600160a01b031633036101e2576101dd6102c3565b905090565b6101ea6100fe565b90565b6101f56102f1565b6001600160a01b0316330361014d5761014a8161034f565b60006102176102f1565b6001600160a01b031633036101e2576101dd6102f1565b6102366102f1565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6103a3565b3660008037600080366000845af43d6000803e8080156102ec573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b61032d836103cb565b60008251118061033a5750805b156101af57610349838361040b565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103786102f1565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610437565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610315565b6103d4816104e0565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061043083836040518060600160405280602781526020016107c560279139610574565b9392505050565b6001600160a01b03811661049c5760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ba565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b0381163b61054d5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102ba565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6104bf565b6060600080856001600160a01b0316856040516105919190610775565b600060405180830381855af49150503d80600081146105cc576040519150601f19603f3d011682016040523d82523d6000602084013e6105d1565b606091505b50915091506105e2868383876105ec565b9695505050505050565b6060831561065b578251600003610654576001600160a01b0385163b6106545760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102ba565b5081610665565b610665838361066d565b949350505050565b81511561067d5781518083602001fd5b8060405162461bcd60e51b81526004016102ba9190610791565b80356001600160a01b03811681146106ae57600080fd5b919050565b6000602082840312156106c557600080fd5b61043082610697565b6000806000604084860312156106e357600080fd5b6106ec84610697565b9250602084013567ffffffffffffffff8082111561070957600080fd5b818601915086601f83011261071d57600080fd5b81358181111561072c57600080fd5b87602082850101111561073e57600080fd5b6020830194508093505050509250925092565b60005b8381101561076c578181015183820152602001610754565b50506000910152565b60008251610787818460208701610751565b9190910192915050565b60208152600082518060208401526107b0816040850160208701610751565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122013e4be7fbb9448379ca283101ef1037ca99a17f6ad00269fe32f79bcefab6e1864736f6c63430008140033",
++ "balance": "0xfffffffffffffba9c6e7dbb0bfffffff"
++ },
++ "0x0000777700000000000000000000000000000007": {
++ "contractName": "ProxiedSingletonSignalService",
++ "storage": {},
++ "code": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80636c6563f6116100715780636c6563f614610162578063715018a6146101755780638da5cb5b1461017d578063a86f9d9e1461018e578063f2fde38b146101a1578063f8f3f844146101b457600080fd5b80630652b57a146100b957806319ab453c146100ce57806332676bc6146100e15780633ab76e9f146101095780635221f6131461012e57806366ca2bc014610141575b600080fd5b6100cc6100c7366004611a23565b6101e0565b005b6100cc6100dc366004611a23565b610259565b6100f46100ef366004611a40565b610371565b60405190151581526020015b60405180910390f35b6097546001600160a01b03165b6040516001600160a01b039091168152602001610100565b6100f461013c366004611a6c565b6103e3565b61015461014f366004611b02565b61055d565b604051908152602001610100565b610116610170366004611b30565b6105a4565b6100cc6105bb565b6065546001600160a01b0316610116565b61011661019c366004611b65565b6105cf565b6100cc6101af366004611a23565b6105e5565b6101546101c2366004611a40565b6040805192835260208301919091526034600c830120918101905290565b6101e861065e565b6001600160a01b03811661020f57604051634d084d8560e11b815260040160405180910390fd5b609780546001600160a01b0319166001600160a01b0383169081179091556040517f399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b90600090a250565b600054610100900460ff16158080156102795750600054600160ff909116105b806102935750303b158015610293575060005460ff166001145b6102fb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801561031e576000805461ff0019166101001790555b610327826106b8565b801561036d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6000826001600160a01b03811661039b576040516354cdfc8d60e11b815260040160405180910390fd5b8260008190036103be5760405163014f1da760e21b815260040160405180910390fd5b5050604080519384526020840192909252506034600c83012091810190525460011490565b6000854681036104065760405163e822b48d60e01b815260040160405180910390fd5b856001600160a01b03811661042e576040516354cdfc8d60e11b815260040160405180910390fd5b8560008190036104515760405163014f1da760e21b815260040160405180910390fd5b600061045f86880188611c01565b90506000610476647461696b6f60d81b60006105cf565b825160405163016674a560e21b815267ffffffffffffffff90911660048201526001600160a01b039190911690630599d29490602401602060405180830381865afa1580156104c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ed9190611cd6565b604080518c8152602081018c90526034600c820120818301909252606081019190915290915061054e90608001604051602081830303815290604052604051806040016040528060018152602001600160f81b8152508460200151846106d1565b9b9a5050505050505050505050565b6000818082036105805760405163014f1da760e21b815260040160405180910390fd5b50506040805133815260208101929092526034600c83012091810190526001815590565b60006105b18484846106f5565b90505b9392505050565b6105c361065e565b6105cd60006107a9565b565b60006105dc4684846106f5565b90505b92915050565b6105ed61065e565b6001600160a01b0381166106525760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f2565b61065b816107a9565b50565b6065546001600160a01b031633146105cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102f2565b6106c06107fb565b6106c861082a565b61065b81610859565b6000806106dd866108a2565b90506106eb818686866108d4565b9695505050505050565b60975460405163195ac1a960e21b815260048101859052602481018490526000916001600160a01b03169063656b06a490604401602060405180830381865afa158015610746573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076a9190611cef565b90508115801561078157506001600160a01b038116155b156105b457604051631467050360e21b815260048101859052602481018490526044016102f2565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166108225760405162461bcd60e51b81526004016102f290611d0c565b6105cd610911565b600054610100900460ff166108515760405162461bcd60e51b81526004016102f290611d0c565b6105cd61093e565b6001600160a01b03811661088057604051634d084d8560e11b815260040160405180910390fd5b609780546001600160a01b0319166001600160a01b0392909216919091179055565b606081805190602001206040516020016108be91815260200190565b6040516020818303038152906040529050919050565b60008060006108e487868661096e565b9150915081801561090657508051602080830191909120875191880191909120145b979650505050505050565b600054610100900460ff166109385760405162461bcd60e51b81526004016102f290611d0c565b60018055565b600054610100900460ff166109655760405162461bcd60e51b81526004016102f290611d0c565b6105cd336107a9565b60006060600061097d85610a49565b9050600080600061098f848a89610b42565b815192955090935091501580806109a35750815b6109ef5760405162461bcd60e51b815260206004820152601a60248201527f50726f76696465642070726f6f6620697320696e76616c69642e00000000000060448201526064016102f2565b600081610a0b5760405180602001604052806000815250610a37565b610a3786610a1a600188611d6d565b81518110610a2a57610a2a611d80565b6020026020010151610f62565b919b919a509098505050505050505050565b60606000610a5683610f89565b90506000815167ffffffffffffffff811115610a7457610a74611b91565b604051908082528060200260200182016040528015610ab957816020015b6040805180820190915260608082526020820152815260200190600190039081610a925790505b50905060005b8251811015610b3a576000610aec848381518110610adf57610adf611d80565b6020026020010151610fbc565b90506040518060400160405280610b0283610f89565b815260200182815250838381518110610b1d57610b1d611d80565b60200260200101819052505080610b3390611d96565b9050610abf565b509392505050565b600060606000806000610b548761104c565b90506000869050600080610b7b604051806040016040528060608152602001606081525090565b60005b8c51811015610f3a578c8181518110610b9957610b99611d80565b602002602001015191508284610baf9190611daf565b9350610bbc600188611daf565b965083600003610c19578482602001518051906020012014610c145760405162461bcd60e51b8152602060048201526011602482015270092dcecc2d8d2c840e4dedee840d0c2e6d607b1b60448201526064016102f2565b610cdb565b602082602001515110610c80578482602001518051906020012014610c145760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964206c6172676520696e7465726e616c2068617368000000000060448201526064016102f2565b84610c8e8360200151611185565b14610cdb5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420696e7465726e616c206e6f6465206861736800000000000060448201526064016102f2565b610ce760106001611dc2565b60ff1682600001515103610d555785518414610f3a576000868581518110610d1157610d11611d80565b01602001518351805160f89290921c925060009183908110610d3557610d35611d80565b60200260200101519050610d48816111ad565b9650600194505050610f2a565b81515160011901610ee2576000610d6b836111e3565b9050600081600081518110610d8257610d82611d80565b016020015160f81c90506000610d99600283611ddb565b610da4906002611e0b565b90506000610db5848360ff16611207565b90506000610dc38b8a611207565b90506000610dd1838361123d565b905060ff851660021480610de8575060ff85166003145b15610e2257808351148015610dfd5750808251145b15610e0f57610e0c818b611daf565b99505b50600160ff1b9950610f3a945050505050565b60ff85161580610e35575060ff85166001145b15610e8b5782518114610e555750600160ff1b9950610f3a945050505050565b610e7c8860000151600181518110610e6f57610e6f611d80565b60200260200101516111ad565b9a509750610f2a945050505050565b60405162461bcd60e51b815260206004820152602660248201527f52656365697665642061206e6f6465207769746820616e20756e6b6e6f776e206044820152650e0e4caccd2f60d31b60648201526084016102f2565b60405162461bcd60e51b815260206004820152601d60248201527f526563656976656420616e20756e706172736561626c65206e6f64652e00000060448201526064016102f2565b610f3381611d96565b9050610b7e565b50600160ff1b841486610f4d8786611207565b909e909d50909b509950505050505050505050565b805180516060916105df91610f7990600190611d6d565b81518110610adf57610adf611d80565b6040805180820182526000808252602091820152815180830190925282518252808301908201526060906105df906112b7565b60606000806000610fcc856114a3565b919450925090506000816001811115610fe757610fe7611e24565b146110345760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420524c502062797465732076616c75652e000000000000000060448201526064016102f2565b611043856020015184846117ed565b95945050505050565b606060008251600261105e9190611e3a565b67ffffffffffffffff81111561107657611076611b91565b6040519080825280601f01601f1916602001820160405280156110a0576020820181803683370190505b50905060005b835181101561117e5760048482815181106110c3576110c3611d80565b01602001516001600160f81b031916901c826110e0836002611e3a565b815181106110f0576110f0611d80565b60200101906001600160f81b031916908160001a905350601084828151811061111b5761111b611d80565b016020015161112d919060f81c611ddb565b60f81b8261113c836002611e3a565b611147906001611daf565b8151811061115757611157611d80565b60200101906001600160f81b031916908160001a90535061117781611d96565b90506110a6565b5092915050565b600060208251101561119957506020015190565b818060200190518101906105df9190611cd6565b600060606020836000015110156111ce576111c783611896565b90506111da565b6111d783610fbc565b90505b6105b481611185565b60606105df6112028360000151600081518110610adf57610adf611d80565b61104c565b60608251821061122657506040805160208101909152600081526105df565b6105dc83838486516112389190611d6d565b6118a1565b6000805b8084511180156112515750808351115b80156112a2575082818151811061126a5761126a611d80565b602001015160f81c60f81b6001600160f81b03191684828151811061129157611291611d80565b01602001516001600160f81b031916145b156105dc576112b081611d96565b9050611241565b60606000806112c5846114a3565b919350909150600190508160018111156112e1576112e1611e24565b1461132e5760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420524c50206c6973742076616c75652e00000000000000000060448201526064016102f2565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816113475790505090506000835b865181101561149857602082106113e05760405162461bcd60e51b815260206004820152602a60248201527f50726f766964656420524c50206c6973742065786365656473206d6178206c6960448201526939ba103632b733ba341760b11b60648201526084016102f2565b60008061141d6040518060400160405280858c600001516114019190611d6d565b8152602001858c602001516114169190611daf565b90526114a3565b5091509150604051806040016040528083836114399190611daf565b8152602001848b6020015161144e9190611daf565b81525085858151811061146357611463611d80565b6020908102919091010152611479600185611daf565b93506114858183611daf565b61148f9084611daf565b92505050611374565b508152949350505050565b6000806000808460000151116114fb5760405162461bcd60e51b815260206004820152601860248201527f524c50206974656d2063616e6e6f74206265206e756c6c2e000000000000000060448201526064016102f2565b6020840151805160001a607f81116115205760006001600094509450945050506117e6565b60b7811161159c576000611535608083611d6d565b90508087600001511161158a5760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420524c502073686f727420737472696e672e0000000000000060448201526064016102f2565b600195509350600092506117e6915050565b60bf811161168b5760006115b160b783611d6d565b9050808760000151116116065760405162461bcd60e51b815260206004820152601f60248201527f496e76616c696420524c50206c6f6e6720737472696e67206c656e6774682e0060448201526064016102f2565b600183015160208290036101000a90046116208183611daf565b88511161166f5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420524c50206c6f6e6720737472696e672e000000000000000060448201526064016102f2565b61167a826001611daf565b96509450600093506117e692505050565b60f781116117065760006116a060c083611d6d565b9050808760000151116116f55760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420524c502073686f7274206c6973742e00000000000000000060448201526064016102f2565b6001955093508492506117e6915050565b600061171360f783611d6d565b9050808760000151116117685760405162461bcd60e51b815260206004820152601d60248201527f496e76616c696420524c50206c6f6e67206c697374206c656e6774682e00000060448201526064016102f2565b600183015160208290036101000a90046117828183611daf565b8851116117ca5760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b210292628103637b733903634b9ba1760511b60448201526064016102f2565b6117d5826001611daf565b96509450600193506117e692505050565b9193909250565b606060008267ffffffffffffffff81111561180a5761180a611b91565b6040519080825280601f01601f191660200182016040528015611834576020820181803683370190505b50905080516000036118475790506105b4565b8484016020820160005b85811015611869578281015182820152602001611851565b5060006001602087066020036101000a039050808251168119845116178252839450505050509392505050565b60606105df826119f8565b6060816118af81601f611daf565b10156118ee5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016102f2565b826118f98382611daf565b10156119385760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016102f2565b6119428284611daf565b845110156119865760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b60448201526064016102f2565b6060821580156119a557604051915060008252602082016040526119ef565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156119de5780518352602092830192016119c6565b5050858452601f01601f1916604052505b50949350505050565b60606105df8260200151600084600001516117ed565b6001600160a01b038116811461065b57600080fd5b600060208284031215611a3557600080fd5b81356105dc81611a0e565b60008060408385031215611a5357600080fd5b8235611a5e81611a0e565b946020939093013593505050565b600080600080600060808688031215611a8457600080fd5b853594506020860135611a9681611a0e565b935060408601359250606086013567ffffffffffffffff80821115611aba57600080fd5b818801915088601f830112611ace57600080fd5b813581811115611add57600080fd5b896020828501011115611aef57600080fd5b9699959850939650602001949392505050565b600060208284031215611b1457600080fd5b5035919050565b80358015158114611b2b57600080fd5b919050565b600080600060608486031215611b4557600080fd5b8335925060208401359150611b5c60408501611b1b565b90509250925092565b60008060408385031215611b7857600080fd5b82359150611b8860208401611b1b565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611bca57611bca611b91565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611bf957611bf9611b91565b604052919050565b60006020808385031215611c1457600080fd5b823567ffffffffffffffff80821115611c2c57600080fd5b9084019060408287031215611c4057600080fd5b611c48611ba7565b82358281168114611c5857600080fd5b81528284013582811115611c6b57600080fd5b80840193505086601f840112611c8057600080fd5b823582811115611c9257611c92611b91565b611ca4601f8201601f19168601611bd0565b92508083528785828601011115611cba57600080fd5b8085850186850137600090830185015292830152509392505050565b600060208284031215611ce857600080fd5b5051919050565b600060208284031215611d0157600080fd5b81516105dc81611a0e565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b818103818111156105df576105df611d57565b634e487b7160e01b600052603260045260246000fd5b600060018201611da857611da8611d57565b5060010190565b808201808211156105df576105df611d57565b60ff81811683821601908111156105df576105df611d57565b600060ff831680611dfc57634e487b7160e01b600052601260045260246000fd5b8060ff84160691505092915050565b60ff82811682821603908111156105df576105df611d57565b634e487b7160e01b600052602160045260246000fd5b80820281158282048414176105df576105df611d5756fea2646970667358221220151fc91dac790a2ffff3f5862cbc56fc2ca0ee6980528cb06692174bd7c2d26064736f6c63430008140033",
+ "balance": "0x0"
+ },
+ "0x0167002000000000000000000000000000010001": {
@@ -7195,7 +7207,7 @@
+ "balance": "0xffffffffffffff21f494c589bfffffff"
+ },
+ "0x0000777700000000000000000000000000000007": {
-+ "contractName": "ProxiedSignalService",
++ "contractName": "ProxiedSingletonSignalService",
+ "storage": {},
+ "code": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80636c6563f6116100715780636c6563f614610162578063715018a6146101755780638da5cb5b1461017d578063a86f9d9e1461018e578063f2fde38b146101a1578063f8f3f844146101b457600080fd5b80630652b57a146100b957806319ab453c146100ce57806332676bc6146100e15780633ab76e9f146101095780635221f6131461012e57806366ca2bc014610141575b600080fd5b6100cc6100c7366004611a23565b6101e0565b005b6100cc6100dc366004611a23565b610259565b6100f46100ef366004611a40565b610371565b60405190151581526020015b60405180910390f35b6097546001600160a01b03165b6040516001600160a01b039091168152602001610100565b6100f461013c366004611a6c565b6103e3565b61015461014f366004611b02565b61055d565b604051908152602001610100565b610116610170366004611b30565b6105a4565b6100cc6105bb565b6065546001600160a01b0316610116565b61011661019c366004611b65565b6105cf565b6100cc6101af366004611a23565b6105e5565b6101546101c2366004611a40565b6040805192835260208301919091526034600c830120918101905290565b6101e861065e565b6001600160a01b03811661020f57604051634d084d8560e11b815260040160405180910390fd5b609780546001600160a01b0319166001600160a01b0383169081179091556040517f399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b90600090a250565b600054610100900460ff16158080156102795750600054600160ff909116105b806102935750303b158015610293575060005460ff166001145b6102fb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801561031e576000805461ff0019166101001790555b610327826106b8565b801561036d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6000826001600160a01b03811661039b576040516354cdfc8d60e11b815260040160405180910390fd5b8260008190036103be5760405163014f1da760e21b815260040160405180910390fd5b5050604080519384526020840192909252506034600c83012091810190525460011490565b6000854681036104065760405163e822b48d60e01b815260040160405180910390fd5b856001600160a01b03811661042e576040516354cdfc8d60e11b815260040160405180910390fd5b8560008190036104515760405163014f1da760e21b815260040160405180910390fd5b600061045f86880188611c01565b90506000610476647461696b6f60d81b60006105cf565b825160405163016674a560e21b815267ffffffffffffffff90911660048201526001600160a01b039190911690630599d29490602401602060405180830381865afa1580156104c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ed9190611cd6565b604080518c8152602081018c90526034600c820120818301909252606081019190915290915061054e90608001604051602081830303815290604052604051806040016040528060018152602001600160f81b8152508460200151846106d1565b9b9a5050505050505050505050565b6000818082036105805760405163014f1da760e21b815260040160405180910390fd5b50506040805133815260208101929092526034600c83012091810190526001815590565b60006105b18484846106f5565b90505b9392505050565b6105c361065e565b6105cd60006107a9565b565b60006105dc4684846106f5565b90505b92915050565b6105ed61065e565b6001600160a01b0381166106525760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f2565b61065b816107a9565b50565b6065546001600160a01b031633146105cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102f2565b6106c06107fb565b6106c861082a565b61065b81610859565b6000806106dd866108a2565b90506106eb818686866108d4565b9695505050505050565b60975460405163195ac1a960e21b815260048101859052602481018490526000916001600160a01b03169063656b06a490604401602060405180830381865afa158015610746573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076a9190611cef565b90508115801561078157506001600160a01b038116155b156105b457604051631467050360e21b815260048101859052602481018490526044016102f2565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166108225760405162461bcd60e51b81526004016102f290611d0c565b6105cd610911565b600054610100900460ff166108515760405162461bcd60e51b81526004016102f290611d0c565b6105cd61093e565b6001600160a01b03811661088057604051634d084d8560e11b815260040160405180910390fd5b609780546001600160a01b0319166001600160a01b0392909216919091179055565b606081805190602001206040516020016108be91815260200190565b6040516020818303038152906040529050919050565b60008060006108e487868661096e565b9150915081801561090657508051602080830191909120875191880191909120145b979650505050505050565b600054610100900460ff166109385760405162461bcd60e51b81526004016102f290611d0c565b60018055565b600054610100900460ff166109655760405162461bcd60e51b81526004016102f290611d0c565b6105cd336107a9565b60006060600061097d85610a49565b9050600080600061098f848a89610b42565b815192955090935091501580806109a35750815b6109ef5760405162461bcd60e51b815260206004820152601a60248201527f50726f76696465642070726f6f6620697320696e76616c69642e00000000000060448201526064016102f2565b600081610a0b5760405180602001604052806000815250610a37565b610a3786610a1a600188611d6d565b81518110610a2a57610a2a611d80565b6020026020010151610f62565b919b919a509098505050505050505050565b60606000610a5683610f89565b90506000815167ffffffffffffffff811115610a7457610a74611b91565b604051908082528060200260200182016040528015610ab957816020015b6040805180820190915260608082526020820152815260200190600190039081610a925790505b50905060005b8251811015610b3a576000610aec848381518110610adf57610adf611d80565b6020026020010151610fbc565b90506040518060400160405280610b0283610f89565b815260200182815250838381518110610b1d57610b1d611d80565b60200260200101819052505080610b3390611d96565b9050610abf565b509392505050565b600060606000806000610b548761104c565b90506000869050600080610b7b604051806040016040528060608152602001606081525090565b60005b8c51811015610f3a578c8181518110610b9957610b99611d80565b602002602001015191508284610baf9190611daf565b9350610bbc600188611daf565b965083600003610c19578482602001518051906020012014610c145760405162461bcd60e51b8152602060048201526011602482015270092dcecc2d8d2c840e4dedee840d0c2e6d607b1b60448201526064016102f2565b610cdb565b602082602001515110610c80578482602001518051906020012014610c145760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964206c6172676520696e7465726e616c2068617368000000000060448201526064016102f2565b84610c8e8360200151611185565b14610cdb5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420696e7465726e616c206e6f6465206861736800000000000060448201526064016102f2565b610ce760106001611dc2565b60ff1682600001515103610d555785518414610f3a576000868581518110610d1157610d11611d80565b01602001518351805160f89290921c925060009183908110610d3557610d35611d80565b60200260200101519050610d48816111ad565b9650600194505050610f2a565b81515160011901610ee2576000610d6b836111e3565b9050600081600081518110610d8257610d82611d80565b016020015160f81c90506000610d99600283611ddb565b610da4906002611e0b565b90506000610db5848360ff16611207565b90506000610dc38b8a611207565b90506000610dd1838361123d565b905060ff851660021480610de8575060ff85166003145b15610e2257808351148015610dfd5750808251145b15610e0f57610e0c818b611daf565b99505b50600160ff1b9950610f3a945050505050565b60ff85161580610e35575060ff85166001145b15610e8b5782518114610e555750600160ff1b9950610f3a945050505050565b610e7c8860000151600181518110610e6f57610e6f611d80565b60200260200101516111ad565b9a509750610f2a945050505050565b60405162461bcd60e51b815260206004820152602660248201527f52656365697665642061206e6f6465207769746820616e20756e6b6e6f776e206044820152650e0e4caccd2f60d31b60648201526084016102f2565b60405162461bcd60e51b815260206004820152601d60248201527f526563656976656420616e20756e706172736561626c65206e6f64652e00000060448201526064016102f2565b610f3381611d96565b9050610b7e565b50600160ff1b841486610f4d8786611207565b909e909d50909b509950505050505050505050565b805180516060916105df91610f7990600190611d6d565b81518110610adf57610adf611d80565b6040805180820182526000808252602091820152815180830190925282518252808301908201526060906105df906112b7565b60606000806000610fcc856114a3565b919450925090506000816001811115610fe757610fe7611e24565b146110345760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420524c502062797465732076616c75652e000000000000000060448201526064016102f2565b611043856020015184846117ed565b95945050505050565b606060008251600261105e9190611e3a565b67ffffffffffffffff81111561107657611076611b91565b6040519080825280601f01601f1916602001820160405280156110a0576020820181803683370190505b50905060005b835181101561117e5760048482815181106110c3576110c3611d80565b01602001516001600160f81b031916901c826110e0836002611e3a565b815181106110f0576110f0611d80565b60200101906001600160f81b031916908160001a905350601084828151811061111b5761111b611d80565b016020015161112d919060f81c611ddb565b60f81b8261113c836002611e3a565b611147906001611daf565b8151811061115757611157611d80565b60200101906001600160f81b031916908160001a90535061117781611d96565b90506110a6565b5092915050565b600060208251101561119957506020015190565b818060200190518101906105df9190611cd6565b600060606020836000015110156111ce576111c783611896565b90506111da565b6111d783610fbc565b90505b6105b481611185565b60606105df6112028360000151600081518110610adf57610adf611d80565b61104c565b60608251821061122657506040805160208101909152600081526105df565b6105dc83838486516112389190611d6d565b6118a1565b6000805b8084511180156112515750808351115b80156112a2575082818151811061126a5761126a611d80565b602001015160f81c60f81b6001600160f81b03191684828151811061129157611291611d80565b01602001516001600160f81b031916145b156105dc576112b081611d96565b9050611241565b60606000806112c5846114a3565b919350909150600190508160018111156112e1576112e1611e24565b1461132e5760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420524c50206c6973742076616c75652e00000000000000000060448201526064016102f2565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816113475790505090506000835b865181101561149857602082106113e05760405162461bcd60e51b815260206004820152602a60248201527f50726f766964656420524c50206c6973742065786365656473206d6178206c6960448201526939ba103632b733ba341760b11b60648201526084016102f2565b60008061141d6040518060400160405280858c600001516114019190611d6d565b8152602001858c602001516114169190611daf565b90526114a3565b5091509150604051806040016040528083836114399190611daf565b8152602001848b6020015161144e9190611daf565b81525085858151811061146357611463611d80565b6020908102919091010152611479600185611daf565b93506114858183611daf565b61148f9084611daf565b92505050611374565b508152949350505050565b6000806000808460000151116114fb5760405162461bcd60e51b815260206004820152601860248201527f524c50206974656d2063616e6e6f74206265206e756c6c2e000000000000000060448201526064016102f2565b6020840151805160001a607f81116115205760006001600094509450945050506117e6565b60b7811161159c576000611535608083611d6d565b90508087600001511161158a5760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420524c502073686f727420737472696e672e0000000000000060448201526064016102f2565b600195509350600092506117e6915050565b60bf811161168b5760006115b160b783611d6d565b9050808760000151116116065760405162461bcd60e51b815260206004820152601f60248201527f496e76616c696420524c50206c6f6e6720737472696e67206c656e6774682e0060448201526064016102f2565b600183015160208290036101000a90046116208183611daf565b88511161166f5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420524c50206c6f6e6720737472696e672e000000000000000060448201526064016102f2565b61167a826001611daf565b96509450600093506117e692505050565b60f781116117065760006116a060c083611d6d565b9050808760000151116116f55760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420524c502073686f7274206c6973742e00000000000000000060448201526064016102f2565b6001955093508492506117e6915050565b600061171360f783611d6d565b9050808760000151116117685760405162461bcd60e51b815260206004820152601d60248201527f496e76616c696420524c50206c6f6e67206c697374206c656e6774682e00000060448201526064016102f2565b600183015160208290036101000a90046117828183611daf565b8851116117ca5760405162461bcd60e51b815260206004820152601660248201527524b73b30b634b210292628103637b733903634b9ba1760511b60448201526064016102f2565b6117d5826001611daf565b96509450600193506117e692505050565b9193909250565b606060008267ffffffffffffffff81111561180a5761180a611b91565b6040519080825280601f01601f191660200182016040528015611834576020820181803683370190505b50905080516000036118475790506105b4565b8484016020820160005b85811015611869578281015182820152602001611851565b5060006001602087066020036101000a039050808251168119845116178252839450505050509392505050565b60606105df826119f8565b6060816118af81601f611daf565b10156118ee5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016102f2565b826118f98382611daf565b10156119385760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016102f2565b6119428284611daf565b845110156119865760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b60448201526064016102f2565b6060821580156119a557604051915060008252602082016040526119ef565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156119de5780518352602092830192016119c6565b5050858452601f01601f1916604052505b50949350505050565b60606105df8260200151600084600001516117ed565b6001600160a01b038116811461065b57600080fd5b600060208284031215611a3557600080fd5b81356105dc81611a0e565b60008060408385031215611a5357600080fd5b8235611a5e81611a0e565b946020939093013593505050565b600080600080600060808688031215611a8457600080fd5b853594506020860135611a9681611a0e565b935060408601359250606086013567ffffffffffffffff80821115611aba57600080fd5b818801915088601f830112611ace57600080fd5b813581811115611add57600080fd5b896020828501011115611aef57600080fd5b9699959850939650602001949392505050565b600060208284031215611b1457600080fd5b5035919050565b80358015158114611b2b57600080fd5b919050565b600080600060608486031215611b4557600080fd5b8335925060208401359150611b5c60408501611b1b565b90509250925092565b60008060408385031215611b7857600080fd5b82359150611b8860208401611b1b565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611bca57611bca611b91565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611bf957611bf9611b91565b604052919050565b60006020808385031215611c1457600080fd5b823567ffffffffffffffff80821115611c2c57600080fd5b9084019060408287031215611c4057600080fd5b611c48611ba7565b82358281168114611c5857600080fd5b81528284013582811115611c6b57600080fd5b80840193505086601f840112611c8057600080fd5b823582811115611c9257611c92611b91565b611ca4601f8201601f19168601611bd0565b92508083528785828601011115611cba57600080fd5b8085850186850137600090830185015292830152509392505050565b600060208284031215611ce857600080fd5b5051919050565b600060208284031215611d0157600080fd5b81516105dc81611a0e565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b818103818111156105df576105df611d57565b634e487b7160e01b600052603260045260246000fd5b600060018201611da857611da8611d57565b5060010190565b808201808211156105df576105df611d57565b60ff81811683821601908111156105df576105df611d57565b600060ff831680611dfc57634e487b7160e01b600052601260045260246000fd5b8060ff84160691505092915050565b60ff82811682821603908111156105df576105df611d57565b634e487b7160e01b600052602160045260246000fd5b80820281158282048414176105df576105df611d5756fea2646970667358221220c8e5d2f03cdfd05271211f91051ea017cc78712d374c157f61c7f6293b421c5864736f6c63430008140033",
+ "balance": "0x0"
diff --git a/packages/guardian-prover-health-check/.default.env b/packages/guardian-prover-health-check/.default.env
new file mode 100644
index 00000000000..7482b03442d
--- /dev/null
+++ b/packages/guardian-prover-health-check/.default.env
@@ -0,0 +1,13 @@
+HTTP_PORT=4103
+PROMETHEUS_HTTP_PORT=6062
+DATABASE_USER=root
+DATABASE_PASSWORD=root
+DATABASE_NAME=healthcheck
+DATABASE_HOST=localhost:3306
+DATABASE_MAX_IDLE_CONNS=50
+DATABASE_MAX_OPEN_CONNS=3000
+DATABASE_CONN_MAX_LIFETIME_IN_MS=100000
+GUARDIAN_PROVER_CONTRACT_ADDRESS=0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE
+GUARDIAN_PROVER_ENDPOINTS=https://guardian-prover-1.internal.taiko.xyz,https://guardian-prover-2.internal.taiko.xyz,https://guardian-prover-3.internal.taiko.xyz,https://guardian-prover-4.internal.taiko.xyz,https://guardian-prover-5.internal.taiko.xyz,
+RPC_URL=wss://l1ws.internal.taiko.xyz
+INTERVAL=12s
\ No newline at end of file
diff --git a/packages/guardian-prover-health-check/.generator.env b/packages/guardian-prover-health-check/.generator.env
new file mode 100644
index 00000000000..80211abf57a
--- /dev/null
+++ b/packages/guardian-prover-health-check/.generator.env
@@ -0,0 +1,12 @@
+HTTP_PORT=4103
+METRICS_HTTP_PORT=6044
+DATABASE_USER=root
+DATABASE_PASSWORD=root
+DATABASE_NAME=healthcheck
+DATABASE_HOST=localhost:3306
+DATABASE_MAX_IDLE_CONNS=50
+DATABASE_MAX_OPEN_CONNS=3000
+DATABASE_CONN_MAX_LIFETIME_IN_MS=100000
+REGENERATE=false
+GENESIS_DATE=2023-11-03
+INTERVAL=12s
\ No newline at end of file
diff --git a/packages/guardian-prover-health-check/.gitignore b/packages/guardian-prover-health-check/.gitignore
new file mode 100644
index 00000000000..e3b802550a1
--- /dev/null
+++ b/packages/guardian-prover-health-check/.gitignore
@@ -0,0 +1,45 @@
+.netrc
+.env
+main
+coverage.txt
+
+# Local .terraform directories
+.terraform
+
+# .tfstate files
+*.tfstate
+*.tfstate.*
+
+# Crash log files
+crash.log
+
+# Exclude all .tfvars files, which are likely to contain sentitive data, such as
+# password, private keys, and other secrets. These should not be part of version
+# control as they are data points which are potentially sensitive and subject
+# to change depending on the environment.
+#
+*.tfvars
+
+# Ignore override files as they are usually used to override resources locally and so
+# are not checked in
+override.tf
+override.tf.json
+*_override.tf
+*_override.tf.json
+
+# Include override files you do wish to add to version control using negated pattern
+#
+# !example_override.tf
+
+# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
+# example: *tfplan*
+
+# Ignore CLI configuration files
+.terraformrc
+terraform.rc
+
+.idea
+
+Bridge.json
+TaikoL2.json
+IHeaderSync.json
\ No newline at end of file
diff --git a/packages/guardian-prover-health-check/.golangci.yml b/packages/guardian-prover-health-check/.golangci.yml
new file mode 100644
index 00000000000..010e197cd32
--- /dev/null
+++ b/packages/guardian-prover-health-check/.golangci.yml
@@ -0,0 +1,48 @@
+# See: https://golangci-lint.run/usage/configuration/
+#
+# Note: for VSCode, you must have the following settings to use this configuration:
+#
+# "go.lintTool": "golangci-lint",
+# "go.lintFlags": [
+# "--fast",
+# "--config=${workspaceFolder}/.golangci.yml"
+# ],
+
+output:
+ format: colored-line-number
+
+linters:
+ enable:
+ - errcheck
+ - funlen
+ - gocognit
+ - gocritic
+ - gofmt
+ # - revive
+ # - gosec
+ - gosimple
+ - lll
+ - unused
+ - whitespace
+ - wsl
+
+linters-settings:
+ funlen:
+ lines: 250
+ statements: 80
+ gocognit:
+ min-complexity: 55
+
+issues:
+ exclude-rules:
+ # Exclude some linters from running on tests files.
+ - path: _test\.go
+ linters:
+ - funlen
+ - path: /
+ linters:
+ - typecheck
+
+run:
+ skip-dirs:
+ - contracts/*
diff --git a/packages/guardian-prover-health-check/CHANGELOG.md b/packages/guardian-prover-health-check/CHANGELOG.md
new file mode 100644
index 00000000000..3d809e6770d
--- /dev/null
+++ b/packages/guardian-prover-health-check/CHANGELOG.md
@@ -0,0 +1,194 @@
+# Changelog
+
+## [0.12.0](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.11.0...relayer-v0.12.0) (2023-10-18)
+
+
+### Features
+
+* **eventindexer:** API documentation, swagger, github pages ([#14948](https://github.com/taikoxyz/taiko-mono/issues/14948)) ([5455267](https://github.com/taikoxyz/taiko-mono/commit/54552674fe8a6b0b4321afe1ef4d90d00d62f0e8))
+
+
+### Bug Fixes
+
+* **eventindexer:** update config tests ([#14912](https://github.com/taikoxyz/taiko-mono/issues/14912)) ([beab49b](https://github.com/taikoxyz/taiko-mono/commit/beab49bd8f085b1e285fb3a16e9b493f3c5f5932))
+* **relayer:** ERC1155 bridging, amount => amounts ([#14959](https://github.com/taikoxyz/taiko-mono/issues/14959)) ([d42c59d](https://github.com/taikoxyz/taiko-mono/commit/d42c59d5150c9c41941458e25fac75121d73da76))
+
+## [0.11.0](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.10.0...relayer-v0.11.0) (2023-09-25)
+
+
+### Features
+
+* **eventindexer:** Track proposer/prover rewards, + generate tasks for total/per day ([#14690](https://github.com/taikoxyz/taiko-mono/issues/14690)) ([cc477b9](https://github.com/taikoxyz/taiko-mono/commit/cc477b97c00e8339a87c4d4502a0ee8ad811c10f))
+* **relayer:** fix cost calculation for isProfitable ([#14767](https://github.com/taikoxyz/taiko-mono/issues/14767)) ([8e1c897](https://github.com/taikoxyz/taiko-mono/commit/8e1c89748fcb42e354d2219ceac2be1c668bcf31))
+* **relayer:** queue processor Prefetch ([#14765](https://github.com/taikoxyz/taiko-mono/issues/14765)) ([a37797a](https://github.com/taikoxyz/taiko-mono/commit/a37797a6115fda37e933b0742881649a411a29ef))
+* **relayer:** Relayer indexer/processor separation and refactor, messaging queue ([#14605](https://github.com/taikoxyz/taiko-mono/issues/14605)) ([15b0e50](https://github.com/taikoxyz/taiko-mono/commit/15b0e50c130687cac32eef97ba5f396f79ad933f))
+* **relayer:** support L2-L2 bridging ([#14711](https://github.com/taikoxyz/taiko-mono/issues/14711)) ([1410217](https://github.com/taikoxyz/taiko-mono/commit/1410217363077ea6179080fca4a7aeadc6c7d149))
+
+
+### Bug Fixes
+
+* **relayer:** Relayer cors flag was not being used ([#14661](https://github.com/taikoxyz/taiko-mono/issues/14661)) ([19f35f7](https://github.com/taikoxyz/taiko-mono/commit/19f35f74e8a955c2776defe6e5cac48a9b6456a3))
+* **relayer:** Relayer paid gas ([#14748](https://github.com/taikoxyz/taiko-mono/issues/14748)) ([b4cb3ff](https://github.com/taikoxyz/taiko-mono/commit/b4cb3ffe9d4bad67682a8217621b8b67cb263f65))
+
+## [0.10.0](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.9.1...relayer-v0.10.0) (2023-09-05)
+
+
+### Features
+
+* **eventindexer:** Eventindexer and relayer a5 updates ([#14597](https://github.com/taikoxyz/taiko-mono/issues/14597)) ([87c9d53](https://github.com/taikoxyz/taiko-mono/commit/87c9d53fa9c6911aada78a1746839d14e4401916))
+
+
+### Bug Fixes
+
+* **relayer:** Eth bridge ([#14609](https://github.com/taikoxyz/taiko-mono/issues/14609)) ([f5207ae](https://github.com/taikoxyz/taiko-mono/commit/f5207ae19c48d9aaa83dab2739cd05d9c2985112))
+
+## [0.9.1](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.9.0...relayer-v0.9.1) (2023-08-22)
+
+
+### Bug Fixes
+
+* **relayer:** use erc20vault not token vault for required end var ([#14519](https://github.com/taikoxyz/taiko-mono/issues/14519)) ([a49c65c](https://github.com/taikoxyz/taiko-mono/commit/a49c65c6ba9535a761f4ef2abd7be2b2213a71c2))
+
+## [0.9.0](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.8.0...relayer-v0.9.0) (2023-08-15)
+
+
+### Features
+
+* **eventindexer:** Index nfts ([#14418](https://github.com/taikoxyz/taiko-mono/issues/14418)) ([364b09b](https://github.com/taikoxyz/taiko-mono/commit/364b09b52344dff8782be7333eac4fdb3e5d1597))
+* **protocol:** alpha-4 with staking-based tokenomics ([#14065](https://github.com/taikoxyz/taiko-mono/issues/14065)) ([1eeba9d](https://github.com/taikoxyz/taiko-mono/commit/1eeba9d97ed8e6e4a8d07a8b0af163a16fbc9ccf))
+
+## [0.8.0](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.7.0...relayer-v0.8.0) (2023-06-26)
+
+
+### Features
+
+* **protocol:** use ring buffer for ETH deposit and optimize storage ([#13868](https://github.com/taikoxyz/taiko-mono/issues/13868)) ([acffb61](https://github.com/taikoxyz/taiko-mono/commit/acffb61b13b44fd4792e8f4a31498d788ca38961))
+* **relayer:** use gas tip cap if available ([#14024](https://github.com/taikoxyz/taiko-mono/issues/14024)) ([773331b](https://github.com/taikoxyz/taiko-mono/commit/773331bebb509ef66f3a9aab51a8927432e11dc3))
+
+
+### Bug Fixes
+
+* **relayer:** cancel waiting for receipts ([#14019](https://github.com/taikoxyz/taiko-mono/issues/14019)) ([c9fcffe](https://github.com/taikoxyz/taiko-mono/commit/c9fcffe1d1227219b244b97555e96a49a865f868))
+* **relayer:** fix scanning blocks twice ([#14047](https://github.com/taikoxyz/taiko-mono/issues/14047)) ([9ee6723](https://github.com/taikoxyz/taiko-mono/commit/9ee67238eccc5218346f7cbcf936a76919bf7ae4))
+* **relayer:** make sure to return nil for first by msg hash ([#13967](https://github.com/taikoxyz/taiko-mono/issues/13967)) ([bf69226](https://github.com/taikoxyz/taiko-mono/commit/bf692264ede4545089515372002ee176e0783729))
+* **relayer:** only need to find first msg hash ([#13966](https://github.com/taikoxyz/taiko-mono/issues/13966)) ([87c6e20](https://github.com/taikoxyz/taiko-mono/commit/87c6e20340757d3bdd6075afb8b5cd264cc511a3))
+* **relayer:** relayer is slow due to inefficient indexing in sql ([#13964](https://github.com/taikoxyz/taiko-mono/issues/13964)) ([edd643c](https://github.com/taikoxyz/taiko-mono/commit/edd643cda2ba883d8060ea4921b726b499927575))
+* **relayer:** Relayer reorg ([#14033](https://github.com/taikoxyz/taiko-mono/issues/14033)) ([4794f45](https://github.com/taikoxyz/taiko-mono/commit/4794f45006aff0287bc6cf4630910a1ec3a01fbd))
+* **relayer:** return nil, not error, if we dont have a previous msghash ([#13968](https://github.com/taikoxyz/taiko-mono/issues/13968)) ([22a1171](https://github.com/taikoxyz/taiko-mono/commit/22a1171a151e26f136771b8bc303bbfefe1dcca8))
+
+## [0.7.0](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.6.0...relayer-v0.7.0) (2023-06-12)
+
+
+### Features
+
+* **eventindexer:** handle reorg ([#13841](https://github.com/taikoxyz/taiko-mono/issues/13841)) ([0a26ce5](https://github.com/taikoxyz/taiko-mono/commit/0a26ce58422d2674f1b5cd151c74bb40f2bec17d))
+* **status-page:** updates for a3 ([#13821](https://github.com/taikoxyz/taiko-mono/issues/13821)) ([7ed816d](https://github.com/taikoxyz/taiko-mono/commit/7ed816d8db7ac75468faa235c09f147db5009034))
+
+## [0.6.0](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.5.0...relayer-v0.6.0) (2023-05-26)
+
+
+### Features
+
+* **eventindexer:** add stats tracking ([#13810](https://github.com/taikoxyz/taiko-mono/issues/13810)) ([bfbbb97](https://github.com/taikoxyz/taiko-mono/commit/bfbbb97fcb67dc33749f0f08f84b8bd54eae9aeb))
+* **relayer:** hardcode gas limit to determine if a message needs extra gas to deploy a contract ([#13764](https://github.com/taikoxyz/taiko-mono/issues/13764)) ([0615bf6](https://github.com/taikoxyz/taiko-mono/commit/0615bf6dfc9d5109c7a70d55dd57e79c2a69925f))
+
+
+### Bug Fixes
+
+* **protocol:** rename treasure to treasury ([#13780](https://github.com/taikoxyz/taiko-mono/issues/13780)) ([ccecd70](https://github.com/taikoxyz/taiko-mono/commit/ccecd708276bce3eca84b92c7c48c95b2156dd18))
+* **relayer:** catch relayer message processing up to latest protocol changes ([#13746](https://github.com/taikoxyz/taiko-mono/issues/13746)) ([e3746ee](https://github.com/taikoxyz/taiko-mono/commit/e3746ee1980dade609ac190d27183a6a5b94f4df))
+* **relayer:** Out of gas ([#13778](https://github.com/taikoxyz/taiko-mono/issues/13778)) ([a42a33b](https://github.com/taikoxyz/taiko-mono/commit/a42a33b30bc0daec707ff51cc639c966642e50ca))
+
+## [0.5.0](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.4.1...relayer-v0.5.0) (2023-05-11)
+
+
+### Features
+
+* **protocol:** major protocol upgrade for alpha-3 testnet ([#13640](https://github.com/taikoxyz/taiko-mono/issues/13640)) ([02552f2](https://github.com/taikoxyz/taiko-mono/commit/02552f2aa001893d326062ce627004c61b46cd26))
+
+## [0.4.1](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.4.0...relayer-v0.4.1) (2023-04-08)
+
+
+### Bug Fixes
+
+* **repo:** fix multiple typos ([#13558](https://github.com/taikoxyz/taiko-mono/issues/13558)) ([f54242a](https://github.com/taikoxyz/taiko-mono/commit/f54242aa95e5c5563f8f0a7f9af0a1eab20ab67b))
+
+## [0.4.0](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.3.0...relayer-v0.4.0) (2023-03-29)
+
+
+### Features
+
+* **eventindexer:** Event indexer ([#13439](https://github.com/taikoxyz/taiko-mono/issues/13439)) ([08b26d2](https://github.com/taikoxyz/taiko-mono/commit/08b26d21577ed8ecd14beed5a600108fe7a0f765))
+* **protocol:** merge alpha 2 to main ([#13369](https://github.com/taikoxyz/taiko-mono/issues/13369)) ([2b9cc64](https://github.com/taikoxyz/taiko-mono/commit/2b9cc6466509372f35109b48c00948d2234b0d59))
+* **relayer:** add failed status to Stringer interface impl for eventstatus ([#13495](https://github.com/taikoxyz/taiko-mono/issues/13495)) ([858f485](https://github.com/taikoxyz/taiko-mono/commit/858f485a858a59fe196de22a3d4eed78278ba4a4))
+* **relayer:** big Gas price ([#13492](https://github.com/taikoxyz/taiko-mono/issues/13492)) ([cb3f7b9](https://github.com/taikoxyz/taiko-mono/commit/cb3f7b9529addc25fe4d3067f2e2c3da3ae1b2bf))
+* **relayer:** handle fail status ([#13493](https://github.com/taikoxyz/taiko-mono/issues/13493)) ([dfac2c4](https://github.com/taikoxyz/taiko-mono/commit/dfac2c4cf84d247f4aa1434e52e403d18253951a))
+* **relayer:** merge alpha-2 to main ([#13376](https://github.com/taikoxyz/taiko-mono/issues/13376)) ([3148f6b](https://github.com/taikoxyz/taiko-mono/commit/3148f6ba955e1b3918289332d2ee30f139edea8b))
+
+
+### Bug Fixes
+
+* **relayer:** 3m => 1.5 gas ([#13494](https://github.com/taikoxyz/taiko-mono/issues/13494)) ([02a582e](https://github.com/taikoxyz/taiko-mono/commit/02a582ebda4a8993c4fad221e88e2b65d57ceb25))
+* **relayer:** new abi gen bindings ([#13342](https://github.com/taikoxyz/taiko-mono/issues/13342)) ([8655ff1](https://github.com/taikoxyz/taiko-mono/commit/8655ff16f3de7445f01b4fd502d183d93e394e1a))
+
+## [0.3.0](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.2.1...relayer-v0.3.0) (2023-03-15)
+
+
+### Features
+
+* **relayer:** add msgHash and event type lookups to findallbyaddress ([#13310](https://github.com/taikoxyz/taiko-mono/issues/13310)) ([8b753ee](https://github.com/taikoxyz/taiko-mono/commit/8b753ee07eeee51adf48e72343b62abcde3b2338))
+* **relayer:** Event filter ([#13318](https://github.com/taikoxyz/taiko-mono/issues/13318)) ([f20d419](https://github.com/taikoxyz/taiko-mono/commit/f20d4195ac9d700dfd4a51192232c3fe7c4c0b43))
+* **relayer:** MessageStatusChanged events ([#13272](https://github.com/taikoxyz/taiko-mono/issues/13272)) ([f5f4fc4](https://github.com/taikoxyz/taiko-mono/commit/f5f4fc4af16520a34e805e8f16c50e0de4902815))
+* **relayer:** Pagination ([#13311](https://github.com/taikoxyz/taiko-mono/issues/13311)) ([9350006](https://github.com/taikoxyz/taiko-mono/commit/9350006aefa8f6423c663ea3a0377f7334a5b749))
+
+
+### Bug Fixes
+
+* **relayer:** estimate gas for tx, set gas to 2.5mil if not estimatable. works now. ([#13271](https://github.com/taikoxyz/taiko-mono/issues/13271)) ([3913ca5](https://github.com/taikoxyz/taiko-mono/commit/3913ca52242913dfb9502488f0a5558724f9ef2b))
+
+## [0.2.1](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.2.0...relayer-v0.2.1) (2023-03-01)
+
+
+### Bug Fixes
+
+* **relayer:** estimate gas, now that gas estimation works again ([#13176](https://github.com/taikoxyz/taiko-mono/issues/13176)) ([b7ae677](https://github.com/taikoxyz/taiko-mono/commit/b7ae677ec2d84dce3e3ae50d369bf31dedc547c3))
+* **relayer:** Save block progress when caught up and subscribing to new events ([#13177](https://github.com/taikoxyz/taiko-mono/issues/13177)) ([5ef2c0f](https://github.com/taikoxyz/taiko-mono/commit/5ef2c0f5d78764189d168aa527cec62238f1d6c6))
+
+## [0.2.0](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.1.0...relayer-v0.2.0) (2023-02-15)
+
+
+### Features
+
+* **protocol:** change statevariables to return a struct ([#13113](https://github.com/taikoxyz/taiko-mono/issues/13113)) ([0bffeb0](https://github.com/taikoxyz/taiko-mono/commit/0bffeb0f3d17938bf2146772962719ae21ce22fa))
+* **relayer:** catch relayer & status page up to new testnet ([#13114](https://github.com/taikoxyz/taiko-mono/issues/13114)) ([543f242](https://github.com/taikoxyz/taiko-mono/commit/543f242bfbf18b155f3476c2d172e79d3041ffc9))
+* **relayer:** prepare bridge relayer API for frontend ([#13124](https://github.com/taikoxyz/taiko-mono/issues/13124)) ([ef1f691](https://github.com/taikoxyz/taiko-mono/commit/ef1f691ac9e6b3138b1ee80bc7bebcf53b749581))
+
+## [0.1.0](https://github.com/taikoxyz/taiko-mono/compare/relayer-v0.0.1...relayer-v0.1.0) (2023-01-19)
+
+
+### Features
+
+* **bridge-ui:** process message ([#387](https://github.com/taikoxyz/taiko-mono/issues/387)) ([d1781c0](https://github.com/taikoxyz/taiko-mono/commit/d1781c0107110e70c87e76d3fc1f6a9bc2aa1a46))
+* **bridge:** add faucet link to announcement ([#485](https://github.com/taikoxyz/taiko-mono/issues/485)) ([d1a4921](https://github.com/taikoxyz/taiko-mono/commit/d1a492183fd4ab8f195697864f54c35349dca93d))
+* **bridge:** bridge design ([#369](https://github.com/taikoxyz/taiko-mono/issues/369)) ([04702db](https://github.com/taikoxyz/taiko-mono/commit/04702db23e3fd705133408e077b8d1a040951202))
+* **bridge:** bridge transactions ([#411](https://github.com/taikoxyz/taiko-mono/issues/411)) ([19dd7ab](https://github.com/taikoxyz/taiko-mono/commit/19dd7abd4a2f5bc83e43d31938e43501472ff108))
+* **bridge:** implement the bridge relayer ([#191](https://github.com/taikoxyz/taiko-mono/issues/191)) ([9f49e4c](https://github.com/taikoxyz/taiko-mono/commit/9f49e4c87304853c9d94693434d23a6b8258eac6))
+* implement release-please workflow ([#12967](https://github.com/taikoxyz/taiko-mono/issues/12967)) ([b0c8b60](https://github.com/taikoxyz/taiko-mono/commit/b0c8b60da0af3160db758f83c1f6368a3a712593))
+* **protocol:** implement & simulate tokenomics ([#376](https://github.com/taikoxyz/taiko-mono/issues/376)) ([191eb11](https://github.com/taikoxyz/taiko-mono/commit/191eb110990d60b49883eb3f3d7841c33421d067))
+* **relayer:** Allow resync flag option to restart processing from block 0 ([#266](https://github.com/taikoxyz/taiko-mono/issues/266)) ([6b01cbe](https://github.com/taikoxyz/taiko-mono/commit/6b01cbe986d61795fc9a2ef256dbe85409251720))
+* **relayer:** Asynchronous message processing, error handling, nonce management, and indexer folder structuring ([#259](https://github.com/taikoxyz/taiko-mono/issues/259)) ([ed6d551](https://github.com/taikoxyz/taiko-mono/commit/ed6d551744965440153eaa7a8c42c887fa26938c))
+* **relayer:** header sync check before processing messages ([#441](https://github.com/taikoxyz/taiko-mono/issues/441)) ([e9fda8b](https://github.com/taikoxyz/taiko-mono/commit/e9fda8bb80ecfefcfd7d64062b50ebf5b5eec2ef))
+* **relayer:** HTTP api for exposing events table for bridge UI ([#271](https://github.com/taikoxyz/taiko-mono/issues/271)) ([7b5e6b8](https://github.com/taikoxyz/taiko-mono/commit/7b5e6b809c0e2f6a8615896d57e2b0d2db98c80b))
+* **relayer:** only process profitable transactions ([#408](https://github.com/taikoxyz/taiko-mono/issues/408)) ([b5d8180](https://github.com/taikoxyz/taiko-mono/commit/b5d81802e32b038b5bcdd26f233b0cd4b3eca3fa))
+* **relayer:** run in http only mode, so we can scale up if necessary for requests and only have one indexer ([6500234](https://github.com/taikoxyz/taiko-mono/commit/6500234991702b203e6e8baeb496e5473b631f83))
+* **relayer:** Wait N confirmations on source chain before processing message on destination chain ([#270](https://github.com/taikoxyz/taiko-mono/issues/270)) ([7ab1291](https://github.com/taikoxyz/taiko-mono/commit/7ab129193f3e08faf04cd1b7e09b5b5994636775))
+
+
+### Bug Fixes
+
+* **bridge-ui:** Eth fix ([#475](https://github.com/taikoxyz/taiko-mono/issues/475)) ([08175b8](https://github.com/taikoxyz/taiko-mono/commit/08175b803aaabdf6195f5a7a3ed8e0baf9558cc5))
+* **protocol:** Remove enableDestChain functionality ([#12341](https://github.com/taikoxyz/taiko-mono/issues/12341)) ([362d083](https://github.com/taikoxyz/taiko-mono/commit/362d083497cc74b3bcd05a406beeff2101a422ef))
+* **relayer:** fix migrations ([#300](https://github.com/taikoxyz/taiko-mono/issues/300)) ([151415e](https://github.com/taikoxyz/taiko-mono/commit/151415e71f2b6ac62c607d5cc928fa258064a679))
+* **relayer:** gas limit + use loading as priorioty on bridge form ([#487](https://github.com/taikoxyz/taiko-mono/issues/487)) ([3747d4c](https://github.com/taikoxyz/taiko-mono/commit/3747d4c41e836ab533e864ec44073ae681bf4b36))
+* **relayer:** save block by chain id ([#379](https://github.com/taikoxyz/taiko-mono/issues/379)) ([608e3e3](https://github.com/taikoxyz/taiko-mono/commit/608e3e3723586f8b412d71118d15f6bab86ad596))
+* **tests:** cleanup tests to prepare for tokenomics testing ([#11316](https://github.com/taikoxyz/taiko-mono/issues/11316)) ([d63fae3](https://github.com/taikoxyz/taiko-mono/commit/d63fae30f1e3415d6f377adeab90c062fed5ad42))
diff --git a/packages/guardian-prover-health-check/GuardianProver.json b/packages/guardian-prover-health-check/GuardianProver.json
new file mode 100644
index 00000000000..8348d1ff4da
--- /dev/null
+++ b/packages/guardian-prover-health-check/GuardianProver.json
@@ -0,0 +1,552 @@
+[
+ {
+ "inputs": [],
+ "name": "INVALID_GUARDIAN",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "INVALID_GUARDIAN_SET",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "INVALID_PAUSE_STATUS",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "INVALID_PROOF",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "PROVING_FAILED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "REENTRANT_CALL",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_DENIED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_INVALID_MANAGER",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_UNEXPECTED_CHAINID",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ }
+ ],
+ "name": "RESOLVER_ZERO_ADDR",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint64",
+ "name": "blockId",
+ "type": "uint64"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "approvalBits",
+ "type": "uint256"
+ },
+ {
+ "indexed": false,
+ "internalType": "bool",
+ "name": "proofSubmitted",
+ "type": "bool"
+ }
+ ],
+ "name": "Approved",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address[5]",
+ "name": "",
+ "type": "address[5]"
+ }
+ ],
+ "name": "GuardiansUpdated",
+ "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": "OwnershipTransferStarted",
+ "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": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Paused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Unpaused",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "NUM_GUARDIANS",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "REQUIRED_GUARDIANS",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "acceptOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "addressManager",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "name": "approvals",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "approvalBits",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "l1Hash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "difficulty",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "blobHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "extraData",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "depositsHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "coinbase",
+ "type": "address"
+ },
+ {
+ "internalType": "uint64",
+ "name": "id",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint32",
+ "name": "gasLimit",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint64",
+ "name": "timestamp",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "l1Height",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint16",
+ "name": "minTier",
+ "type": "uint16"
+ },
+ {
+ "internalType": "bool",
+ "name": "blobUsed",
+ "type": "bool"
+ }
+ ],
+ "internalType": "struct TaikoData.BlockMetadata",
+ "name": "meta",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "parentHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "blockHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "graffiti",
+ "type": "bytes32"
+ }
+ ],
+ "internalType": "struct TaikoData.Transition",
+ "name": "tran",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint16",
+ "name": "tier",
+ "type": "uint16"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ }
+ ],
+ "internalType": "struct TaikoData.TierProof",
+ "name": "proof",
+ "type": "tuple"
+ }
+ ],
+ "name": "approve",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "guardian",
+ "type": "address"
+ }
+ ],
+ "name": "guardianIds",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "id",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "name": "guardians",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_addressManager",
+ "type": "address"
+ }
+ ],
+ "name": "init",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "pause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "paused",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "pendingOwner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "renounceOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "name",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowZeroAddress",
+ "type": "bool"
+ }
+ ],
+ "name": "resolve",
+ "outputs": [
+ {
+ "internalType": "address payable",
+ "name": "addr",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes32",
+ "name": "name",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowZeroAddress",
+ "type": "bool"
+ }
+ ],
+ "name": "resolve",
+ "outputs": [
+ {
+ "internalType": "address payable",
+ "name": "addr",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address[5]",
+ "name": "_guardians",
+ "type": "address[5]"
+ }
+ ],
+ "name": "setGuardians",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "transferOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "unpause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ }
+]
diff --git a/packages/guardian-prover-health-check/README.md b/packages/guardian-prover-health-check/README.md
new file mode 100644
index 00000000000..9bbbcf78c60
--- /dev/null
+++ b/packages/guardian-prover-health-check/README.md
@@ -0,0 +1,40 @@
+[](https://github.com/taikoxyz/taiko-mono/actions/workflows/golang.yml)
+[](https://codecov.io/gh/taikoxyz/taiko-mono)
+
+# Guardian Prover Health Check Service
+
+A service that watches the guardian provers and pings them for uptime availability metrics.
+
+## Build the source
+
+Building the `taiko-client` binary requires a Go compiler. Once installed, run:
+
+```sh
+make build
+```
+
+## Configuration
+
+Run migrations:
+`cd migrations`
+`goose mysql "user:pass@/dbname?parseTime=true" up`
+
+To run the health check service:
+`ENV_FILE=.env go run cmd/main.go healthchecker`
+
+To run the stats generator:
+`ENV_FILE=.generator.env go run cmd/main.go generator`
+
+## Usage
+
+Review all available sub-commands:
+
+```sh
+bin/guardian-prover-health-check --help
+```
+
+Review each sub-command's command line flags:
+
+```sh
+bin/guardian-prover-health-check --help
+```
diff --git a/packages/guardian-prover-health-check/bindings/guardianprover/GuardianProver.go b/packages/guardian-prover-health-check/bindings/guardianprover/GuardianProver.go
new file mode 100644
index 00000000000..31628eab563
--- /dev/null
+++ b/packages/guardian-prover-health-check/bindings/guardianprover/GuardianProver.go
@@ -0,0 +1,1708 @@
+// Code generated - DO NOT EDIT.
+// This file is a generated binding and any manual changes will be lost.
+
+package guardianprover
+
+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
+)
+
+// TaikoDataBlockMetadata is an auto generated low-level Go binding around an user-defined struct.
+type TaikoDataBlockMetadata struct {
+ L1Hash [32]byte
+ Difficulty [32]byte
+ BlobHash [32]byte
+ ExtraData [32]byte
+ DepositsHash [32]byte
+ Coinbase common.Address
+ Id uint64
+ GasLimit uint32
+ Timestamp uint64
+ L1Height uint64
+ MinTier uint16
+ BlobUsed bool
+}
+
+// TaikoDataTierProof is an auto generated low-level Go binding around an user-defined struct.
+type TaikoDataTierProof struct {
+ Tier uint16
+ Data []byte
+}
+
+// TaikoDataTransition is an auto generated low-level Go binding around an user-defined struct.
+type TaikoDataTransition struct {
+ ParentHash [32]byte
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ Graffiti [32]byte
+}
+
+// GuardianProverMetaData contains all meta data concerning the GuardianProver contract.
+var GuardianProverMetaData = &bind.MetaData{
+ ABI: "[{\"inputs\":[],\"name\":\"INVALID_GUARDIAN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_GUARDIAN_SET\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PROVING_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"approvalBits\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"proofSubmitted\",\"type\":\"bool\"}],\"name\":\"Approved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[5]\",\"name\":\"\",\"type\":\"address[5]\"}],\"name\":\"GuardiansUpdated\",\"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\":\"OwnershipTransferStarted\",\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"NUM_GUARDIANS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REQUIRED_GUARDIANS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"approvals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"approvalBits\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"difficulty\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blobHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"depositsHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"minTier\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"blobUsed\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"graffiti\",\"type\":\"bytes32\"}],\"internalType\":\"structTaikoData.Transition\",\"name\":\"tran\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structTaikoData.TierProof\",\"name\":\"proof\",\"type\":\"tuple\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"guardianIds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"guardians\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[5]\",\"name\":\"_guardians\",\"type\":\"address[5]\"}],\"name\":\"setGuardians\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+}
+
+// GuardianProverABI is the input ABI used to generate the binding from.
+// Deprecated: Use GuardianProverMetaData.ABI instead.
+var GuardianProverABI = GuardianProverMetaData.ABI
+
+// GuardianProver is an auto generated Go binding around an Ethereum contract.
+type GuardianProver struct {
+ GuardianProverCaller // Read-only binding to the contract
+ GuardianProverTransactor // Write-only binding to the contract
+ GuardianProverFilterer // Log filterer for contract events
+}
+
+// GuardianProverCaller is an auto generated read-only Go binding around an Ethereum contract.
+type GuardianProverCaller struct {
+ contract *bind.BoundContract // Generic contract wrapper for the low level calls
+}
+
+// GuardianProverTransactor is an auto generated write-only Go binding around an Ethereum contract.
+type GuardianProverTransactor struct {
+ contract *bind.BoundContract // Generic contract wrapper for the low level calls
+}
+
+// GuardianProverFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
+type GuardianProverFilterer struct {
+ contract *bind.BoundContract // Generic contract wrapper for the low level calls
+}
+
+// GuardianProverSession is an auto generated Go binding around an Ethereum contract,
+// with pre-set call and transact options.
+type GuardianProverSession struct {
+ Contract *GuardianProver // 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
+}
+
+// GuardianProverCallerSession is an auto generated read-only Go binding around an Ethereum contract,
+// with pre-set call options.
+type GuardianProverCallerSession struct {
+ Contract *GuardianProverCaller // Generic contract caller binding to set the session for
+ CallOpts bind.CallOpts // Call options to use throughout this session
+}
+
+// GuardianProverTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
+// with pre-set transact options.
+type GuardianProverTransactorSession struct {
+ Contract *GuardianProverTransactor // Generic contract transactor binding to set the session for
+ TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
+}
+
+// GuardianProverRaw is an auto generated low-level Go binding around an Ethereum contract.
+type GuardianProverRaw struct {
+ Contract *GuardianProver // Generic contract binding to access the raw methods on
+}
+
+// GuardianProverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
+type GuardianProverCallerRaw struct {
+ Contract *GuardianProverCaller // Generic read-only contract binding to access the raw methods on
+}
+
+// GuardianProverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
+type GuardianProverTransactorRaw struct {
+ Contract *GuardianProverTransactor // Generic write-only contract binding to access the raw methods on
+}
+
+// NewGuardianProver creates a new instance of GuardianProver, bound to a specific deployed contract.
+func NewGuardianProver(address common.Address, backend bind.ContractBackend) (*GuardianProver, error) {
+ contract, err := bindGuardianProver(address, backend, backend, backend)
+ if err != nil {
+ return nil, err
+ }
+ return &GuardianProver{GuardianProverCaller: GuardianProverCaller{contract: contract}, GuardianProverTransactor: GuardianProverTransactor{contract: contract}, GuardianProverFilterer: GuardianProverFilterer{contract: contract}}, nil
+}
+
+// NewGuardianProverCaller creates a new read-only instance of GuardianProver, bound to a specific deployed contract.
+func NewGuardianProverCaller(address common.Address, caller bind.ContractCaller) (*GuardianProverCaller, error) {
+ contract, err := bindGuardianProver(address, caller, nil, nil)
+ if err != nil {
+ return nil, err
+ }
+ return &GuardianProverCaller{contract: contract}, nil
+}
+
+// NewGuardianProverTransactor creates a new write-only instance of GuardianProver, bound to a specific deployed contract.
+func NewGuardianProverTransactor(address common.Address, transactor bind.ContractTransactor) (*GuardianProverTransactor, error) {
+ contract, err := bindGuardianProver(address, nil, transactor, nil)
+ if err != nil {
+ return nil, err
+ }
+ return &GuardianProverTransactor{contract: contract}, nil
+}
+
+// NewGuardianProverFilterer creates a new log filterer instance of GuardianProver, bound to a specific deployed contract.
+func NewGuardianProverFilterer(address common.Address, filterer bind.ContractFilterer) (*GuardianProverFilterer, error) {
+ contract, err := bindGuardianProver(address, nil, nil, filterer)
+ if err != nil {
+ return nil, err
+ }
+ return &GuardianProverFilterer{contract: contract}, nil
+}
+
+// bindGuardianProver binds a generic wrapper to an already deployed contract.
+func bindGuardianProver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
+ parsed, err := GuardianProverMetaData.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 (_GuardianProver *GuardianProverRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
+ return _GuardianProver.Contract.GuardianProverCaller.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 (_GuardianProver *GuardianProverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _GuardianProver.Contract.GuardianProverTransactor.contract.Transfer(opts)
+}
+
+// Transact invokes the (paid) contract method with params as input values.
+func (_GuardianProver *GuardianProverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
+ return _GuardianProver.Contract.GuardianProverTransactor.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 (_GuardianProver *GuardianProverCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
+ return _GuardianProver.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 (_GuardianProver *GuardianProverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _GuardianProver.Contract.contract.Transfer(opts)
+}
+
+// Transact invokes the (paid) contract method with params as input values.
+func (_GuardianProver *GuardianProverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
+ return _GuardianProver.Contract.contract.Transact(opts, method, params...)
+}
+
+// NUMGUARDIANS is a free data retrieval call binding the contract method 0x55ff4c83.
+//
+// Solidity: function NUM_GUARDIANS() view returns(uint256)
+func (_GuardianProver *GuardianProverCaller) NUMGUARDIANS(opts *bind.CallOpts) (*big.Int, error) {
+ var out []interface{}
+ err := _GuardianProver.contract.Call(opts, &out, "NUM_GUARDIANS")
+
+ if err != nil {
+ return *new(*big.Int), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+
+ return out0, err
+
+}
+
+// NUMGUARDIANS is a free data retrieval call binding the contract method 0x55ff4c83.
+//
+// Solidity: function NUM_GUARDIANS() view returns(uint256)
+func (_GuardianProver *GuardianProverSession) NUMGUARDIANS() (*big.Int, error) {
+ return _GuardianProver.Contract.NUMGUARDIANS(&_GuardianProver.CallOpts)
+}
+
+// NUMGUARDIANS is a free data retrieval call binding the contract method 0x55ff4c83.
+//
+// Solidity: function NUM_GUARDIANS() view returns(uint256)
+func (_GuardianProver *GuardianProverCallerSession) NUMGUARDIANS() (*big.Int, error) {
+ return _GuardianProver.Contract.NUMGUARDIANS(&_GuardianProver.CallOpts)
+}
+
+// REQUIREDGUARDIANS is a free data retrieval call binding the contract method 0x05520401.
+//
+// Solidity: function REQUIRED_GUARDIANS() view returns(uint256)
+func (_GuardianProver *GuardianProverCaller) REQUIREDGUARDIANS(opts *bind.CallOpts) (*big.Int, error) {
+ var out []interface{}
+ err := _GuardianProver.contract.Call(opts, &out, "REQUIRED_GUARDIANS")
+
+ if err != nil {
+ return *new(*big.Int), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+
+ return out0, err
+
+}
+
+// REQUIREDGUARDIANS is a free data retrieval call binding the contract method 0x05520401.
+//
+// Solidity: function REQUIRED_GUARDIANS() view returns(uint256)
+func (_GuardianProver *GuardianProverSession) REQUIREDGUARDIANS() (*big.Int, error) {
+ return _GuardianProver.Contract.REQUIREDGUARDIANS(&_GuardianProver.CallOpts)
+}
+
+// REQUIREDGUARDIANS is a free data retrieval call binding the contract method 0x05520401.
+//
+// Solidity: function REQUIRED_GUARDIANS() view returns(uint256)
+func (_GuardianProver *GuardianProverCallerSession) REQUIREDGUARDIANS() (*big.Int, error) {
+ return _GuardianProver.Contract.REQUIREDGUARDIANS(&_GuardianProver.CallOpts)
+}
+
+// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f.
+//
+// Solidity: function addressManager() view returns(address)
+func (_GuardianProver *GuardianProverCaller) AddressManager(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _GuardianProver.contract.Call(opts, &out, "addressManager")
+
+ if err != nil {
+ return *new(common.Address), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+
+ return out0, err
+
+}
+
+// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f.
+//
+// Solidity: function addressManager() view returns(address)
+func (_GuardianProver *GuardianProverSession) AddressManager() (common.Address, error) {
+ return _GuardianProver.Contract.AddressManager(&_GuardianProver.CallOpts)
+}
+
+// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f.
+//
+// Solidity: function addressManager() view returns(address)
+func (_GuardianProver *GuardianProverCallerSession) AddressManager() (common.Address, error) {
+ return _GuardianProver.Contract.AddressManager(&_GuardianProver.CallOpts)
+}
+
+// Approvals is a free data retrieval call binding the contract method 0xbf7c2131.
+//
+// Solidity: function approvals(bytes32 ) view returns(uint256 approvalBits)
+func (_GuardianProver *GuardianProverCaller) Approvals(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) {
+ var out []interface{}
+ err := _GuardianProver.contract.Call(opts, &out, "approvals", arg0)
+
+ if err != nil {
+ return *new(*big.Int), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+
+ return out0, err
+
+}
+
+// Approvals is a free data retrieval call binding the contract method 0xbf7c2131.
+//
+// Solidity: function approvals(bytes32 ) view returns(uint256 approvalBits)
+func (_GuardianProver *GuardianProverSession) Approvals(arg0 [32]byte) (*big.Int, error) {
+ return _GuardianProver.Contract.Approvals(&_GuardianProver.CallOpts, arg0)
+}
+
+// Approvals is a free data retrieval call binding the contract method 0xbf7c2131.
+//
+// Solidity: function approvals(bytes32 ) view returns(uint256 approvalBits)
+func (_GuardianProver *GuardianProverCallerSession) Approvals(arg0 [32]byte) (*big.Int, error) {
+ return _GuardianProver.Contract.Approvals(&_GuardianProver.CallOpts, arg0)
+}
+
+// GuardianIds is a free data retrieval call binding the contract method 0xb6158373.
+//
+// Solidity: function guardianIds(address guardian) view returns(uint256 id)
+func (_GuardianProver *GuardianProverCaller) GuardianIds(opts *bind.CallOpts, guardian common.Address) (*big.Int, error) {
+ var out []interface{}
+ err := _GuardianProver.contract.Call(opts, &out, "guardianIds", guardian)
+
+ if err != nil {
+ return *new(*big.Int), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+
+ return out0, err
+
+}
+
+// GuardianIds is a free data retrieval call binding the contract method 0xb6158373.
+//
+// Solidity: function guardianIds(address guardian) view returns(uint256 id)
+func (_GuardianProver *GuardianProverSession) GuardianIds(guardian common.Address) (*big.Int, error) {
+ return _GuardianProver.Contract.GuardianIds(&_GuardianProver.CallOpts, guardian)
+}
+
+// GuardianIds is a free data retrieval call binding the contract method 0xb6158373.
+//
+// Solidity: function guardianIds(address guardian) view returns(uint256 id)
+func (_GuardianProver *GuardianProverCallerSession) GuardianIds(guardian common.Address) (*big.Int, error) {
+ return _GuardianProver.Contract.GuardianIds(&_GuardianProver.CallOpts, guardian)
+}
+
+// Guardians is a free data retrieval call binding the contract method 0xf560c734.
+//
+// Solidity: function guardians(uint256 ) view returns(address)
+func (_GuardianProver *GuardianProverCaller) Guardians(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) {
+ var out []interface{}
+ err := _GuardianProver.contract.Call(opts, &out, "guardians", arg0)
+
+ if err != nil {
+ return *new(common.Address), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+
+ return out0, err
+
+}
+
+// Guardians is a free data retrieval call binding the contract method 0xf560c734.
+//
+// Solidity: function guardians(uint256 ) view returns(address)
+func (_GuardianProver *GuardianProverSession) Guardians(arg0 *big.Int) (common.Address, error) {
+ return _GuardianProver.Contract.Guardians(&_GuardianProver.CallOpts, arg0)
+}
+
+// Guardians is a free data retrieval call binding the contract method 0xf560c734.
+//
+// Solidity: function guardians(uint256 ) view returns(address)
+func (_GuardianProver *GuardianProverCallerSession) Guardians(arg0 *big.Int) (common.Address, error) {
+ return _GuardianProver.Contract.Guardians(&_GuardianProver.CallOpts, arg0)
+}
+
+// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+//
+// Solidity: function owner() view returns(address)
+func (_GuardianProver *GuardianProverCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _GuardianProver.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 (_GuardianProver *GuardianProverSession) Owner() (common.Address, error) {
+ return _GuardianProver.Contract.Owner(&_GuardianProver.CallOpts)
+}
+
+// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+//
+// Solidity: function owner() view returns(address)
+func (_GuardianProver *GuardianProverCallerSession) Owner() (common.Address, error) {
+ return _GuardianProver.Contract.Owner(&_GuardianProver.CallOpts)
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_GuardianProver *GuardianProverCaller) Paused(opts *bind.CallOpts) (bool, error) {
+ var out []interface{}
+ err := _GuardianProver.contract.Call(opts, &out, "paused")
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_GuardianProver *GuardianProverSession) Paused() (bool, error) {
+ return _GuardianProver.Contract.Paused(&_GuardianProver.CallOpts)
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_GuardianProver *GuardianProverCallerSession) Paused() (bool, error) {
+ return _GuardianProver.Contract.Paused(&_GuardianProver.CallOpts)
+}
+
+// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978.
+//
+// Solidity: function pendingOwner() view returns(address)
+func (_GuardianProver *GuardianProverCaller) PendingOwner(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _GuardianProver.contract.Call(opts, &out, "pendingOwner")
+
+ if err != nil {
+ return *new(common.Address), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+
+ return out0, err
+
+}
+
+// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978.
+//
+// Solidity: function pendingOwner() view returns(address)
+func (_GuardianProver *GuardianProverSession) PendingOwner() (common.Address, error) {
+ return _GuardianProver.Contract.PendingOwner(&_GuardianProver.CallOpts)
+}
+
+// PendingOwner is a free data retrieval call binding the contract method 0xe30c3978.
+//
+// Solidity: function pendingOwner() view returns(address)
+func (_GuardianProver *GuardianProverCallerSession) PendingOwner() (common.Address, error) {
+ return _GuardianProver.Contract.PendingOwner(&_GuardianProver.CallOpts)
+}
+
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
+//
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_GuardianProver *GuardianProverCaller) Resolve(opts *bind.CallOpts, chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ var out []interface{}
+ err := _GuardianProver.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress)
+
+ if err != nil {
+ return *new(common.Address), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+
+ return out0, err
+
+}
+
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
+//
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_GuardianProver *GuardianProverSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ return _GuardianProver.Contract.Resolve(&_GuardianProver.CallOpts, chainId, name, allowZeroAddress)
+}
+
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
+//
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_GuardianProver *GuardianProverCallerSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ return _GuardianProver.Contract.Resolve(&_GuardianProver.CallOpts, chainId, name, allowZeroAddress)
+}
+
+// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e.
+//
+// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_GuardianProver *GuardianProverCaller) Resolve0(opts *bind.CallOpts, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ var out []interface{}
+ err := _GuardianProver.contract.Call(opts, &out, "resolve0", name, allowZeroAddress)
+
+ if err != nil {
+ return *new(common.Address), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+
+ return out0, err
+
+}
+
+// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e.
+//
+// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_GuardianProver *GuardianProverSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ return _GuardianProver.Contract.Resolve0(&_GuardianProver.CallOpts, name, allowZeroAddress)
+}
+
+// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e.
+//
+// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_GuardianProver *GuardianProverCallerSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ return _GuardianProver.Contract.Resolve0(&_GuardianProver.CallOpts, name, allowZeroAddress)
+}
+
+// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097.
+//
+// Solidity: function acceptOwnership() returns()
+func (_GuardianProver *GuardianProverTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _GuardianProver.contract.Transact(opts, "acceptOwnership")
+}
+
+// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097.
+//
+// Solidity: function acceptOwnership() returns()
+func (_GuardianProver *GuardianProverSession) AcceptOwnership() (*types.Transaction, error) {
+ return _GuardianProver.Contract.AcceptOwnership(&_GuardianProver.TransactOpts)
+}
+
+// AcceptOwnership is a paid mutator transaction binding the contract method 0x79ba5097.
+//
+// Solidity: function acceptOwnership() returns()
+func (_GuardianProver *GuardianProverTransactorSession) AcceptOwnership() (*types.Transaction, error) {
+ return _GuardianProver.Contract.AcceptOwnership(&_GuardianProver.TransactOpts)
+}
+
+// Approve is a paid mutator transaction binding the contract method 0x0bba05b8.
+//
+// Solidity: function approve((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (bytes32,bytes32,bytes32,bytes32) tran, (uint16,bytes) proof) returns()
+func (_GuardianProver *GuardianProverTransactor) Approve(opts *bind.TransactOpts, meta TaikoDataBlockMetadata, tran TaikoDataTransition, proof TaikoDataTierProof) (*types.Transaction, error) {
+ return _GuardianProver.contract.Transact(opts, "approve", meta, tran, proof)
+}
+
+// Approve is a paid mutator transaction binding the contract method 0x0bba05b8.
+//
+// Solidity: function approve((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (bytes32,bytes32,bytes32,bytes32) tran, (uint16,bytes) proof) returns()
+func (_GuardianProver *GuardianProverSession) Approve(meta TaikoDataBlockMetadata, tran TaikoDataTransition, proof TaikoDataTierProof) (*types.Transaction, error) {
+ return _GuardianProver.Contract.Approve(&_GuardianProver.TransactOpts, meta, tran, proof)
+}
+
+// Approve is a paid mutator transaction binding the contract method 0x0bba05b8.
+//
+// Solidity: function approve((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint16,bool) meta, (bytes32,bytes32,bytes32,bytes32) tran, (uint16,bytes) proof) returns()
+func (_GuardianProver *GuardianProverTransactorSession) Approve(meta TaikoDataBlockMetadata, tran TaikoDataTransition, proof TaikoDataTierProof) (*types.Transaction, error) {
+ return _GuardianProver.Contract.Approve(&_GuardianProver.TransactOpts, meta, tran, proof)
+}
+
+// Init is a paid mutator transaction binding the contract method 0x19ab453c.
+//
+// Solidity: function init(address _addressManager) returns()
+func (_GuardianProver *GuardianProverTransactor) Init(opts *bind.TransactOpts, _addressManager common.Address) (*types.Transaction, error) {
+ return _GuardianProver.contract.Transact(opts, "init", _addressManager)
+}
+
+// Init is a paid mutator transaction binding the contract method 0x19ab453c.
+//
+// Solidity: function init(address _addressManager) returns()
+func (_GuardianProver *GuardianProverSession) Init(_addressManager common.Address) (*types.Transaction, error) {
+ return _GuardianProver.Contract.Init(&_GuardianProver.TransactOpts, _addressManager)
+}
+
+// Init is a paid mutator transaction binding the contract method 0x19ab453c.
+//
+// Solidity: function init(address _addressManager) returns()
+func (_GuardianProver *GuardianProverTransactorSession) Init(_addressManager common.Address) (*types.Transaction, error) {
+ return _GuardianProver.Contract.Init(&_GuardianProver.TransactOpts, _addressManager)
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_GuardianProver *GuardianProverTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _GuardianProver.contract.Transact(opts, "pause")
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_GuardianProver *GuardianProverSession) Pause() (*types.Transaction, error) {
+ return _GuardianProver.Contract.Pause(&_GuardianProver.TransactOpts)
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_GuardianProver *GuardianProverTransactorSession) Pause() (*types.Transaction, error) {
+ return _GuardianProver.Contract.Pause(&_GuardianProver.TransactOpts)
+}
+
+// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
+//
+// Solidity: function renounceOwnership() returns()
+func (_GuardianProver *GuardianProverTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _GuardianProver.contract.Transact(opts, "renounceOwnership")
+}
+
+// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
+//
+// Solidity: function renounceOwnership() returns()
+func (_GuardianProver *GuardianProverSession) RenounceOwnership() (*types.Transaction, error) {
+ return _GuardianProver.Contract.RenounceOwnership(&_GuardianProver.TransactOpts)
+}
+
+// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
+//
+// Solidity: function renounceOwnership() returns()
+func (_GuardianProver *GuardianProverTransactorSession) RenounceOwnership() (*types.Transaction, error) {
+ return _GuardianProver.Contract.RenounceOwnership(&_GuardianProver.TransactOpts)
+}
+
+// SetGuardians is a paid mutator transaction binding the contract method 0x5cb1eb25.
+//
+// Solidity: function setGuardians(address[5] _guardians) returns()
+func (_GuardianProver *GuardianProverTransactor) SetGuardians(opts *bind.TransactOpts, _guardians [5]common.Address) (*types.Transaction, error) {
+ return _GuardianProver.contract.Transact(opts, "setGuardians", _guardians)
+}
+
+// SetGuardians is a paid mutator transaction binding the contract method 0x5cb1eb25.
+//
+// Solidity: function setGuardians(address[5] _guardians) returns()
+func (_GuardianProver *GuardianProverSession) SetGuardians(_guardians [5]common.Address) (*types.Transaction, error) {
+ return _GuardianProver.Contract.SetGuardians(&_GuardianProver.TransactOpts, _guardians)
+}
+
+// SetGuardians is a paid mutator transaction binding the contract method 0x5cb1eb25.
+//
+// Solidity: function setGuardians(address[5] _guardians) returns()
+func (_GuardianProver *GuardianProverTransactorSession) SetGuardians(_guardians [5]common.Address) (*types.Transaction, error) {
+ return _GuardianProver.Contract.SetGuardians(&_GuardianProver.TransactOpts, _guardians)
+}
+
+// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
+//
+// Solidity: function transferOwnership(address newOwner) returns()
+func (_GuardianProver *GuardianProverTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
+ return _GuardianProver.contract.Transact(opts, "transferOwnership", newOwner)
+}
+
+// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
+//
+// Solidity: function transferOwnership(address newOwner) returns()
+func (_GuardianProver *GuardianProverSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
+ return _GuardianProver.Contract.TransferOwnership(&_GuardianProver.TransactOpts, newOwner)
+}
+
+// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
+//
+// Solidity: function transferOwnership(address newOwner) returns()
+func (_GuardianProver *GuardianProverTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
+ return _GuardianProver.Contract.TransferOwnership(&_GuardianProver.TransactOpts, newOwner)
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_GuardianProver *GuardianProverTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _GuardianProver.contract.Transact(opts, "unpause")
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_GuardianProver *GuardianProverSession) Unpause() (*types.Transaction, error) {
+ return _GuardianProver.Contract.Unpause(&_GuardianProver.TransactOpts)
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_GuardianProver *GuardianProverTransactorSession) Unpause() (*types.Transaction, error) {
+ return _GuardianProver.Contract.Unpause(&_GuardianProver.TransactOpts)
+}
+
+// GuardianProverApprovedIterator is returned from FilterApproved and is used to iterate over the raw logs and unpacked data for Approved events raised by the GuardianProver contract.
+type GuardianProverApprovedIterator struct {
+ Event *GuardianProverApproved // 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 *GuardianProverApprovedIterator) 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(GuardianProverApproved)
+ 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(GuardianProverApproved)
+ 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 *GuardianProverApprovedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *GuardianProverApprovedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// GuardianProverApproved represents a Approved event raised by the GuardianProver contract.
+type GuardianProverApproved struct {
+ BlockId uint64
+ ApprovalBits *big.Int
+ ProofSubmitted bool
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterApproved is a free log retrieval operation binding the contract event 0x491ef33230925e6876158c5f7551d4f58c2c7d04e41546850b1009678c20816a.
+//
+// Solidity: event Approved(uint64 indexed blockId, uint256 approvalBits, bool proofSubmitted)
+func (_GuardianProver *GuardianProverFilterer) FilterApproved(opts *bind.FilterOpts, blockId []uint64) (*GuardianProverApprovedIterator, error) {
+
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+
+ logs, sub, err := _GuardianProver.contract.FilterLogs(opts, "Approved", blockIdRule)
+ if err != nil {
+ return nil, err
+ }
+ return &GuardianProverApprovedIterator{contract: _GuardianProver.contract, event: "Approved", logs: logs, sub: sub}, nil
+}
+
+// WatchApproved is a free log subscription operation binding the contract event 0x491ef33230925e6876158c5f7551d4f58c2c7d04e41546850b1009678c20816a.
+//
+// Solidity: event Approved(uint64 indexed blockId, uint256 approvalBits, bool proofSubmitted)
+func (_GuardianProver *GuardianProverFilterer) WatchApproved(opts *bind.WatchOpts, sink chan<- *GuardianProverApproved, blockId []uint64) (event.Subscription, error) {
+
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+
+ logs, sub, err := _GuardianProver.contract.WatchLogs(opts, "Approved", blockIdRule)
+ 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(GuardianProverApproved)
+ if err := _GuardianProver.contract.UnpackLog(event, "Approved", 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
+}
+
+// ParseApproved is a log parse operation binding the contract event 0x491ef33230925e6876158c5f7551d4f58c2c7d04e41546850b1009678c20816a.
+//
+// Solidity: event Approved(uint64 indexed blockId, uint256 approvalBits, bool proofSubmitted)
+func (_GuardianProver *GuardianProverFilterer) ParseApproved(log types.Log) (*GuardianProverApproved, error) {
+ event := new(GuardianProverApproved)
+ if err := _GuardianProver.contract.UnpackLog(event, "Approved", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// GuardianProverGuardiansUpdatedIterator is returned from FilterGuardiansUpdated and is used to iterate over the raw logs and unpacked data for GuardiansUpdated events raised by the GuardianProver contract.
+type GuardianProverGuardiansUpdatedIterator struct {
+ Event *GuardianProverGuardiansUpdated // 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 *GuardianProverGuardiansUpdatedIterator) 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(GuardianProverGuardiansUpdated)
+ 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(GuardianProverGuardiansUpdated)
+ 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 *GuardianProverGuardiansUpdatedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *GuardianProverGuardiansUpdatedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// GuardianProverGuardiansUpdated represents a GuardiansUpdated event raised by the GuardianProver contract.
+type GuardianProverGuardiansUpdated struct {
+ Arg0 [5]common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterGuardiansUpdated is a free log retrieval operation binding the contract event 0x9ce971150384a46b1b1f7cfdf16a84a1c346add127bf86ce2787fb41872b6fc9.
+//
+// Solidity: event GuardiansUpdated(address[5] arg0)
+func (_GuardianProver *GuardianProverFilterer) FilterGuardiansUpdated(opts *bind.FilterOpts) (*GuardianProverGuardiansUpdatedIterator, error) {
+
+ logs, sub, err := _GuardianProver.contract.FilterLogs(opts, "GuardiansUpdated")
+ if err != nil {
+ return nil, err
+ }
+ return &GuardianProverGuardiansUpdatedIterator{contract: _GuardianProver.contract, event: "GuardiansUpdated", logs: logs, sub: sub}, nil
+}
+
+// WatchGuardiansUpdated is a free log subscription operation binding the contract event 0x9ce971150384a46b1b1f7cfdf16a84a1c346add127bf86ce2787fb41872b6fc9.
+//
+// Solidity: event GuardiansUpdated(address[5] arg0)
+func (_GuardianProver *GuardianProverFilterer) WatchGuardiansUpdated(opts *bind.WatchOpts, sink chan<- *GuardianProverGuardiansUpdated) (event.Subscription, error) {
+
+ logs, sub, err := _GuardianProver.contract.WatchLogs(opts, "GuardiansUpdated")
+ 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(GuardianProverGuardiansUpdated)
+ if err := _GuardianProver.contract.UnpackLog(event, "GuardiansUpdated", 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
+}
+
+// ParseGuardiansUpdated is a log parse operation binding the contract event 0x9ce971150384a46b1b1f7cfdf16a84a1c346add127bf86ce2787fb41872b6fc9.
+//
+// Solidity: event GuardiansUpdated(address[5] arg0)
+func (_GuardianProver *GuardianProverFilterer) ParseGuardiansUpdated(log types.Log) (*GuardianProverGuardiansUpdated, error) {
+ event := new(GuardianProverGuardiansUpdated)
+ if err := _GuardianProver.contract.UnpackLog(event, "GuardiansUpdated", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// GuardianProverInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the GuardianProver contract.
+type GuardianProverInitializedIterator struct {
+ Event *GuardianProverInitialized // 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 *GuardianProverInitializedIterator) 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(GuardianProverInitialized)
+ 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(GuardianProverInitialized)
+ 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 *GuardianProverInitializedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *GuardianProverInitializedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// GuardianProverInitialized represents a Initialized event raised by the GuardianProver contract.
+type GuardianProverInitialized 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 (_GuardianProver *GuardianProverFilterer) FilterInitialized(opts *bind.FilterOpts) (*GuardianProverInitializedIterator, error) {
+
+ logs, sub, err := _GuardianProver.contract.FilterLogs(opts, "Initialized")
+ if err != nil {
+ return nil, err
+ }
+ return &GuardianProverInitializedIterator{contract: _GuardianProver.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 (_GuardianProver *GuardianProverFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *GuardianProverInitialized) (event.Subscription, error) {
+
+ logs, sub, err := _GuardianProver.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(GuardianProverInitialized)
+ if err := _GuardianProver.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 (_GuardianProver *GuardianProverFilterer) ParseInitialized(log types.Log) (*GuardianProverInitialized, error) {
+ event := new(GuardianProverInitialized)
+ if err := _GuardianProver.contract.UnpackLog(event, "Initialized", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// GuardianProverOwnershipTransferStartedIterator is returned from FilterOwnershipTransferStarted and is used to iterate over the raw logs and unpacked data for OwnershipTransferStarted events raised by the GuardianProver contract.
+type GuardianProverOwnershipTransferStartedIterator struct {
+ Event *GuardianProverOwnershipTransferStarted // 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 *GuardianProverOwnershipTransferStartedIterator) 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(GuardianProverOwnershipTransferStarted)
+ 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(GuardianProverOwnershipTransferStarted)
+ 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 *GuardianProverOwnershipTransferStartedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *GuardianProverOwnershipTransferStartedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// GuardianProverOwnershipTransferStarted represents a OwnershipTransferStarted event raised by the GuardianProver contract.
+type GuardianProverOwnershipTransferStarted struct {
+ PreviousOwner common.Address
+ NewOwner common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterOwnershipTransferStarted is a free log retrieval operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700.
+//
+// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner)
+func (_GuardianProver *GuardianProverFilterer) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*GuardianProverOwnershipTransferStartedIterator, 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 := _GuardianProver.contract.FilterLogs(opts, "OwnershipTransferStarted", previousOwnerRule, newOwnerRule)
+ if err != nil {
+ return nil, err
+ }
+ return &GuardianProverOwnershipTransferStartedIterator{contract: _GuardianProver.contract, event: "OwnershipTransferStarted", logs: logs, sub: sub}, nil
+}
+
+// WatchOwnershipTransferStarted is a free log subscription operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700.
+//
+// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner)
+func (_GuardianProver *GuardianProverFilterer) WatchOwnershipTransferStarted(opts *bind.WatchOpts, sink chan<- *GuardianProverOwnershipTransferStarted, 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 := _GuardianProver.contract.WatchLogs(opts, "OwnershipTransferStarted", 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(GuardianProverOwnershipTransferStarted)
+ if err := _GuardianProver.contract.UnpackLog(event, "OwnershipTransferStarted", 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
+}
+
+// ParseOwnershipTransferStarted is a log parse operation binding the contract event 0x38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700.
+//
+// Solidity: event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner)
+func (_GuardianProver *GuardianProverFilterer) ParseOwnershipTransferStarted(log types.Log) (*GuardianProverOwnershipTransferStarted, error) {
+ event := new(GuardianProverOwnershipTransferStarted)
+ if err := _GuardianProver.contract.UnpackLog(event, "OwnershipTransferStarted", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// GuardianProverOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the GuardianProver contract.
+type GuardianProverOwnershipTransferredIterator struct {
+ Event *GuardianProverOwnershipTransferred // 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 *GuardianProverOwnershipTransferredIterator) 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(GuardianProverOwnershipTransferred)
+ 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(GuardianProverOwnershipTransferred)
+ 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 *GuardianProverOwnershipTransferredIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *GuardianProverOwnershipTransferredIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// GuardianProverOwnershipTransferred represents a OwnershipTransferred event raised by the GuardianProver contract.
+type GuardianProverOwnershipTransferred 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 (_GuardianProver *GuardianProverFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*GuardianProverOwnershipTransferredIterator, 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 := _GuardianProver.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+ if err != nil {
+ return nil, err
+ }
+ return &GuardianProverOwnershipTransferredIterator{contract: _GuardianProver.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 (_GuardianProver *GuardianProverFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *GuardianProverOwnershipTransferred, 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 := _GuardianProver.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(GuardianProverOwnershipTransferred)
+ if err := _GuardianProver.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 (_GuardianProver *GuardianProverFilterer) ParseOwnershipTransferred(log types.Log) (*GuardianProverOwnershipTransferred, error) {
+ event := new(GuardianProverOwnershipTransferred)
+ if err := _GuardianProver.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// GuardianProverPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the GuardianProver contract.
+type GuardianProverPausedIterator struct {
+ Event *GuardianProverPaused // 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 *GuardianProverPausedIterator) 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(GuardianProverPaused)
+ 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(GuardianProverPaused)
+ 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 *GuardianProverPausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *GuardianProverPausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// GuardianProverPaused represents a Paused event raised by the GuardianProver contract.
+type GuardianProverPaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_GuardianProver *GuardianProverFilterer) FilterPaused(opts *bind.FilterOpts) (*GuardianProverPausedIterator, error) {
+
+ logs, sub, err := _GuardianProver.contract.FilterLogs(opts, "Paused")
+ if err != nil {
+ return nil, err
+ }
+ return &GuardianProverPausedIterator{contract: _GuardianProver.contract, event: "Paused", logs: logs, sub: sub}, nil
+}
+
+// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_GuardianProver *GuardianProverFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *GuardianProverPaused) (event.Subscription, error) {
+
+ logs, sub, err := _GuardianProver.contract.WatchLogs(opts, "Paused")
+ 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(GuardianProverPaused)
+ if err := _GuardianProver.contract.UnpackLog(event, "Paused", 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
+}
+
+// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_GuardianProver *GuardianProverFilterer) ParsePaused(log types.Log) (*GuardianProverPaused, error) {
+ event := new(GuardianProverPaused)
+ if err := _GuardianProver.contract.UnpackLog(event, "Paused", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// GuardianProverUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the GuardianProver contract.
+type GuardianProverUnpausedIterator struct {
+ Event *GuardianProverUnpaused // 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 *GuardianProverUnpausedIterator) 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(GuardianProverUnpaused)
+ 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(GuardianProverUnpaused)
+ 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 *GuardianProverUnpausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *GuardianProverUnpausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// GuardianProverUnpaused represents a Unpaused event raised by the GuardianProver contract.
+type GuardianProverUnpaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_GuardianProver *GuardianProverFilterer) FilterUnpaused(opts *bind.FilterOpts) (*GuardianProverUnpausedIterator, error) {
+
+ logs, sub, err := _GuardianProver.contract.FilterLogs(opts, "Unpaused")
+ if err != nil {
+ return nil, err
+ }
+ return &GuardianProverUnpausedIterator{contract: _GuardianProver.contract, event: "Unpaused", logs: logs, sub: sub}, nil
+}
+
+// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_GuardianProver *GuardianProverFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *GuardianProverUnpaused) (event.Subscription, error) {
+
+ logs, sub, err := _GuardianProver.contract.WatchLogs(opts, "Unpaused")
+ 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(GuardianProverUnpaused)
+ if err := _GuardianProver.contract.UnpackLog(event, "Unpaused", 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
+}
+
+// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_GuardianProver *GuardianProverFilterer) ParseUnpaused(log types.Log) (*GuardianProverUnpaused, error) {
+ event := new(GuardianProverUnpaused)
+ if err := _GuardianProver.contract.UnpackLog(event, "Unpaused", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
diff --git a/packages/guardian-prover-health-check/cmd/flags/common.go b/packages/guardian-prover-health-check/cmd/flags/common.go
new file mode 100644
index 00000000000..434e5a98ee4
--- /dev/null
+++ b/packages/guardian-prover-health-check/cmd/flags/common.go
@@ -0,0 +1,97 @@
+package flags
+
+import (
+ "github.com/urfave/cli/v2"
+)
+
+var (
+ commonCategory = "COMMON"
+ healthCheckCategory = "HEALTHCHECK"
+ generatorCategory = "GENERATOR"
+)
+
+var (
+ DatabaseUsername = &cli.StringFlag{
+ Name: "db.username",
+ Usage: "Database connection username",
+ Required: true,
+ Category: commonCategory,
+ EnvVars: []string{"DATABASE_USER"},
+ }
+ DatabasePassword = &cli.StringFlag{
+ Name: "db.password",
+ Usage: "Database connection password",
+ Required: true,
+ Category: commonCategory,
+ EnvVars: []string{"DATABASE_PASSWORD"},
+ }
+ DatabaseHost = &cli.StringFlag{
+ Name: "db.host",
+ Usage: "Database connection host",
+ Required: true,
+ Category: commonCategory,
+ EnvVars: []string{"DATABASE_HOST"},
+ }
+ DatabaseName = &cli.StringFlag{
+ Name: "db.name",
+ Usage: "Database connection name",
+ Required: true,
+ Category: commonCategory,
+ EnvVars: []string{"DATABASE_NAME"},
+ }
+)
+
+var (
+ DatabaseMaxIdleConns = &cli.Uint64Flag{
+ Name: "db.maxIdleConns",
+ Usage: "Database max idle connections",
+ Value: 50,
+ Category: commonCategory,
+ EnvVars: []string{"DATABASE_MAX_IDLE_CONNS"},
+ }
+ DatabaseMaxOpenConns = &cli.Uint64Flag{
+ Name: "db.maxOpenConns",
+ Usage: "Database max open connections",
+ Value: 200,
+ Category: commonCategory,
+ EnvVars: []string{"DATABASE_MAX_OPEN_CONNS"},
+ }
+ DatabaseConnMaxLifetime = &cli.Uint64Flag{
+ Name: "db.connMaxLifetime",
+ Usage: "Database connection max lifetime in seconds",
+ Value: 10,
+ Category: commonCategory,
+ EnvVars: []string{"DATABASE_CONN_MAX_LIFETIME"},
+ }
+ MetricsHTTPPort = &cli.Uint64Flag{
+ Name: "metrics.port",
+ Usage: "Port to run metrics http server on",
+ Category: commonCategory,
+ Value: 6061,
+ EnvVars: []string{"METRICS_HTTP_PORT"},
+ }
+)
+
+// All common flags.
+var CommonFlags = []cli.Flag{
+ // required
+ DatabaseUsername,
+ DatabasePassword,
+ DatabaseHost,
+ DatabaseName,
+ // optional
+ DatabaseMaxIdleConns,
+ DatabaseConnMaxLifetime,
+ DatabaseMaxOpenConns,
+ MetricsHTTPPort,
+}
+
+// MergeFlags merges the given flag slices.
+func MergeFlags(groups ...[]cli.Flag) []cli.Flag {
+ var merged []cli.Flag
+ for _, group := range groups {
+ merged = append(merged, group...)
+ }
+
+ return merged
+}
diff --git a/packages/guardian-prover-health-check/cmd/flags/generator.go b/packages/guardian-prover-health-check/cmd/flags/generator.go
new file mode 100644
index 00000000000..9f9f4988ee0
--- /dev/null
+++ b/packages/guardian-prover-health-check/cmd/flags/generator.go
@@ -0,0 +1,24 @@
+package flags
+
+import "github.com/urfave/cli/v2"
+
+var (
+ GenesisDate = &cli.StringFlag{
+ Name: "genesisDate",
+ Usage: "Genesis date to start generating data from, YYYY-MM-DD",
+ Required: true,
+ Category: generatorCategory,
+ EnvVars: []string{"GENESIS_DATE"},
+ }
+ Regenerate = &cli.StringFlag{
+ Name: "regenerate",
+ Usage: "True to delete all existing data and regenerate from genesis, false to not",
+ Required: false,
+ Category: generatorCategory,
+ EnvVars: []string{"REGENERATE"},
+ }
+)
+var GeneratorFlags = MergeFlags(CommonFlags, []cli.Flag{
+ GenesisDate,
+ Regenerate,
+})
diff --git a/packages/guardian-prover-health-check/cmd/flags/healthcheck.go b/packages/guardian-prover-health-check/cmd/flags/healthcheck.go
new file mode 100644
index 00000000000..78f913e43b2
--- /dev/null
+++ b/packages/guardian-prover-health-check/cmd/flags/healthcheck.go
@@ -0,0 +1,72 @@
+package flags
+
+import (
+ "time"
+
+ "github.com/urfave/cli/v2"
+)
+
+// required flags
+var (
+ GuardianProverEndpoints = &cli.StringSliceFlag{
+ Name: "guardianProverEndpoints",
+ Usage: "List of guardian prover endpoints",
+ Category: healthCheckCategory,
+ EnvVars: []string{"GUARDIAN_PROVER_ENDPOINTS"},
+ Required: true,
+ }
+ GuardianProverContractAddress = &cli.StringFlag{
+ Name: "guardianProverContractAddress",
+ Usage: "Address of the GuardianProver contract",
+ Category: healthCheckCategory,
+ EnvVars: []string{"GUARDIAN_PROVER_CONTRACT_ADDRESS"},
+ Required: true,
+ }
+ RPCUrl = &cli.StringFlag{
+ Name: "rpcUrl",
+ Usage: "RPC Url",
+ Category: healthCheckCategory,
+ EnvVars: []string{"RPC_URL"},
+ Required: true,
+ }
+)
+var (
+ Backoff = &cli.DurationFlag{
+ Name: "backoff",
+ Usage: "Backoff in time units (ie: 5s)",
+ Value: 1 * time.Second,
+ Category: healthCheckCategory,
+ EnvVars: []string{"BACKOFF"},
+ }
+ HTTPPort = &cli.Uint64Flag{
+ Name: "http.port",
+ Usage: "Port to run http server on",
+ Category: healthCheckCategory,
+ Value: 4102,
+ EnvVars: []string{"HTTP_PORT"},
+ }
+ CORSOrigins = &cli.StringFlag{
+ Name: "http.corsOrigins",
+ Usage: "Comma-delinated list of cors origins",
+ Category: healthCheckCategory,
+ Value: "*",
+ EnvVars: []string{"HTTP_CORS_ORIGINS"},
+ }
+ Interval = &cli.DurationFlag{
+ Name: "interval",
+ Usage: "Health check interval duration",
+ Category: healthCheckCategory,
+ Value: 12 * time.Second,
+ EnvVars: []string{"INTERVAL"},
+ }
+)
+
+var HealthCheckFlags = MergeFlags(CommonFlags, []cli.Flag{
+ HTTPPort,
+ CORSOrigins,
+ Backoff,
+ GuardianProverEndpoints,
+ GuardianProverContractAddress,
+ Interval,
+ RPCUrl,
+})
diff --git a/packages/guardian-prover-health-check/cmd/main.go b/packages/guardian-prover-health-check/cmd/main.go
new file mode 100644
index 00000000000..c07735e7735
--- /dev/null
+++ b/packages/guardian-prover-health-check/cmd/main.go
@@ -0,0 +1,59 @@
+package main
+
+import (
+ "fmt"
+ "log"
+ "os"
+
+ "github.com/joho/godotenv"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/cmd/flags"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/cmd/utils"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/generator"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/healthchecker"
+ "github.com/urfave/cli/v2"
+)
+
+func main() {
+ app := cli.NewApp()
+
+ log.SetOutput(os.Stdout)
+ // attempt to load a .env file to overwrite CLI flags, but allow it to not
+ // exist.
+
+ envFile := os.Getenv("ENV_FILE")
+ if envFile == "" {
+ envFile = ".env"
+ }
+
+ _ = godotenv.Load(envFile)
+
+ app.Name = "Taiko guardian-prover-health-check"
+ app.Usage = "The taiko guardian-prover-health-check softwares command line interface"
+ app.Copyright = "Copyright 2021-2023 Taiko Labs"
+ app.Description = "guardian-prover-health-check implementation in Golang for Taiko protocol"
+ app.Authors = []*cli.Author{{Name: "Taiko Labs", Email: "info@taiko.xyz"}}
+ app.EnableBashCompletion = true
+
+ // All supported sub commands.
+ app.Commands = []*cli.Command{
+ {
+ Name: "healthchecker",
+ Flags: flags.HealthCheckFlags,
+ Usage: "Starts the health check software",
+ Description: "Taiko guardian-prover-health-check health checker software",
+ Action: utils.SubcommandAction(new(healthchecker.HealthChecker)),
+ },
+ {
+ Name: "generator",
+ Flags: flags.GeneratorFlags,
+ Usage: "Starts the health check software",
+ Description: "Taiko guardian-prover-health-check uptime availability generator software",
+ Action: utils.SubcommandAction(new(generator.Generator)),
+ },
+ }
+
+ if err := app.Run(os.Args); err != nil {
+ fmt.Fprintln(os.Stderr, err)
+ os.Exit(1)
+ }
+}
diff --git a/packages/guardian-prover-health-check/cmd/utils/subcommand.go b/packages/guardian-prover-health-check/cmd/utils/subcommand.go
new file mode 100644
index 00000000000..7ceb08e2b20
--- /dev/null
+++ b/packages/guardian-prover-health-check/cmd/utils/subcommand.go
@@ -0,0 +1,62 @@
+package utils
+
+import (
+ "context"
+ "os"
+ "os/signal"
+ "syscall"
+
+ "log/slog"
+
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/metrics"
+ "github.com/urfave/cli/v2"
+)
+
+type SubcommandApplication interface {
+ InitFromCli(context.Context, *cli.Context) error
+ Name() string
+ Start() error
+ Close(context.Context)
+}
+
+func SubcommandAction(app SubcommandApplication) cli.ActionFunc {
+ return func(c *cli.Context) error {
+ ctx, ctxClose := context.WithCancel(context.Background())
+ defer func() { ctxClose() }()
+
+ if err := app.InitFromCli(ctx, c); err != nil {
+ return err
+ }
+
+ slog.Info("Starting Taiko relayer application", "name", app.Name())
+
+ if err := app.Start(); err != nil {
+ slog.Error("Starting application error", "name", app.Name(), "error", err)
+ return err
+ }
+
+ _, startMetrics := metrics.Serve(ctx, c)
+
+ if err := startMetrics(); err != nil {
+ slog.Error("Starting metrics server error", "error", err)
+ return err
+ }
+
+ defer func() {
+ ctxClose()
+ app.Close(ctx)
+ slog.Info("Application stopped", "name", app.Name())
+ }()
+
+ quitCh := make(chan os.Signal, 1)
+ signal.Notify(quitCh, []os.Signal{
+ os.Interrupt,
+ os.Kill,
+ syscall.SIGTERM,
+ syscall.SIGQUIT,
+ }...)
+ <-quitCh
+
+ return nil
+ }
+}
diff --git a/packages/guardian-prover-health-check/db.go b/packages/guardian-prover-health-check/db.go
new file mode 100644
index 00000000000..75263f6edaa
--- /dev/null
+++ b/packages/guardian-prover-health-check/db.go
@@ -0,0 +1,28 @@
+package guardianproverhealthcheck
+
+import (
+ "database/sql"
+
+ "github.com/cyberhorsey/errors"
+ "gorm.io/gorm"
+)
+
+var (
+ ErrNoDB = errors.Validation.NewWithKeyAndDetail("ERR_NO_DB", "DB is required")
+)
+
+type DBConnectionOpts struct {
+ Name string
+ Password string
+ Host string
+ Database string
+ MaxIdleConns uint64
+ MaxOpenConns uint64
+ MaxConnLifetime uint64
+ OpenFunc func(dsn string) (DB, error)
+}
+
+type DB interface {
+ DB() (*sql.DB, error)
+ GormDB() *gorm.DB
+}
diff --git a/packages/guardian-prover-health-check/db/db.go b/packages/guardian-prover-health-check/db/db.go
new file mode 100644
index 00000000000..e2d19c61ca0
--- /dev/null
+++ b/packages/guardian-prover-health-check/db/db.go
@@ -0,0 +1,86 @@
+package db
+
+import (
+ "database/sql"
+ "fmt"
+ "time"
+
+ "github.com/cyberhorsey/errors"
+ "gorm.io/gorm"
+)
+
+type DB struct {
+ gormdb *gorm.DB
+}
+
+func (db *DB) DB() (*sql.DB, error) {
+ return db.gormdb.DB()
+}
+
+func (db *DB) GormDB() *gorm.DB {
+ return db.gormdb
+}
+
+func New(gormdb *gorm.DB) *DB {
+ return &DB{
+ gormdb: gormdb,
+ }
+}
+
+var (
+ ErrNoDB = errors.Validation.NewWithKeyAndDetail("ERR_NO_DB", "DB is required")
+)
+
+type DBConnectionOpts struct {
+ Name string
+ Password string
+ Host string
+ Database string
+ MaxIdleConns uint64
+ MaxOpenConns uint64
+ MaxConnLifetime uint64
+ OpenFunc func(dsn string) (*DB, error)
+}
+
+func OpenDBConnection(opts DBConnectionOpts) (*DB, error) {
+ dsn := ""
+ if opts.Password == "" {
+ dsn = fmt.Sprintf(
+ "%v@tcp(%v)/%v?charset=utf8mb4&parseTime=True&loc=%v",
+ opts.Name,
+ opts.Host,
+ opts.Database,
+ "UTC",
+ )
+ } else {
+ dsn = fmt.Sprintf(
+ "%v:%v@tcp(%v)/%v?charset=utf8mb4&parseTime=True&loc=%v",
+ opts.Name,
+ opts.Password,
+ opts.Host,
+ opts.Database,
+ "UTC",
+ )
+ }
+
+ db, err := opts.OpenFunc(dsn)
+ if err != nil {
+ return nil, err
+ }
+
+ sqlDB, err := db.DB()
+ if err != nil {
+ return nil, err
+ }
+
+ // SetMaxOpenConns sets the maximum number of open connections to the database.
+ sqlDB.SetMaxOpenConns(int(opts.MaxOpenConns))
+
+ // SetMaxIdleConns sets the maximum number of connections in the idle connection pool.
+ sqlDB.SetMaxIdleConns(int(opts.MaxIdleConns))
+
+ // SetConnMaxLifetime sets the maximum amount of time a connection may be reused.
+ sqlDB.SetConnMaxLifetime(time.Duration(opts.MaxConnLifetime))
+
+ return db, nil
+}
diff --git a/packages/guardian-prover-health-check/db/db_test.go b/packages/guardian-prover-health-check/db/db_test.go
new file mode 100644
index 00000000000..001cc59d674
--- /dev/null
+++ b/packages/guardian-prover-health-check/db/db_test.go
@@ -0,0 +1,14 @@
+package db
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+ "gorm.io/gorm"
+)
+
+func Test_DB(t *testing.T) {
+ d := New(&gorm.DB{})
+
+ assert.Equal(t, &gorm.DB{}, d.GormDB())
+}
diff --git a/packages/guardian-prover-health-check/generator/config.go b/packages/guardian-prover-health-check/generator/config.go
new file mode 100644
index 00000000000..4c17d508e91
--- /dev/null
+++ b/packages/guardian-prover-health-check/generator/config.go
@@ -0,0 +1,75 @@
+package generator
+
+import (
+ "database/sql"
+ "time"
+
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/cmd/flags"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/db"
+ "github.com/urfave/cli/v2"
+ "gorm.io/driver/mysql"
+ "gorm.io/gorm"
+ "gorm.io/gorm/logger"
+)
+
+type DB interface {
+ DB() (*sql.DB, error)
+ GormDB() *gorm.DB
+}
+
+type Config struct {
+ // db configs
+ DatabaseUsername string
+ DatabasePassword string
+ DatabaseName string
+ DatabaseHost string
+ DatabaseMaxIdleConns uint64
+ DatabaseMaxOpenConns uint64
+ DatabaseMaxConnLifetime uint64
+ MetricsHTTPPort uint64
+ GenesisDate time.Time
+ Regenerate bool
+ OpenDBFunc func() (DB, error)
+}
+
+// NewConfigFromCliContext creates a new config instance from command line flags.
+func NewConfigFromCliContext(c *cli.Context) (*Config, error) {
+ date, err := time.Parse("2006-01-02", c.String(flags.GenesisDate.Name))
+ if err != nil {
+ return nil, err
+ }
+
+ return &Config{
+ DatabaseUsername: c.String(flags.DatabaseUsername.Name),
+ DatabasePassword: c.String(flags.DatabasePassword.Name),
+ DatabaseName: c.String(flags.DatabaseName.Name),
+ DatabaseHost: c.String(flags.DatabaseHost.Name),
+ DatabaseMaxIdleConns: c.Uint64(flags.DatabaseMaxIdleConns.Name),
+ DatabaseMaxOpenConns: c.Uint64(flags.DatabaseMaxOpenConns.Name),
+ DatabaseMaxConnLifetime: c.Uint64(flags.DatabaseConnMaxLifetime.Name),
+ GenesisDate: date,
+ Regenerate: c.Bool(flags.Regenerate.Name),
+ MetricsHTTPPort: c.Uint64(flags.MetricsHTTPPort.Name),
+ OpenDBFunc: func() (DB, error) {
+ return db.OpenDBConnection(db.DBConnectionOpts{
+ Name: c.String(flags.DatabaseUsername.Name),
+ Password: c.String(flags.DatabasePassword.Name),
+ Database: c.String(flags.DatabaseName.Name),
+ Host: c.String(flags.DatabaseHost.Name),
+ MaxIdleConns: c.Uint64(flags.DatabaseMaxIdleConns.Name),
+ MaxOpenConns: c.Uint64(flags.DatabaseMaxOpenConns.Name),
+ MaxConnLifetime: c.Uint64(flags.DatabaseConnMaxLifetime.Name),
+ OpenFunc: func(dsn string) (*db.DB, error) {
+ gormDB, err := gorm.Open(mysql.Open(dsn), &gorm.Config{
+ Logger: logger.Default.LogMode(logger.Silent),
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ return db.New(gormDB), nil
+ },
+ })
+ },
+ }, nil
+}
diff --git a/packages/guardian-prover-health-check/generator/config_test.go b/packages/guardian-prover-health-check/generator/config_test.go
new file mode 100644
index 00000000000..aae2c43a546
--- /dev/null
+++ b/packages/guardian-prover-health-check/generator/config_test.go
@@ -0,0 +1,58 @@
+package generator
+
+import (
+ "context"
+ "testing"
+ "time"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/cmd/flags"
+ "github.com/urfave/cli/v2"
+)
+
+func setupApp() *cli.App {
+ app := cli.NewApp()
+ app.Flags = flags.GeneratorFlags
+ app.Action = func(ctx *cli.Context) error {
+ _, err := NewConfigFromCliContext(ctx)
+ return err
+ }
+
+ return app
+}
+
+func TestNewConfigFromCliContext(t *testing.T) {
+ app := setupApp()
+
+ app.Action = func(ctx *cli.Context) error {
+ c, err := NewConfigFromCliContext(ctx)
+
+ assert.Nil(t, err)
+ assert.Equal(t, "dbuser", c.DatabaseUsername)
+ assert.Equal(t, "dbpass", c.DatabasePassword)
+ assert.Equal(t, "dbname", c.DatabaseName)
+ assert.Equal(t, "dbhost", c.DatabaseHost)
+
+ d, err := time.Parse("2006-01-02", "2023-11-03")
+ assert.Nil(t, err)
+
+ assert.Equal(t, d, c.GenesisDate)
+
+ c.OpenDBFunc = func() (DB, error) {
+ return nil, nil
+ }
+
+ assert.Nil(t, InitFromConfig(context.Background(), new(Generator), c))
+
+ return err
+ }
+
+ assert.Nil(t, app.Run([]string{
+ "TestNewConfigFromCliContext",
+ "--" + flags.DatabaseUsername.Name, "dbuser",
+ "--" + flags.DatabasePassword.Name, "dbpass",
+ "--" + flags.DatabaseHost.Name, "dbhost",
+ "--" + flags.DatabaseName.Name, "dbname",
+ "--" + flags.GenesisDate.Name, "2023-11-03",
+ }))
+}
diff --git a/packages/guardian-prover-health-check/generator/generator.go b/packages/guardian-prover-health-check/generator/generator.go
new file mode 100644
index 00000000000..24599218cb9
--- /dev/null
+++ b/packages/guardian-prover-health-check/generator/generator.go
@@ -0,0 +1,270 @@
+package generator
+
+import (
+ "context"
+ "time"
+
+ "github.com/urfave/cli/v2"
+ "golang.org/x/exp/slog"
+)
+
+type generatorQueryResult struct {
+ Requests int
+ SuccessfulRequests int
+}
+
+// Generator is a subcommand which is intended to be run on an interval, like
+// a cronjob, to parse the indexed data from the database, and generate
+// time series data that can easily be displayed via charting libraries.
+type Generator struct {
+ db DB
+ genesisDate time.Time
+ regenerate bool
+}
+
+func (g *Generator) InitFromCli(ctx context.Context, c *cli.Context) error {
+ config, err := NewConfigFromCliContext(c)
+ if err != nil {
+ return err
+ }
+
+ return InitFromConfig(ctx, g, config)
+}
+
+func InitFromConfig(ctx context.Context, g *Generator, cfg *Config) error {
+ db, err := cfg.OpenDBFunc()
+ if err != nil {
+ return err
+ }
+
+ g.db = db
+ g.genesisDate = cfg.GenesisDate
+ g.regenerate = cfg.Regenerate
+
+ return nil
+}
+
+func (g *Generator) Name() string {
+ return "generator"
+}
+
+func (g *Generator) Start() error {
+ if g.regenerate {
+ slog.Info("regenerating, deleting existing data")
+
+ if err := g.deleteUptimeAvailabilityStats(context.Background()); err != nil {
+ return err
+ }
+ }
+
+ slog.Info("generating uptime availability statistics")
+
+ if err := g.generateUptimeAvailabilityStats(context.Background()); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (g *Generator) Close(ctx context.Context) {
+ sqlDB, err := g.db.DB()
+ if err != nil {
+ slog.Error("error getting sqldb when closing generator", "err", err.Error())
+ }
+
+ if err := sqlDB.Close(); err != nil {
+ slog.Error("error closing sqlbd connection", "err", err.Error())
+ }
+}
+
+func (g *Generator) generateUptimeAvailabilityStats(ctx context.Context) error {
+ guardianProverIDs, err := g.getGuardianProverIDs(ctx)
+ if err != nil {
+ return err
+ }
+
+ for _, guardianProverID := range guardianProverIDs {
+ if err := g.generateByGuardianProverID(ctx, guardianProverID); err != nil {
+ slog.Error("error generating", "guardianProverID", guardianProverID, "error", err.Error())
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (g *Generator) getGuardianProverIDs(ctx context.Context) ([]int, error) {
+ var guardianProverIDs []int
+
+ q := `SELECT DISTINCT guardian_prover_id FROM health_checks;`
+
+ err := g.db.GormDB().Raw(q).Scan(&guardianProverIDs).Error
+
+ if err != nil {
+ return nil, err
+ }
+
+ slog.Info("guardian prover IDs found", "guardianProverIDs", guardianProverIDs)
+
+ return guardianProverIDs, nil
+}
+
+// generateByTask generates uptime availability data for each day in between the current date
+// and the most recently generated data, for the given guardian prover.
+func (g *Generator) generateByGuardianProverID(ctx context.Context, guardianProverID int) error {
+ slog.Info("generating", "guardianProverID", guardianProverID)
+
+ startingDate, err := g.getStartingDate(ctx, guardianProverID)
+ if err != nil {
+ return err
+ }
+
+ currentDate := g.getCurrentDate()
+ if startingDate.Compare(currentDate) == 0 {
+ slog.Info(
+ "data already generated up-to-date for id",
+ "guardianProverID", guardianProverID,
+ "date", startingDate.Format("2006-01-02"),
+ "currentDate", currentDate.Format("2006-01-02"),
+ )
+
+ return nil
+ }
+
+ // Loop through each date from latestDate to currentDate
+ for d := startingDate; d.Before(currentDate); d = d.AddDate(0, 0, 1) {
+ slog.Info("Processing",
+ "guardianProverID", guardianProverID,
+ "date", d.Format("2006-01-02"),
+ "currentDate", currentDate.Format("2006-01-02"),
+ )
+
+ result, err := g.query(ctx, guardianProverID, d)
+ if err != nil {
+ slog.Info("Query failed", "guardianProverID", guardianProverID, "date", d.Format("2006-01-02"), "error", err.Error())
+ return err
+ }
+
+ var uptime float64 = 0
+ if result.Requests != 0 && result.SuccessfulRequests != 0 {
+ uptime = (float64(result.Requests) / float64(result.SuccessfulRequests)) * 100
+ }
+
+ slog.Info("Query successful",
+ "guardianProverID", guardianProverID,
+ "date", d.Format("2006-01-02"),
+ "numRequests", result.Requests,
+ "numSuccessfulRequests", result.SuccessfulRequests,
+ "uptime", uptime,
+ )
+
+ insertStmt := `
+ INSERT INTO stats(guardian_prover_id, requests, successful_requests, uptime, date)
+ VALUES (?, ?, ?, ?, ?)`
+
+ err = g.db.GormDB().Exec(
+ insertStmt,
+ guardianProverID,
+ result.Requests,
+ result.SuccessfulRequests,
+ uptime,
+ d.Format("2006-01-02"),
+ ).Error
+ if err != nil {
+ slog.Info("Insert failed",
+ "guardianProverID", guardianProverID,
+ "date", d.Format("2006-01-02"),
+ "error", err.Error(),
+ )
+
+ return err
+ }
+
+ slog.Info("Processed", "guardianProverID", guardianProverID, "date", d.Format("2006-01-02"))
+ }
+
+ return nil
+}
+
+func (g *Generator) query(ctx context.Context, guardianProverID int, date time.Time) (*generatorQueryResult, error) {
+ dateString := date.Format("2006-01-02")
+
+ var numRequests int
+
+ var numSuccessfulRequests int
+
+ query := "SELECT count(*) FROM health_checks WHERE guardian_prover_id = ? AND DATE(created_at) = ?"
+ err := g.db.GormDB().
+ Raw(query, guardianProverID, dateString).
+ Scan(&numRequests).Error
+
+ if err != nil {
+ return nil, err
+ }
+
+ query = "SELECT count(*) FROM health_checks WHERE guardian_prover_id = ? AND alive = 1 AND DATE(created_at) = ?"
+ err = g.db.GormDB().
+ Raw(query, guardianProverID, dateString).
+ Scan(&numSuccessfulRequests).Error
+
+ if err != nil {
+ return nil, err
+ }
+
+ result := &generatorQueryResult{
+ Requests: numRequests,
+ SuccessfulRequests: numSuccessfulRequests,
+ }
+
+ return result, nil
+}
+
+// getCurrentDate returns the current date in YYYY-MM-DD format
+func (g *Generator) getCurrentDate() time.Time {
+ // Get current date
+ currentTime := time.Now().UTC()
+ currentDate := time.Date(currentTime.Year(), currentTime.Month(), currentTime.Day(), 0, 0, 0, 0, time.UTC)
+
+ return currentDate
+}
+
+// getStartingDate returns first required data to be generated, one after the latest date entry,
+// or the genesis date.
+func (g *Generator) getStartingDate(ctx context.Context, guardianProverID int) (time.Time, error) {
+ var latestDateString string
+
+ var nextRequiredDate time.Time
+
+ q := `SELECT date FROM health_checks WHERE guardian_prover_id = ? ORDER BY date DESC LIMIT 1;`
+
+ err := g.db.GormDB().Raw(q, guardianProverID).Scan(&latestDateString).Error
+
+ slog.Info("latestDateString", "guardianProverID", guardianProverID, "date", latestDateString)
+
+ if err != nil || latestDateString == "" {
+ nextRequiredDate = g.genesisDate
+ } else {
+ latestDate, err := time.Parse("2006-01-02", latestDateString)
+ if err != nil {
+ return time.Time{}, err
+ }
+
+ nextRequiredDate = latestDate.AddDate(0, 0, 1)
+ }
+
+ slog.Info("next required date for task",
+ "guardianProverID", guardianProverID,
+ "nextRequiredDate", nextRequiredDate.Format("2006-01-02"),
+ )
+
+ return nextRequiredDate, nil
+}
+
+func (g *Generator) deleteUptimeAvailabilityStats(ctx context.Context) error {
+ deleteStmt := "DELETE FROM stats;"
+ if err := g.db.GormDB().Exec(deleteStmt).Error; err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/packages/guardian-prover-health-check/healthcheck.go b/packages/guardian-prover-health-check/healthcheck.go
new file mode 100644
index 00000000000..5e8353bd2cb
--- /dev/null
+++ b/packages/guardian-prover-health-check/healthcheck.go
@@ -0,0 +1,38 @@
+package guardianproverhealthcheck
+
+import (
+ "context"
+ "net/http"
+
+ "github.com/morkid/paginate"
+)
+
+type HealthCheck struct {
+ ID int `json:"id"`
+ GuardianProverID uint64 `json:"guardianProverId"`
+ Alive bool `json:"alive"`
+ ExpectedAddress string `json:"expectedAddress"`
+ RecoveredAddress string `json:"recoveredAddress"`
+ SignedResponse string `json:"signedResponse"`
+}
+
+type SaveHealthCheckOpts struct {
+ GuardianProverID uint64
+ Alive bool
+ ExpectedAddress string
+ RecoveredAddress string
+ SignedResponse string
+}
+
+type HealthCheckRepository interface {
+ Get(
+ ctx context.Context,
+ req *http.Request,
+ ) (paginate.Page, error)
+ GetByGuardianProverID(
+ ctx context.Context,
+ req *http.Request,
+ id int,
+ ) (paginate.Page, error)
+ Save(opts SaveHealthCheckOpts) error
+}
diff --git a/packages/guardian-prover-health-check/healthchecker/config.go b/packages/guardian-prover-health-check/healthchecker/config.go
new file mode 100644
index 00000000000..8a8eb2b648f
--- /dev/null
+++ b/packages/guardian-prover-health-check/healthchecker/config.go
@@ -0,0 +1,78 @@
+package healthchecker
+
+import (
+ "database/sql"
+ "strings"
+ "time"
+
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/cmd/flags"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/db"
+ "github.com/urfave/cli/v2"
+ "gorm.io/driver/mysql"
+ "gorm.io/gorm"
+ "gorm.io/gorm/logger"
+)
+
+type DB interface {
+ DB() (*sql.DB, error)
+ GormDB() *gorm.DB
+}
+
+type Config struct {
+ // db configs
+ DatabaseUsername string
+ DatabasePassword string
+ DatabaseName string
+ DatabaseHost string
+ DatabaseMaxIdleConns uint64
+ DatabaseMaxOpenConns uint64
+ DatabaseMaxConnLifetime uint64
+ CORSOrigins []string
+ Backoff uint64
+ HTTPPort uint64
+ GuardianProverEndpoints []string
+ GuardianProverContractAddress string
+ RPCUrl string
+ Interval time.Duration
+ OpenDBFunc func() (DB, error)
+}
+
+// NewConfigFromCliContext creates a new config instance from command line flags.
+func NewConfigFromCliContext(c *cli.Context) (*Config, error) {
+ return &Config{
+ DatabaseUsername: c.String(flags.DatabaseUsername.Name),
+ DatabasePassword: c.String(flags.DatabasePassword.Name),
+ DatabaseName: c.String(flags.DatabaseName.Name),
+ DatabaseHost: c.String(flags.DatabaseHost.Name),
+ DatabaseMaxIdleConns: c.Uint64(flags.DatabaseMaxIdleConns.Name),
+ DatabaseMaxOpenConns: c.Uint64(flags.DatabaseMaxOpenConns.Name),
+ DatabaseMaxConnLifetime: c.Uint64(flags.DatabaseConnMaxLifetime.Name),
+ CORSOrigins: strings.Split(c.String(flags.CORSOrigins.Name), ","),
+ GuardianProverEndpoints: c.StringSlice(flags.GuardianProverEndpoints.Name),
+ GuardianProverContractAddress: c.String(flags.GuardianProverContractAddress.Name),
+ RPCUrl: c.String(flags.RPCUrl.Name),
+ HTTPPort: c.Uint64(flags.HTTPPort.Name),
+ Interval: c.Duration(flags.Interval.Name),
+ OpenDBFunc: func() (DB, error) {
+ return db.OpenDBConnection(db.DBConnectionOpts{
+ Name: c.String(flags.DatabaseUsername.Name),
+ Password: c.String(flags.DatabasePassword.Name),
+ Database: c.String(flags.DatabaseName.Name),
+ Host: c.String(flags.DatabaseHost.Name),
+ MaxIdleConns: c.Uint64(flags.DatabaseMaxIdleConns.Name),
+ MaxOpenConns: c.Uint64(flags.DatabaseMaxOpenConns.Name),
+ MaxConnLifetime: c.Uint64(flags.DatabaseConnMaxLifetime.Name),
+ OpenFunc: func(dsn string) (*db.DB, error) {
+ gormDB, err := gorm.Open(mysql.Open(dsn), &gorm.Config{
+ Logger: logger.Default.LogMode(logger.Silent),
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ return db.New(gormDB), nil
+ },
+ })
+ },
+ }, nil
+}
diff --git a/packages/guardian-prover-health-check/healthchecker/config_test.go b/packages/guardian-prover-health-check/healthchecker/config_test.go
new file mode 100644
index 00000000000..6776e04c064
--- /dev/null
+++ b/packages/guardian-prover-health-check/healthchecker/config_test.go
@@ -0,0 +1,76 @@
+package healthchecker
+
+import (
+ "strings"
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/cmd/flags"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/mock"
+ "github.com/urfave/cli/v2"
+)
+
+var (
+ guardianProverAddress = "0x63FaC9201494f0bd17B9892B9fae4d52fe3BD377"
+ guardianProverEndpoints = "http://endpoint.com,http://endpoint2.com"
+ databaseMaxIdleConns = "10"
+ databaseMaxOpenConns = "10"
+ databaseMaxConnLifetime = "30"
+ HTTPPort = "1000"
+)
+
+func setupApp() *cli.App {
+ app := cli.NewApp()
+ app.Flags = flags.HealthCheckFlags
+ app.Action = func(ctx *cli.Context) error {
+ _, err := NewConfigFromCliContext(ctx)
+ return err
+ }
+
+ return app
+}
+
+func TestNewConfigFromCliContext(t *testing.T) {
+ app := setupApp()
+
+ app.Action = func(ctx *cli.Context) error {
+ c, err := NewConfigFromCliContext(ctx)
+ assert.Nil(t, err)
+ assert.Equal(t, "dbuser", c.DatabaseUsername)
+ assert.Equal(t, "dbpass", c.DatabasePassword)
+ assert.Equal(t, "dbname", c.DatabaseName)
+ assert.Equal(t, "dbhost", c.DatabaseHost)
+ assert.Equal(t, "rpcUrl", c.RPCUrl)
+ assert.Equal(t, strings.Split(guardianProverEndpoints, ","), c.GuardianProverEndpoints)
+ assert.Equal(t, guardianProverAddress, c.GuardianProverContractAddress)
+ assert.Equal(t, []string{"*"}, c.CORSOrigins)
+ assert.Equal(t, uint64(10), c.DatabaseMaxIdleConns)
+ assert.Equal(t, uint64(10), c.DatabaseMaxOpenConns)
+ assert.Equal(t, uint64(30), c.DatabaseMaxConnLifetime)
+ assert.Equal(t, uint64(1000), c.HTTPPort)
+
+ c.OpenDBFunc = func() (DB, error) {
+ return &mock.DB{}, nil
+ }
+
+ // assert.Nil(t, InitFromConfig(context.Background(), new(Indexer), c))
+
+ return err
+ }
+
+ assert.Nil(t, app.Run([]string{
+ "TestNewConfigFromCliContext",
+ "--" + flags.DatabaseUsername.Name, "dbuser",
+ "--" + flags.DatabasePassword.Name, "dbpass",
+ "--" + flags.DatabaseHost.Name, "dbhost",
+ "--" + flags.DatabaseName.Name, "dbname",
+ "--" + flags.RPCUrl.Name, "rpcUrl",
+ "--" + flags.CORSOrigins.Name, "*",
+ "--" + flags.DatabaseMaxOpenConns.Name, databaseMaxOpenConns,
+ "--" + flags.DatabaseMaxIdleConns.Name, databaseMaxIdleConns,
+ "--" + flags.DatabaseConnMaxLifetime.Name, databaseMaxConnLifetime,
+ "--" + flags.HTTPPort.Name, HTTPPort,
+ "--" + flags.GuardianProverContractAddress.Name, guardianProverAddress,
+ "--" + flags.GuardianProverEndpoints.Name, guardianProverEndpoints,
+ }))
+}
diff --git a/packages/guardian-prover-health-check/healthchecker/healthchecker.go b/packages/guardian-prover-health-check/healthchecker/healthchecker.go
new file mode 100644
index 00000000000..68d42ec39a8
--- /dev/null
+++ b/packages/guardian-prover-health-check/healthchecker/healthchecker.go
@@ -0,0 +1,261 @@
+package healthchecker
+
+import (
+ "context"
+ "encoding/base64"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "log/slog"
+ "math/big"
+ "net/http"
+ "net/url"
+ "time"
+
+ "github.com/ethereum/go-ethereum/accounts/abi/bind"
+ "github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/crypto"
+ "github.com/ethereum/go-ethereum/ethclient"
+ "github.com/labstack/echo/v4"
+ guardianproverhealthcheck "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/bindings/guardianprover"
+ hchttp "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/http"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/repo"
+ "github.com/urfave/cli/v2"
+)
+
+var (
+ msg = crypto.Keccak256Hash([]byte("HEART_BEAT")).Bytes()
+)
+
+type guardianProver struct {
+ address common.Address
+ id *big.Int
+ endpoint *url.URL
+}
+
+type HealthChecker struct {
+ ctx context.Context
+ cancelCtx context.CancelFunc
+ healthCheckRepo guardianproverhealthcheck.HealthCheckRepository
+ interval time.Duration
+ guardianProverContract *guardianprover.GuardianProver
+ numGuardians uint64
+ guardianProvers []guardianProver
+ httpSrv *hchttp.Server
+ httpPort uint64
+}
+
+type healthCheckResponse struct {
+ ProverAddress string `json:"prover"`
+ HeartBeatSignature string `json:"heartBeatSignature"`
+}
+
+func (h *HealthChecker) Name() string {
+ return "healthchecker"
+}
+
+func (h *HealthChecker) Close(ctx context.Context) {
+ h.cancelCtx()
+
+ if err := h.httpSrv.Shutdown(ctx); err != nil {
+ slog.Error("error encountered shutting down http server", "error", err)
+ }
+}
+
+func (h *HealthChecker) InitFromCli(ctx context.Context, c *cli.Context) error {
+ cfg, err := NewConfigFromCliContext(c)
+ if err != nil {
+ return err
+ }
+
+ return InitFromConfig(ctx, h, cfg)
+}
+
+func InitFromConfig(ctx context.Context, h *HealthChecker, cfg *Config) (err error) {
+ db, err := cfg.OpenDBFunc()
+ if err != nil {
+ return err
+ }
+
+ healthCheckRepo, err := repo.NewHealthCheckRepository(db)
+ if err != nil {
+ return err
+ }
+
+ ethClient, err := ethclient.Dial(cfg.RPCUrl)
+ if err != nil {
+ return err
+ }
+
+ guardianProverContract, err := guardianprover.NewGuardianProver(
+ common.HexToAddress(cfg.GuardianProverContractAddress),
+ ethClient,
+ )
+ if err != nil {
+ return err
+ }
+
+ numGuardians, err := guardianProverContract.NUMGUARDIANS(nil)
+ if err != nil {
+ return err
+ }
+
+ var guardianProvers []guardianProver
+
+ for i := 0; i < int(numGuardians.Uint64()); i++ {
+ guardianAddress, err := guardianProverContract.Guardians(&bind.CallOpts{}, new(big.Int).SetInt64(int64(i)))
+ if err != nil {
+ return err
+ }
+
+ guardianId, err := guardianProverContract.GuardianIds(&bind.CallOpts{}, guardianAddress)
+ if err != nil {
+ return err
+ }
+
+ endpoint, err := url.Parse(cfg.GuardianProverEndpoints[i])
+ if err != nil {
+ return err
+ }
+
+ guardianProvers = append(guardianProvers, guardianProver{
+ address: guardianAddress,
+ id: guardianId,
+ endpoint: endpoint,
+ })
+ }
+
+ h.httpSrv, err = hchttp.NewServer(hchttp.NewServerOpts{
+ Echo: echo.New(),
+ HealthCheckRepo: healthCheckRepo,
+ })
+
+ if err != nil {
+ return err
+ }
+
+ h.guardianProvers = guardianProvers
+ h.numGuardians = numGuardians.Uint64()
+ h.healthCheckRepo = healthCheckRepo
+ h.interval = cfg.Interval
+ h.guardianProverContract = guardianProverContract
+ h.httpPort = cfg.HTTPPort
+
+ h.ctx, h.cancelCtx = context.WithCancel(ctx)
+
+ return nil
+}
+
+func (h *HealthChecker) Start() error {
+ go func() {
+ if err := h.httpSrv.Start(fmt.Sprintf(":%v", h.httpPort)); !errors.Is(err, http.ErrServerClosed) {
+ slog.Error("Failed to start http server", "error", err)
+ }
+ }()
+
+ go h.checkGuardianProversOnInterval()
+
+ return nil
+}
+
+func (h *HealthChecker) checkGuardianProversOnInterval() {
+ t := time.NewTicker(h.interval)
+
+ for {
+ select {
+ case <-h.ctx.Done():
+ return
+ case <-t.C:
+ for _, g := range h.guardianProvers {
+ resp, recoveredAddr, err := h.checkGuardianProver(g)
+ if err != nil {
+ slog.Error(
+ "error checking guardian prover endpoint",
+ "endpoint", g.endpoint,
+ "id", g.id,
+ "address", g.address.Hex(),
+ "recoveredAddr", recoveredAddr,
+ "error", err,
+ )
+ }
+
+ var sig string = ""
+
+ if resp != nil {
+ sig = resp.HeartBeatSignature
+ }
+
+ err = h.healthCheckRepo.Save(
+ guardianproverhealthcheck.SaveHealthCheckOpts{
+ GuardianProverID: g.id.Uint64(),
+ Alive: sig != "",
+ ExpectedAddress: g.address.Hex(),
+ RecoveredAddress: recoveredAddr,
+ SignedResponse: sig,
+ },
+ )
+
+ if err != nil {
+ slog.Error("error saving failed health check to database",
+ "endpoint", g.endpoint,
+ "id", g.id,
+ "address", g.address.Hex(),
+ "recoveredAddr", recoveredAddr,
+ "sig", sig,
+ "error", err,
+ )
+ } else {
+ slog.Info("saved health check to database",
+ "endpoint", g.endpoint,
+ "id", g.id,
+ "address", g.address.Hex(),
+ "recoveredAddr", recoveredAddr,
+ "sig", sig,
+ )
+ }
+ }
+ }
+ }
+}
+
+func (h *HealthChecker) checkGuardianProver(g guardianProver) (*healthCheckResponse, string, error) {
+ slog.Info("checking guardian prover", "id", g.id, "endpoint", g.endpoint)
+
+ healthCheckResponse := &healthCheckResponse{}
+
+ resp, err := http.Get(g.endpoint.String() + "/status")
+ if err != nil {
+ // save fail to db
+ return healthCheckResponse, "", err
+ }
+
+ b, err := io.ReadAll(resp.Body)
+ if err != nil {
+ return healthCheckResponse, "", err
+ }
+
+ if err := json.Unmarshal(b, healthCheckResponse); err != nil {
+ return healthCheckResponse, "", err
+ }
+
+ if g.address.Cmp(common.HexToAddress(healthCheckResponse.ProverAddress)) != 0 {
+ slog.Error("address mismatch", "expected", g.address.Hex(), "received", healthCheckResponse.ProverAddress)
+ return healthCheckResponse, "", errors.New("prover address provided was not the address expected")
+ }
+
+ b64DecodedSig, err := base64.StdEncoding.DecodeString(healthCheckResponse.HeartBeatSignature)
+ if err != nil {
+ return healthCheckResponse, "", err
+ }
+
+ pubKey, err := crypto.SigToPub(msg, b64DecodedSig)
+ if err != nil {
+ return healthCheckResponse, "", err
+ }
+
+ recoveredAddr := crypto.PubkeyToAddress(*pubKey)
+
+ return healthCheckResponse, recoveredAddr.Hex(), nil
+}
diff --git a/packages/guardian-prover-health-check/http/get_health_checks.go b/packages/guardian-prover-health-check/http/get_health_checks.go
new file mode 100644
index 00000000000..00e9509795f
--- /dev/null
+++ b/packages/guardian-prover-health-check/http/get_health_checks.go
@@ -0,0 +1,27 @@
+package http
+
+import (
+ "net/http"
+
+ echo "github.com/labstack/echo/v4"
+)
+
+// GetHealthChecks
+//
+// returns the health checks.
+//
+// @Summary Get health checks
+// @ID get-health-checks
+// @Accept json
+// @Produce json
+// @Success 200 {object} paginate.Page
+// @Router /healthchecks [get]
+
+func (srv *Server) GetHealthChecks(c echo.Context) error {
+ page, err := srv.healthCheckRepo.Get(c.Request().Context(), c.Request())
+ if err != nil {
+ return c.JSON(http.StatusBadRequest, err)
+ }
+
+ return c.JSON(http.StatusOK, page)
+}
diff --git a/packages/guardian-prover-health-check/http/get_health_checks_by_guardian_prover_id.go b/packages/guardian-prover-health-check/http/get_health_checks_by_guardian_prover_id.go
new file mode 100644
index 00000000000..e65c2dee974
--- /dev/null
+++ b/packages/guardian-prover-health-check/http/get_health_checks_by_guardian_prover_id.go
@@ -0,0 +1,39 @@
+package http
+
+import (
+ "errors"
+ "net/http"
+ "strconv"
+
+ echo "github.com/labstack/echo/v4"
+)
+
+// GetHealthChecks
+//
+// returns the health checks.
+//
+// @Summary Get health checks
+// @ID get-health-checks
+// @Accept json
+// @Produce json
+// @Success 200 {object} paginate.Page
+// @Router /healthchecks [get]
+
+func (srv *Server) GetHealthChecksByGuardianProverID(c echo.Context) error {
+ idParam := c.Param("id")
+ if idParam == "" {
+ return c.JSON(http.StatusBadRequest, errors.New("no id provided"))
+ }
+
+ id, err := strconv.Atoi(idParam)
+ if err != nil {
+ return c.JSON(http.StatusBadRequest, err)
+ }
+
+ page, err := srv.healthCheckRepo.GetByGuardianProverID(c.Request().Context(), c.Request(), id)
+ if err != nil {
+ return c.JSON(http.StatusBadRequest, err)
+ }
+
+ return c.JSON(http.StatusOK, page)
+}
diff --git a/packages/guardian-prover-health-check/http/get_health_checks_by_guardian_prover_id_test.go b/packages/guardian-prover-health-check/http/get_health_checks_by_guardian_prover_id_test.go
new file mode 100644
index 00000000000..3b4e59f17c2
--- /dev/null
+++ b/packages/guardian-prover-health-check/http/get_health_checks_by_guardian_prover_id_test.go
@@ -0,0 +1,66 @@
+package http
+
+import (
+ "fmt"
+ "net/http"
+ "net/http/httptest"
+ "testing"
+
+ "github.com/cyberhorsey/webutils/testutils"
+ "github.com/labstack/echo/v4"
+ "github.com/stretchr/testify/assert"
+ guardianproverhealthcheck "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check"
+)
+
+func Test_GetHealthChecksByGuardianProverID(t *testing.T) {
+ srv := newTestServer("")
+
+ err := srv.healthCheckRepo.Save(guardianproverhealthcheck.SaveHealthCheckOpts{
+ GuardianProverID: 1,
+ Alive: true,
+ ExpectedAddress: "0x123",
+ RecoveredAddress: "0x123",
+ SignedResponse: "0x123",
+ })
+
+ assert.Nil(t, err)
+
+ assert.Equal(t, nil, err)
+
+ tests := []struct {
+ name string
+ id string
+ wantStatus int
+ wantBodyRegexpMatches []string
+ }{
+ {
+ "success",
+ "1",
+ http.StatusOK,
+ // nolint: lll
+ []string{`[{"id":0,"guardianProverId":1,"alive":true,"expectedAddress":"0x123","recoveredAddress":"0x123","signedResponse":"0x123"}]`},
+ },
+ {
+ "success",
+ "9839483294",
+ http.StatusOK,
+ []string{``},
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ req := testutils.NewUnauthenticatedRequest(
+ echo.GET,
+ fmt.Sprintf("/healthchecks/%v", tt.id),
+ nil,
+ )
+
+ rec := httptest.NewRecorder()
+
+ srv.ServeHTTP(rec, req)
+
+ testutils.AssertStatusAndBody(t, rec, tt.wantStatus, tt.wantBodyRegexpMatches)
+ })
+ }
+}
diff --git a/packages/guardian-prover-health-check/http/get_health_checks_test.go b/packages/guardian-prover-health-check/http/get_health_checks_test.go
new file mode 100644
index 00000000000..d32db8b46b0
--- /dev/null
+++ b/packages/guardian-prover-health-check/http/get_health_checks_test.go
@@ -0,0 +1,57 @@
+package http
+
+import (
+ "net/http"
+ "net/http/httptest"
+ "testing"
+
+ "github.com/cyberhorsey/webutils/testutils"
+ "github.com/labstack/echo/v4"
+ "github.com/stretchr/testify/assert"
+ guardianproverhealthcheck "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check"
+)
+
+func Test_GetHealthChecks(t *testing.T) {
+ srv := newTestServer("")
+
+ err := srv.healthCheckRepo.Save(guardianproverhealthcheck.SaveHealthCheckOpts{
+ GuardianProverID: 1,
+ Alive: true,
+ ExpectedAddress: "0x123",
+ RecoveredAddress: "0x123",
+ SignedResponse: "0x123",
+ })
+
+ assert.Nil(t, err)
+
+ assert.Equal(t, nil, err)
+
+ tests := []struct {
+ name string
+ wantStatus int
+ wantBodyRegexpMatches []string
+ }{
+ {
+ "success",
+ http.StatusOK,
+ // nolint: lll
+ []string{`[{"id":0,"guardianProverId":1,"alive":true,"expectedAddress":"0x123","recoveredAddress":"0x123","signedResponse":"0x123"}]`},
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ req := testutils.NewUnauthenticatedRequest(
+ echo.GET,
+ "/healthchecks",
+ nil,
+ )
+
+ rec := httptest.NewRecorder()
+
+ srv.ServeHTTP(rec, req)
+
+ testutils.AssertStatusAndBody(t, rec, tt.wantStatus, tt.wantBodyRegexpMatches)
+ })
+ }
+}
diff --git a/packages/guardian-prover-health-check/http/routes.go b/packages/guardian-prover-health-check/http/routes.go
new file mode 100644
index 00000000000..b128d86fc5d
--- /dev/null
+++ b/packages/guardian-prover-health-check/http/routes.go
@@ -0,0 +1,10 @@
+package http
+
+func (srv *Server) configureRoutes() {
+ srv.echo.GET("/healthz", srv.Health)
+ srv.echo.GET("/", srv.Health)
+
+ srv.echo.GET("/healthchecks", srv.GetHealthChecks)
+
+ srv.echo.GET("/healthchecks/:id", srv.GetHealthChecksByGuardianProverID)
+}
diff --git a/packages/guardian-prover-health-check/http/server.go b/packages/guardian-prover-health-check/http/server.go
new file mode 100644
index 00000000000..01244e082d9
--- /dev/null
+++ b/packages/guardian-prover-health-check/http/server.go
@@ -0,0 +1,102 @@
+package http
+
+import (
+ "context"
+ "net/http"
+ "os"
+
+ "github.com/labstack/echo/v4/middleware"
+ guardianproverhealthcheck "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check"
+
+ echo "github.com/labstack/echo/v4"
+)
+
+// @title Taiko Guardian Prover Health Check API
+// @version 1.0
+// @termsOfService http://swagger.io/terms/
+
+// @contact.name API Support
+// @contact.url https://community.taiko.xyz/
+// @contact.email info@taiko.xyz
+
+// @license.name MIT
+
+// @host healthcheck.internal.taiko.xyz
+// Server represents an guardian prover health check http server instance.
+type Server struct {
+ echo *echo.Echo
+ healthCheckRepo guardianproverhealthcheck.HealthCheckRepository
+}
+
+type NewServerOpts struct {
+ Echo *echo.Echo
+ HealthCheckRepo guardianproverhealthcheck.HealthCheckRepository
+ CorsOrigins []string
+}
+
+func NewServer(opts NewServerOpts) (*Server, error) {
+ srv := &Server{
+ echo: opts.Echo,
+ healthCheckRepo: opts.HealthCheckRepo,
+ }
+
+ corsOrigins := opts.CorsOrigins
+ if corsOrigins == nil {
+ corsOrigins = []string{"*"}
+ }
+
+ srv.configureMiddleware(corsOrigins)
+ srv.configureRoutes()
+
+ return srv, nil
+}
+
+// Start starts the HTTP server
+func (srv *Server) Start(address string) error {
+ return srv.echo.Start(address)
+}
+
+// Shutdown shuts down the HTTP server
+func (srv *Server) Shutdown(ctx context.Context) error {
+ return srv.echo.Shutdown(ctx)
+}
+
+// ServeHTTP implements the `http.Handler` interface which serves HTTP requests
+func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
+ srv.echo.ServeHTTP(w, r)
+}
+
+// Health endpoints for probes
+func (srv *Server) Health(c echo.Context) error {
+ return c.NoContent(http.StatusOK)
+}
+
+func LogSkipper(c echo.Context) bool {
+ switch c.Request().URL.Path {
+ case "/healthz":
+ return true
+ case "/metrics":
+ return true
+ default:
+ return true
+ }
+}
+
+func (srv *Server) configureMiddleware(corsOrigins []string) {
+ srv.echo.Use(middleware.RequestID())
+
+ srv.echo.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{
+ Skipper: LogSkipper,
+ Format: `{"time":"${time_rfc3339_nano}","level":"INFO","message":{"id":"${id}","remote_ip":"${remote_ip}",` + //nolint:lll
+ `"host":"${host}","method":"${method}","uri":"${uri}","user_agent":"${user_agent}",` + //nolint:lll
+ `"response_status":${status},"error":"${error}","latency":${latency},"latency_human":"${latency_human}",` +
+ `"bytes_in":${bytes_in},"bytes_out":${bytes_out}}}` + "\n",
+ Output: os.Stdout,
+ }))
+
+ srv.echo.Use(middleware.CORSWithConfig(middleware.CORSConfig{
+ AllowOrigins: corsOrigins,
+ AllowHeaders: []string{echo.HeaderOrigin, echo.HeaderContentType, echo.HeaderAccept},
+ AllowMethods: []string{http.MethodGet, http.MethodHead},
+ }))
+}
diff --git a/packages/guardian-prover-health-check/http/server_test.go b/packages/guardian-prover-health-check/http/server_test.go
new file mode 100644
index 00000000000..506607cbecf
--- /dev/null
+++ b/packages/guardian-prover-health-check/http/server_test.go
@@ -0,0 +1,84 @@
+package http
+
+import (
+ "context"
+ "net/http"
+ "net/http/httptest"
+ "testing"
+
+ "github.com/joho/godotenv"
+ echo "github.com/labstack/echo/v4"
+ "github.com/stretchr/testify/assert"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/mock"
+)
+
+func newTestServer(url string) *Server {
+ _ = godotenv.Load("../.test.env")
+
+ srv := &Server{
+ echo: echo.New(),
+ healthCheckRepo: mock.NewHealthCheckRepository(),
+ }
+
+ srv.configureMiddleware([]string{"*"})
+ srv.configureRoutes()
+
+ return srv
+}
+
+func Test_NewServer(t *testing.T) {
+ tests := []struct {
+ name string
+ opts NewServerOpts
+ wantErr error
+ }{
+ {
+ "success",
+ NewServerOpts{
+ Echo: echo.New(),
+ CorsOrigins: make([]string, 0),
+ },
+ nil,
+ },
+ }
+
+ for _, tt := range tests {
+ _, err := NewServer(tt.opts)
+ assert.Equal(t, tt.wantErr, err)
+ }
+}
+
+func Test_Health(t *testing.T) {
+ srv := newTestServer("")
+
+ req, _ := http.NewRequest(echo.GET, "/healthz", nil)
+ rec := httptest.NewRecorder()
+
+ srv.ServeHTTP(rec, req)
+
+ if rec.Code != http.StatusOK {
+ t.Fatalf("Test_Health expected code %v, got %v", http.StatusOK, rec.Code)
+ }
+}
+
+func Test_Root(t *testing.T) {
+ srv := newTestServer("")
+
+ req, _ := http.NewRequest(echo.GET, "/", nil)
+ rec := httptest.NewRecorder()
+
+ srv.ServeHTTP(rec, req)
+
+ if rec.Code != http.StatusOK {
+ t.Fatalf("Test_Root expected code %v, got %v", http.StatusOK, rec.Code)
+ }
+}
+
+func Test_StartShutdown(t *testing.T) {
+ srv := newTestServer("")
+
+ go func() {
+ _ = srv.Start(":3928")
+ }()
+ assert.Nil(t, srv.Shutdown(context.Background()))
+}
diff --git a/packages/guardian-prover-health-check/metrics/metrics.go b/packages/guardian-prover-health-check/metrics/metrics.go
new file mode 100644
index 00000000000..9ca8ff7be76
--- /dev/null
+++ b/packages/guardian-prover-health-check/metrics/metrics.go
@@ -0,0 +1,34 @@
+package metrics
+
+import (
+ "context"
+ "fmt"
+
+ echoprom "github.com/labstack/echo-contrib/prometheus"
+ "github.com/labstack/echo/v4"
+ "github.com/labstack/gommon/log"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/cmd/flags"
+ "github.com/urfave/cli/v2"
+ "golang.org/x/exp/slog"
+)
+
+// Serve starts the metrics server on the given address, will be closed when the given
+// context is cancelled.
+func Serve(ctx context.Context, c *cli.Context) (*echo.Echo, func() error) {
+ // Enable metrics middleware
+ p := echoprom.NewPrometheus("echo", nil)
+ e := echo.New()
+ p.SetMetricsPath(e)
+
+ go func() {
+ <-ctx.Done()
+
+ if err := e.Shutdown(ctx); err != nil {
+ log.Error("Failed to close metrics server", "error", err)
+ }
+ }()
+
+ slog.Info("Starting metrics server", "port", c.Uint64(flags.MetricsHTTPPort.Name))
+
+ return e, func() error { return e.Start(fmt.Sprintf(":%v", c.Uint64(flags.MetricsHTTPPort.Name))) }
+}
diff --git a/packages/guardian-prover-health-check/metrics/metrics_test.go b/packages/guardian-prover-health-check/metrics/metrics_test.go
new file mode 100644
index 00000000000..5c4775e2e99
--- /dev/null
+++ b/packages/guardian-prover-health-check/metrics/metrics_test.go
@@ -0,0 +1,64 @@
+package metrics
+
+import (
+ "context"
+ "net/http"
+ "net/http/httptest"
+ "testing"
+ "time"
+
+ "github.com/labstack/echo/v4"
+ "github.com/stretchr/testify/assert"
+ "github.com/taikoxyz/taiko-mono/packages/relayer/cmd/flags"
+ "github.com/urfave/cli/v2"
+)
+
+func Test_Metrics(t *testing.T) {
+ app := cli.NewApp()
+ app.Flags = []cli.Flag{
+ flags.MetricsHTTPPort,
+ }
+
+ app.Action = func(c *cli.Context) error {
+ ctx, cancel := context.WithCancel(context.Background())
+
+ var e *echo.Echo
+
+ var startFunc func() error
+
+ var err error
+
+ go func() {
+ e, startFunc = Serve(ctx, c)
+
+ err = startFunc()
+ }()
+
+ for e == nil && err == nil {
+ time.Sleep(1 * time.Second)
+ }
+
+ assert.Nil(t, err)
+ assert.NotNil(t, e)
+
+ req, _ := http.NewRequest(echo.GET, "/metrics", nil)
+ rec := httptest.NewRecorder()
+
+ e.ServeHTTP(rec, req)
+
+ if rec.Code != http.StatusOK {
+ t.Fatalf("Test_Metrics expected code %v, got %v", http.StatusOK, rec.Code)
+ }
+
+ cancel()
+
+ assert.Nil(t, err)
+
+ return nil
+ }
+
+ assert.Nil(t, app.Run([]string{
+ "TestMetrics",
+ "-" + flags.MetricsHTTPPort.Name, "5019",
+ }))
+}
diff --git a/packages/guardian-prover-health-check/migrations/1666650599_create_health_checks_table.sql b/packages/guardian-prover-health-check/migrations/1666650599_create_health_checks_table.sql
new file mode 100644
index 00000000000..f330cf20bd6
--- /dev/null
+++ b/packages/guardian-prover-health-check/migrations/1666650599_create_health_checks_table.sql
@@ -0,0 +1,18 @@
+-- +goose Up
+-- +goose StatementBegin
+CREATE TABLE IF NOT EXISTS health_checks (
+ id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ guardian_prover_id int NOT NULL,
+ alive BOOLEAN NOT NULL DEFAULT false,
+ expected_address VARCHAR(42) NOT NULL,
+ recovered_address VARCHAR(42) NOT NULL DEFAULT "",
+ signed_response VARCHAR(5000) NOT NULL DEFAULT "",
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
+ updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+);
+
+-- +goose StatementEnd
+-- +goose Down
+-- +goose StatementBegin
+DROP TABLE health_checks;
+-- +goose StatementEnd
diff --git a/packages/guardian-prover-health-check/migrations/1666651000_create_stats_table.sql b/packages/guardian-prover-health-check/migrations/1666651000_create_stats_table.sql
new file mode 100644
index 00000000000..0812d0799c9
--- /dev/null
+++ b/packages/guardian-prover-health-check/migrations/1666651000_create_stats_table.sql
@@ -0,0 +1,19 @@
+-- +goose Up
+-- +goose StatementBegin
+CREATE TABLE IF NOT EXISTS stats (
+ id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ guardian_prover_id int NOT NULL,
+ date VARCHAR(20) NOT NULL,
+ requests int NOT NULL,
+ successful_requests int NOT NULL,
+ uptime FLOAT NOT NULL,
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
+ updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ UNIQUE key `guardian_prover_id_date` (`guardian_prover_id`, `date`)
+);
+
+-- +goose StatementEnd
+-- +goose Down
+-- +goose StatementBegin
+DROP TABLE stats;
+-- +goose StatementEnd
diff --git a/packages/guardian-prover-health-check/mock/db.go b/packages/guardian-prover-health-check/mock/db.go
new file mode 100644
index 00000000000..00d2111641a
--- /dev/null
+++ b/packages/guardian-prover-health-check/mock/db.go
@@ -0,0 +1,18 @@
+package mock
+
+import (
+ "database/sql"
+
+ "gorm.io/gorm"
+)
+
+type DB struct {
+}
+
+func (db *DB) DB() (*sql.DB, error) {
+ return &sql.DB{}, nil
+}
+
+func (db *DB) GormDB() *gorm.DB {
+ return &gorm.DB{}
+}
diff --git a/packages/guardian-prover-health-check/mock/health_check_repo.go b/packages/guardian-prover-health-check/mock/health_check_repo.go
new file mode 100644
index 00000000000..40051714329
--- /dev/null
+++ b/packages/guardian-prover-health-check/mock/health_check_repo.go
@@ -0,0 +1,50 @@
+package mock
+
+import (
+ "context"
+ "net/http"
+
+ "github.com/morkid/paginate"
+ guardianproverhealthcheck "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check"
+)
+
+type HealthCheckRepo struct {
+ healthChecks []*guardianproverhealthcheck.HealthCheck
+}
+
+func NewHealthCheckRepository() *HealthCheckRepo {
+ return &HealthCheckRepo{
+ healthChecks: make([]*guardianproverhealthcheck.HealthCheck, 0),
+ }
+}
+func (h *HealthCheckRepo) GetByGuardianProverID(
+ ctx context.Context,
+ req *http.Request,
+ id int,
+) (paginate.Page, error) {
+ return paginate.Page{
+ Items: h.healthChecks,
+ }, nil
+}
+
+func (h *HealthCheckRepo) Get(
+ ctx context.Context,
+ req *http.Request,
+) (paginate.Page, error) {
+ return paginate.Page{
+ Items: h.healthChecks,
+ }, nil
+}
+
+func (h *HealthCheckRepo) Save(opts guardianproverhealthcheck.SaveHealthCheckOpts) error {
+ h.healthChecks = append(h.healthChecks, &guardianproverhealthcheck.HealthCheck{
+ GuardianProverID: opts.GuardianProverID,
+ Alive: opts.Alive,
+ ExpectedAddress: opts.ExpectedAddress,
+ RecoveredAddress: opts.RecoveredAddress,
+ SignedResponse: opts.SignedResponse,
+ },
+ )
+
+ return nil
+}
diff --git a/packages/guardian-prover-health-check/package.json b/packages/guardian-prover-health-check/package.json
new file mode 100644
index 00000000000..6f112354b53
--- /dev/null
+++ b/packages/guardian-prover-health-check/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "@taiko/guardian-prover-health-check",
+ "version": "0.1.0",
+ "private": true
+}
diff --git a/packages/guardian-prover-health-check/prometheus.go b/packages/guardian-prover-health-check/prometheus.go
new file mode 100644
index 00000000000..b15056f252d
--- /dev/null
+++ b/packages/guardian-prover-health-check/prometheus.go
@@ -0,0 +1,13 @@
+package guardianproverhealthcheck
+
+import (
+ "github.com/prometheus/client_golang/prometheus"
+ "github.com/prometheus/client_golang/prometheus/promauto"
+)
+
+var (
+ EventsProcessed = promauto.NewCounter(prometheus.CounterOpts{
+ Name: "events_processed_ops_total",
+ Help: "The total number of processed events",
+ })
+)
diff --git a/packages/guardian-prover-health-check/repo/containers_test.go b/packages/guardian-prover-health-check/repo/containers_test.go
new file mode 100644
index 00000000000..ead1b0b685b
--- /dev/null
+++ b/packages/guardian-prover-health-check/repo/containers_test.go
@@ -0,0 +1,76 @@
+package repo
+
+import (
+ "context"
+ "fmt"
+ "testing"
+
+ "github.com/pressly/goose/v3"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/db"
+ "github.com/testcontainers/testcontainers-go"
+ "github.com/testcontainers/testcontainers-go/wait"
+ "gorm.io/driver/mysql"
+ "gorm.io/gorm"
+ "gorm.io/gorm/logger"
+)
+
+var (
+ dbName = "relayer"
+ dbUsername = "root"
+ dbPassword = "password"
+)
+
+func testMysql(t *testing.T) (DB, func(), error) {
+ req := testcontainers.ContainerRequest{
+ Image: "mysql:latest",
+ ExposedPorts: []string{"3306/tcp", "33060/tcp"},
+ Env: map[string]string{
+ "MYSQL_ROOT_PASSWORD": dbPassword,
+ "MYSQL_DATABASE": dbName,
+ },
+ WaitingFor: wait.ForLog("port: 3306 MySQL Community Server - GPL"),
+ }
+
+ ctx := context.Background()
+
+ mysqlC, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
+ ContainerRequest: req,
+ Started: true,
+ })
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ closeContainer := func() {
+ err := mysqlC.Terminate(ctx)
+ if err != nil {
+ t.Fatal(err)
+ }
+ }
+
+ host, _ := mysqlC.Host(ctx)
+ p, _ := mysqlC.MappedPort(ctx, "3306/tcp")
+ port := p.Int()
+
+ dsn := fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?tls=skip-verify&parseTime=true&multiStatements=true",
+ dbUsername, dbPassword, host, port, dbName)
+
+ gormDB, err := gorm.Open(mysql.Open(dsn), &gorm.Config{
+ Logger: logger.Default.LogMode(logger.Silent),
+ })
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if err := goose.SetDialect("mysql"); err != nil {
+ t.Fatal(err)
+ }
+
+ sqlDB, _ := gormDB.DB()
+ if err := goose.Up(sqlDB, "../migrations"); err != nil {
+ t.Fatal(err)
+ }
+
+ return db.New(gormDB), closeContainer, nil
+}
diff --git a/packages/guardian-prover-health-check/repo/db.go b/packages/guardian-prover-health-check/repo/db.go
new file mode 100644
index 00000000000..1c8a35dbca3
--- /dev/null
+++ b/packages/guardian-prover-health-check/repo/db.go
@@ -0,0 +1,17 @@
+package repo
+
+import (
+ "database/sql"
+
+ "github.com/cyberhorsey/errors"
+ "gorm.io/gorm"
+)
+
+var (
+ ErrNoDB = errors.Validation.NewWithKeyAndDetail("ERR_NO_DB", "no db")
+)
+
+type DB interface {
+ DB() (*sql.DB, error)
+ GormDB() *gorm.DB
+}
diff --git a/packages/guardian-prover-health-check/repo/healthcheck.go b/packages/guardian-prover-health-check/repo/healthcheck.go
new file mode 100644
index 00000000000..de90298557a
--- /dev/null
+++ b/packages/guardian-prover-health-check/repo/healthcheck.go
@@ -0,0 +1,74 @@
+package repo
+
+import (
+ "context"
+ "net/http"
+
+ "github.com/morkid/paginate"
+ guardianproverhealthcheck "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check"
+ "gorm.io/gorm"
+)
+
+type HealthCheckRepository struct {
+ db DB
+}
+
+func NewHealthCheckRepository(db DB) (*HealthCheckRepository, error) {
+ if db == nil {
+ return nil, ErrNoDB
+ }
+
+ return &HealthCheckRepository{
+ db: db,
+ }, nil
+}
+
+func (r *HealthCheckRepository) startQuery() *gorm.DB {
+ return r.db.GormDB().Table("health_checks")
+}
+
+func (r *HealthCheckRepository) Get(
+ ctx context.Context,
+ req *http.Request,
+) (paginate.Page, error) {
+ pg := paginate.New(&paginate.Config{
+ DefaultSize: 100,
+ })
+
+ reqCtx := pg.With(r.startQuery())
+
+ page := reqCtx.Request(req).Response(&[]guardianproverhealthcheck.HealthCheck{})
+
+ return page, nil
+}
+
+func (r *HealthCheckRepository) GetByGuardianProverID(
+ ctx context.Context,
+ req *http.Request,
+ id int,
+) (paginate.Page, error) {
+ pg := paginate.New(&paginate.Config{
+ DefaultSize: 100,
+ })
+
+ reqCtx := pg.With(r.startQuery().Where("guardian_prover_id = ?", id))
+
+ page := reqCtx.Request(req).Response(&[]guardianproverhealthcheck.HealthCheck{})
+
+ return page, nil
+}
+
+func (r *HealthCheckRepository) Save(opts guardianproverhealthcheck.SaveHealthCheckOpts) error {
+ b := &guardianproverhealthcheck.HealthCheck{
+ Alive: opts.Alive,
+ ExpectedAddress: opts.ExpectedAddress,
+ RecoveredAddress: opts.RecoveredAddress,
+ SignedResponse: opts.SignedResponse,
+ GuardianProverID: opts.GuardianProverID,
+ }
+ if err := r.startQuery().Create(b).Error; err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/packages/guardian-prover-health-check/repo/healthcheck_test.go b/packages/guardian-prover-health-check/repo/healthcheck_test.go
new file mode 100644
index 00000000000..9e98dd968bf
--- /dev/null
+++ b/packages/guardian-prover-health-check/repo/healthcheck_test.go
@@ -0,0 +1,78 @@
+package repo
+
+import (
+ "context"
+ "net/http"
+ "testing"
+
+ guardianproverhealthcheck "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check"
+ "github.com/taikoxyz/taiko-mono/packages/guardian-prover-health-check/db"
+ "gopkg.in/go-playground/assert.v1"
+)
+
+func Test_NewHealthCheckRepo(t *testing.T) {
+ tests := []struct {
+ name string
+ db DB
+ wantErr error
+ }{
+ {
+ "success",
+ &db.DB{},
+ nil,
+ },
+ {
+ "noDb",
+ nil,
+ ErrNoDB,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ _, err := NewHealthCheckRepository(tt.db)
+ assert.Equal(t, tt.wantErr, err)
+ })
+ }
+}
+
+func TestIntegration_HealthCheck_Save(t *testing.T) {
+ db, close, err := testMysql(t)
+ assert.Equal(t, nil, err)
+
+ defer close()
+
+ healthCheckRepo, err := NewHealthCheckRepository(db)
+ assert.Equal(t, nil, err)
+ tests := []struct {
+ name string
+ opts guardianproverhealthcheck.SaveHealthCheckOpts
+ wantErr error
+ }{
+ {
+ "success",
+ guardianproverhealthcheck.SaveHealthCheckOpts{
+ GuardianProverID: 1,
+ Alive: true,
+ ExpectedAddress: "0x123",
+ RecoveredAddress: "0x123",
+ SignedResponse: "0x123456",
+ },
+ nil,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ err = healthCheckRepo.Save(tt.opts)
+ assert.Equal(t, tt.wantErr, err)
+
+ req, err := http.NewRequest(http.MethodGet, "/healtcheck", nil)
+ assert.Equal(t, nil, err)
+
+ page, err := healthCheckRepo.Get(context.Background(), req)
+ assert.Equal(t, nil, err)
+ assert.Equal(t, page.Size, 1)
+ })
+ }
+}
diff --git a/packages/guardian-prover-health-check/scripts/abigen.sh b/packages/guardian-prover-health-check/scripts/abigen.sh
new file mode 100755
index 00000000000..206fba1c653
--- /dev/null
+++ b/packages/guardian-prover-health-check/scripts/abigen.sh
@@ -0,0 +1,22 @@
+#/bin/sh
+
+if [ ! -d "../protocol/out" ]; then
+ echo "ABI not generated in protocol package yet. Please run npm install && npx hardhat compile in ../protocol"
+ exit 1
+fi
+
+paths=("GuardianProver.sol")
+
+names=("GuardianProver")
+
+for (( i = 0; i < ${#paths[@]}; ++i ));
+do
+ jq .abi ../protocol/out/${paths[i]}/${names[i]}.json > ${names[i]}.json
+ lower=$(echo "${names[i]}" | tr '[:upper:]' '[:lower:]')
+ abigen --abi ${names[i]}.json \
+ --pkg $lower \
+ --type ${names[i]} \
+ --out bindings/$lower/${names[i]}.go
+done
+
+exit 0
\ No newline at end of file
diff --git a/packages/protocol/.eslintrc.js b/packages/protocol/.eslintrc.js
index 6d4c06dc472..4c6326c83b5 100644
--- a/packages/protocol/.eslintrc.js
+++ b/packages/protocol/.eslintrc.js
@@ -25,5 +25,6 @@ module.exports = {
"node/no-missing-import": "off",
"node/no-missing-require": "off",
"no-unused-expressions": "off",
+ "no-global-import": "off",
},
};
diff --git a/packages/protocol/.gitignore b/packages/protocol/.gitignore
index 968e3fd962d..a8640e16fc1 100644
--- a/packages/protocol/.gitignore
+++ b/packages/protocol/.gitignore
@@ -13,6 +13,7 @@ yarn-debug.log*
yarn-error.log*
package-lock.json
npm-debug.log*
+typechain-types
# Hardhat files
cache
@@ -29,4 +30,6 @@ broadcast
.vscode
#coverage
-lcov.info
\ No newline at end of file
+lcov.info
+
+simulation/out/
diff --git a/packages/protocol/.solhint.json b/packages/protocol/.solhint.json
index ce3716cc9d3..0a49c1fe1a0 100644
--- a/packages/protocol/.solhint.json
+++ b/packages/protocol/.solhint.json
@@ -10,6 +10,9 @@
"not-rely-on-time": "off",
"ordering": "warn",
"payable-fallback": "off",
- "no-console": "off"
+ "no-console": "off",
+ "avoid-tx-origin": "off",
+ "one-contract-per-file": "off",
+ "no-global-import": "off"
}
}
diff --git a/packages/protocol/.solhintignore b/packages/protocol/.solhintignore
index ef1c8c9a147..0ae2b08dfc4 100644
--- a/packages/protocol/.solhintignore
+++ b/packages/protocol/.solhintignore
@@ -1,7 +1,6 @@
node_modules/
lib/
contracts/test/TestLibRLPReader.sol
-contracts/test/TestLibRLPWriter.sol
**/contracts/thirdparty/**/*.sol
test/GasComparison.t.sol
test/TestLn.sol
\ No newline at end of file
diff --git a/packages/protocol/CHANGELOG.md b/packages/protocol/CHANGELOG.md
index 5130d357a04..b649df2dab4 100644
--- a/packages/protocol/CHANGELOG.md
+++ b/packages/protocol/CHANGELOG.md
@@ -49,7 +49,7 @@
* **protocol:** block reward must be minted ([#14595](https://github.com/taikoxyz/taiko-mono/issues/14595)) ([e92b1da](https://github.com/taikoxyz/taiko-mono/commit/e92b1da2ced73c2b28a825fce916acededab0a39))
* **protocol:** change transition ID from uint16 to uint32 ([#14620](https://github.com/taikoxyz/taiko-mono/issues/14620)) ([c8969b6](https://github.com/taikoxyz/taiko-mono/commit/c8969b64bbaacf9ec6d239608509424fdc02ee97))
-* **protocol:** remove proof from getInstance calculation ([#14623](https://github.com/taikoxyz/taiko-mono/issues/14623)) ([2eedc33](https://github.com/taikoxyz/taiko-mono/commit/2eedc33c213cb5d0abf9daa8bc9bd21b730ae6af))
+* **protocol:** remove proof from calcInstance calculation ([#14623](https://github.com/taikoxyz/taiko-mono/issues/14623)) ([2eedc33](https://github.com/taikoxyz/taiko-mono/commit/2eedc33c213cb5d0abf9daa8bc9bd21b730ae6af))
* **protocol:** revert impl deployment V2 ([#14621](https://github.com/taikoxyz/taiko-mono/issues/14621)) ([7e59e0b](https://github.com/taikoxyz/taiko-mono/commit/7e59e0b0077e4d81bcd5333bc6f0900e0761d6ea))
## [0.13.0](https://github.com/taikoxyz/taiko-mono/compare/protocol-v0.12.0...protocol-v0.13.0) (2023-08-15)
@@ -226,7 +226,7 @@
- **protocol:** add special logics for alpha-2 testnet ([#12987](https://github.com/taikoxyz/taiko-mono/issues/12987)) ([3b71285](https://github.com/taikoxyz/taiko-mono/commit/3b712857b5d5ede2a3683d949d1974c8cceeb69a))
- **protocol:** deploy the generated Yul plonk verifier ([#13016](https://github.com/taikoxyz/taiko-mono/issues/13016)) ([eb5d564](https://github.com/taikoxyz/taiko-mono/commit/eb5d564ec469b1ec79619b4d563c3f9989d264c2))
- **protocol:** enable two dimensional circuit/verifier lookup. ([#13066](https://github.com/taikoxyz/taiko-mono/issues/13066)) ([51d1f67](https://github.com/taikoxyz/taiko-mono/commit/51d1f67aa45fec8e2de73c1ed5a992306c6339c1))
-- **protocol:** implement `Bridge.isMessageFailed` ([#13004](https://github.com/taikoxyz/taiko-mono/issues/13004)) ([45153d9](https://github.com/taikoxyz/taiko-mono/commit/45153d92cbcd0e80438c925d5ce5c52df3abd696))
+- **protocol:** implement `Bridge.proveMessageFailed` ([#13004](https://github.com/taikoxyz/taiko-mono/issues/13004)) ([45153d9](https://github.com/taikoxyz/taiko-mono/commit/45153d92cbcd0e80438c925d5ce5c52df3abd696))
- **protocol:** implement releaseEther & releaseERC20 ([#13008](https://github.com/taikoxyz/taiko-mono/issues/13008)) ([088933e](https://github.com/taikoxyz/taiko-mono/commit/088933e74f7163459e328d61d8331235ab87e388))
- **protocol:** improve sync header storage on L2 ([#13041](https://github.com/taikoxyz/taiko-mono/issues/13041)) ([86c9fe4](https://github.com/taikoxyz/taiko-mono/commit/86c9fe44a3200490032610c017bfc88c3a57a8dd))
- **protocol:** temporarily force an `oracle prover` to be the first prover ([#13070](https://github.com/taikoxyz/taiko-mono/issues/13070)) ([d7401a2](https://github.com/taikoxyz/taiko-mono/commit/d7401a20c66a3c52330c4f92c95c71c902d74452))
@@ -242,7 +242,7 @@
### Features
-- **bridge:** add getMessageStatusSlot function ([#12940](https://github.com/taikoxyz/taiko-mono/issues/12940)) ([9837fa3](https://github.com/taikoxyz/taiko-mono/commit/9837fa3dceb5d702b2247879af52988be4da333d))
+- **bridge:** add messageStatusSlot function ([#12940](https://github.com/taikoxyz/taiko-mono/issues/12940)) ([9837fa3](https://github.com/taikoxyz/taiko-mono/commit/9837fa3dceb5d702b2247879af52988be4da333d))
- **bridge:** bridge transactions ([#411](https://github.com/taikoxyz/taiko-mono/issues/411)) ([19dd7ab](https://github.com/taikoxyz/taiko-mono/commit/19dd7abd4a2f5bc83e43d31938e43501472ff108))
- **bridge:** implement the bridge relayer ([#191](https://github.com/taikoxyz/taiko-mono/issues/191)) ([9f49e4c](https://github.com/taikoxyz/taiko-mono/commit/9f49e4c87304853c9d94693434d23a6b8258eac6))
- **deployment:** fund L1 bridge ([#400](https://github.com/taikoxyz/taiko-mono/issues/400)) ([e7ef53e](https://github.com/taikoxyz/taiko-mono/commit/e7ef53e27cb906d7128a3e512e7082e4176786e4))
diff --git a/packages/protocol/README.md b/packages/protocol/README.md
index c08f896a063..b35b54d2129 100644
--- a/packages/protocol/README.md
+++ b/packages/protocol/README.md
@@ -36,35 +36,32 @@ pnpm test:integration
## Generate L2 genesis JSON's `alloc` field
-Start by creating a `config.json`, for example:
+Start by creating a `config.js`, for example:
-```json
-{
+```javascript
+module.exports = {
// Owner address of the pre-deployed L2 contracts.
- "contractOwner": "0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39",
+ contractOwner: "0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39",
// Chain ID of the Taiko L2 network.
- "chainId": 167,
+ chainId: 167,
// Account address and pre-mint ETH amount as key-value pairs.
- "seedAccounts": [
+ seedAccounts: [
{ "0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39": 1024 },
{ "0x79fcdef22feed20eddacbb2587640e45491b757f": 1024 }
],
// L2 EIP-1559 baseFee calculation related fields.
- "param1559": {
- "yscale": "358298803609133338137582400989",
- "xscale": "1488514844",
- "gasIssuedPerSecond": "12500000",
- "gasExcess": "45450000000"
+ param1559: {
+ "gasExcess": 1
},
// Option to pre-deploy an ERC-20 token.
- "predeployERC20": true
+ predeployERC20: true
}
```
Next, run the generation script:
```sh
-pnpm compile && pnpm generate:genesis config.json
+pnpm compile && pnpm generate:genesis config.js
```
The script will output two JSON files under `./deployments`:
diff --git a/packages/protocol/contracts/4844/BlobHashReader.yulp b/packages/protocol/contracts/4844/BlobHashReader.yulp
new file mode 100644
index 00000000000..7490d5c1c8f
--- /dev/null
+++ b/packages/protocol/contracts/4844/BlobHashReader.yulp
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+// An implemenatation of IBlobHashReader
+object "BlobHashReader" {
+ code {
+ datacopy(0, dataoffset("runtime"), datasize("runtime"))
+ return(0, datasize("runtime"))
+ }
+ object "runtime" {
+ code {
+ // Match against the keccak of the ABI function signature needed.
+ switch shr(0xe0,calldataload(0))
+ // bytes4(keccak("function getFirstBlobHash()"))
+ // Returns the versioned hash for the first blob in this transaction.
+ case 0xfd122ecf {
+ // DATAHASH opcode has hex value 0x49
+ let hash := verbatim_1i_1o(hex"49", 0)
+ mstore(0, hash)
+ return(0, 32)
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/protocol/contracts/4844/IBlobHashReader.sol b/packages/protocol/contracts/4844/IBlobHashReader.sol
new file mode 100644
index 00000000000..eb88b6e1935
--- /dev/null
+++ b/packages/protocol/contracts/4844/IBlobHashReader.sol
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+/// @title IBlobHashReader
+/// @dev Labeled in AddressResolver as "blob_hash_reader"
+/// @dev This interface and its corresponding implementation may deprecate once
+/// solidity supports the new BLOBHASH opcode natively.
+interface IBlobHashReader {
+ /// @notice Returns the versioned hash for the first blob in this
+ /// transaction. If there is no blob found, 0x0 is returned.
+ function getFirstBlobHash() external view returns (bytes32);
+}
diff --git a/packages/protocol/contracts/4844/Lib4844.sol b/packages/protocol/contracts/4844/Lib4844.sol
new file mode 100644
index 00000000000..64ae752c17f
--- /dev/null
+++ b/packages/protocol/contracts/4844/Lib4844.sol
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+/// @title Lib4844
+/// @notice A library for handling EIP-4844 blobs
+/// `solc contracts/libs/Lib4844.sol --ir > contracts/libs/Lib4844.yul`
+library Lib4844 {
+ address public constant POINT_EVALUATION_PRECOMPILE_ADDRESS = address(0x0A);
+ uint32 public constant FIELD_ELEMENTS_PERBLOB = 4096;
+ uint256 public constant BLS_MODULUS =
+ 52_435_875_175_126_190_479_447_740_508_185_965_837_690_552_500_527_637_822_603_658_699_938_581_184_513;
+
+ error EVAL_FAILED();
+ error POINT_X_TOO_LARGE();
+ error POINT_Y_TOO_LARGE();
+
+ /// @notice Evaluates the 4844 point using the precompile.
+ /// @param blobHash The versioned hash
+ /// @param x The evaluation point
+ /// @param y The expected output
+ /// @param commitment The input kzg point
+ /// @param pointProof The quotient kzg
+ function evaluatePoint(
+ bytes32 blobHash,
+ uint256 x,
+ uint256 y,
+ bytes1[48] memory commitment,
+ bytes1[48] memory pointProof
+ )
+ internal
+ view
+ {
+ if (x >= BLS_MODULUS) revert POINT_X_TOO_LARGE();
+ if (y >= BLS_MODULUS) revert POINT_Y_TOO_LARGE();
+
+ (bool ok,) = POINT_EVALUATION_PRECOMPILE_ADDRESS.staticcall(
+ abi.encodePacked(blobHash, x, y, commitment, pointProof)
+ );
+ if (!ok) revert EVAL_FAILED();
+ }
+}
diff --git a/packages/protocol/contracts/L1/IProofVerifier.sol b/packages/protocol/contracts/L1/IProofVerifier.sol
deleted file mode 100644
index 0f10d7e9018..00000000000
--- a/packages/protocol/contracts/L1/IProofVerifier.sol
+++ /dev/null
@@ -1,24 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-/// @title IProofVerifier
-/// @notice Contract that is responsible for verifying proofs.
-interface IProofVerifier {
- /// @notice Verify the given proof(s) for the given blockId. This function
- /// should revert if the verification fails.
- /// @param blockId Unique identifier for the block.
- /// @param blockProofs Raw bytes representing the proof(s).
- /// @param instance Hashed evidence & config data. If set to zero, proof is
- /// assumed to be from oracle prover.
- function verifyProofs(
- uint64 blockId,
- bytes calldata blockProofs,
- bytes32 instance
- )
- external;
-}
diff --git a/packages/protocol/contracts/L1/IProver.sol b/packages/protocol/contracts/L1/IProver.sol
deleted file mode 100644
index 81ae6ed576c..00000000000
--- a/packages/protocol/contracts/L1/IProver.sol
+++ /dev/null
@@ -1,28 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { TaikoData } from "./TaikoData.sol";
-
-/// @title IProver Interface
-/// @notice Defines the function that handles prover assignment.
-interface IProver {
- /// @notice Assigns a prover to a specific block or reverts if this prover
- /// is not available.
- /// @param blockId The ID of the proposed block. Note that the ID is only
- /// known when the block is proposed, therefore, it should not be used for
- /// verifying prover authorization.
- /// @param input The block's BlockMetadataInput data.
- /// @param assignment The assignment to evaluate
- function onBlockAssigned(
- uint64 blockId,
- TaikoData.BlockMetadataInput calldata input,
- TaikoData.ProverAssignment calldata assignment
- )
- external
- payable;
-}
diff --git a/packages/protocol/contracts/L1/ProofVerifier.sol b/packages/protocol/contracts/L1/ProofVerifier.sol
deleted file mode 100644
index 22fbfa1f788..00000000000
--- a/packages/protocol/contracts/L1/ProofVerifier.sol
+++ /dev/null
@@ -1,75 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { AddressResolver } from "../common/AddressResolver.sol";
-import { EssentialContract } from "../common/EssentialContract.sol";
-import { IProofVerifier } from "./IProofVerifier.sol";
-import { LibBytesUtils } from "../thirdparty/LibBytesUtils.sol";
-import { LibZKPVerifier } from "./libs/verifiers/LibZKPVerifier.sol";
-import { Proxied } from "../common/Proxied.sol";
-
-/// @title ProofVerifier
-/// @notice See the documentation in {IProofVerifier}.
-contract ProofVerifier is EssentialContract, IProofVerifier {
- uint256[50] private __gap;
-
- error L1_INVALID_PROOF();
-
- /// @notice Initializes the contract with the provided address manager.
- /// @param _addressManager The address of the address manager contract.
- function init(address _addressManager) external initializer {
- EssentialContract._init(_addressManager);
- }
-
- /// @inheritdoc IProofVerifier
- function verifyProofs(
- // blockId is unused now, but can be used later when supporting
- // different types of proofs.
- uint64,
- bytes calldata blockProofs,
- bytes32 instance
- )
- external
- view
- {
- // If instance is zero, proof is considered as from oracle prover
- // and not checked.
- if (instance == 0) return;
-
- // Validate the instance using bytes utilities.
- if (
- !LibBytesUtils.equal(
- LibBytesUtils.slice(blockProofs, 2, 32),
- bytes.concat(bytes16(0), bytes16(instance))
- )
- ) {
- revert L1_INVALID_PROOF();
- }
-
- if (
- !LibBytesUtils.equal(
- LibBytesUtils.slice(blockProofs, 34, 32),
- bytes.concat(bytes16(0), bytes16(uint128(uint256(instance))))
- )
- ) {
- revert L1_INVALID_PROOF();
- }
-
- // Extract verifier ID from the proof.
- uint16 verifierId = uint16(bytes2(blockProofs[0:2]));
-
- // Delegate to the ZKP verifier library to validate the proof.
- LibZKPVerifier.verifyProof(
- AddressResolver(address(this)), blockProofs[2:], verifierId
- );
- }
-}
-
-/// @title ProxiedProofVerifier
-/// @notice Proxied version of the parent contract.
-contract ProxiedProofVerifier is Proxied, ProofVerifier { }
diff --git a/packages/protocol/contracts/L1/TaikoData.sol b/packages/protocol/contracts/L1/TaikoData.sol
index 629cd659fd6..5184e261a99 100644
--- a/packages/protocol/contracts/L1/TaikoData.sol
+++ b/packages/protocol/contracts/L1/TaikoData.sol
@@ -16,9 +16,7 @@ library TaikoData {
// Group 1: General configs
// ---------------------------------------------------------------------
// The chain ID of the network where Taiko contracts are deployed.
- uint256 chainId;
- // Flag indicating whether the relay signal root is enabled or not.
- bool relaySignalRoot;
+ uint64 chainId;
// ---------------------------------------------------------------------
// Group 2: Block level configs
// ---------------------------------------------------------------------
@@ -26,34 +24,21 @@ library TaikoData {
uint64 blockMaxProposals;
// Size of the block ring buffer, allowing extra space for proposals.
uint64 blockRingBufferSize;
- // The maximum number of verifications allowed per transaction in a
- // block.
- uint64 blockMaxVerificationsPerTx;
+ // The maximum number of verifications allowed when a block is proposed.
+ uint64 maxBlocksToVerifyPerProposal;
// The maximum gas limit allowed for a block.
uint32 blockMaxGasLimit;
- // The base gas for processing a block.
- uint32 blockFeeBaseGas;
// The maximum allowed bytes for the proposed transaction list calldata.
uint24 blockMaxTxListBytes;
- // The expiration time for the block transaction list.
- uint256 blockTxListExpiry;
- // Amount of token to reward to the first block propsoed in each L1
- // block.
- uint256 proposerRewardPerSecond;
- uint256 proposerRewardMax;
+ // The max period in seconds that a blob can be reused for DA.
+ uint24 blobExpiry;
+ // True if EIP-4844 is enabled for DA
+ bool blobAllowedForDA;
// ---------------------------------------------------------------------
// Group 3: Proof related configs
// ---------------------------------------------------------------------
- // The cooldown period for regular proofs (in minutes).
- uint256 proofRegularCooldown;
- // The cooldown period for oracle proofs (in minutes).
- uint256 proofOracleCooldown;
- // The maximum time window allowed for a proof submission (in minutes).
- uint16 proofWindow;
- // The amount of Taiko token as a bond
- uint96 proofBond;
- // True to skip proof verification
- bool skipProverAssignmentVerificaiton;
+ // The amount of Taiko token as a prover liveness bond
+ uint96 livenessBond;
// ---------------------------------------------------------------------
// Group 4: ETH deposit related configs
// ---------------------------------------------------------------------
@@ -73,91 +58,93 @@ library TaikoData {
uint256 ethDepositMaxFee;
}
- /// @dev Struct holding state variables.
- struct StateVariables {
- uint64 genesisHeight;
- uint64 genesisTimestamp;
- uint64 numBlocks;
- uint64 lastVerifiedBlockId;
- uint64 nextEthDepositToProcess;
- uint64 numEthDeposits;
+ /// @dev Struct representing prover assignment
+ struct TierFee {
+ uint16 tier;
+ uint128 fee;
}
- /// @dev Struct representing input data for block metadata.
- struct BlockMetadataInput {
- bytes32 txListHash;
- address proposer;
- uint24 txListByteStart; // byte-wise start index (inclusive)
- uint24 txListByteEnd; // byte-wise end index (exclusive)
- bool cacheTxListInfo;
+ struct TierProof {
+ uint16 tier;
+ bytes data;
}
- /// @dev Struct representing prover assignment
- struct ProverAssignment {
- address prover;
- uint64 expiry;
+ struct HookCall {
+ address hook;
bytes data;
}
+ struct BlockParams {
+ address assignedProver;
+ bytes32 extraData;
+ bytes32 blobHash;
+ uint24 txListByteOffset;
+ uint24 txListByteSize;
+ bool cacheBlobForReuse;
+ bytes32 parentMetaHash;
+ HookCall[] hookCalls;
+ }
+
/// @dev Struct containing data only required for proving a block
- /// Warning: changing this struct requires changing {LibUtils.hashMetadata}
- /// accordingly.
+ /// Note: On L2, `block.difficulty` is the pseudo name of
+ /// `block.prevrandao`, which returns a random number provided by the layer
+ /// 1 chain.
struct BlockMetadata {
+ bytes32 l1Hash; // slot 1
+ bytes32 difficulty; // slot 2
+ bytes32 blobHash; //or txListHash (if Blob not yet supported), // slot 3
+ bytes32 extraData; // slot 4
+ bytes32 depositsHash; // slot 5
+ address coinbase; // L2 coinbase, // slot 6
uint64 id;
- uint64 timestamp;
- uint64 l1Height;
- bytes32 l1Hash;
- bytes32 mixHash;
- bytes32 txListHash;
- uint24 txListByteStart;
- uint24 txListByteEnd;
uint32 gasLimit;
- address proposer;
- TaikoData.EthDeposit[] depositsProcessed;
+ uint64 timestamp; // slot 7
+ uint64 l1Height;
+ uint24 txListByteOffset;
+ uint24 txListByteSize;
+ uint16 minTier;
+ bool blobUsed;
+ bytes32 parentMetaHash; // slot 8
}
- /// @dev Struct representing block evidence.
- struct BlockEvidence {
- bytes32 metaHash;
+ /// @dev Struct representing transition to be proven.
+ struct Transition {
bytes32 parentHash;
bytes32 blockHash;
bytes32 signalRoot;
bytes32 graffiti;
- address prover;
- bytes proofs;
}
/// @dev Struct representing state transition data.
- /// 10 slots reserved for upgradability, 4 slots used.
- struct Transition {
- bytes32 key; //only written/read for the 1st state transition.
- bytes32 blockHash;
- bytes32 signalRoot;
- address prover;
- uint64 provenAt;
- bytes32[6] __reserved;
+ /// 10 slots reserved for upgradability, 6 slots used.
+ struct TransitionState {
+ bytes32 key; // slot 1, only written/read for the 1st state transition.
+ bytes32 blockHash; // slot 2
+ bytes32 signalRoot; // slot 3
+ address prover; // slot 4
+ uint96 validityBond;
+ address contester; // slot 5
+ uint96 contestBond;
+ uint64 timestamp; // slot 6 (90 bits)
+ uint16 tier;
+ uint8 contestations;
+ bytes32[4] __reserved;
}
/// @dev Struct containing data required for verifying a block.
/// 10 slots reserved for upgradability, 3 slots used.
struct Block {
bytes32 metaHash; // slot 1
- address prover; // slot 2
- uint96 proofBond;
+ address assignedProver; // slot 2
+ uint96 livenessBond;
uint64 blockId; // slot 3
- uint64 proposedAt;
+ uint64 proposedAt; // timestamp
+ uint64 proposedIn; // L1 block number
uint32 nextTransitionId;
uint32 verifiedTransitionId;
bytes32[7] __reserved;
}
- /// @dev Struct representing information about a transaction list.
- /// 1 slot used.
- struct TxListInfo {
- uint64 validSince;
- uint24 size;
- }
-
/// @dev Struct representing an Ethereum deposit.
/// 1 slot used.
struct EthDeposit {
@@ -180,9 +167,8 @@ library TaikoData {
struct SlotB {
uint64 numBlocks;
- uint64 nextEthDepositToProcess;
- uint64 lastVerifiedAt;
uint64 lastVerifiedBlockId;
+ bool provingPaused;
}
/// @dev Struct holding the state variables for the {TaikoL1} contract.
@@ -190,23 +176,18 @@ library TaikoData {
// Ring buffer for proposed blocks and a some recent verified blocks.
mapping(uint64 blockId_mod_blockRingBufferSize => Block) blocks;
// Indexing to transition ids (ring buffer not possible)
- mapping(
- uint64 blockId => mapping(bytes32 parentHash => uint32 transitionId)
- ) transitionIds;
+ mapping(uint64 blockId => mapping(bytes32 parentHash => uint32 transitionId)) transitionIds;
// Ring buffer for transitions
mapping(
uint64 blockId_mod_blockRingBufferSize
- => mapping(uint32 transitionId => Transition)
+ => mapping(uint32 transitionId => TransitionState)
) transitions;
- // txList cached info
- mapping(bytes32 txListHash => TxListInfo) txListInfo;
// Ring buffer for Ether deposits
- mapping(uint256 depositId_mod_ethDepositRingBufferSize => uint256)
- ethDeposits;
- // In-protocol Taiko token balances
- mapping(address account => uint256 balance) taikoTokenBalances;
- SlotA slotA; // slot 7
- SlotB slotB; // slot 8
- uint256[142] __gap;
+ mapping(uint256 depositId_mod_ethDepositRingBufferSize => uint256) ethDeposits;
+ // Reusable blobs
+ mapping(bytes32 blobHash => uint256 since) reusableBlobs;
+ SlotA slotA; // slot 6
+ SlotB slotB; // slot 7
+ uint256[143] __gap;
}
}
diff --git a/packages/protocol/contracts/L1/TaikoErrors.sol b/packages/protocol/contracts/L1/TaikoErrors.sol
index 6ce519ad20c..639176287e7 100644
--- a/packages/protocol/contracts/L1/TaikoErrors.sol
+++ b/packages/protocol/contracts/L1/TaikoErrors.sol
@@ -13,29 +13,38 @@ pragma solidity ^0.8.20;
abstract contract TaikoErrors {
// NOTE: The following custom errors must match the definitions in
// `L1/libs/*.sol`.
- error L1_ALREADY_PROVEN();
- error L1_BLOCK_ID_MISMATCH();
- error L1_EVIDENCE_MISMATCH();
+ error L1_ALREADY_CONTESTED();
+ error L1_ALREADY_PROVED();
+ error L1_ASSIGNED_PROVER_NOT_ALLOWED();
+ error L1_BLOB_FOR_DA_DISABLED();
+ error L1_BLOB_NOT_FOUND();
+ error L1_BLOB_NOT_REUSEABLE();
+ error L1_BLOCK_MISMATCH();
error L1_INSUFFICIENT_TOKEN();
- error L1_INVALID_ASSIGNMENT();
+ error L1_INVALID_ADDRESS();
+ error L1_INVALID_AMOUNT();
error L1_INVALID_BLOCK_ID();
error L1_INVALID_CONFIG();
error L1_INVALID_ETH_DEPOSIT();
- error L1_INVALID_EVIDENCE();
- error L1_INVALID_METADATA();
- error L1_INVALID_ORACLE_PROVER();
error L1_INVALID_PARAM();
+ error L1_INVALID_PAUSE_STATUS();
error L1_INVALID_PROOF();
- error L1_INVALID_PROPOSER();
error L1_INVALID_PROVER();
- error L1_INVALID_PROVER_SIG();
- error L1_NOT_PROVEABLE();
- error L1_SAME_PROOF();
+ error L1_INVALID_TIER();
+ error L1_INVALID_TRANSITION();
+ error L1_LIVENESS_BOND_NOT_RECEIVED();
+ error L1_NOT_ASSIGNED_PROVER();
+ error L1_PROPOSER_NOT_EOA();
+ error L1_PROVING_PAUSED();
+ error L1_RECEIVE_DISABLED();
error L1_TOO_MANY_BLOCKS();
+ error L1_TOO_MANY_TIERS();
+ error L1_TRANSITION_ID_ZERO();
error L1_TRANSITION_NOT_FOUND();
- error L1_TX_LIST_NOT_EXIST();
- error L1_TX_LIST_HASH();
- error L1_TX_LIST_RANGE();
- error L1_TX_LIST();
+ error L1_TXLIST_OFFSET_SIZE();
+ error L1_TXLIST_TOO_LARGE();
+ error L1_UNAUTHORIZED();
+ error L1_UNEXPECTED_PARENT();
error L1_UNEXPECTED_TRANSITION_ID();
+ error L1_UNEXPECTED_TRANSITION_TIER();
}
diff --git a/packages/protocol/contracts/L1/TaikoEvents.sol b/packages/protocol/contracts/L1/TaikoEvents.sol
index 4fdc049e9f0..bad23df0b40 100644
--- a/packages/protocol/contracts/L1/TaikoEvents.sol
+++ b/packages/protocol/contracts/L1/TaikoEvents.sol
@@ -6,7 +6,7 @@
pragma solidity ^0.8.20;
-import { TaikoData } from "./TaikoData.sol";
+import "./TaikoData.sol";
/// @title TaikoEvents
/// @notice This abstract contract provides event declarations for the Taiko
@@ -17,50 +17,77 @@ import { TaikoData } from "./TaikoData.sol";
abstract contract TaikoEvents {
/// @dev Emitted when a block is proposed.
/// @param blockId The ID of the proposed block.
- /// @param prover The address of the assigned prover for the block.
- /// @param reward The proposer's block reward in Taiko token.
+ /// @param assignedProver The block's assigned prover.
+ /// @param livenessBond The bond in Taiko token from the assigned prover.
/// @param meta The block metadata containing information about the proposed
/// block.
+ /// @param depositsProcessed Ether deposits processed.
event BlockProposed(
uint256 indexed blockId,
- address indexed prover,
- uint256 reward,
- TaikoData.BlockMetadata meta
+ address indexed assignedProver,
+ uint96 livenessBond,
+ TaikoData.BlockMetadata meta,
+ TaikoData.EthDeposit[] depositsProcessed
);
-
- /// @dev Emitted when a block is proven.
- /// @param blockId The ID of the proven block.
- /// @param parentHash The hash of the parent block.
- /// @param blockHash The hash of the proven block.
- /// @param signalRoot The signal root of the proven block.
- /// @param prover The address of the prover who submitted the proof.
- event BlockProven(
+ /// @dev Emitted when a block is verified.
+ /// @param blockId The ID of the verified block.
+ /// @param assignedProver The block's assigned prover.
+ /// @param prover The prover whose transition is used for verifing the
+ /// block.
+ /// @param blockHash The hash of the verified block.
+ /// @param signalRoot The latest value of the signal service storage.
+ /// @param tier The tier ID of the proof.
+ /// @param contestations Number of total contestations.
+ event BlockVerified(
uint256 indexed blockId,
- bytes32 parentHash,
+ address indexed assignedProver,
+ address indexed prover,
bytes32 blockHash,
bytes32 signalRoot,
- address prover
+ uint16 tier,
+ uint8 contestations
);
- /// @dev Emitted when a block is verified.
- /// @param blockId The ID of the verified block.
- /// @param prover The address of the prover that proved the block which is
- /// verified.
- /// @param blockHash The hash of the verified block.
- event BlockVerified(
- uint256 indexed blockId, address indexed prover, bytes32 blockHash
+ /// @dev Emitted when a block transition is proved or re-proved.
+ event TransitionProved(
+ uint256 indexed blockId,
+ TaikoData.Transition tran,
+ address prover,
+ uint96 validityBond,
+ uint16 tier
+ );
+
+ /// @dev Emitted when a block transition is contested.
+ event TransitionContested(
+ uint256 indexed blockId,
+ TaikoData.Transition tran,
+ address contester,
+ uint96 contestBond,
+ uint16 tier
);
+ /// @dev Emitted when a blob is cached for reuse.
+ event BlobCached(bytes32 blobHash);
+
+ /// @dev Emitted when proving has been paused
+ event ProvingPaused(bool paused);
+
/// @dev Emitted when an Ethereum deposit is made.
/// @param deposit The Ethereum deposit information including recipient,
/// amount, and ID.
event EthDeposited(TaikoData.EthDeposit deposit);
- /// @dev The following events are emitted when bonds are received, returned,
- /// or rewarded. Note that no event is emitted when a bond is kept/burnt as
- /// for a single block, multiple bonds may get burned or retained by the
- /// protocol, emitting events will consume more gas.
- event BondReceived(address indexed from, uint64 blockId, uint256 bond);
- event BondReturned(address indexed to, uint64 blockId, uint256 bond);
- event BondRewarded(address indexed to, uint64 blockId, uint256 bond);
+ /// @dev Emitted when a user deposited Taiko token into this contract.
+ event TokenDeposited(uint256 amount);
+
+ /// @dev Emitted when a user withdrawed Taiko token from this contract.
+ event TokenWithdrawn(uint256 amount);
+
+ /// @dev Emitted when Taiko token are credited to the user's in-protocol
+ /// balance.
+ event TokenCredited(address to, uint256 amount);
+
+ /// @dev Emitted when Taiko token are debited from the user's in-protocol
+ /// balance.
+ event TokenDebited(address from, uint256 amount);
}
diff --git a/packages/protocol/contracts/L1/TaikoL1.sol b/packages/protocol/contracts/L1/TaikoL1.sol
index 6de751ca126..9358ff93e95 100644
--- a/packages/protocol/contracts/L1/TaikoL1.sol
+++ b/packages/protocol/contracts/L1/TaikoL1.sol
@@ -6,37 +6,222 @@
pragma solidity ^0.8.20;
-import { Proxied } from "../common/Proxied.sol";
-import { TaikoData } from "./TaikoData.sol";
-import { TaikoL1Base } from "./TaikoL1Base.sol";
+import "../common/EssentialContract.sol";
+import "./libs/LibDepositing.sol";
+import "./libs/LibProposing.sol";
+import "./libs/LibProving.sol";
+import "./libs/LibVerifying.sol";
+import "./TaikoErrors.sol";
+import "./TaikoEvents.sol";
-contract TaikoL1 is TaikoL1Base {
- function getConfig()
+/// @title TaikoL1
+/// @dev Labeled in AddressResolver as "taiko"
+/// @notice This contract serves as the "base layer contract" of the Taiko
+/// protocol, providing functionalities for proposing, proving, and verifying
+/// blocks. The term "base layer contract" means that although this is usually
+/// deployed on L1, it can also be deployed on L2s to create L3s ("inception
+/// layers"). The contract also handles the deposit and withdrawal of Taiko
+/// tokens and Ether.
+/// This contract doesn't hold any Ether. Ether deposited to L2 are held by the Bridge contract.
+contract TaikoL1 is EssentialContract, ICrossChainSync, ITierProvider, TaikoEvents, TaikoErrors {
+ TaikoData.State public state;
+ uint256[100] private __gap;
+
+ /// @dev Fallback function to receive Ether from Hooks
+ receive() external payable {
+ if (!_inNonReentrant()) revert L1_RECEIVE_DISABLED();
+ }
+
+ /// @notice Initializes the rollup.
+ /// @param _addressManager The {AddressManager} address.
+ /// @param _genesisBlockHash The block hash of the genesis block.
+ function init(address _addressManager, bytes32 _genesisBlockHash) external initializer {
+ __Essential_init(_addressManager);
+ LibVerifying.init(state, getConfig(), _genesisBlockHash);
+ }
+
+ /// @notice Proposes a Taiko L2 block.
+ /// @param params Block parameters, currently an encoded BlockParams object.
+ /// @param txList txList data if calldata is used for DA.
+ /// @return meta The metadata of the proposed L2 block.
+ /// @return depositsProcessed The Ether deposits processed.
+ function proposeBlock(
+ bytes calldata params,
+ bytes calldata txList
+ )
+ external
+ payable
+ nonReentrant
+ whenNotPaused
+ returns (
+ TaikoData.BlockMetadata memory meta,
+ TaikoData.EthDeposit[] memory depositsProcessed
+ )
+ {
+ TaikoData.Config memory config = getConfig();
+
+ (meta, depositsProcessed) =
+ LibProposing.proposeBlock(state, config, AddressResolver(this), params, txList);
+
+ if (!state.slotB.provingPaused && config.maxBlocksToVerifyPerProposal > 0) {
+ LibVerifying.verifyBlocks(
+ state, config, AddressResolver(this), config.maxBlocksToVerifyPerProposal
+ );
+ }
+ }
+
+ /// @notice Proves or contests a block transition.
+ /// @param blockId The index of the block to prove. This is also used to
+ /// select the right implementation version.
+ /// @param input An abi-encoded (BlockMetadata, Transition, TierProof)
+ /// tuple.
+ function proveBlock(uint64 blockId, bytes calldata input) external nonReentrant whenNotPaused {
+ if (state.slotB.provingPaused) revert L1_PROVING_PAUSED();
+
+ (
+ TaikoData.BlockMetadata memory meta,
+ TaikoData.Transition memory tran,
+ TaikoData.TierProof memory proof
+ ) = abi.decode(input, (TaikoData.BlockMetadata, TaikoData.Transition, TaikoData.TierProof));
+
+ if (blockId != meta.id) revert L1_INVALID_BLOCK_ID();
+
+ TaikoData.Config memory config = getConfig();
+
+ uint8 maxBlocksToVerify =
+ LibProving.proveBlock(state, config, AddressResolver(this), meta, tran, proof);
+
+ if (maxBlocksToVerify > 0) {
+ LibVerifying.verifyBlocks(state, config, AddressResolver(this), maxBlocksToVerify);
+ }
+ }
+
+ /// @notice Verifies up to N blocks.
+ /// @param maxBlocksToVerify Max number of blocks to verify.
+ function verifyBlocks(uint64 maxBlocksToVerify) external nonReentrant whenNotPaused {
+ if (maxBlocksToVerify == 0) revert L1_INVALID_PARAM();
+ if (state.slotB.provingPaused) revert L1_PROVING_PAUSED();
+
+ LibVerifying.verifyBlocks(state, getConfig(), AddressResolver(this), maxBlocksToVerify);
+ }
+
+ /// @notice Pause block proving.
+ /// @param pause True if paused.
+ function pauseProving(bool pause) external onlyOwner {
+ LibProving.pauseProving(state, pause);
+ }
+
+ /// @notice Deposits Ether to Layer 2.
+ /// @param recipient Address of the recipient for the deposited Ether on
+ /// Layer 2.
+ function depositEtherToL2(address recipient) external payable whenNotPaused {
+ LibDepositing.depositEtherToL2(state, getConfig(), AddressResolver(this), recipient);
+ }
+
+ /// @notice Checks if Ether deposit is allowed for Layer 2.
+ /// @param amount Amount of Ether to be deposited.
+ /// @return true if Ether deposit is allowed, false otherwise.
+ function canDepositEthToL2(uint256 amount) public view returns (bool) {
+ return LibDepositing.canDepositEthToL2(state, getConfig(), amount);
+ }
+
+ function isBlobReusable(bytes32 blobHash) public view returns (bool) {
+ return LibProposing.isBlobReusable(state, getConfig(), blobHash);
+ }
+
+ /// @notice Gets the details of a block.
+ /// @param blockId Index of the block.
+ /// @return blk The block.
+ function getBlock(uint64 blockId) public view returns (TaikoData.Block memory blk) {
+ return LibUtils.getBlock(state, getConfig(), blockId);
+ }
+
+ /// @notice Gets the state transition for a specific block.
+ /// @param blockId Index of the block.
+ /// @param parentHash Parent hash of the block.
+ /// @return The state transition data of the block.
+ function getTransition(
+ uint64 blockId,
+ bytes32 parentHash
+ )
+ public
+ view
+ returns (TaikoData.TransitionState memory)
+ {
+ return LibUtils.getTransition(state, getConfig(), blockId, parentHash);
+ }
+
+ /// @inheritdoc ICrossChainSync
+ function getSyncedSnippet(uint64 blockId)
public
- pure
+ view
+ override
+ returns (ICrossChainSync.Snippet memory)
+ {
+ return LibUtils.getSyncedSnippet(state, getConfig(), blockId);
+ }
+
+ /// @notice Gets the state variables of the TaikoL1 contract.
+ function getStateVariables()
+ public
+ view
+ returns (TaikoData.SlotA memory a, TaikoData.SlotB memory b)
+ {
+ a = state.slotA;
+ b = state.slotB;
+ }
+
+ /// @notice Retrieves the configuration for a specified tier.
+ /// @param tierId ID of the tier.
+ /// @return Tier struct containing the tier's parameters. This
+ /// function will revert if the tier is not supported.
+ function getTier(uint16 tierId)
+ public
+ view
virtual
override
- returns (TaikoData.Config memory)
+ returns (ITierProvider.Tier memory)
{
+ return ITierProvider(resolve("tier_provider", false)).getTier(tierId);
+ }
+
+ /// @notice Retrieves the IDs of all supported tiers.
+ function getTierIds() public view virtual override returns (uint16[] memory ids) {
+ ids = ITierProvider(resolve("tier_provider", false)).getTierIds();
+ if (ids.length >= type(uint8).max) revert L1_TOO_MANY_TIERS();
+ }
+
+ /// @notice Determines the minimal tier for a block based on a random input.
+ function getMinTier(uint256 rand) public view virtual override returns (uint16) {
+ return ITierProvider(resolve("tier_provider", false)).getMinTier(rand);
+ }
+
+ /// @notice Gets the configuration of the TaikoL1 contract.
+ /// @return Config struct containing configuration parameters.
+ function getConfig() public view virtual returns (TaikoData.Config memory) {
+ // All hard-coded configurations:
+ // - treasury: 0xdf09A0afD09a63fb04ab3573922437e1e637dE8b
+ // - blockMaxTxs: 150 (limited by the PSE zkEVM circuits)
+ // - anchorGasLimit: 250_000 (based on internal devnet, its ~220_000
+ // after 256 L2 blocks)
return TaikoData.Config({
- chainId: 167_007,
- relaySignalRoot: false,
- blockMaxProposals: 403_200,
- blockRingBufferSize: 403_210,
- // This number is calculated from blockMaxProposals to make the
- // maximum value of the multiplier close to 20.0
- blockMaxVerificationsPerTx: 10,
- blockMaxGasLimit: 8_000_000,
- blockFeeBaseGas: 20_000,
+ chainId: 167_008,
+ // Assume the block time is 3s, the protocol will allow ~1 month of
+ // new blocks without any verification.
+ blockMaxProposals: 864_000,
+ blockRingBufferSize: 864_100,
+ // Can be overridden by the tier config.
+ maxBlocksToVerifyPerProposal: 10,
+ // Limited by the PSE zkEVM circuits.
+ blockMaxGasLimit: 15_000_000,
+ // Each go-ethereum transaction has a size limit of 128KB,
+ // and right now txList is still saved in calldata, so we set it
+ // to 120KB.
blockMaxTxListBytes: 120_000,
- blockTxListExpiry: 0,
- proposerRewardPerSecond: 25e16, // 0.25 Taiko token
- proposerRewardMax: 32e18, // 32 Taiko token
- proofRegularCooldown: 30 minutes,
- proofOracleCooldown: 15 minutes,
- proofWindow: 90 minutes,
- proofBond: 1024e18,
- skipProverAssignmentVerificaiton: false,
+ blobExpiry: 24 hours,
+ blobAllowedForDA: false,
+ livenessBond: 250e18, // 250 Taiko token
+ // ETH deposit related.
ethDepositRingBufferSize: 1024,
ethDepositMinCountPerBlock: 8,
ethDepositMaxCountPerBlock: 32,
@@ -46,8 +231,8 @@ contract TaikoL1 is TaikoL1Base {
ethDepositMaxFee: 1 ether / 10
});
}
-}
-/// @title TaikoL1
-/// @notice Proxied version of the parent contract.
-contract ProxiedTaikoL1 is Proxied, TaikoL1 { }
+ function isConfigValid() public view returns (bool) {
+ return LibVerifying.isConfigValid(getConfig());
+ }
+}
diff --git a/packages/protocol/contracts/L1/TaikoL1Base.sol b/packages/protocol/contracts/L1/TaikoL1Base.sol
deleted file mode 100644
index 612066ab5c1..00000000000
--- a/packages/protocol/contracts/L1/TaikoL1Base.sol
+++ /dev/null
@@ -1,265 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { AddressResolver } from "../common/AddressResolver.sol";
-import { EssentialContract } from "../common/EssentialContract.sol";
-import { ICrossChainSync } from "../common/ICrossChainSync.sol";
-import { LibDepositing } from "./libs/LibDepositing.sol";
-import { LibProposing } from "./libs/LibProposing.sol";
-import { LibProving } from "./libs/LibProving.sol";
-import { LibTaikoToken } from "./libs/LibTaikoToken.sol";
-import { LibUtils } from "./libs/LibUtils.sol";
-import { LibVerifying } from "./libs/LibVerifying.sol";
-import { TaikoData } from "./TaikoData.sol";
-import { TaikoErrors } from "./TaikoErrors.sol";
-import { TaikoEvents } from "./TaikoEvents.sol";
-
-/// @title TaikoL1Base
-/// @notice This contract serves as the "base layer contract" of the Taiko
-/// protocol, providing functionalities for proposing, proving, and verifying
-/// blocks. The term "base layer contract" means that although this is usually
-/// deployed on L1, it can also be deployed on L2s to create L3s ("inception
-/// layers"). The contract also handles the deposit and withdrawal of Taiko
-/// tokens and Ether.
-abstract contract TaikoL1Base is
- EssentialContract,
- ICrossChainSync,
- TaikoEvents,
- TaikoErrors
-{
- using LibUtils for TaikoData.State;
-
- TaikoData.State public state;
- uint256[100] private __gap;
-
- /// @dev Fallback function to receive Ether and deposit to to Layer 2.
- receive() external payable {
- depositEtherToL2(address(0));
- }
-
- /// @notice Initializes the rollup.
- /// @param _addressManager The {AddressManager} address.
- /// @param _genesisBlockHash The block hash of the genesis block.
- function init(
- address _addressManager,
- bytes32 _genesisBlockHash
- )
- external
- initializer
- {
- EssentialContract._init(_addressManager);
- LibVerifying.init({
- state: state,
- config: getConfig(),
- genesisBlockHash: _genesisBlockHash
- });
- }
-
- /// @notice Proposes a Taiko L2 block.
- /// @param input An abi-encoded BlockMetadataInput that the actual L2 block
- /// header must satisfy.
- /// @param assignment Data to assign a prover.
- /// @param txList A list of transactions in this block, encoded with RLP.
- /// Note, in the corresponding L2 block an "anchor transaction" will be the
- /// first transaction in the block. If there are `n` transactions in the
- /// `txList`, then there will be up to `n + 1` transactions in the L2 block.
- /// @return meta The metadata of the proposed L2 block.
- function proposeBlock(
- bytes calldata input,
- bytes calldata assignment,
- bytes calldata txList
- )
- external
- payable
- nonReentrant
- returns (TaikoData.BlockMetadata memory meta)
- {
- TaikoData.Config memory config = getConfig();
- meta = LibProposing.proposeBlock({
- state: state,
- config: config,
- resolver: AddressResolver(this),
- input: abi.decode(input, (TaikoData.BlockMetadataInput)),
- assignment: abi.decode(assignment, (TaikoData.ProverAssignment)),
- txList: txList
- });
- if (config.blockMaxVerificationsPerTx > 0) {
- LibVerifying.verifyBlocks({
- state: state,
- config: config,
- resolver: AddressResolver(this),
- maxBlocks: config.blockMaxVerificationsPerTx
- });
- }
- }
-
- /// @notice Proves a block with a zero-knowledge proof.
- /// @param blockId The index of the block to prove. This is also used to
- /// select the right implementation version.
- /// @param input An abi-encoded {TaikoData.BlockEvidence} object.
- function proveBlock(
- uint64 blockId,
- bytes calldata input
- )
- external
- nonReentrant
- {
- TaikoData.Config memory config = getConfig();
- LibProving.proveBlock({
- state: state,
- config: config,
- resolver: AddressResolver(this),
- blockId: blockId,
- evidence: abi.decode(input, (TaikoData.BlockEvidence))
- });
- if (config.blockMaxVerificationsPerTx > 0) {
- LibVerifying.verifyBlocks({
- state: state,
- config: config,
- resolver: AddressResolver(this),
- maxBlocks: config.blockMaxVerificationsPerTx
- });
- }
- }
-
- /// @notice Verifies up to N blocks.
- /// @param maxBlocks Max number of blocks to verify.
- function verifyBlocks(uint64 maxBlocks) external nonReentrant {
- if (maxBlocks == 0) revert L1_INVALID_PARAM();
- LibVerifying.verifyBlocks({
- state: state,
- config: getConfig(),
- resolver: AddressResolver(this),
- maxBlocks: maxBlocks
- });
- }
-
- /// @notice Deposits Taiko tokens to the contract.
- /// @param amount Amount of Taiko tokens to deposit.
- function depositTaikoToken(uint256 amount) external nonReentrant {
- LibTaikoToken.depositTaikoToken(state, AddressResolver(this), amount);
- }
-
- /// @notice Withdraws Taiko tokens from the contract.
- /// @param amount Amount of Taiko tokens to withdraw.
- function withdrawTaikoToken(uint256 amount) external nonReentrant {
- LibTaikoToken.withdrawTaikoToken(state, AddressResolver(this), amount);
- }
-
- /// @notice Deposits Ether to Layer 2.
- /// @param recipient Address of the recipient for the deposited Ether on
- /// Layer 2.
- function depositEtherToL2(address recipient) public payable {
- LibDepositing.depositEtherToL2({
- state: state,
- config: getConfig(),
- resolver: AddressResolver(this),
- recipient: recipient
- });
- }
-
- /// @notice Gets the Taiko token balance for a specific address.
- /// @param addr Address to check the Taiko token balance.
- /// @return The Taiko token balance of the address.
- function getTaikoTokenBalance(address addr) public view returns (uint256) {
- return state.taikoTokenBalances[addr];
- }
-
- /// @notice Checks if Ether deposit is allowed for Layer 2.
- /// @param amount Amount of Ether to be deposited.
- /// @return true if Ether deposit is allowed, false otherwise.
- function canDepositEthToL2(uint256 amount) public view returns (bool) {
- return LibDepositing.canDepositEthToL2({
- state: state,
- config: getConfig(),
- amount: amount
- });
- }
-
- /// @notice Gets the details of a block.
- /// @param blockId Index of the block.
- /// @return blk The block.
- function getBlock(uint64 blockId)
- public
- view
- returns (TaikoData.Block memory blk)
- {
- return LibProposing.getBlock({
- state: state,
- config: getConfig(),
- blockId: blockId
- });
- }
-
- /// @notice Gets the state transition for a specific block.
- /// @param blockId Index of the block.
- /// @param parentHash Parent hash of the block.
- /// @return The state transition data of the block.
- function getTransition(
- uint64 blockId,
- bytes32 parentHash
- )
- public
- view
- returns (TaikoData.Transition memory)
- {
- return LibProving.getTransition({
- state: state,
- config: getConfig(),
- blockId: blockId,
- parentHash: parentHash
- });
- }
-
- /// @inheritdoc ICrossChainSync
- function getCrossChainBlockHash(uint64 blockId)
- public
- view
- override
- returns (bytes32)
- {
- return LibUtils.getVerifyingTransition(state, getConfig(), blockId)
- .blockHash;
- }
-
- /// @inheritdoc ICrossChainSync
- function getCrossChainSignalRoot(uint64 blockId)
- public
- view
- override
- returns (bytes32)
- {
- return LibUtils.getVerifyingTransition(state, getConfig(), blockId)
- .signalRoot;
- }
-
- /// @notice Gets the state variables of the TaikoL1 contract.
- /// @return StateVariables struct containing state variables.
- function getStateVariables()
- public
- view
- returns (TaikoData.StateVariables memory)
- {
- return state.getStateVariables();
- }
-
- /// @notice Gets the name of the proof verifier by ID.
- /// @param id ID of the verifier.
- /// @return Verifier name.
- function getVerifierName(uint16 id) public pure returns (bytes32) {
- return LibUtils.getVerifierName(id);
- }
-
- /// @notice Gets the configuration of the TaikoL1 contract.
- /// @return Config struct containing configuration parameters.
- function getConfig()
- public
- pure
- virtual
- returns (TaikoData.Config memory);
-}
diff --git a/packages/protocol/contracts/L1/TaikoToken.sol b/packages/protocol/contracts/L1/TaikoToken.sol
index c2402bada03..c2b4de3891e 100644
--- a/packages/protocol/contracts/L1/TaikoToken.sol
+++ b/packages/protocol/contracts/L1/TaikoToken.sol
@@ -6,128 +6,69 @@
pragma solidity ^0.8.20;
-import { ERC20BurnableUpgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";
-import { ERC20PermitUpgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol";
-import { ERC20SnapshotUpgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol";
-import {
- ERC20Upgradeable,
- IERC20Upgradeable
-} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
-import { ERC20VotesUpgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";
-import { EssentialContract } from "../common/EssentialContract.sol";
-import { IMintableERC20 } from "../common/IMintableERC20.sol";
-import { PausableUpgradeable } from
- "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
-import { Proxied } from "../common/Proxied.sol";
+import "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol";
+import
+ "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20SnapshotUpgradeable.sol";
+import
+ "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol";
+import "../common/EssentialContract.sol";
/// @title TaikoToken
+/// @dev Labeled in AddressResolver as "taiko_token"
/// @notice The TaikoToken (TKO), in the protocol is used for prover collateral
/// in the form of bonds. It is an ERC20 token with 18 decimal places of
/// precision.
-contract TaikoToken is
- EssentialContract,
- ERC20Upgradeable,
- ERC20BurnableUpgradeable,
- ERC20SnapshotUpgradeable,
- PausableUpgradeable,
- ERC20PermitUpgradeable,
- ERC20VotesUpgradeable,
- IMintableERC20
-{
+contract TaikoToken is EssentialContract, ERC20SnapshotUpgradeable, ERC20VotesUpgradeable {
error TKO_INVALID_ADDR();
error TKO_INVALID_PREMINT_PARAMS();
- /// @notice Initializes the TaikoToken contract and mints initial tokens to
- /// specified recipients.
- /// @param _addressManager The {AddressManager} address.
+ /// @notice Initializes the TaikoToken contract and mints initial tokens.
/// @param _name The name of the token.
/// @param _symbol The symbol of the token.
- /// @param _premintRecipients An array of addresses to receive initial token
- /// minting.
- /// @param _premintAmounts An array of token amounts to mint for each
- /// corresponding recipient.
+ /// @param _recipient The address to receive initial token minting.
function init(
- address _addressManager,
string calldata _name,
string calldata _symbol,
- address[] calldata _premintRecipients,
- uint256[] calldata _premintAmounts
+ address _recipient
)
public
initializer
{
- EssentialContract._init(_addressManager);
+ __Essential_init();
__ERC20_init(_name, _symbol);
- __ERC20Burnable_init();
__ERC20Snapshot_init();
- __Pausable_init();
- __ERC20Permit_init(_name);
__ERC20Votes_init();
- for (uint256 i = 0; i < _premintRecipients.length; ++i) {
- _mint(_premintRecipients[i], _premintAmounts[i]);
- }
- }
-
- /// @notice Creates a new token snapshot.
- function snapshot() public onlyOwner {
- _snapshot();
- }
-
- /// @notice Pauses token transfers.
- function pause() public onlyOwner {
- _pause();
- }
-
- /// @notice Unpauses token transfers.
- function unpause() public onlyOwner {
- _unpause();
+ // Mint 1 billion tokens
+ _mint(_recipient, 1_000_000_000 ether);
}
/// @notice Mints new tokens to the specified address.
/// @param to The address to receive the minted tokens.
/// @param amount The amount of tokens to mint.
- function mint(
- address to,
- uint256 amount
- )
- public
- onlyFromNamed2("erc20_vault", "taiko")
- {
+ function mint(address to, uint256 amount) public onlyOwner {
_mint(to, amount);
}
/// @notice Burns tokens from the specified address.
/// @param from The address to burn tokens from.
/// @param amount The amount of tokens to burn.
- function burn(
- address from,
- uint256 amount
- )
- public
- onlyFromNamed2("erc20_vault", "taiko")
- {
+ function burn(address from, uint256 amount) public onlyOwner {
_burn(from, amount);
}
+ /// @notice Creates a new token snapshot.
+ function snapshot() public onlyOwner {
+ _snapshot();
+ }
+
/// @notice Transfers tokens to a specified address.
/// @param to The address to transfer tokens to.
/// @param amount The amount of tokens to transfer.
/// @return A boolean indicating whether the transfer was successful or not.
- function transfer(
- address to,
- uint256 amount
- )
- public
- override(ERC20Upgradeable, IERC20Upgradeable)
- returns (bool)
- {
+ function transfer(address to, uint256 amount) public override returns (bool) {
if (to == address(this)) revert TKO_INVALID_ADDR();
- return ERC20Upgradeable.transfer(to, amount);
+ return super.transfer(to, amount);
}
/// @notice Transfers tokens from one address to another.
@@ -141,11 +82,11 @@ contract TaikoToken is
uint256 amount
)
public
- override(ERC20Upgradeable, IERC20Upgradeable)
+ override
returns (bool)
{
if (to == address(this)) revert TKO_INVALID_ADDR();
- return ERC20Upgradeable.transferFrom(from, to, amount);
+ return super.transferFrom(from, to, amount);
}
function _beforeTokenTransfer(
@@ -155,7 +96,6 @@ contract TaikoToken is
)
internal
override(ERC20Upgradeable, ERC20SnapshotUpgradeable)
- whenNotPaused
{
super._beforeTokenTransfer(from, to, amount);
}
@@ -191,7 +131,3 @@ contract TaikoToken is
super._burn(from, amount);
}
}
-
-/// @title ProxiedTaikoToken
-/// @notice Proxied version of the TaikoToken contract.
-contract ProxiedTaikoToken is Proxied, TaikoToken { }
diff --git a/packages/protocol/contracts/L1/gov/TaikoGovernor.sol b/packages/protocol/contracts/L1/gov/TaikoGovernor.sol
new file mode 100644
index 00000000000..88405915789
--- /dev/null
+++ b/packages/protocol/contracts/L1/gov/TaikoGovernor.sol
@@ -0,0 +1,125 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "lib/openzeppelin-contracts-upgradeable/contracts/governance/GovernorUpgradeable.sol";
+import
+ "lib/openzeppelin-contracts-upgradeable/contracts/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol";
+import
+ "lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/GovernorVotesUpgradeable.sol";
+import
+ "lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol";
+import
+ "lib/openzeppelin-contracts-upgradeable/contracts/governance/extensions/GovernorTimelockControlUpgradeable.sol";
+import "../../common/OwnerUUPSUpgradable.sol";
+
+contract TaikoGovernor is
+ OwnerUUPSUpgradable,
+ GovernorUpgradeable,
+ GovernorCompatibilityBravoUpgradeable,
+ GovernorVotesUpgradeable,
+ GovernorVotesQuorumFractionUpgradeable,
+ GovernorTimelockControlUpgradeable
+{
+ uint256[50] private __gap;
+
+ function init(
+ IVotesUpgradeable _token,
+ TimelockControllerUpgradeable _timelock
+ )
+ external
+ initializer
+ {
+ __OwnerUUPSUpgradable_init();
+ __Governor_init("TaikoGovernor");
+ __GovernorVotes_init(_token);
+ __GovernorVotesQuorumFraction_init(4);
+ __GovernorTimelockControl_init(_timelock);
+ }
+
+ function propose(
+ address[] memory targets,
+ uint256[] memory values,
+ bytes[] memory calldatas,
+ string memory description
+ )
+ public
+ override(IGovernorUpgradeable, GovernorUpgradeable, GovernorCompatibilityBravoUpgradeable)
+ returns (uint256)
+ {
+ return super.propose(targets, values, calldatas, description);
+ }
+
+ function supportsInterface(bytes4 interfaceId)
+ public
+ view
+ override(GovernorUpgradeable, GovernorTimelockControlUpgradeable, IERC165Upgradeable)
+ returns (bool)
+ {
+ return super.supportsInterface(interfaceId);
+ }
+
+ function state(uint256 proposalId)
+ public
+ view
+ override(IGovernorUpgradeable, GovernorUpgradeable, GovernorTimelockControlUpgradeable)
+ returns (ProposalState)
+ {
+ return super.state(proposalId);
+ }
+
+ // How long after a proposal is created should voting power be fixed. A
+ // large voting delay gives users time to unstake tokens if necessary.
+ function votingDelay() public pure override returns (uint256) {
+ return 7200; // 1 day
+ }
+
+ // How long does a proposal remain open to votes.
+ function votingPeriod() public pure override returns (uint256) {
+ return 50_400; // 1 week
+ }
+
+ // The number of votes required in order for a voter to become a proposer
+ function proposalThreshold() public pure override returns (uint256) {
+ return 1_000_000_000 ether / 10_000; // 0.01% of Taiko Token
+ }
+
+ function _execute(
+ uint256 proposalId,
+ address[] memory targets,
+ uint256[] memory values,
+ bytes[] memory calldatas,
+ bytes32 descriptionHash
+ )
+ internal
+ override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)
+ {
+ super._execute(proposalId, targets, values, calldatas, descriptionHash);
+ }
+
+ function _cancel(
+ address[] memory targets,
+ uint256[] memory values,
+ bytes[] memory calldatas,
+ bytes32 descriptionHash
+ )
+ internal
+ override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)
+ returns (uint256)
+ {
+ return super._cancel(targets, values, calldatas, descriptionHash);
+ }
+
+ function _executor()
+ internal
+ view
+ override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)
+ returns (address)
+ {
+ return super._executor();
+ }
+}
diff --git a/packages/protocol/contracts/L1/gov/TaikoTimelockController.sol b/packages/protocol/contracts/L1/gov/TaikoTimelockController.sol
new file mode 100644
index 00000000000..84cd8bee348
--- /dev/null
+++ b/packages/protocol/contracts/L1/gov/TaikoTimelockController.sol
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import
+ "lib/openzeppelin-contracts-upgradeable/contracts/governance/TimelockControllerUpgradeable.sol";
+import "../../common/OwnerUUPSUpgradable.sol";
+
+contract TaikoTimelockController is OwnerUUPSUpgradable, TimelockControllerUpgradeable {
+ uint256[50] private __gap;
+
+ function init(uint256 minDelay) external initializer {
+ __OwnerUUPSUpgradable_init();
+ address[] memory nil = new address[](0);
+ __TimelockController_init(minDelay, nil, nil, owner());
+ }
+
+ /// @dev Allows the admin to get around of the min delay.
+ function getMinDelay() public view override returns (uint256) {
+ return hasRole(TIMELOCK_ADMIN_ROLE, msg.sender) ? 0 : super.getMinDelay();
+ }
+}
diff --git a/packages/protocol/contracts/L1/hooks/AssignmentHook.sol b/packages/protocol/contracts/L1/hooks/AssignmentHook.sol
new file mode 100644
index 00000000000..693334e1e8a
--- /dev/null
+++ b/packages/protocol/contracts/L1/hooks/AssignmentHook.sol
@@ -0,0 +1,164 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
+import "../../common/EssentialContract.sol";
+import "../../libs/LibAddress.sol";
+import "../TaikoData.sol";
+import "./IHook.sol";
+
+/// @title AssignmentHook
+/// A hook that handles prover assignment varification and fee processing.
+contract AssignmentHook is EssentialContract, IHook {
+ using LibAddress for address;
+
+ struct ProverAssignment {
+ address feeToken;
+ uint64 expiry;
+ uint64 maxBlockId;
+ uint64 maxProposedIn;
+ bytes32 metaHash;
+ TaikoData.TierFee[] tierFees;
+ bytes signature;
+ }
+
+ struct Input {
+ ProverAssignment assignment;
+ uint256 tip;
+ }
+
+ // Max gas paying the prover. This should be large enough to prevent the
+ // worst cases, usually block proposer shall be aware the risks and only
+ // choose provers that cannot consume too much gas when receiving Ether.
+ uint256 public constant MAX_GAS_PAYING_PROVER = 200_000;
+
+ event BlockAssigned(
+ address indexed assignedProver, TaikoData.BlockMetadata meta, ProverAssignment assignment
+ );
+
+ error HOOK_ASSIGNMENT_EXPIRED();
+ error HOOK_ASSIGNMENT_INVALID_SIG();
+ error HOOK_ASSIGNMENT_INSUFFICIENT_FEE();
+ error HOOK_TIER_NOT_FOUND();
+
+ function init(address _addressManager) external initializer {
+ __Essential_init(_addressManager);
+ }
+
+ function onBlockProposed(
+ TaikoData.Block memory blk,
+ TaikoData.BlockMetadata memory meta,
+ bytes memory data
+ )
+ external
+ payable
+ nonReentrant
+ onlyFromNamed("taiko")
+ {
+ Input memory input = abi.decode(data, (Input));
+ ProverAssignment memory assignment = input.assignment;
+
+ // Check assignment validity
+ if (
+ block.timestamp > assignment.expiry
+ || assignment.metaHash != 0 && blk.metaHash != assignment.metaHash
+ || assignment.maxBlockId != 0 && meta.id > assignment.maxBlockId
+ || assignment.maxProposedIn != 0 && block.number > assignment.maxProposedIn
+ ) {
+ revert HOOK_ASSIGNMENT_EXPIRED();
+ }
+
+ // Hash the assignment with the blobHash, this hash will be signed by
+ // the prover, therefore, we add a string as a prefix.
+ bytes32 hash = hashAssignment(assignment, msg.sender, meta.blobHash);
+
+ if (!blk.assignedProver.isValidSignature(hash, assignment.signature)) {
+ revert HOOK_ASSIGNMENT_INVALID_SIG();
+ }
+
+ // Send the liveness bond to the Taiko contract
+ IERC20 tko = IERC20(resolve("taiko_token", false));
+ tko.transferFrom(blk.assignedProver, msg.sender, blk.livenessBond);
+
+ // Find the prover fee using the minimal tier
+ uint256 proverFee = _getProverFee(assignment.tierFees, meta.minTier);
+
+ // The proposer irrevocably pays a fee to the assigned prover, either in
+ // Ether or ERC20 tokens.
+ uint256 refund;
+ if (assignment.feeToken == address(0)) {
+ if (msg.value < proverFee + input.tip) {
+ revert HOOK_ASSIGNMENT_INSUFFICIENT_FEE();
+ }
+
+ unchecked {
+ refund = msg.value - proverFee - input.tip;
+ }
+
+ // Paying Ether
+ blk.assignedProver.sendEther(proverFee, MAX_GAS_PAYING_PROVER);
+ } else {
+ if (msg.value < input.tip) {
+ revert HOOK_ASSIGNMENT_INSUFFICIENT_FEE();
+ }
+ unchecked {
+ refund = msg.value - input.tip;
+ }
+ // Paying ERC20 tokens
+ IERC20(assignment.feeToken).transferFrom(msg.sender, blk.assignedProver, proverFee);
+ }
+
+ // block.coinbase can be address(0) in tests
+ if (input.tip != 0 && block.coinbase != address(0)) {
+ address(block.coinbase).sendEther(input.tip);
+ }
+
+ if (refund != 0) {
+ msg.sender.sendEther(refund);
+ }
+
+ emit BlockAssigned(blk.assignedProver, meta, assignment);
+ }
+
+ function hashAssignment(
+ ProverAssignment memory assignment,
+ address taikoAddress,
+ bytes32 blobHash
+ )
+ public
+ pure
+ returns (bytes32)
+ {
+ return keccak256(
+ abi.encode(
+ "PROVER_ASSIGNMENT",
+ taikoAddress,
+ blobHash,
+ assignment.feeToken,
+ assignment.expiry,
+ assignment.maxBlockId,
+ assignment.maxProposedIn,
+ assignment.tierFees
+ )
+ );
+ }
+
+ function _getProverFee(
+ TaikoData.TierFee[] memory tierFees,
+ uint16 tierId
+ )
+ private
+ pure
+ returns (uint256)
+ {
+ for (uint256 i; i < tierFees.length; ++i) {
+ if (tierFees[i].tier == tierId) return tierFees[i].fee;
+ }
+ revert HOOK_TIER_NOT_FOUND();
+ }
+}
diff --git a/packages/protocol/contracts/L1/hooks/IHook.sol b/packages/protocol/contracts/L1/hooks/IHook.sol
new file mode 100644
index 00000000000..abe4539c6a2
--- /dev/null
+++ b/packages/protocol/contracts/L1/hooks/IHook.sol
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "../TaikoData.sol";
+
+/// @title IHook Interface
+interface IHook {
+ function onBlockProposed(
+ TaikoData.Block memory blk,
+ TaikoData.BlockMetadata memory meta,
+ bytes memory data
+ )
+ external
+ payable;
+}
diff --git a/packages/protocol/contracts/L1/libs/LibDepositing.sol b/packages/protocol/contracts/L1/libs/LibDepositing.sol
index 4a51f18ef09..17192139267 100644
--- a/packages/protocol/contracts/L1/libs/LibDepositing.sol
+++ b/packages/protocol/contracts/L1/libs/LibDepositing.sol
@@ -6,48 +6,42 @@
pragma solidity ^0.8.20;
-import { AddressResolver } from "../../common/AddressResolver.sol";
-import { LibAddress } from "../../libs/LibAddress.sol";
-import { LibMath } from "../../libs/LibMath.sol";
-import { TaikoData } from "../TaikoData.sol";
+import "../../common/AddressResolver.sol";
+import "../../libs/LibAddress.sol";
+import "../../libs/LibMath.sol";
+import "../TaikoData.sol";
/// @title LibDepositing
/// @notice A library for handling Ether deposits in the Taiko protocol.
library LibDepositing {
using LibAddress for address;
+ using LibAddress for address payable;
using LibMath for uint256;
+ // Warning: Any events defined here must also be defined in TaikoEvents.sol.
event EthDeposited(TaikoData.EthDeposit deposit);
+ // Warning: Any errors defined here must also be defined in TaikoErrors.sol.
error L1_INVALID_ETH_DEPOSIT();
- /// @dev Deposits Ether into Taiko.
- /// @param state The current state of the Taiko protocol.
- /// @param config The config of the Taiko protocol.
- /// @param resolver The {AddressResolver} instance for address resolution.
- /// @param recipient The address of the deposit recipient.
+ /// @dev Deposits Ether to Layer 2.
function depositEtherToL2(
TaikoData.State storage state,
TaikoData.Config memory config,
AddressResolver resolver,
address recipient
)
- internal
+ external
{
if (!canDepositEthToL2(state, config, msg.value)) {
revert L1_INVALID_ETH_DEPOSIT();
}
- address to = resolver.resolve("ether_vault", true);
- if (to == address(0)) {
- to = resolver.resolve("bridge", false);
- }
- to.sendEther(msg.value);
+ resolver.resolve("bridge", false).sendEther(msg.value);
// Append the deposit to the queue.
address _recipient = recipient == address(0) ? msg.sender : recipient;
- uint256 slot =
- state.slotA.numEthDeposits % config.ethDepositRingBufferSize;
+ uint256 slot = state.slotA.numEthDeposits % config.ethDepositRingBufferSize;
// range of msg.value is checked by next line.
state.ethDeposits[slot] = _encodeEthDeposit(_recipient, msg.value);
@@ -69,10 +63,6 @@ library LibDepositing {
}
/// @dev Processes the ETH deposits in a batched manner.
- /// @param state The current state of the Taiko protocol.
- /// @param config The config of the Taiko protocol.
- /// @param feeRecipient Address to receive the deposit fee.
- /// @return deposits The array of processed deposits.
function processDeposits(
TaikoData.State storage state,
TaikoData.Config memory config,
@@ -82,8 +72,7 @@ library LibDepositing {
returns (TaikoData.EthDeposit[] memory deposits)
{
// Calculate the number of pending deposits.
- uint256 numPending =
- state.slotA.numEthDeposits - state.slotA.nextEthDepositToProcess;
+ uint256 numPending = state.slotA.numEthDeposits - state.slotA.nextEthDepositToProcess;
if (numPending < config.ethDepositMinCountPerBlock) {
deposits = new TaikoData.EthDeposit[](0);
@@ -91,23 +80,17 @@ library LibDepositing {
deposits = new TaikoData.EthDeposit[](
numPending.min(config.ethDepositMaxCountPerBlock)
);
- uint96 fee = uint96(
- config.ethDepositMaxFee.min(
- block.basefee * config.ethDepositGas
- )
- );
+ uint96 fee = uint96(config.ethDepositMaxFee.min(block.basefee * config.ethDepositGas));
uint64 j = state.slotA.nextEthDepositToProcess;
uint96 totalFee;
for (uint256 i; i < deposits.length;) {
- uint256 data =
- state.ethDeposits[j % config.ethDepositRingBufferSize];
+ uint256 data = state.ethDeposits[j % config.ethDepositRingBufferSize];
deposits[i] = TaikoData.EthDeposit({
recipient: address(uint160(data >> 96)),
amount: uint96(data),
id: j
});
- uint96 _fee =
- deposits[i].amount > fee ? fee : deposits[i].amount;
+ uint96 _fee = deposits[i].amount > fee ? fee : deposits[i].amount;
// Unchecked is safe:
// - _fee cannot be bigger than deposits[i].amount
@@ -123,8 +106,7 @@ library LibDepositing {
}
state.slotA.nextEthDepositToProcess = j;
// This is the fee deposit
- state.ethDeposits[state.slotA.numEthDeposits
- % config.ethDepositRingBufferSize] =
+ state.ethDeposits[state.slotA.numEthDeposits % config.ethDepositRingBufferSize] =
_encodeEthDeposit(feeRecipient, totalFee);
// Unchecked is safe:
@@ -136,11 +118,7 @@ library LibDepositing {
}
}
- /// @dev Checks if the given deposit amount is valid.
- /// @param state The current state of the Taiko protocol.
- /// @param config The config of the Taiko protocol.
- /// @param amount The amount to deposit.
- /// @return true if the deposit is valid, false otherwise.
+ /// @dev Checks if Ether deposit is allowed for Layer 2.
function canDepositEthToL2(
TaikoData.State storage state,
TaikoData.Config memory config,
@@ -158,36 +136,17 @@ library LibDepositing {
// - ethDepositRingBufferSize cannot be 0 by default (validity checked
// in LibVerifying)
unchecked {
- return amount >= config.ethDepositMinAmount
- && amount <= config.ethDepositMaxAmount
+ return amount >= config.ethDepositMinAmount && amount <= config.ethDepositMaxAmount
&& state.slotA.numEthDeposits - state.slotA.nextEthDepositToProcess
< config.ethDepositRingBufferSize - 1;
}
}
- /// @dev Computes the hash of the given deposits.
- /// @param deposits The deposits to hash.
- /// @return The computed hash.
- function hashEthDeposits(TaikoData.EthDeposit[] memory deposits)
- internal
- pure
- returns (bytes32)
- {
- return keccak256(abi.encode(deposits));
- }
-
/// @dev Encodes the given deposit into a uint256.
/// @param addr The address of the deposit recipient.
/// @param amount The amount of the deposit.
/// @return The encoded deposit.
- function _encodeEthDeposit(
- address addr,
- uint256 amount
- )
- private
- pure
- returns (uint256)
- {
+ function _encodeEthDeposit(address addr, uint256 amount) private pure returns (uint256) {
if (amount >= type(uint96).max) revert L1_INVALID_ETH_DEPOSIT();
return (uint256(uint160(addr)) << 96) | amount;
}
diff --git a/packages/protocol/contracts/L1/libs/LibProposing.sol b/packages/protocol/contracts/L1/libs/LibProposing.sol
index ef9832df312..8d87a9f688b 100644
--- a/packages/protocol/contracts/L1/libs/LibProposing.sol
+++ b/packages/protocol/contracts/L1/libs/LibProposing.sol
@@ -6,294 +6,297 @@
pragma solidity ^0.8.20;
-import { Address } from "@openzeppelin/contracts/utils/Address.sol";
-import { AddressResolver } from "../../common/AddressResolver.sol";
-import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
-import { IERC1271 } from "@openzeppelin/contracts/interfaces/IERC1271.sol";
-import { IMintableERC20 } from "../../common/IMintableERC20.sol";
-import { IProver } from "../IProver.sol";
-import { LibAddress } from "../../libs/LibAddress.sol";
-import { LibDepositing } from "./LibDepositing.sol";
-import { LibMath } from "../../libs/LibMath.sol";
-import { LibTaikoToken } from "./LibTaikoToken.sol";
-import { LibUtils } from "./LibUtils.sol";
-import { TaikoData } from "../TaikoData.sol";
-import { TaikoToken } from "../TaikoToken.sol";
-
+import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
+import "../../4844/IBlobHashReader.sol";
+import "../../common/AddressResolver.sol";
+import "../../libs/LibAddress.sol";
+import "../hooks/IHook.sol";
+import "../tiers/ITierProvider.sol";
+import "../TaikoData.sol";
+import "./LibDepositing.sol";
+
+/// @title LibProposing
+/// @notice A library for handling block proposals in the Taiko protocol.
library LibProposing {
- using Address for address;
- using ECDSA for bytes32;
using LibAddress for address;
- using LibAddress for address payable;
- using LibMath for uint256;
- using LibUtils for TaikoData.State;
- bytes4 internal constant EIP1271_MAGICVALUE = 0x1626ba7e;
+ // According to EIP4844, each blob has up to 4096 field elements, and each
+ // field element has 32 bytes.
+ uint256 public constant MAX_BYTES_PER_BLOB = 4096 * 32;
+ // Warning: Any events defined here must also be defined in TaikoEvents.sol.
event BlockProposed(
uint256 indexed blockId,
- address indexed prover,
- uint256 reward,
- TaikoData.BlockMetadata meta
+ address indexed assignedProver,
+ uint96 livenessBond,
+ TaikoData.BlockMetadata meta,
+ TaikoData.EthDeposit[] depositsProcessed
);
- event BondReceived(address indexed from, uint64 blockId, uint256 bond);
- error L1_INVALID_ASSIGNMENT();
- error L1_INVALID_BLOCK_ID();
- error L1_INVALID_METADATA();
- error L1_INVALID_PROPOSER();
+ event BlobCached(bytes32 blobHash);
+
+ // Warning: Any errors defined here must also be defined in TaikoErrors.sol.
+ error L1_BLOB_FOR_DA_DISABLED();
+ error L1_BLOB_NOT_FOUND();
+ error L1_BLOB_NOT_REUSEABLE();
+ error L1_INVALID_PARAM();
error L1_INVALID_PROVER();
- error L1_INVALID_PROVER_SIG();
+ error L1_LIVENESS_BOND_NOT_RECEIVED();
+ error L1_PROPOSER_NOT_EOA();
error L1_TOO_MANY_BLOCKS();
- error L1_TX_LIST_NOT_EXIST();
- error L1_TX_LIST_HASH();
- error L1_TX_LIST_RANGE();
- error L1_TX_LIST();
+ error L1_TXLIST_OFFSET();
+ error L1_TXLIST_SIZE();
+ error L1_UNAUTHORIZED();
+ error L1_UNEXPECTED_PARENT();
+ /// @dev Proposes a Taiko L2 block.
function proposeBlock(
TaikoData.State storage state,
TaikoData.Config memory config,
AddressResolver resolver,
- TaikoData.BlockMetadataInput memory input,
- TaikoData.ProverAssignment memory assignment,
+ bytes calldata data,
bytes calldata txList
)
- internal
- returns (TaikoData.BlockMetadata memory meta)
+ external
+ returns (
+ TaikoData.BlockMetadata memory meta,
+ TaikoData.EthDeposit[] memory depositsProcessed
+ )
{
- // Check proposer
- address proposer = resolver.resolve("proposer", true);
- if (proposer != address(0) && msg.sender != proposer) {
- revert L1_INVALID_PROPOSER();
- }
+ TaikoData.BlockParams memory params = abi.decode(data, (TaikoData.BlockParams));
- // Check prover assignment
- if (
- assignment.prover == address(0)
- || assignment.expiry <= block.timestamp
- ) {
- revert L1_INVALID_ASSIGNMENT();
+ if (params.assignedProver == address(0)) {
+ revert L1_INVALID_PROVER();
}
- // Too many unverified blocks?
+ // Taiko, as a Based Rollup, enables permissionless block proposals.
+ // However, if the "proposer" address is set to a non-zero value, we
+ // ensure that only that specific address has the authority to propose
+ // blocks.
TaikoData.SlotB memory b = state.slotB;
- if (b.numBlocks >= b.lastVerifiedBlockId + config.blockMaxProposals + 1)
- {
+ if (!_isProposerPermitted(b, resolver)) revert L1_UNAUTHORIZED();
+
+ // It's essential to ensure that the ring buffer for proposed blocks
+ // still has space for at least one more block.
+
+ if (b.numBlocks >= b.lastVerifiedBlockId + config.blockMaxProposals + 1) {
revert L1_TOO_MANY_BLOCKS();
}
- if (assignment.prover != LibUtils.ORACLE_PROVER) {
- LibTaikoToken.receiveTaikoToken({
- state: state,
- resolver: resolver,
- from: assignment.prover,
- amount: config.proofBond
- });
+ TaikoData.Block storage parent =
+ state.blocks[(b.numBlocks - 1) % config.blockRingBufferSize];
+
+ // Check if parent block has the right meta hash
+ if (params.parentMetaHash != 0 && parent.metaHash != params.parentMetaHash) {
+ revert L1_UNEXPECTED_PARENT();
+ }
- emit BondReceived(assignment.prover, b.numBlocks, config.proofBond);
+ // Each transaction must handle a specific quantity of L1-to-L2
+ // Ether deposits.
+ depositsProcessed = LibDepositing.processDeposits(state, config, msg.sender);
+
+ // Initialize metadata to compute a metaHash, which forms a part of
+ // the block data to be stored on-chain for future integrity checks.
+ // If we choose to persist all data fields in the metadata, it will
+ // require additional storage slots.
+ unchecked {
+ meta = TaikoData.BlockMetadata({
+ l1Hash: blockhash(block.number - 1),
+ difficulty: 0, // to be initialized below
+ blobHash: 0, // to be initialized below
+ extraData: params.extraData,
+ depositsHash: keccak256(abi.encode(depositsProcessed)),
+ coinbase: msg.sender,
+ id: b.numBlocks,
+ gasLimit: config.blockMaxGasLimit,
+ timestamp: uint64(block.timestamp),
+ l1Height: uint64(block.number - 1),
+ txListByteOffset: 0, // to be initialized below
+ txListByteSize: 0, // to be initialized below
+ minTier: 0, // to be initialized below
+ blobUsed: txList.length == 0,
+ parentMetaHash: parent.metaHash
+ });
}
- // Pay prover after verifying assignment
- if (config.skipProverAssignmentVerificaiton) {
- // For testing only
- assignment.prover.sendEther(msg.value);
- } else if (!assignment.prover.isContract()) {
- address assignedProver = assignment.prover;
- if (assignment.prover == LibUtils.ORACLE_PROVER) {
- assignedProver = resolver.resolve("oracle_prover", false);
+ // Update certain meta fields
+ if (meta.blobUsed) {
+ if (!config.blobAllowedForDA) revert L1_BLOB_FOR_DA_DISABLED();
+
+ if (params.blobHash != 0) {
+ // We try to reuse an old blob
+ if (isBlobReusable(state, config, params.blobHash)) {
+ revert L1_BLOB_NOT_REUSEABLE();
+ }
+ meta.blobHash = params.blobHash;
+ } else {
+ // Always use the first blob in this transaction. If the
+ // proposeBlock functions are called more than once in the same
+ // L1 transaction, these multiple L2 blocks will share the same
+ // blob.
+ meta.blobHash =
+ IBlobHashReader(resolver.resolve("blob_hash_reader", false)).getFirstBlobHash();
+
+ if (meta.blobHash == 0) revert L1_BLOB_NOT_FOUND();
+
+ // Depends on the blob data price, it may not make sense to
+ // cache the blob which costs 20,000 (sstore) + 631 (event)
+ // extra gas.
+ if (params.cacheBlobForReuse) {
+ state.reusableBlobs[meta.blobHash] = block.timestamp;
+ emit BlobCached(meta.blobHash);
+ }
}
- if (
- _hashAssignment(input, assignment).recover(assignment.data)
- != assignedProver
- ) {
- revert L1_INVALID_PROVER_SIG();
+ if (uint256(params.txListByteOffset) + params.txListByteSize > MAX_BYTES_PER_BLOB) {
+ revert L1_TXLIST_OFFSET();
}
- assignedProver.sendEther(msg.value);
- } else if (
- assignment.prover.supportsInterface(type(IProver).interfaceId)
- ) {
- IProver(assignment.prover).onBlockAssigned{ value: msg.value }(
- b.numBlocks, input, assignment
- );
- } else if (
- assignment.prover.supportsInterface(type(IERC1271).interfaceId)
- ) {
- if (
- IERC1271(assignment.prover).isValidSignature(
- _hashAssignment(input, assignment), assignment.data
- ) != EIP1271_MAGICVALUE
- ) {
- revert L1_INVALID_PROVER_SIG();
+
+ if (params.txListByteSize == 0 || params.txListByteSize > config.blockMaxTxListBytes) {
+ revert L1_TXLIST_SIZE();
}
- assignment.prover.sendEther(msg.value);
+
+ meta.txListByteOffset = params.txListByteOffset;
+ meta.txListByteSize = params.txListByteSize;
} else {
- revert L1_INVALID_PROVER();
- }
+ // The proposer must be an Externally Owned Account (EOA) for
+ // calldata usage. This ensures that the transaction is not an
+ // internal one, making calldata retrieval more straightforward for
+ // Taiko node software.
+ if (!LibAddress.isSenderEOA()) revert L1_PROPOSER_NOT_EOA();
+
+ if (params.txListByteOffset != 0 || params.txListByteSize != 0) {
+ revert L1_INVALID_PARAM();
+ }
- // Reward the proposer
- uint256 reward;
- if (config.proposerRewardPerSecond > 0 && config.proposerRewardMax > 0)
- {
- // Unchecked is safe:
- // - block.timestamp is always greater than block.proposedAt
- // (proposed in the past)
- // - 1x state.taikoTokenBalances[addr] uint256 could theoretically
- // store the whole token supply
- unchecked {
- // Calculate the time elapsed since the last block was proposed
- uint256 blockTime = block.timestamp
- - state.blocks[(b.numBlocks - 1) % config.blockRingBufferSize]
- .proposedAt;
-
- // Reward only the first proposer in an L1 block. Subsequent
- // proposeBlock transactions in the same L1 block will have
- // blockTime as 0, and receive no reward
- if (blockTime > 0) {
- reward = (config.proposerRewardPerSecond * blockTime).min(
- config.proposerRewardMax
- );
-
- // Reward the proposer
- TaikoToken(resolver.resolve("taiko_token", false)).mint(
- input.proposer, reward
- );
- }
+ // blockMaxTxListBytes is a uint24
+ if (txList.length > config.blockMaxTxListBytes) {
+ revert L1_TXLIST_SIZE();
}
+
+ meta.blobHash = keccak256(txList);
+ meta.txListByteOffset = 0;
+ meta.txListByteSize = uint24(txList.length);
}
- if (_validateBlock(state, config, input, txList)) {
- // returns true if we need to cache the txList info
- state.txListInfo[input.txListHash] = TaikoData.TxListInfo({
- validSince: uint64(block.timestamp),
- size: uint24(txList.length)
- });
+ // Following the Merge, the L1 mixHash incorporates the
+ // prevrandao value from the beacon chain. Given the possibility
+ // of multiple Taiko blocks being proposed within a single
+ // Ethereum block, we must introduce a salt to this random
+ // number as the L2 mixHash.
+ unchecked {
+ meta.difficulty = meta.blobHash ^ bytes32(block.prevrandao * b.numBlocks * block.number);
}
- // Init the metadata
- // Unchecked is safe:
- // - equation is done among same variable types
- // - incrementation (state.slotB.numBlocks++) is fine for 584K years if
- // we propose at every second
+ // Use the difficulty as a random number
+ meta.minTier = ITierProvider(resolver.resolve("tier_provider", false)).getMinTier(
+ uint256(meta.difficulty)
+ );
+
+ // Now, it's essential to initialize the block that will be stored
+ // on L1. We should aim to utilize as few storage slots as possible,
+ // alghouth using a ring buffer can minimize storage writes once
+ // the buffer reaches its capacity.
+ TaikoData.Block storage blk = state.blocks[b.numBlocks % config.blockRingBufferSize];
+
+ // Please note that all fields must be re-initialized since we are
+ // utilizing an existing ring buffer slot, not creating a new storage
+ // slot.
+ blk.metaHash = keccak256(abi.encode(meta));
+
+ // Safeguard the liveness bond to ensure its preservation,
+ // particularly in scenarios where it might be altered after the
+ // block's proposal but before it has been proven or verified.
+ blk.livenessBond = config.livenessBond;
+ blk.blockId = b.numBlocks;
+
+ blk.proposedAt = meta.timestamp;
+ blk.proposedIn = uint64(block.number);
+
+ // For a new block, the next transition ID is always 1, not 0.
+ blk.nextTransitionId = 1;
+
+ // For unverified block, its verifiedTransitionId is always 0.
+ blk.verifiedTransitionId = 0;
+
+ // Verify assignment authorization; if prover's address is an IProver
+ // contract, transfer Ether and call "validateAssignment" for
+ // verification.
+ // Prover can charge ERC20/NFT as fees; msg.value can be zero. Taiko
+ // doesn't mandate Ether as the only proofing fee.
+ blk.assignedProver = params.assignedProver;
+
+ // Increment the counter (cursor) by 1.
unchecked {
- meta.id = b.numBlocks;
- meta.timestamp = uint64(block.timestamp);
- meta.l1Height = uint64(block.number - 1);
- meta.l1Hash = blockhash(block.number - 1);
-
- // After The Merge, L1 mixHash contains the prevrandao
- // from the beacon chain. Since multiple Taiko blocks
- // can be proposed in one Ethereum block, we need to
- // add salt to this random number as L2 mixHash
- meta.mixHash = bytes32(block.prevrandao * b.numBlocks);
-
- meta.txListHash = input.txListHash;
- meta.txListByteStart = input.txListByteStart;
- meta.txListByteEnd = input.txListByteEnd;
- meta.gasLimit = config.blockMaxGasLimit;
- meta.proposer = input.proposer;
- meta.depositsProcessed =
- LibDepositing.processDeposits(state, config, input.proposer);
-
- // Init the block
- TaikoData.Block storage blk =
- state.blocks[b.numBlocks % config.blockRingBufferSize];
-
- blk.metaHash = LibUtils.hashMetadata(meta);
- blk.prover = assignment.prover;
- blk.proofBond = config.proofBond;
- blk.blockId = meta.id;
- blk.proposedAt = meta.timestamp;
- blk.nextTransitionId = 1;
- blk.verifiedTransitionId = 0;
-
- emit BlockProposed({
- blockId: state.slotB.numBlocks++,
- prover: blk.prover,
- reward: reward,
- meta: meta
- });
+ ++state.slotB.numBlocks;
}
+
+ {
+ IERC20 tko = IERC20(resolver.resolve("taiko_token", false));
+ uint256 tkoBalance = tko.balanceOf(address(this));
+
+ // Run all hooks.
+ // Note that address(this).balance has been updated with msg.value,
+ // prior to any code in this function has been executed.
+ for (uint256 i; i < params.hookCalls.length; ++i) {
+ // When a hook is called, all ether in this contract will be send to the hook.
+ // If the ether sent to the hook is not used entirely, the hook shall send the Ether
+ // back to this contract for the next hook to use.
+ // Proposers shall choose use extra hooks wisely.
+ IHook(params.hookCalls[i].hook).onBlockProposed{ value: address(this).balance }(
+ blk, meta, params.hookCalls[i].data
+ );
+ }
+ // Refund Ether
+ if (address(this).balance != 0) {
+ msg.sender.sendEther(address(this).balance);
+ }
+
+ // Check that after hooks, the Taiko Token balance of this contract
+ // have increased by at least config.livenessBond
+ if (tko.balanceOf(address(this)) < tkoBalance + config.livenessBond) {
+ revert L1_LIVENESS_BOND_NOT_RECEIVED();
+ }
+ }
+
+ emit BlockProposed({
+ blockId: blk.blockId,
+ assignedProver: blk.assignedProver,
+ livenessBond: config.livenessBond,
+ meta: meta,
+ depositsProcessed: depositsProcessed
+ });
}
- function getBlock(
+ function isBlobReusable(
TaikoData.State storage state,
TaikoData.Config memory config,
- uint64 blockId
+ bytes32 blobHash
)
internal
view
- returns (TaikoData.Block storage blk)
+ returns (bool)
{
- blk = state.blocks[blockId % config.blockRingBufferSize];
- if (blk.blockId != blockId) {
- revert L1_INVALID_BLOCK_ID();
- }
+ return state.reusableBlobs[blobHash] + config.blobExpiry > block.timestamp;
}
- function _validateBlock(
- TaikoData.State storage state,
- TaikoData.Config memory config,
- TaikoData.BlockMetadataInput memory input,
- bytes calldata txList
+ function _isProposerPermitted(
+ TaikoData.SlotB memory slotB,
+ AddressResolver resolver
)
private
view
- returns (bool cacheTxListInfo)
+ returns (bool)
{
- if (input.proposer == address(0)) revert L1_INVALID_METADATA();
-
- // handling txList
-
- uint24 size = uint24(txList.length);
- if (size > config.blockMaxTxListBytes) revert L1_TX_LIST();
-
- if (input.txListByteStart > input.txListByteEnd) {
- revert L1_TX_LIST_RANGE();
- }
-
- if (config.blockTxListExpiry == 0) {
- // caching is disabled
- if (input.txListByteStart != 0 || input.txListByteEnd != size) {
- revert L1_TX_LIST_RANGE();
- }
- } else {
- // caching is enabled
- if (size == 0) {
- // This blob shall have been submitted earlier
- TaikoData.TxListInfo memory info =
- state.txListInfo[input.txListHash];
-
- if (input.txListByteEnd > info.size) {
- revert L1_TX_LIST_RANGE();
- }
-
- if (
- info.size == 0
- || info.validSince + config.blockTxListExpiry
- < block.timestamp
- ) {
- revert L1_TX_LIST_NOT_EXIST();
- }
- } else {
- if (input.txListByteEnd > size) revert L1_TX_LIST_RANGE();
- if (input.txListHash != keccak256(txList)) {
- revert L1_TX_LIST_HASH();
- }
-
- cacheTxListInfo = input.cacheTxListInfo;
+ if (slotB.numBlocks == 1) {
+ // Only proposer_one can propose the first block after genesis
+ address proposerOne = resolver.resolve("proposer_one", true);
+ if (proposerOne != address(0) && msg.sender != proposerOne) {
+ return false;
}
}
- }
- function _hashAssignment(
- TaikoData.BlockMetadataInput memory input,
- TaikoData.ProverAssignment memory assignment
- )
- private
- view
- returns (bytes32)
- {
- return keccak256(abi.encode(input, msg.value, assignment.expiry));
+ address proposer = resolver.resolve("proposer", true);
+ return proposer == address(0) || msg.sender == proposer;
}
}
diff --git a/packages/protocol/contracts/L1/libs/LibProving.sol b/packages/protocol/contracts/L1/libs/LibProving.sol
index fc26b687e9d..3bec955ae9f 100644
--- a/packages/protocol/contracts/L1/libs/LibProving.sol
+++ b/packages/protocol/contracts/L1/libs/LibProving.sol
@@ -6,178 +6,426 @@
pragma solidity ^0.8.20;
-import { AddressResolver } from "../../common/AddressResolver.sol";
-import { IProofVerifier } from "../IProofVerifier.sol";
-import { LibMath } from "../../libs/LibMath.sol";
-import { LibUtils } from "./LibUtils.sol";
-import { TaikoData } from "../../L1/TaikoData.sol";
+import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
+import "../../common/AddressResolver.sol";
+import "../tiers/ITierProvider.sol";
+import "../verifiers/IVerifier.sol";
+import "../TaikoData.sol";
+import "./LibUtils.sol";
+/// @title LibProving
+/// @notice A library for handling block contestation and proving in the Taiko
+/// protocol.
library LibProving {
- using LibMath for uint256;
+ bytes32 public constant RETURN_LIVENESS_BOND = keccak256("RETURN_LIVENESS_BOND");
+ // Warning: Any events defined here must also be defined in TaikoEvents.sol.
- event BlockProven(
+ event TransitionProved(
uint256 indexed blockId,
- bytes32 parentHash,
- bytes32 blockHash,
- bytes32 signalRoot,
- address prover
+ TaikoData.Transition tran,
+ address prover,
+ uint96 validityBond,
+ uint16 tier
);
- error L1_ALREADY_PROVEN();
- error L1_BLOCK_ID_MISMATCH();
- error L1_EVIDENCE_MISMATCH();
- error L1_TRANSITION_NOT_FOUND();
+ event TransitionContested(
+ uint256 indexed blockId,
+ TaikoData.Transition tran,
+ address contester,
+ uint96 contestBond,
+ uint16 tier
+ );
+
+ event ProvingPaused(bool paused);
+
+ // Warning: Any errors defined here must also be defined in TaikoErrors.sol.
+ error L1_ALREADY_CONTESTED();
+ error L1_ALREADY_PROVED();
+ error L1_ASSIGNED_PROVER_NOT_ALLOWED();
+ error L1_BLOCK_MISMATCH();
error L1_INVALID_BLOCK_ID();
- error L1_INVALID_EVIDENCE();
- error L1_INVALID_ORACLE_PROVER();
- error L1_INVALID_PROOF();
- error L1_NOT_PROVEABLE();
- error L1_SAME_PROOF();
+ error L1_INVALID_PAUSE_STATUS();
+ error L1_INVALID_TIER();
+ error L1_INVALID_TRANSITION();
+ error L1_NOT_ASSIGNED_PROVER();
+ error L1_PROVING_PAUSED();
+ error L1_UNEXPECTED_TRANSITION_TIER();
+
+ function pauseProving(TaikoData.State storage state, bool pause) external {
+ if (state.slotB.provingPaused == pause) revert L1_INVALID_PAUSE_STATUS();
+ state.slotB.provingPaused = pause;
+ emit ProvingPaused(pause);
+ }
+
+ /// @dev Proves or contests a block transition.
function proveBlock(
TaikoData.State storage state,
TaikoData.Config memory config,
AddressResolver resolver,
- uint64 blockId,
- TaikoData.BlockEvidence memory evidence
+ TaikoData.BlockMetadata memory meta,
+ TaikoData.Transition memory tran,
+ TaikoData.TierProof memory proof
)
- internal
+ external
+ returns (uint8 maxBlocksToVerify)
{
- if (
- evidence.prover == address(0) || evidence.parentHash == 0
- || evidence.blockHash == 0 || evidence.signalRoot == 0
- ) revert L1_INVALID_EVIDENCE();
+ // Make sure parentHash is not zero
+ if (tran.parentHash == 0) revert L1_INVALID_TRANSITION();
+ // Check that the block has been proposed but has not yet been verified.
TaikoData.SlotB memory b = state.slotB;
- if (blockId <= b.lastVerifiedBlockId || blockId >= b.numBlocks) {
+ if (meta.id <= b.lastVerifiedBlockId || meta.id >= b.numBlocks) {
revert L1_INVALID_BLOCK_ID();
}
- uint64 slot = blockId % config.blockRingBufferSize;
+ uint64 slot = meta.id % config.blockRingBufferSize;
TaikoData.Block storage blk = state.blocks[slot];
- if (blk.blockId != blockId) revert L1_BLOCK_ID_MISMATCH();
-
- // Check the metadata hash matches the proposed block's. This is
- // necessary to handle chain reorgs.
- if (blk.metaHash != evidence.metaHash) {
- revert L1_EVIDENCE_MISMATCH();
+ // Check the integrity of the block data. It's worth noting that in
+ // theory, this check may be skipped, but it's included for added
+ // caution.
+ if (blk.blockId != meta.id || blk.metaHash != keccak256(abi.encode(meta))) {
+ revert L1_BLOCK_MISMATCH();
}
- if (evidence.prover == LibUtils.ORACLE_PROVER) {
- // Oracle prover
- if (msg.sender != resolver.resolve("oracle_prover", false)) {
- revert L1_INVALID_ORACLE_PROVER();
- }
- } else {
- // A block can be proven by a regular prover in the following cases:
- // 1. The actual prover is the assigned prover
- // 2. The block has at least one state transition (which must be
- // from the assigned prover)
- // 3. The block has become open
- if (
- evidence.prover != blk.prover && blk.nextTransitionId == 1
- && block.timestamp <= blk.proposedAt + config.proofWindow
- ) revert L1_NOT_PROVEABLE();
- }
-
- TaikoData.Transition storage tran;
-
- uint32 tid =
- LibUtils.getTransitionId(state, blk, slot, evidence.parentHash);
+ // Each transition is uniquely identified by the parentHash, with the
+ // blockHash and signalRoot open for later updates as higher-tier proofs
+ // become available. In cases where a transition with the specified
+ // parentHash does not exist, the transition ID (tid) will be set to 0.
+ uint32 tid = LibUtils.getTransitionId(state, blk, slot, tran.parentHash);
+ TaikoData.TransitionState storage ts;
if (tid == 0) {
- tid = blk.nextTransitionId;
-
- // Unchecked is safe:
- // - Not realistic 2**32 different fork choice per block will be
- // proven and none of them is valid
+ // In cases where a transition with the provided parentHash is not
+ // found, we must essentially "create" one and set it to its initial
+ // state. This initial state can be viewed as a special transition
+ // on tier-0.
+ //
+ // Subsequently, we transform this tier-0 transition into a
+ // non-zero-tier transition with a proof. This approach ensures that
+ // the same logic is applicable for both 0-to-non-zero transition
+ // updates and non-zero-to-non-zero transition updates.
unchecked {
- ++blk.nextTransitionId;
+ // Unchecked is safe: Not realistic 2**32 different fork choice
+ // per block will be proven and none of them is valid
+ tid = blk.nextTransitionId++;
}
- tran = state.transitions[slot][tid];
+ // Keep in mind that state.transitions are also reusable storage
+ // slots, so it's necessary to reinitialize all transition fields
+ // below.
+ ts = state.transitions[slot][tid];
+ ts.blockHash = 0;
+ ts.signalRoot = 0;
+ ts.validityBond = 0;
+ ts.contester = address(0);
+ ts.contestBond = 1; // see below (the value does't matter)
+ ts.timestamp = blk.proposedAt;
+ ts.tier = 0;
+ ts.contestations = 0;
if (tid == 1) {
- // We only write the key when tid is 1.
- tran.key = evidence.parentHash;
+ // This approach serves as a cost-saving technique for the
+ // majority of blocks, where the first transition is expected to
+ // be the correct one. Writing to `tran` is more economical
+ // since it resides in the ring buffer, whereas writing to
+ // `transitionIds` is not as cost-effective.
+ ts.key = tran.parentHash;
+
+ // In the case of this first transition, the block's assigned
+ // prover has the privilege to re-prove it, but only when the
+ // assigned prover matches the previous prover. To ensure this,
+ // we establish the transition's prover as the block's assigned
+ // prover. Consequently, when we carry out a 0-to-non-zero
+ // transition update, the previous prover will consistently be
+ // the block's assigned prover.
+ //
+ // While alternative implementations are possible, introducing
+ // such changes would require additional if-else logic.
+ ts.prover = blk.assignedProver;
} else {
- state.transitionIds[blk.blockId][evidence.parentHash] = tid;
+ // In scenarios where this transition is not the first one, we
+ // straightforwardly reset the transition prover to address
+ // zero.
+ ts.prover = address(0);
+
+ // Furthermore, we index the transition for future retrieval.
+ // It's worth emphasizing that this mapping for indexing is not
+ // reusable. However, given that the majority of blocks will
+ // only possess one transition — the correct one — we don't need
+ // to be concerned about the cost in this case.
+ state.transitionIds[blk.blockId][tran.parentHash] = tid;
}
- } else if (evidence.prover == LibUtils.ORACLE_PROVER) {
- // This is the branch the oracle prover is trying to overwrite
- // We need to check the previous proof is not the same as the
- // new proof
- tran = state.transitions[slot][tid];
- if (
- tran.blockHash == evidence.blockHash
- && tran.signalRoot == evidence.signalRoot
- ) revert L1_SAME_PROOF();
} else {
- revert L1_ALREADY_PROVEN();
+ // A transition with the provided parentHash has been located.
+ ts = state.transitions[slot][tid];
+ if (ts.tier < meta.minTier) {
+ revert L1_UNEXPECTED_TRANSITION_TIER();
+ }
}
- tran.blockHash = evidence.blockHash;
- tran.signalRoot = evidence.signalRoot;
- tran.prover = evidence.prover;
- tran.provenAt = uint64(block.timestamp);
-
- IProofVerifier(resolver.resolve("proof_verifier", false)).verifyProofs(
- blockId, evidence.proofs, getInstance(evidence)
- );
-
- emit BlockProven({
- blockId: blockId,
- parentHash: evidence.parentHash,
- blockHash: evidence.blockHash,
- signalRoot: evidence.signalRoot,
- prover: evidence.prover
- });
- }
+ // The new proof must meet or exceed the minimum tier required by the
+ // block or the previous proof; it cannot be on a lower tier.
+ if (proof.tier == 0 || proof.tier < meta.minTier || proof.tier < ts.tier) {
+ revert L1_INVALID_TIER();
+ }
- function getTransition(
- TaikoData.State storage state,
- TaikoData.Config memory config,
- uint64 blockId,
- bytes32 parentHash
- )
- internal
- view
- returns (TaikoData.Transition storage tran)
- {
- TaikoData.SlotB memory b = state.slotB;
- if (blockId < b.lastVerifiedBlockId || blockId >= b.numBlocks) {
- revert L1_INVALID_BLOCK_ID();
+ // Retrieve the tier configurations. If the tier is not supported, the
+ // subsequent action will result in a revert.
+ ITierProvider.Tier memory tier =
+ ITierProvider(resolver.resolve("tier_provider", false)).getTier(proof.tier);
+
+ maxBlocksToVerify = tier.maxBlocksToVerify;
+
+ // We must verify the proof, and any failure in proof verification will
+ // result in a revert.
+ //
+ // It's crucial to emphasize that the proof can be assessed in two
+ // potential modes: "proving mode" and "contesting mode." However, the
+ // precise verification logic is defined within each tier'IVerifier
+ // contract implementation. We simply specify to the verifier contract
+ // which mode it should utilize - if the new tier is higher than the
+ // previous tier, we employ the proving mode; otherwise, we employ the
+ // contesting mode (the new tier cannot be lower than the previous tier,
+ // this has been checked above).
+ //
+ // It's obvious that proof verification is entirely decoupled from
+ // Taiko's core protocol.
+ {
+ address verifier = resolver.resolve(tier.verifierName, true);
+ // The verifier can be address-zero, signifying that there are no
+ // proof checks for the tier. In practice, this only applies to
+ // optimistic proofs.
+ if (verifier != address(0)) {
+ bool isContesting = proof.tier == ts.tier && tier.contestBond != 0;
+
+ IVerifier.Context memory ctx = IVerifier.Context({
+ metaHash: blk.metaHash,
+ blobHash: meta.blobHash,
+ prover: msg.sender,
+ blockId: blk.blockId,
+ isContesting: isContesting,
+ blobUsed: meta.blobUsed
+ });
+
+ IVerifier(verifier).verifyProof(ctx, tran, proof);
+ }
}
- uint64 slot = blockId % config.blockRingBufferSize;
- TaikoData.Block storage blk = state.blocks[slot];
- if (blk.blockId != blockId) revert L1_BLOCK_ID_MISMATCH();
+ IERC20 tko = IERC20(resolver.resolve("taiko_token", false));
- uint32 tid = LibUtils.getTransitionId(state, blk, slot, parentHash);
- if (tid == 0) revert L1_TRANSITION_NOT_FOUND();
+ if (tier.contestBond == 0) {
+ assert(tier.validityBond == 0);
+ // When contestBond is zero for the current tier, it signifies
+ // it's the top tier. In this case, it can overwrite existing
+ // transitions without contestation.
+ if (tran.blockHash == ts.blockHash && tran.signalRoot == ts.signalRoot) {
+ revert L1_ALREADY_PROVED();
+ }
+ // We should outright prohibit the use of zero values for both
+ // blockHash and signalRoot since, when we initialize a new
+ // transition, we set both blockHash and signalRoot to 0.
+ if (tran.blockHash == 0 || tran.signalRoot == 0) {
+ revert L1_INVALID_TRANSITION();
+ }
- tran = state.transitions[slot][tid];
- }
+ // A special return value from the top tier prover can signal this
+ // contract to return all liveness bond.
+ if (
+ blk.livenessBond > 0 && proof.data.length == 32
+ && bytes32(proof.data) == RETURN_LIVENESS_BOND
+ ) {
+ tko.transfer(blk.assignedProver, blk.livenessBond);
+ blk.livenessBond = 0;
+ }
- function getInstance(TaikoData.BlockEvidence memory evidence)
- internal
- pure
- returns (bytes32 instance)
- {
- if (evidence.prover == LibUtils.ORACLE_PROVER) {
- return 0;
+ ts.blockHash = tran.blockHash;
+ ts.signalRoot = tran.signalRoot;
+ ts.prover = msg.sender;
+
+ if (ts.contester != address(0)) {
+ // At this point we know that the contester was right
+ tko.transfer(ts.contester, ts.validityBond / 4 + ts.contestBond);
+ ts.contester = address(0);
+ ts.validityBond = 0;
+ }
+
+ ts.timestamp = uint64(block.timestamp);
+ ts.tier = proof.tier;
+
+ emit TransitionProved({
+ blockId: blk.blockId,
+ tran: tran,
+ prover: msg.sender,
+ validityBond: 0,
+ tier: proof.tier
+ });
+ } else if (proof.tier == ts.tier) {
+ // Contesting an existing transition requires either the blockHash
+ // or signalRoot to be different. This precaution is necessary
+ // because this `proveBlock` transaction might aim to prove a
+ // transition but could potentially be front-run by another prover
+ // attempting to prove the same transition.
+ if (tran.blockHash == ts.blockHash && tran.signalRoot == ts.signalRoot) {
+ revert L1_ALREADY_PROVED();
+ }
+
+ // The new tier is the same as the previous tier, we are in the
+ // contesting mode.
+ //
+ // It's important to note that tran.blockHash and
+ // tran.signalRoot are not permanently stored, so their
+ // specific values are inconsequential. They only need to differ
+ // from the existing values to signify a contest. Therefore, a
+ // contester can conveniently utilize the value 1 for these two
+ // parameters.
+
+ // The existing transiton must not have been contested.
+ if (ts.contester != address(0)) revert L1_ALREADY_CONTESTED();
+
+ // Burn the contest bond from the prover.
+ tko.transferFrom(msg.sender, address(this), tier.contestBond);
+
+ // We retain the contest bond within the transition, just in
+ // case this configuration is altered to a different value
+ // before the contest is resolved.
+ //
+ // It's worth noting that the previous value of ts.contestBond
+ // doesn't have any significance.
+ ts.contestBond = tier.contestBond;
+ ts.contester = msg.sender;
+ ts.timestamp = uint64(block.timestamp);
+ ts.contestations += 1;
+
+ emit TransitionContested({
+ blockId: blk.blockId,
+ tran: tran,
+ contester: msg.sender,
+ contestBond: tier.contestBond,
+ tier: proof.tier
+ });
} else {
- return keccak256(
- abi.encode(
- evidence.metaHash,
- evidence.parentHash,
- evidence.blockHash,
- evidence.signalRoot,
- evidence.graffiti,
- evidence.prover
- )
- );
+ assert(proof.tier > ts.tier);
+ // The new tier is higher than the previous tier, we are in the
+ // proving mode. This works even if this transition's contester is
+ // address zero, see more info below.
+
+ // zero values are not allowed
+ if (tran.blockHash == 0 || tran.signalRoot == 0) {
+ revert L1_INVALID_TRANSITION();
+ }
+
+ // The ability to prove a transition is granted under the following
+ // two circumstances:
+ //
+ // 1. When the transition has been contested, indicated by
+ // ts.contester not being address zero.
+ //
+ // 2. When the transition's blockHash and/or signalRoot differs. In
+ // this case, the new prover essentially contests the previous proof
+ // but immediately validates it, obviating the requirement to set a
+ // contester, burn the contest bond, and other associated actions.
+ // This streamlined process is applied to 0-to-non-zero transition
+ // updates.
+ if (
+ ts.contester == address(0) && ts.blockHash == tran.blockHash
+ && ts.signalRoot == tran.signalRoot
+ ) {
+ // Alternatively, it can be understood that a transition cannot
+ // be re-approved by higher-tier proofs without undergoing
+ // contestation.
+ revert L1_ALREADY_PROVED();
+ }
+
+ if (tid == 1 && ts.prover == blk.assignedProver) {
+ // For the first transition, (1) if the previous prover is
+ // still the assigned prover, we exclusively grant permission to
+ // the assigned approver to re-prove the block, (2) unless the
+ // proof window has elapsed.
+ if (
+ block.timestamp <= ts.timestamp + tier.provingWindow
+ && msg.sender != blk.assignedProver
+ ) revert L1_NOT_ASSIGNED_PROVER();
+
+ if (
+ block.timestamp > ts.timestamp + tier.provingWindow
+ && msg.sender == blk.assignedProver
+ ) revert L1_ASSIGNED_PROVER_NOT_ALLOWED();
+ } else if (msg.sender == blk.assignedProver) {
+ // However, if the previous prover of the first transition is
+ // not the block's assigned prover, or for any other
+ // transitions, the assigned prover is not permitted to prove
+ // such transitions.
+ revert L1_ASSIGNED_PROVER_NOT_ALLOWED();
+ }
+
+ unchecked {
+ // This is the amount of Taiko tokens to send to the new prover
+ // and the winner of the contest (same amount to both parties).
+ uint256 reward;
+ if (ts.blockHash == tran.blockHash && ts.signalRoot == tran.signalRoot) {
+ assert(ts.contester != address(0));
+ // In the event that the previous prover emerges as the
+ // winner, half of the contest bond is designated as the
+ // reward, to be divided equally between the new prover and
+ // the previous prover -- 1/4 each
+ reward = ts.contestBond / 4;
+
+ // Mint the reward and the validity bond and return it to
+ // the previous prover.
+ tko.transfer(ts.prover, reward + ts.validityBond);
+ } else {
+ // In the event that the contester is the winner, half of
+ // the validity bond is designated as the reward, to be
+ // divided equally between the new prover and the contester.
+ reward = ts.validityBond / 4;
+
+ // It's important to note that the contester is set to zero
+ // for the tier-0 transition. Consequently, we only grant a
+ // reward to the contester if it is not a zero-address.
+ if (ts.contester != address(0)) {
+ tko.transfer(ts.contester, reward + ts.contestBond);
+ } else {
+ // The prover is also the contester, so the reward is
+ // sent to him.
+ tko.transfer(msg.sender, reward);
+ }
+
+ // Given that the contester emerges as the winner, the
+ // previous blockHash and signalRoot are considered
+ // incorrect, and we must replace them with the correct
+ // values.
+ ts.blockHash = tran.blockHash;
+ ts.signalRoot = tran.signalRoot;
+ }
+
+ // Reward this prover.
+ // In theory, the reward can also be zero for certain tiers if
+ // their validity bonds are set to zero.
+ tko.transfer(msg.sender, reward);
+ }
+
+ // Burn the validity bond from the prover.
+ tko.transferFrom(msg.sender, address(this), tier.validityBond);
+
+ // Regardless of whether the previous prover or the contester
+ // emerges as the winner, we consistently erase the contest history
+ // to make this transition appear entirely new.
+ ts.prover = msg.sender;
+ ts.validityBond = tier.validityBond;
+ ts.contester = address(0);
+ ts.contestBond = 1; // to save gas
+ ts.timestamp = uint64(block.timestamp);
+ ts.tier = proof.tier;
+
+ emit TransitionProved({
+ blockId: blk.blockId,
+ tran: tran,
+ prover: msg.sender,
+ validityBond: tier.validityBond,
+ tier: proof.tier
+ });
}
}
}
diff --git a/packages/protocol/contracts/L1/libs/LibTaikoToken.sol b/packages/protocol/contracts/L1/libs/LibTaikoToken.sol
deleted file mode 100644
index 3b4ca51f998..00000000000
--- a/packages/protocol/contracts/L1/libs/LibTaikoToken.sol
+++ /dev/null
@@ -1,72 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { AddressResolver } from "../../common/AddressResolver.sol";
-import { LibFixedPointMath as Math } from
- "../../thirdparty/LibFixedPointMath.sol";
-import { LibMath } from "../../libs/LibMath.sol";
-import { TaikoData } from "../TaikoData.sol";
-import { TaikoToken } from "../TaikoToken.sol";
-
-library LibTaikoToken {
- error L1_INSUFFICIENT_TOKEN();
-
- function withdrawTaikoToken(
- TaikoData.State storage state,
- AddressResolver resolver,
- uint256 amount
- )
- internal
- {
- uint256 balance = state.taikoTokenBalances[msg.sender];
- if (balance < amount) revert L1_INSUFFICIENT_TOKEN();
- // Unchecked is safe per above check
- unchecked {
- state.taikoTokenBalances[msg.sender] -= amount;
- }
-
- TaikoToken(resolver.resolve("taiko_token", false)).transfer(
- msg.sender, amount
- );
- }
-
- function depositTaikoToken(
- TaikoData.State storage state,
- AddressResolver resolver,
- uint256 amount
- )
- internal
- {
- if (amount > 0) {
- TaikoToken(resolver.resolve("taiko_token", false)).transferFrom(
- msg.sender, address(this), amount
- );
- state.taikoTokenBalances[msg.sender] += amount;
- }
- }
-
- function receiveTaikoToken(
- TaikoData.State storage state,
- AddressResolver resolver,
- address from,
- uint256 amount
- )
- internal
- returns (TaikoToken tt)
- {
- tt = TaikoToken(resolver.resolve("taiko_token", false));
- if (state.taikoTokenBalances[from] >= amount) {
- // Safe, see the above constraint
- unchecked {
- state.taikoTokenBalances[from] -= amount;
- }
- } else {
- tt.transferFrom(from, address(this), amount);
- }
- }
-}
diff --git a/packages/protocol/contracts/L1/libs/LibUtils.sol b/packages/protocol/contracts/L1/libs/LibUtils.sol
index db5f4ffc447..5d7ad9c9343 100644
--- a/packages/protocol/contracts/L1/libs/LibUtils.sol
+++ b/packages/protocol/contracts/L1/libs/LibUtils.sol
@@ -6,100 +6,107 @@
pragma solidity ^0.8.20;
-import { LibDepositing } from "./LibDepositing.sol";
-import { LibMath } from "../../libs/LibMath.sol";
-import { TaikoData } from "../TaikoData.sol";
+import "../../common/ICrossChainSync.sol";
+import "../TaikoData.sol";
+/// @title LibUtils
+/// @notice A library that offers helper functions.
library LibUtils {
- using LibMath for uint256;
-
- address internal constant ORACLE_PROVER = address(1);
-
+ // Warning: Any errors defined here must also be defined in TaikoErrors.sol.
+ error L1_BLOCK_MISMATCH();
error L1_INVALID_BLOCK_ID();
+ error L1_TRANSITION_NOT_FOUND();
+ error L1_UNEXPECTED_TRANSITION_ID();
- function getTransitionId(
+ /// @dev Retrieves the transition with a given parentHash.
+ /// This function will revert if the transition is not found.
+ function getTransition(
TaikoData.State storage state,
- TaikoData.Block storage blk,
- uint64 slot,
+ TaikoData.Config memory config,
+ uint64 blockId,
bytes32 parentHash
)
- internal
+ external
view
- returns (uint32 tid)
+ returns (TaikoData.TransitionState storage ts)
{
- if (state.transitions[slot][1].key == parentHash) {
- tid = 1;
- } else {
- tid = state.transitionIds[blk.blockId][parentHash];
+ TaikoData.SlotB memory b = state.slotB;
+ if (blockId < b.lastVerifiedBlockId || blockId >= b.numBlocks) {
+ revert L1_INVALID_BLOCK_ID();
}
- assert(tid < blk.nextTransitionId);
+ uint64 slot = blockId % config.blockRingBufferSize;
+ TaikoData.Block storage blk = state.blocks[slot];
+ if (blk.blockId != blockId) revert L1_BLOCK_MISMATCH();
+
+ uint32 tid = getTransitionId(state, blk, slot, parentHash);
+ if (tid == 0) revert L1_TRANSITION_NOT_FOUND();
+
+ ts = state.transitions[slot][tid];
}
- function getVerifyingTransition(
+ function getSyncedSnippet(
TaikoData.State storage state,
TaikoData.Config memory config,
uint64 blockId
)
- internal
+ external
view
- returns (TaikoData.Transition memory transition)
+ returns (ICrossChainSync.Snippet memory)
{
- uint64 id = blockId == 0 ? state.slotB.lastVerifiedBlockId : blockId;
- uint64 slot = id % config.blockRingBufferSize;
+ uint64 _blockId = blockId == 0 ? state.slotB.lastVerifiedBlockId : blockId;
+ uint64 slot = _blockId % config.blockRingBufferSize;
TaikoData.Block storage blk = state.blocks[slot];
- if (blk.blockId == id) {
- transition = state.transitions[slot][blk.verifiedTransitionId];
- }
+
+ if (blk.blockId != _blockId) revert L1_BLOCK_MISMATCH();
+ if (blk.verifiedTransitionId == 0) revert L1_TRANSITION_NOT_FOUND();
+
+ TaikoData.TransitionState storage transition =
+ state.transitions[slot][blk.verifiedTransitionId];
+
+ return ICrossChainSync.Snippet({
+ remoteBlockId: blockId,
+ syncedInBlock: blk.proposedIn,
+ blockHash: transition.blockHash,
+ signalRoot: transition.signalRoot
+ });
}
- function getStateVariables(TaikoData.State storage state)
- internal
+ /// @dev Retrieves a block based on its ID.
+ function getBlock(
+ TaikoData.State storage state,
+ TaikoData.Config memory config,
+ uint64 blockId
+ )
+ external
view
- returns (TaikoData.StateVariables memory)
+ returns (TaikoData.Block storage blk)
{
- TaikoData.SlotA memory a = state.slotA;
- TaikoData.SlotB memory b = state.slotB;
-
- return TaikoData.StateVariables({
- genesisHeight: a.genesisHeight,
- genesisTimestamp: a.genesisTimestamp,
- numBlocks: b.numBlocks,
- lastVerifiedBlockId: b.lastVerifiedBlockId,
- nextEthDepositToProcess: a.nextEthDepositToProcess,
- numEthDeposits: a.numEthDeposits - a.nextEthDepositToProcess
- });
+ blk = state.blocks[blockId % config.blockRingBufferSize];
+ if (blk.blockId != blockId) {
+ revert L1_INVALID_BLOCK_ID();
+ }
}
- /// @dev Hashing the block metadata.
- function hashMetadata(TaikoData.BlockMetadata memory meta)
+ /// @dev Retrieves the ID of the transition with a given parentHash.
+ /// This function will return 0 if the transtion is not found.
+ function getTransitionId(
+ TaikoData.State storage state,
+ TaikoData.Block storage blk,
+ uint64 slot,
+ bytes32 parentHash
+ )
internal
- pure
- returns (bytes32 hash)
+ view
+ returns (uint32 tid)
{
- uint256[6] memory inputs;
-
- inputs[0] = (uint256(meta.id) << 192) | (uint256(meta.timestamp) << 128)
- | (uint256(meta.l1Height) << 64);
-
- inputs[1] = uint256(meta.l1Hash);
- inputs[2] = uint256(meta.mixHash);
- inputs[3] =
- uint256(LibDepositing.hashEthDeposits(meta.depositsProcessed));
- inputs[4] = uint256(meta.txListHash);
-
- inputs[5] = (uint256(meta.txListByteStart) << 232)
- | (uint256(meta.txListByteEnd) << 208) //
- | (uint256(meta.gasLimit) << 176)
- | (uint256(uint160(meta.proposer)) << 16);
-
- assembly {
- hash := keccak256(inputs, mul(6, 32))
+ if (state.transitions[slot][1].key == parentHash) {
+ tid = 1;
+ } else {
+ tid = state.transitionIds[blk.blockId][parentHash];
}
- }
- function getVerifierName(uint16 id) internal pure returns (bytes32) {
- return bytes32(uint256(0x1000000) + id);
+ if (tid >= blk.nextTransitionId) revert L1_UNEXPECTED_TRANSITION_ID();
}
}
diff --git a/packages/protocol/contracts/L1/libs/LibVerifying.sol b/packages/protocol/contracts/L1/libs/LibVerifying.sol
index 578dd1bce01..3c1c78afe52 100644
--- a/packages/protocol/contracts/L1/libs/LibVerifying.sol
+++ b/packages/protocol/contracts/L1/libs/LibVerifying.sol
@@ -6,111 +6,124 @@
pragma solidity ^0.8.20;
-import { Address } from "@openzeppelin/contracts/utils/Address.sol";
-import { AddressResolver } from "../../common/AddressResolver.sol";
-import { IMintableERC20 } from "../../common/IMintableERC20.sol";
-import { IProver } from "../IProver.sol";
-import { ISignalService } from "../../signal/ISignalService.sol";
-import { LibMath } from "../../libs/LibMath.sol";
-import { LibUtils } from "./LibUtils.sol";
-import { TaikoData } from "../../L1/TaikoData.sol";
-
+import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
+import "../../common/AddressResolver.sol";
+import "../../signal/ISignalService.sol";
+import "../tiers/ITierProvider.sol";
+import "../TaikoData.sol";
+import "./LibUtils.sol";
+
+/// @title LibVerifying
+/// @notice A library for handling block verification in the Taiko protocol.
library LibVerifying {
- using Address for address;
- using LibUtils for TaikoData.State;
- using LibMath for uint256;
-
+ // Warning: Any events defined here must also be defined in TaikoEvents.sol.
event BlockVerified(
- uint256 indexed blockId, address indexed prover, bytes32 blockHash
+ uint256 indexed blockId,
+ address indexed assignedProver,
+ address indexed prover,
+ bytes32 blockHash,
+ bytes32 signalRoot,
+ uint16 tier,
+ uint8 contestations
);
+
event CrossChainSynced(
- uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot
+ uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot
);
- event BondReturned(address indexed to, uint64 blockId, uint256 bond);
- event BondRewarded(address indexed to, uint64 blockId, uint256 bond);
- error L1_BLOCK_ID_MISMATCH();
+ // Warning: Any errors defined here must also be defined in TaikoErrors.sol.
+ error L1_BLOCK_MISMATCH();
error L1_INVALID_CONFIG();
- error L1_UNEXPECTED_TRANSITION_ID();
+ error L1_TRANSITION_ID_ZERO();
function init(
TaikoData.State storage state,
TaikoData.Config memory config,
bytes32 genesisBlockHash
)
- internal
+ external
{
- if (
- config.chainId <= 1 //
- || config.blockMaxProposals == 1
- || config.blockRingBufferSize <= config.blockMaxProposals + 1
- || config.blockMaxGasLimit == 0 || config.blockMaxTxListBytes == 0
- || config.blockTxListExpiry > 30 * 24 hours
- || config.blockMaxTxListBytes > 128 * 1024 //blob up to 128K
- || config.proofRegularCooldown < config.proofOracleCooldown
- || config.proofWindow == 0 || config.proofBond == 0
- || config.proofBond < 10 * config.proposerRewardPerSecond
- || config.ethDepositRingBufferSize <= 1
- || config.ethDepositMinCountPerBlock == 0
- || config.ethDepositMaxCountPerBlock
- < config.ethDepositMinCountPerBlock
- || config.ethDepositMinAmount == 0
- || config.ethDepositMaxAmount <= config.ethDepositMinAmount
- || config.ethDepositMaxAmount >= type(uint96).max
- || config.ethDepositGas == 0 || config.ethDepositMaxFee == 0
- || config.ethDepositMaxFee >= type(uint96).max
- || config.ethDepositMaxFee
- >= type(uint96).max / config.ethDepositMaxCountPerBlock
- ) revert L1_INVALID_CONFIG();
+ if (!isConfigValid(config)) revert L1_INVALID_CONFIG();
// Init state
state.slotA.genesisHeight = uint64(block.number);
state.slotA.genesisTimestamp = uint64(block.timestamp);
state.slotB.numBlocks = 1;
- state.slotB.lastVerifiedAt = uint64(block.timestamp);
// Init the genesis block
TaikoData.Block storage blk = state.blocks[0];
blk.nextTransitionId = 2;
- blk.verifiedTransitionId = 1;
blk.proposedAt = uint64(block.timestamp);
+ blk.verifiedTransitionId = 1;
// Init the first state transition
- TaikoData.Transition storage tran = state.transitions[0][1];
- tran.blockHash = genesisBlockHash;
- tran.provenAt = uint64(block.timestamp);
+ TaikoData.TransitionState storage ts = state.transitions[0][1];
+ ts.blockHash = genesisBlockHash;
+ ts.prover = address(0);
+ ts.timestamp = uint64(block.timestamp);
emit BlockVerified({
blockId: 0,
- prover: LibUtils.ORACLE_PROVER,
- blockHash: genesisBlockHash
+ assignedProver: address(0),
+ prover: address(0),
+ blockHash: genesisBlockHash,
+ signalRoot: 0,
+ tier: 0,
+ contestations: 0
});
}
+ function isConfigValid(TaikoData.Config memory config) public pure returns (bool isValid) {
+ if (
+ config.chainId <= 1 //
+ || config.blockMaxProposals == 1
+ || config.blockRingBufferSize <= config.blockMaxProposals + 1
+ || config.blockMaxGasLimit == 0 || config.blockMaxTxListBytes == 0
+ || config.blockMaxTxListBytes > 128 * 1024 // calldata up to 128K
+ || config.livenessBond == 0 || config.ethDepositRingBufferSize <= 1
+ || config.ethDepositMinCountPerBlock == 0
+ || config.ethDepositMaxCountPerBlock < config.ethDepositMinCountPerBlock
+ || config.ethDepositMinAmount == 0
+ || config.ethDepositMaxAmount <= config.ethDepositMinAmount
+ || config.ethDepositMaxAmount >= type(uint96).max || config.ethDepositGas == 0
+ || config.ethDepositMaxFee == 0 || config.ethDepositMaxFee >= type(uint96).max
+ || config.ethDepositMaxFee >= type(uint96).max / config.ethDepositMaxCountPerBlock
+ ) return false;
+
+ return true;
+ }
+
+ /// @dev Verifies up to N blocks.
function verifyBlocks(
TaikoData.State storage state,
TaikoData.Config memory config,
AddressResolver resolver,
- uint64 maxBlocks
+ uint64 maxBlocksToVerify
)
internal
{
+ // Retrieve the latest verified block and the associated transition used
+ // for its verification.
TaikoData.SlotB memory b = state.slotB;
uint64 blockId = b.lastVerifiedBlockId;
uint64 slot = blockId % config.blockRingBufferSize;
+
TaikoData.Block storage blk = state.blocks[slot];
- if (blk.blockId != blockId) revert L1_BLOCK_ID_MISMATCH();
+ if (blk.blockId != blockId) revert L1_BLOCK_MISMATCH();
uint32 tid = blk.verifiedTransitionId;
- if (tid == 0) revert L1_UNEXPECTED_TRANSITION_ID();
- bytes32 blockHash = state.transitions[slot][tid].blockHash;
+ // The following scenario should never occur but is included as a
+ // precaution.
+ if (tid == 0) revert L1_TRANSITION_ID_ZERO();
+ // The `blockHash` variable represents the most recently trusted
+ // blockHash on L2.
+ bytes32 blockHash = state.transitions[slot][tid].blockHash;
bytes32 signalRoot;
- TaikoData.Transition storage tran;
-
uint64 processed;
+ address tierProvider;
// Unchecked is safe:
// - assignment is within ranges
@@ -119,47 +132,87 @@ library LibVerifying {
unchecked {
++blockId;
- while (blockId < b.numBlocks && processed < maxBlocks) {
+ while (blockId < b.numBlocks && processed < maxBlocksToVerify) {
slot = blockId % config.blockRingBufferSize;
+
blk = state.blocks[slot];
- if (blk.blockId != blockId) revert L1_BLOCK_ID_MISMATCH();
+ if (blk.blockId != blockId) revert L1_BLOCK_MISMATCH();
tid = LibUtils.getTransitionId(state, blk, slot, blockHash);
+ // When `tid` is 0, it indicates that there is no proven
+ // transition with its parentHash equal to the blockHash of the
+ // most recently verified block.
if (tid == 0) break;
- tran = state.transitions[slot][tid];
- if (tran.prover == address(0)) break;
+ // A transition with the correct `parentHash` has been located.
+ TaikoData.TransitionState storage ts = state.transitions[slot][tid];
- uint256 proofCooldown = tran.prover == LibUtils.ORACLE_PROVER
- ? config.proofOracleCooldown
- : config.proofRegularCooldown;
- if (block.timestamp <= tran.provenAt + proofCooldown) {
+ // It's not possible to verify this block if either the
+ // transition is contested and awaiting higher-tier proof or if
+ // the transition is still within its cooldown period.
+ if (ts.contester != address(0)) {
break;
+ } else {
+ if (tierProvider == address(0)) {
+ tierProvider = resolver.resolve("tier_provider", false);
+ }
+ if (
+ uint256(ITierProvider(tierProvider).getTier(ts.tier).cooldownWindow)
+ + ts.timestamp > block.timestamp
+ ) {
+ // If cooldownWindow is 0, the block can theoretically
+ // be proved and verified within the same L1 block.
+ break;
+ }
}
- blockHash = tran.blockHash;
- signalRoot = tran.signalRoot;
+ // Mark this block as verified
blk.verifiedTransitionId = tid;
- // If the default assigned prover is the oracle do not refund
- // because was not even charged.
- if (blk.prover != LibUtils.ORACLE_PROVER) {
- // Refund bond or give 1/4 of it to the actual prover and
- // burn the rest.
- if (
- tran.prover == LibUtils.ORACLE_PROVER
- || tran.provenAt <= blk.proposedAt + config.proofWindow
- ) {
- state.taikoTokenBalances[blk.prover] += blk.proofBond;
- emit BondReturned(blk.prover, blockId, blk.proofBond);
- } else {
- uint256 rewardAmount = blk.proofBond / 4;
- state.taikoTokenBalances[tran.prover] += rewardAmount;
- emit BondRewarded(tran.prover, blockId, rewardAmount);
- }
+ // Update variables
+ blockHash = ts.blockHash;
+ signalRoot = ts.signalRoot;
+
+ // We consistently return the liveness bond and the validity
+ // bond to the actual prover of the transition utilized for
+ // block verification. If the actual prover happens to be the
+ // block's assigned prover, he will receive both deposits,
+ // ultimately earning the proving fee paid during block
+ // proposal. In contrast, if the actual prover is different from
+ // the block's assigned prover, the liveness bond serves as a
+ // reward to the actual prover, while the assigned prover
+ // forfeits his liveness bond due to failure to fulfill their
+ // commitment.
+ uint256 bondToReturn = uint256(ts.validityBond) + blk.livenessBond;
+
+ // Nevertheless, it's possible for the actual prover to be the
+ // same individual or entity as the block's assigned prover.
+ // Consequently, we have chosen to grant the actual prover only
+ // half of the liveness bond as a reward.
+ if (ts.prover != blk.assignedProver) {
+ bondToReturn -= blk.livenessBond / 2;
}
- emit BlockVerified(blockId, tran.prover, tran.blockHash);
+ IERC20 tko = IERC20(resolver.resolve("taiko_token", false));
+ tko.transfer(ts.prover, bondToReturn);
+
+ // Note: We exclusively address the bonds linked to the
+ // transition used for verification. While there may exist
+ // other transitions for this block, we disregard them entirely.
+ // The bonds for these other transitions are burned either when
+ // the transitions are generated or proven. In such cases, both
+ // the provers and contesters of of those transitions forfeit
+ // their bonds.
+
+ emit BlockVerified({
+ blockId: blockId,
+ assignedProver: blk.assignedProver,
+ prover: ts.prover,
+ blockHash: blockHash,
+ signalRoot: signalRoot,
+ tier: ts.tier,
+ contestations: ts.contestations
+ });
++blockId;
++processed;
@@ -167,19 +220,16 @@ library LibVerifying {
if (processed > 0) {
uint64 lastVerifiedBlockId = b.lastVerifiedBlockId + processed;
+
+ // Update protocol level state variables
state.slotB.lastVerifiedBlockId = lastVerifiedBlockId;
- state.slotB.lastVerifiedAt = uint64(block.timestamp);
-
- if (config.relaySignalRoot) {
- // Send the L2's signal root to the signal service so other
- // TaikoL1 deployments, if they share the same signal
- // service, can relay the signal to their corresponding
- // TaikoL2 contract.
- ISignalService(resolver.resolve("signal_service", false))
- .sendSignal(signalRoot);
- }
+
+ // Store the L2's signal root as a signal to the local signal
+ // service to allow for multi-hop bridging.
+ ISignalService(resolver.resolve("signal_service", false)).sendSignal(signalRoot);
+
emit CrossChainSynced(
- lastVerifiedBlockId, blockHash, signalRoot
+ uint64(block.number), lastVerifiedBlockId, blockHash, signalRoot
);
}
}
diff --git a/packages/protocol/contracts/L1/libs/verifiers/LibZKPVerifier.sol b/packages/protocol/contracts/L1/libs/verifiers/LibZKPVerifier.sol
deleted file mode 100644
index 14f4a35a491..00000000000
--- a/packages/protocol/contracts/L1/libs/verifiers/LibZKPVerifier.sol
+++ /dev/null
@@ -1,45 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { AddressResolver } from "../../../common/AddressResolver.sol";
-import { LibUtils } from "../LibUtils.sol";
-import { TaikoData } from "../../TaikoData.sol";
-
-/// @title LibZKPVerifier
-/// @notice A library for verifying ZK proofs in the Taiko protocol.
-library LibZKPVerifier {
- error L1_INVALID_PROOF();
-
- /// @dev Verifies the provided proof using the designated verifier.
- /// @param resolver The {AddressResolver} instance to resolve the verifier's
- /// address.
- /// @param proof The ZKP to verify.
- /// @param verifierId The identifier of the ZKP verifier.
- function verifyProof(
- AddressResolver resolver,
- bytes memory proof,
- uint16 verifierId
- )
- internal
- view
- {
- // Resolve the verifier's name and obtain its address.
- address verifierAddress =
- resolver.resolve(LibUtils.getVerifierName(verifierId), false);
-
- // Call the verifier contract with the provided proof.
- (bool verified, bytes memory ret) =
- verifierAddress.staticcall(bytes.concat(proof));
-
- // Check if the proof is valid.
- if (!verified || ret.length != 32 || bytes32(ret) != keccak256("taiko"))
- {
- revert L1_INVALID_PROOF();
- }
- }
-}
diff --git a/packages/protocol/contracts/L1/provers/GuardianProver.sol b/packages/protocol/contracts/L1/provers/GuardianProver.sol
new file mode 100644
index 00000000000..4d49f127478
--- /dev/null
+++ b/packages/protocol/contracts/L1/provers/GuardianProver.sol
@@ -0,0 +1,47 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "../tiers/ITierProvider.sol";
+import "./Guardians.sol";
+
+/// @title GuardianProver
+contract GuardianProver is Guardians {
+ error PROVING_FAILED();
+
+ /// @notice Initializes the contract with the provided address manager.
+ /// @param _addressManager The address of the address manager contract.
+ function init(address _addressManager) external initializer {
+ __Essential_init(_addressManager);
+ }
+
+ /// @dev Called by guardians to approve a guardian proof
+ function approve(
+ TaikoData.BlockMetadata calldata meta,
+ TaikoData.Transition calldata tran,
+ TaikoData.TierProof calldata proof
+ )
+ external
+ whenNotPaused
+ nonReentrant
+ returns (bool approved)
+ {
+ if (proof.tier != LibTiers.TIER_GUARDIAN) revert INVALID_PROOF();
+ bytes32 hash = keccak256(abi.encode(meta, tran));
+ approved = approve(meta.id, hash);
+
+ if (approved) {
+ deleteApproval(hash);
+ bytes memory data = abi.encodeWithSignature(
+ "proveBlock(uint64,bytes)", meta.id, abi.encode(meta, tran, proof)
+ );
+
+ (bool success,) = resolve("taiko", false).call(data);
+ if (!success) revert PROVING_FAILED();
+ }
+ }
+}
diff --git a/packages/protocol/contracts/L1/provers/Guardians.sol b/packages/protocol/contracts/L1/provers/Guardians.sol
new file mode 100644
index 00000000000..5976e665022
--- /dev/null
+++ b/packages/protocol/contracts/L1/provers/Guardians.sol
@@ -0,0 +1,108 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "../../common/EssentialContract.sol";
+import "../TaikoData.sol";
+
+/// @title Guardians
+abstract contract Guardians is EssentialContract {
+ uint256 public constant MIN_NUM_GUARDIANS = 5;
+
+ mapping(address guardian => uint256 id) public guardianIds; // slot 1
+ mapping(uint32 version => mapping(bytes32 => uint256 approvalBits)) internal _approvals;
+ address[] public guardians; // slot 3
+ uint32 public version; // slot 4
+ uint32 public minGuardians;
+
+ uint256[46] private __gap;
+
+ event GuardiansUpdated(uint32 version, address[] guardians);
+ event Approved(uint256 indexed operationId, uint256 approvalBits, bool proofSubmitted);
+
+ error INVALID_GUARDIAN();
+ error INVALID_GUARDIAN_SET();
+ error INVALID_MIN_GUARDIANS();
+ error INVALID_PROOF();
+
+ /// @notice Set the set of guardians
+ /// @param _guardians The new set of guardians
+ function setGuardians(
+ address[] memory _guardians,
+ uint8 _minGuardians
+ )
+ external
+ onlyOwner
+ nonReentrant
+ {
+ if (_guardians.length < MIN_NUM_GUARDIANS || _guardians.length > type(uint8).max) {
+ revert INVALID_GUARDIAN_SET();
+ }
+ if (
+ _minGuardians == 0 || _minGuardians < _guardians.length / 2
+ || _minGuardians > _guardians.length
+ ) revert INVALID_MIN_GUARDIANS();
+
+ // Delete current guardians data
+ for (uint256 i; i < guardians.length; ++i) {
+ delete guardianIds[guardians[i]];
+ }
+ assembly {
+ sstore(guardians.slot, 0)
+ }
+
+ for (uint256 i = 0; i < _guardians.length;) {
+ address guardian = _guardians[i];
+ if (guardian == address(0)) revert INVALID_GUARDIAN();
+ if (guardianIds[guardian] != 0) revert INVALID_GUARDIAN_SET();
+
+ // Save and index the guardian
+ guardians.push(guardian);
+ guardianIds[guardian] = ++i;
+ }
+
+ minGuardians = _minGuardians;
+ emit GuardiansUpdated(++version, _guardians);
+ }
+
+ function isApproved(bytes32 hash) public view returns (bool) {
+ return isApproved(_approvals[version][hash]);
+ }
+
+ function numGuardians() public view returns (uint256) {
+ return guardians.length;
+ }
+
+ function approve(uint256 operationId, bytes32 hash) internal returns (bool approved) {
+ uint256 id = guardianIds[msg.sender];
+ if (id == 0) revert INVALID_GUARDIAN();
+
+ unchecked {
+ _approvals[version][hash] |= 1 << (id - 1);
+ }
+
+ approved = isApproved(_approvals[version][hash]);
+ emit Approved(operationId, _approvals[version][hash], approved);
+ }
+
+ function deleteApproval(bytes32 hash) internal {
+ delete _approvals[version][hash];
+ }
+
+ function isApproved(uint256 approvalBits) internal view returns (bool) {
+ uint256 count;
+ uint256 bits = approvalBits;
+ unchecked {
+ for (uint256 i; i < guardians.length; ++i) {
+ if (bits & 1 == 1) ++count;
+ if (count == minGuardians) return true;
+ bits >>= 1;
+ }
+ }
+ return false;
+ }
+}
diff --git a/packages/protocol/contracts/L1/tiers/ITierProvider.sol b/packages/protocol/contracts/L1/tiers/ITierProvider.sol
new file mode 100644
index 00000000000..3425380be67
--- /dev/null
+++ b/packages/protocol/contracts/L1/tiers/ITierProvider.sol
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+/// @title ITierProvider
+/// @notice Defines interface to return tier configuration.
+interface ITierProvider {
+ struct Tier {
+ bytes32 verifierName;
+ uint96 validityBond;
+ uint96 contestBond;
+ uint24 cooldownWindow;
+ uint16 provingWindow;
+ uint8 maxBlocksToVerify;
+ }
+
+ /// @dev Retrieves the configuration for a specified tier.
+ function getTier(uint16 tierId) external view returns (Tier memory);
+
+ /// @dev Retrieves the IDs of all supported tiers.
+ /// Note that the core protocol requires the number of tiers to be smaller
+ /// than 256. In reality, this number should be much smaller.
+ function getTierIds() external view returns (uint16[] memory);
+
+ /// @dev Determines the minimal tier for a block based on a random input.
+ function getMinTier(uint256 rand) external view returns (uint16);
+}
+
+/// @dev Tier ID cannot be zero!
+library LibTiers {
+ uint16 public constant TIER_OPTIMISTIC = 100;
+ uint16 public constant TIER_SGX = 200;
+ uint16 public constant TIER_PSE_ZKEVM = 300;
+ uint16 public constant TIER_SGX_AND_PSE_ZKEVM = 400;
+ uint16 public constant TIER_GUARDIAN = 1000;
+}
diff --git a/packages/protocol/contracts/L1/tiers/TaikoA6TierProvider.sol b/packages/protocol/contracts/L1/tiers/TaikoA6TierProvider.sol
new file mode 100644
index 00000000000..66733440a90
--- /dev/null
+++ b/packages/protocol/contracts/L1/tiers/TaikoA6TierProvider.sol
@@ -0,0 +1,92 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "../../common/EssentialContract.sol";
+import "./ITierProvider.sol";
+
+/// @title TaikoA6TierProvider
+/// @dev Labeled in AddressResolver as "tier_provider"
+/// @dev Assuming liveness bound is 250TKO.
+// Taiko token's total supply is 1 billion. Assuming block time is 2 second, and
+// the cool down period is 2 days. In 2 days, we can have (2*86400/2)=86400
+// blocks. Assuming 10% tokens are used in bonds, then each block may use up to
+// these many tokens: 1,000,000,000 * 10% / 86400=1157 TOK per block, which is
+// about 722 USD.
+contract TaikoA6TierProvider is EssentialContract, ITierProvider {
+ error TIER_NOT_FOUND();
+
+ /// @notice Initializes the contract with the provided address manager.
+ function init() external initializer {
+ __Essential_init();
+ }
+
+ function getTier(uint16 tierId) public pure override returns (ITierProvider.Tier memory) {
+ if (tierId == LibTiers.TIER_OPTIMISTIC) {
+ return ITierProvider.Tier({
+ verifierName: "tier_optimistic",
+ validityBond: 1000 ether, // TKO
+ contestBond: 1000 ether, // TKO
+ cooldownWindow: 24 hours,
+ provingWindow: 2 hours,
+ maxBlocksToVerify: 10
+ });
+ }
+
+ if (tierId == LibTiers.TIER_SGX) {
+ return ITierProvider.Tier({
+ verifierName: "tier_sgx",
+ validityBond: 500 ether, // TKO
+ contestBond: 500 ether, // TKO
+ cooldownWindow: 24 hours,
+ provingWindow: 4 hours,
+ maxBlocksToVerify: 8
+ });
+ }
+
+ if (tierId == LibTiers.TIER_SGX_AND_PSE_ZKEVM) {
+ return ITierProvider.Tier({
+ verifierName: "tier_sgx_and_pse_zkevm",
+ validityBond: 250 ether, // TKO
+ contestBond: 250 ether, // TKO
+ cooldownWindow: 24 hours,
+ provingWindow: 6 hours,
+ maxBlocksToVerify: 6
+ });
+ }
+
+ if (tierId == LibTiers.TIER_GUARDIAN) {
+ return ITierProvider.Tier({
+ verifierName: "tier_guardian",
+ validityBond: 0,
+ contestBond: 0, // not contestable
+ cooldownWindow: 24 hours,
+ provingWindow: 8 hours,
+ maxBlocksToVerify: 4
+ });
+ }
+
+ revert TIER_NOT_FOUND();
+ }
+
+ function getTierIds() public pure override returns (uint16[] memory tiers) {
+ tiers = new uint16[](4);
+ tiers[0] = LibTiers.TIER_OPTIMISTIC;
+ tiers[1] = LibTiers.TIER_SGX;
+ tiers[2] = LibTiers.TIER_SGX_AND_PSE_ZKEVM;
+ tiers[3] = LibTiers.TIER_GUARDIAN;
+ }
+
+ function getMinTier(uint256 rand) public pure override returns (uint16) {
+ // 0.2% will be selected to require PSE zkEVM + SGX proofs.
+ if (rand % 500 == 0) return LibTiers.TIER_SGX_AND_PSE_ZKEVM;
+ // 10% will be selected to require SGX proofs.
+ if (rand % 10 == 0) return LibTiers.TIER_SGX;
+ // Other blocks are optimisitc, without validity proofs.
+ return LibTiers.TIER_OPTIMISTIC;
+ }
+}
diff --git a/packages/protocol/contracts/L1/verifiers/GuardianVerifier.sol b/packages/protocol/contracts/L1/verifiers/GuardianVerifier.sol
new file mode 100644
index 00000000000..dc077e869d6
--- /dev/null
+++ b/packages/protocol/contracts/L1/verifiers/GuardianVerifier.sol
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "../../common/EssentialContract.sol";
+import "../TaikoData.sol";
+import "./IVerifier.sol";
+
+/// @title GuardianVerifier
+contract GuardianVerifier is EssentialContract, IVerifier {
+ uint256[50] private __gap;
+
+ error PERMISSION_DENIED();
+
+ /// @notice Initializes the contract with the provided address manager.
+ /// @param _addressManager The address of the address manager contract.
+ function init(address _addressManager) external initializer {
+ __Essential_init(_addressManager);
+ }
+
+ /// @inheritdoc IVerifier
+ function verifyProof(
+ Context calldata ctx,
+ TaikoData.Transition calldata,
+ TaikoData.TierProof calldata
+ )
+ external
+ view
+ {
+ if (ctx.prover != resolve("guardian_prover", false)) {
+ revert PERMISSION_DENIED();
+ }
+ }
+}
diff --git a/packages/protocol/contracts/L1/verifiers/IVerifier.sol b/packages/protocol/contracts/L1/verifiers/IVerifier.sol
new file mode 100644
index 00000000000..81cfa57b710
--- /dev/null
+++ b/packages/protocol/contracts/L1/verifiers/IVerifier.sol
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "../TaikoData.sol";
+
+/// @title IVerifier Interface
+/// @notice Defines the function that handles proof verification.
+interface IVerifier {
+ struct Context {
+ bytes32 metaHash;
+ bytes32 blobHash;
+ address prover;
+ uint64 blockId;
+ bool isContesting;
+ bool blobUsed;
+ }
+
+ function verifyProof(
+ Context calldata ctx,
+ TaikoData.Transition calldata tran,
+ TaikoData.TierProof calldata proof
+ )
+ external;
+}
diff --git a/packages/protocol/contracts/libs/yul/PlonkVerifier.yulp b/packages/protocol/contracts/L1/verifiers/PlonkVerifier.yulp
similarity index 99%
rename from packages/protocol/contracts/libs/yul/PlonkVerifier.yulp
rename to packages/protocol/contracts/L1/verifiers/PlonkVerifier.yulp
index ff337407c41..570e425c7dc 100644
--- a/packages/protocol/contracts/libs/yul/PlonkVerifier.yulp
+++ b/packages/protocol/contracts/L1/verifiers/PlonkVerifier.yulp
@@ -1,4 +1,5 @@
// Code generated - DO NOT EDIT.
+// Generated using https://github.com/privacy-scaling-explorations/snark-verifier
// SPDX-License-Identifier: MIT
// _____ _ _ _ _
// |_ _|_ _(_) |_____ | | __ _| |__ ___
diff --git a/packages/protocol/contracts/L1/verifiers/PseZkVerifier.sol b/packages/protocol/contracts/L1/verifiers/PseZkVerifier.sol
new file mode 100644
index 00000000000..1cd78bfcde3
--- /dev/null
+++ b/packages/protocol/contracts/L1/verifiers/PseZkVerifier.sol
@@ -0,0 +1,140 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "../../4844/Lib4844.sol";
+import "../../common/EssentialContract.sol";
+import "../../thirdparty/LibBytesUtils.sol";
+import "../TaikoData.sol";
+import "./IVerifier.sol";
+
+/// @title PseZkVerifier
+/// @notice See the documentation in {IVerifier}.
+contract PseZkVerifier is EssentialContract, IVerifier {
+ struct PointProof {
+ bytes32 txListHash;
+ uint256 pointValue;
+ bytes1[48] pointCommitment;
+ bytes1[48] pointProof;
+ }
+
+ struct ZkEvmProof {
+ uint16 verifierId;
+ bytes zkp;
+ bytes pointProof;
+ }
+
+ uint256[50] private __gap;
+
+ error L1_INVALID_PROOF();
+
+ /// @notice Initializes the contract with the provided address manager.
+ /// @param _addressManager The address of the address manager contract.
+ function init(address _addressManager) external initializer {
+ __Essential_init(_addressManager);
+ }
+
+ /// @inheritdoc IVerifier
+ function verifyProof(
+ Context calldata ctx,
+ TaikoData.Transition calldata tran,
+ TaikoData.TierProof calldata proof
+ )
+ external
+ view
+ {
+ // Do not run proof verification to contest an existing proof
+ if (ctx.isContesting) return;
+
+ ZkEvmProof memory zkProof = abi.decode(proof.data, (ZkEvmProof));
+
+ bytes32 instance;
+ if (ctx.blobUsed) {
+ PointProof memory pf = abi.decode(zkProof.pointProof, (PointProof));
+
+ instance = calcInstance({
+ tran: tran,
+ prover: ctx.prover,
+ metaHash: ctx.metaHash,
+ txListHash: pf.txListHash,
+ pointValue: pf.pointValue
+ });
+
+ Lib4844.evaluatePoint({
+ blobHash: ctx.blobHash,
+ x: calc4844PointEvalX(ctx.blobHash, pf.txListHash),
+ y: pf.pointValue,
+ commitment: pf.pointCommitment,
+ pointProof: pf.pointProof
+ });
+ } else {
+ assert(zkProof.pointProof.length == 0);
+ instance = calcInstance({
+ tran: tran,
+ prover: ctx.prover,
+ metaHash: ctx.metaHash,
+ txListHash: ctx.blobHash,
+ pointValue: 0
+ });
+ }
+
+ // Validate the instance using bytes utilities.
+ bool verified = LibBytesUtils.equal(
+ LibBytesUtils.slice(zkProof.zkp, 0, 32), bytes.concat(bytes16(0), bytes16(instance))
+ );
+
+ if (!verified) revert L1_INVALID_PROOF();
+
+ verified = LibBytesUtils.equal(
+ LibBytesUtils.slice(zkProof.zkp, 32, 32),
+ bytes.concat(bytes16(0), bytes16(uint128(uint256(instance))))
+ );
+ if (!verified) revert L1_INVALID_PROOF();
+
+ // Delegate to the ZKP verifier library to validate the proof.
+ // Resolve the verifier's name and obtain its address.
+ address verifierAddress = resolve(getVerifierName(zkProof.verifierId), false);
+
+ // Call the verifier contract with the provided proof.
+ bytes memory ret;
+ (verified, ret) = verifierAddress.staticcall(bytes.concat(zkProof.zkp));
+
+ // Check if the proof is valid.
+ if (!verified) revert L1_INVALID_PROOF();
+ if (ret.length != 32) revert L1_INVALID_PROOF();
+ if (bytes32(ret) != keccak256("taiko")) revert L1_INVALID_PROOF();
+ }
+
+ function calc4844PointEvalX(
+ bytes32 blobHash,
+ bytes32 txListHash
+ )
+ public
+ pure
+ returns (uint256)
+ {
+ return uint256(keccak256(abi.encodePacked(blobHash, txListHash))) % Lib4844.BLS_MODULUS;
+ }
+
+ function calcInstance(
+ TaikoData.Transition memory tran,
+ address prover,
+ bytes32 metaHash,
+ bytes32 txListHash,
+ uint256 pointValue
+ )
+ public
+ pure
+ returns (bytes32 instance)
+ {
+ return keccak256(abi.encode(tran, prover, metaHash, txListHash, pointValue));
+ }
+
+ function getVerifierName(uint16 id) public pure returns (bytes32) {
+ return bytes32(uint256(0x1000000) + id);
+ }
+}
diff --git a/packages/protocol/contracts/L1/verifiers/SgxAndZkVerifier.sol b/packages/protocol/contracts/L1/verifiers/SgxAndZkVerifier.sol
new file mode 100644
index 00000000000..5b50859b475
--- /dev/null
+++ b/packages/protocol/contracts/L1/verifiers/SgxAndZkVerifier.sol
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "../../common/EssentialContract.sol";
+import "../../thirdparty/LibBytesUtils.sol";
+import "../TaikoData.sol";
+import "./IVerifier.sol";
+
+/// @title SgxAndZkVerifier
+/// @notice See the documentation in {IVerifier}.
+contract SgxAndZkVerifier is EssentialContract, IVerifier {
+ uint8 public constant SGX_PROOF_SIZE = 89;
+ uint256[50] private __gap;
+
+ /// @notice Initializes the contract with the provided address manager.
+ /// @param _addressManager The address of the address manager contract.
+ function init(address _addressManager) external initializer {
+ __Essential_init(_addressManager);
+ }
+
+ /// @inheritdoc IVerifier
+ function verifyProof(
+ Context calldata ctx,
+ TaikoData.Transition calldata tran,
+ TaikoData.TierProof calldata proof
+ )
+ external
+ {
+ TaikoData.TierProof memory _proof;
+ _proof.tier = proof.tier;
+
+ // Verify the SGX part
+ _proof.data = LibBytesUtils.slice(proof.data, 0, SGX_PROOF_SIZE);
+ IVerifier(resolve("tier_sgx", false)).verifyProof(ctx, tran, _proof);
+
+ // Verify the ZK part
+ _proof.data =
+ LibBytesUtils.slice(proof.data, SGX_PROOF_SIZE, (proof.data.length - SGX_PROOF_SIZE));
+ IVerifier(resolve("tier_pse_zkevm", false)).verifyProof(ctx, tran, _proof);
+ }
+}
diff --git a/packages/protocol/contracts/L1/verifiers/SgxVerifier.sol b/packages/protocol/contracts/L1/verifiers/SgxVerifier.sol
new file mode 100644
index 00000000000..8553f212d11
--- /dev/null
+++ b/packages/protocol/contracts/L1/verifiers/SgxVerifier.sol
@@ -0,0 +1,160 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol";
+import "../../common/EssentialContract.sol";
+import "../../thirdparty/LibBytesUtils.sol";
+import "../TaikoData.sol";
+import "./IVerifier.sol";
+
+/// @title SgxVerifier
+/// @notice This contract is the implementation of verifying SGX signature
+/// proofs on-chain. Please see references below!
+/// Reference #1: https://ethresear.ch/t/2fa-zk-rollups-using-sgx/14462
+/// Reference #2: https://github.com/gramineproject/gramine/discussions/1579
+contract SgxVerifier is EssentialContract, IVerifier {
+ /// @dev Each public-private key pair (Ethereum address) is generated within
+ /// the SGX program when it boots up. The off-chain remote attestation
+ /// ensures the validity of the program hash and has the capability of
+ /// bootstrapping the network with trustworthy instances.
+ struct Instance {
+ address addr;
+ uint64 addedAt; // We can calculate if expired
+ }
+
+ uint256 public constant INSTANCE_EXPIRY = 180 days;
+
+ /// @dev For gas savings, we shall assign each SGX instance with an id
+ /// so that when we need to set a new pub key, just write storage once.
+ uint256 public nextInstanceId; // slot 1
+
+ /// @dev One SGX instance is uniquely identified (on-chain) by it's ECDSA
+ /// public key (or rather ethereum address). Once that address is used (by
+ /// proof verification) it has to be overwritten by a new one (representing
+ /// the same instance). This is due to side-channel protection. Also this
+ /// public key shall expire after some time. (For now it is a long enough 6
+ /// months setting.)
+ mapping(uint256 instanceId => Instance) public instances; // slot 2
+
+ uint256[48] private __gap;
+
+ event InstanceAdded(
+ uint256 indexed id, address indexed instance, address replaced, uint256 timstamp
+ );
+
+ error SGX_INVALID_INSTANCE();
+ error SGX_INVALID_INSTANCES();
+ error SGX_INVALID_PROOF();
+
+ /// @notice Initializes the contract with the provided address manager.
+ /// @param _addressManager The address of the address manager contract.
+ function init(address _addressManager) external initializer {
+ __Essential_init(_addressManager);
+ }
+
+ /// @notice Adds trusted SGX instances to the registry.
+ /// @param _instances The address array of trusted SGX instances.
+ /// @return ids The respective instanceId array per addresses.
+ function addInstances(address[] calldata _instances)
+ external
+ onlyOwner
+ returns (uint256[] memory ids)
+ {
+ if (_instances.length == 0) revert SGX_INVALID_INSTANCES();
+ ids = _addInstances(_instances);
+ }
+
+ /// @notice Adds SGX instances to the registry by another SGX instance.
+ /// @param id The id of the SGX instance who is adding new members.
+ /// @param newInstance The new address of this instance.
+ /// @param extraInstances The address array of SGX instances.
+ /// @param signature The signature proving authenticity.
+ /// @return ids The respective instanceId array per addresses.
+ function addInstances(
+ uint256 id,
+ address newInstance,
+ address[] calldata extraInstances,
+ bytes calldata signature
+ )
+ external
+ returns (uint256[] memory ids)
+ {
+ bytes32 signedHash = keccak256(abi.encode("ADD_INSTANCES", extraInstances));
+ address oldInstance = ECDSA.recover(signedHash, signature);
+ if (!_isInstanceValid(id, oldInstance)) revert SGX_INVALID_INSTANCE();
+
+ _replaceInstance(id, oldInstance, newInstance);
+
+ ids = _addInstances(extraInstances);
+ }
+
+ /// @inheritdoc IVerifier
+ function verifyProof(
+ Context calldata ctx,
+ TaikoData.Transition calldata tran,
+ TaikoData.TierProof calldata proof
+ )
+ external
+ {
+ // Do not run proof verification to contest an existing proof
+ if (ctx.isContesting) return;
+
+ // Size is: 89 bytes
+ // 4 bytes + 20 bytes + 65 bytes (signature) = 89
+ if (proof.data.length != 89) revert SGX_INVALID_PROOF();
+
+ uint32 id = uint32(bytes4(LibBytesUtils.slice(proof.data, 0, 4)));
+ address newInstance = address(bytes20(LibBytesUtils.slice(proof.data, 4, 20)));
+ bytes memory signature = LibBytesUtils.slice(proof.data, 24);
+
+ address oldInstance =
+ ECDSA.recover(getSignedHash(tran, newInstance, ctx.prover, ctx.metaHash), signature);
+
+ if (!_isInstanceValid(id, oldInstance)) revert SGX_INVALID_INSTANCE();
+ _replaceInstance(id, oldInstance, newInstance);
+ }
+
+ function getSignedHash(
+ TaikoData.Transition memory tran,
+ address newInstance,
+ address prover,
+ bytes32 metaHash
+ )
+ public
+ pure
+ returns (bytes32 signedHash)
+ {
+ return keccak256(abi.encode(tran, newInstance, prover, metaHash));
+ }
+
+ function _addInstances(address[] calldata _instances) private returns (uint256[] memory ids) {
+ ids = new uint256[](_instances.length);
+
+ for (uint256 i; i < _instances.length; ++i) {
+ if (_instances[i] == address(0)) revert SGX_INVALID_INSTANCE();
+
+ instances[nextInstanceId] = Instance(_instances[i], uint64(block.timestamp));
+ ids[i] = nextInstanceId;
+
+ emit InstanceAdded(nextInstanceId, _instances[i], address(0), block.timestamp);
+
+ nextInstanceId++;
+ }
+ }
+
+ function _replaceInstance(uint256 id, address oldInstance, address newInstance) private {
+ instances[id] = Instance(newInstance, uint64(block.timestamp));
+ emit InstanceAdded(id, newInstance, oldInstance, block.timestamp);
+ }
+
+ function _isInstanceValid(uint256 id, address instance) private view returns (bool) {
+ if (instance == address(0)) return false;
+ if (instance != instances[id].addr) return false;
+ return instances[id].addedAt + INSTANCE_EXPIRY > block.timestamp;
+ }
+}
diff --git a/packages/protocol/contracts/L2/Lib1559Math.sol b/packages/protocol/contracts/L2/Lib1559Math.sol
new file mode 100644
index 00000000000..71595c8173e
--- /dev/null
+++ b/packages/protocol/contracts/L2/Lib1559Math.sol
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "../thirdparty/LibFixedPointMath.sol";
+
+/// @title Lib1559Math
+/// @dev Implementation of e^(x) based bonding curve for EIP-1559
+/// See https://ethresear.ch/t/make-eip-1559-more-like-an-amm-curve/9082
+library Lib1559Math {
+ error EIP1559_INVALID_PARAMS();
+
+ /// @dev eth_qty(excess_gas_issued) / (TARGET * ADJUSTMENT_QUOTIENT)
+ /// @param adjustmentFactor The product of gasTarget and adjustmentQuotient
+ function basefee(uint256 gasExcess, uint256 adjustmentFactor) internal pure returns (uint256) {
+ if (adjustmentFactor == 0) {
+ revert EIP1559_INVALID_PARAMS();
+ }
+
+ return _ethQty(gasExcess, adjustmentFactor) / LibFixedPointMath.SCALING_FACTOR
+ / adjustmentFactor;
+ }
+
+ /// @dev exp(gas_qty / TARGET / ADJUSTMENT_QUOTIENT)
+ function _ethQty(uint256 gasExcess, uint256 adjustmentFactor) private pure returns (uint256) {
+ uint256 input = gasExcess * LibFixedPointMath.SCALING_FACTOR / adjustmentFactor;
+ if (input > LibFixedPointMath.MAX_EXP_INPUT) {
+ input = LibFixedPointMath.MAX_EXP_INPUT;
+ }
+ return uint256(LibFixedPointMath.exp(int256(input)));
+ }
+}
diff --git a/packages/protocol/contracts/L2/TaikoL2.sol b/packages/protocol/contracts/L2/TaikoL2.sol
index e20147b64f5..c38427f57c2 100644
--- a/packages/protocol/contracts/L2/TaikoL2.sol
+++ b/packages/protocol/contracts/L2/TaikoL2.sol
@@ -6,12 +6,12 @@
pragma solidity ^0.8.20;
-import { EssentialContract } from "../common/EssentialContract.sol";
-import { ICrossChainSync } from "../common/ICrossChainSync.sol";
-import { Lib1559Math } from "../libs/Lib1559Math.sol";
-import { LibMath } from "../libs/LibMath.sol";
-import { Proxied } from "../common/Proxied.sol";
-import { TaikoL2Signer } from "./TaikoL2Signer.sol";
+import "../common/EssentialContract.sol";
+import "../common/ICrossChainSync.sol";
+import "../libs/LibMath.sol";
+import "../signal/ISignalService.sol";
+import "./Lib1559Math.sol";
+import "./TaikoL2Signer.sol";
/// @title TaikoL2
/// @notice Taiko L2 is a smart contract that handles cross-layer message
@@ -22,238 +22,147 @@ import { TaikoL2Signer } from "./TaikoL2Signer.sol";
contract TaikoL2 is EssentialContract, TaikoL2Signer, ICrossChainSync {
using LibMath for uint256;
- struct VerifiedBlock {
- bytes32 blockHash;
- bytes32 signalRoot;
- }
-
- struct EIP1559Params {
- uint64 basefee;
- uint32 gasIssuedPerSecond;
- uint64 gasExcessMax;
- uint64 gasTarget;
- uint64 ratio2x1x;
- }
-
- struct EIP1559Config {
- uint128 yscale;
- uint64 xscale;
- uint32 gasIssuedPerSecond;
+ struct Config {
+ uint32 gasTargetPerL1Block;
+ uint8 basefeeAdjustmentQuotient;
}
// Mapping from L2 block numbers to their block hashes.
// All L2 block hashes will be saved in this mapping.
- mapping(uint256 blockId => bytes32 blockHash) private _l2Hashes;
- mapping(uint256 blockId => VerifiedBlock) private _l1VerifiedBlocks;
+ mapping(uint256 blockId => bytes32 blockHash) public l2Hashes;
+ mapping(uint256 l1height => ICrossChainSync.Snippet) public snippets;
// A hash to check the integrity of public inputs.
- bytes32 public publicInputHash; // slot 3
-
- EIP1559Config public eip1559Config; // slot 4
+ address public signalService; // slot 3
+ bytes32 public publicInputHash; // slot 4
- uint64 public parentTimestamp; // slot 5
+ uint64 public gasExcess; // slot 5
uint64 public latestSyncedL1Height;
- uint64 public gasExcess;
- uint64 private __reserved1;
uint256[145] private __gap;
- // Captures all block variables mentioned in
- // https://docs.soliditylang.org/en/v0.8.20/units-and-global-variables.html
- event Anchored(
- uint64 number,
- uint64 basefee,
- uint32 gaslimit,
- uint64 timestamp,
- bytes32 parentHash,
- uint256 prevrandao,
- address coinbase,
- uint64 chainid
- );
-
- event EIP1559ConfigUpdated(EIP1559Config config, uint64 gasExcess);
+ event Anchored(bytes32 parentHash, uint64 gasExcess);
error L2_BASEFEE_MISMATCH();
- error L2_INVALID_1559_PARAMS();
error L2_INVALID_CHAIN_ID();
+ error L2_INVALID_PARAM();
error L2_INVALID_SENDER();
error L2_PUBLIC_INPUT_HASH_MISMATCH();
error L2_TOO_LATE();
/// @notice Initializes the TaikoL2 contract.
- /// @param _addressManager Address of the {AddressManager} contract.
- /// @param _param1559 EIP-1559 parameters to set up the gas pricing model.
- function init(
- address _addressManager,
- EIP1559Params calldata _param1559
- )
- external
- initializer
- {
- EssentialContract._init(_addressManager);
+ /// @param _signalService Address of the {ISignalService} contract.
+ /// @param _gasExcess The initial gasExcess.
+ function init(address _signalService, uint64 _gasExcess) external initializer {
+ __Essential_init();
+
+ if (_signalService == address(0)) revert L2_INVALID_PARAM();
+ signalService = _signalService;
if (block.chainid <= 1 || block.chainid >= type(uint64).max) {
revert L2_INVALID_CHAIN_ID();
}
- if (block.number > 1) revert L2_TOO_LATE();
- parentTimestamp = uint64(block.timestamp);
- (publicInputHash,) = _calcPublicInputHash(block.number);
-
- if (block.number > 0) {
+ if (block.number == 0) {
+ // This is the case in real L2 genesis
+ } else if (block.number == 1) {
+ // This is the case in tests
uint256 parentHeight = block.number - 1;
- _l2Hashes[parentHeight] = blockhash(parentHeight);
+ l2Hashes[parentHeight] = blockhash(parentHeight);
+ } else {
+ revert L2_TOO_LATE();
}
- updateEIP1559Config(_param1559);
+ gasExcess = _gasExcess;
+ (publicInputHash,) = _calcPublicInputHash(block.number);
}
/// @notice Anchors the latest L1 block details to L2 for cross-layer
/// message verification.
- /// @param l1Hash The latest L1 block hash when this block was proposed.
- /// @param l1SignalRoot The latest value of the L1 signal service storage
- /// root.
+ /// @param l1BlockHash The latest L1 block hash when this block was
+ /// proposed.
+ /// @param l1SignalRoot The latest value of the L1 signal root.
/// @param l1Height The latest L1 block height when this block was proposed.
/// @param parentGasUsed The gas used in the parent block.
function anchor(
- bytes32 l1Hash,
+ bytes32 l1BlockHash,
bytes32 l1SignalRoot,
uint64 l1Height,
uint32 parentGasUsed
)
external
{
- if (msg.sender != GOLDEN_TOUCH_ADDRESS) revert L2_INVALID_SENDER();
+ if (
+ l1BlockHash == 0 || l1SignalRoot == 0 || l1Height == 0
+ || (block.number != 1 && parentGasUsed == 0)
+ ) revert L2_INVALID_PARAM();
- uint256 parentHeight = block.number - 1;
- bytes32 parentHash = blockhash(parentHeight);
+ if (msg.sender != GOLDEN_TOUCH_ADDRESS) revert L2_INVALID_SENDER();
- (bytes32 prevPIH, bytes32 currPIH) = _calcPublicInputHash(parentHeight);
+ uint256 parentId;
+ unchecked {
+ parentId = block.number - 1;
+ }
- if (publicInputHash != prevPIH) {
+ // Verify ancestor hashes
+ (bytes32 publicInputHashOld, bytes32 publicInputHashNew) = _calcPublicInputHash(parentId);
+ if (publicInputHash != publicInputHashOld) {
revert L2_PUBLIC_INPUT_HASH_MISMATCH();
}
- // Replace the oldest block hash with the parent's blockhash
- publicInputHash = currPIH;
- _l2Hashes[parentHeight] = parentHash;
+ Config memory config = getConfig();
- latestSyncedL1Height = l1Height;
- _l1VerifiedBlocks[l1Height] = VerifiedBlock(l1Hash, l1SignalRoot);
-
- emit CrossChainSynced(l1Height, l1Hash, l1SignalRoot);
-
- // Check EIP-1559 basefee
+ // Verify the base fee per gas is correct
uint256 basefee;
- EIP1559Config memory config = getEIP1559Config();
- if (config.gasIssuedPerSecond != 0) {
- (basefee, gasExcess) = _calcBasefee({
- config: config,
- timeSinceParent: block.timestamp - parentTimestamp,
- parentGasUsed: parentGasUsed
- });
- }
-
- // On L2, basefee is not burnt, but sent to a treasury instead.
- // The circuits will need to verify the basefee recipient is the
- // designated address.
- if (block.basefee != basefee) {
+ (basefee, gasExcess) = _calc1559BaseFee(config, l1Height, parentGasUsed);
+ if (!skipFeeCheck() && block.basefee != basefee) {
revert L2_BASEFEE_MISMATCH();
}
- parentTimestamp = uint64(block.timestamp);
-
- // We emit this event so circuits can grab its data to verify block
- // variables.
- // If plonk lookup table already has all these data, we can still use
- // this event for debugging purpose.
- emit Anchored({
- number: uint64(block.number),
- basefee: uint64(basefee),
- gaslimit: uint32(block.gaslimit),
- timestamp: uint64(block.timestamp),
- parentHash: parentHash,
- prevrandao: block.prevrandao,
- coinbase: block.coinbase,
- chainid: uint64(block.chainid)
+ // Store the L1's signal root as a signal to the local signal service to
+ // allow for multi-hop bridging.
+ ISignalService(signalService).sendSignal(l1SignalRoot);
+ emit CrossChainSynced(uint64(block.number), l1Height, l1BlockHash, l1SignalRoot);
+
+ // Update state variables
+ l2Hashes[parentId] = blockhash(parentId);
+ snippets[l1Height] = ICrossChainSync.Snippet({
+ remoteBlockId: l1Height,
+ syncedInBlock: uint64(block.number),
+ blockHash: l1BlockHash,
+ signalRoot: l1SignalRoot
});
+ publicInputHash = publicInputHashNew;
+ latestSyncedL1Height = l1Height;
+
+ emit Anchored(blockhash(parentId), gasExcess);
}
- /// @notice Updates EIP-1559 configurations.
- /// @param _param1559 EIP-1559 parameters to set up the gas pricing model.
- function updateEIP1559Config(EIP1559Params calldata _param1559)
+ /// @inheritdoc ICrossChainSync
+ function getSyncedSnippet(uint64 blockId)
public
- onlyOwner
+ view
+ override
+ returns (ICrossChainSync.Snippet memory)
{
- if (_param1559.gasIssuedPerSecond == 0) {
- delete eip1559Config;
- delete gasExcess;
- } else {
- if (
- _param1559.basefee == 0 || _param1559.gasExcessMax == 0
- || _param1559.gasTarget == 0 || _param1559.ratio2x1x == 0
- ) revert L2_INVALID_1559_PARAMS();
-
- (uint128 xscale, uint128 yscale) = Lib1559Math.calculateScales({
- xExcessMax: _param1559.gasExcessMax,
- price: _param1559.basefee,
- target: _param1559.gasTarget,
- ratio2x1x: _param1559.ratio2x1x
- });
-
- if (xscale == 0 || xscale >= type(uint64).max || yscale == 0) {
- revert L2_INVALID_1559_PARAMS();
- }
- eip1559Config.yscale = yscale;
- eip1559Config.xscale = uint64(xscale);
- eip1559Config.gasIssuedPerSecond = _param1559.gasIssuedPerSecond;
-
- gasExcess = _param1559.gasExcessMax / 2;
- }
-
- emit EIP1559ConfigUpdated(eip1559Config, gasExcess);
+ uint256 id = blockId == 0 ? latestSyncedL1Height : blockId;
+ return snippets[id];
}
/// @notice Gets the basefee and gas excess using EIP-1559 configuration for
/// the given parameters.
- /// @param timeSinceParent Time elapsed since the parent block's timestamp.
+ /// @param l1Height The synced L1 height in the next Taiko block
/// @param parentGasUsed Gas used in the parent block.
- /// @return _basefee The calculated EIP-1559 basefee.
+ /// @return basefee The calculated EIP-1559 base fee per gas.
function getBasefee(
- uint64 timeSinceParent,
+ uint64 l1Height,
uint32 parentGasUsed
)
public
view
- returns (uint256 _basefee)
+ returns (uint256 basefee)
{
- (_basefee,) = _calcBasefee({
- config: getEIP1559Config(),
- timeSinceParent: timeSinceParent,
- parentGasUsed: parentGasUsed
- });
- }
-
- /// @inheritdoc ICrossChainSync
- function getCrossChainBlockHash(uint64 blockId)
- public
- view
- override
- returns (bytes32)
- {
- uint256 id = blockId == 0 ? latestSyncedL1Height : blockId;
- return _l1VerifiedBlocks[id].blockHash;
- }
-
- /// @inheritdoc ICrossChainSync
- function getCrossChainSignalRoot(uint64 blockId)
- public
- view
- override
- returns (bytes32)
- {
- uint256 id = blockId == 0 ? latestSyncedL1Height : blockId;
- return _l1VerifiedBlocks[id].signalRoot;
+ (basefee,) = _calc1559BaseFee(getConfig(), l1Height, parentGasUsed);
}
/// @notice Retrieves the block hash for the given L2 block number.
@@ -261,31 +170,29 @@ contract TaikoL2 is EssentialContract, TaikoL2Signer, ICrossChainSync {
/// @return The block hash for the specified L2 block id, or zero if the
/// block id is greater than or equal to the current block number.
function getBlockHash(uint64 blockId) public view returns (bytes32) {
- if (blockId >= block.number) {
- return 0;
- } else if (blockId < block.number && blockId >= block.number - 256) {
- return blockhash(blockId);
- } else {
- return _l2Hashes[blockId];
- }
+ if (blockId >= block.number) return 0;
+ if (blockId >= block.number - 256) return blockhash(blockId);
+ return l2Hashes[blockId];
}
- /// @notice Retrieves the current EIP-1559 configuration details.
- /// @return The current EIP-1559 configuration details, including the
- /// yscale, xscale, and gasIssuedPerSecond parameters.
- function getEIP1559Config()
- public
- view
- virtual
- returns (EIP1559Config memory)
- {
- return eip1559Config;
+ /// @notice Returns EIP1559 related configurations
+ function getConfig() public view virtual returns (Config memory config) {
+ // 4x Ethereum gas target, if we assume most of the time, L2 block time
+ // is 3s, and each block is full (gasUsed is 15_000_000), then its
+ // ~60_000_000, if the network is congester than that, the base fee
+ // will increase.
+ config.gasTargetPerL1Block = 15 * 1e6 * 4;
+ config.basefeeAdjustmentQuotient = 8;
}
+ /// @notice Tells if we need to validate basefee (for simulation).
+ /// @return Returns true to skip checking basefee mismatch.
+ function skipFeeCheck() public pure virtual returns (bool) { }
+
function _calcPublicInputHash(uint256 blockId)
private
view
- returns (bytes32 prevPIH, bytes32 currPIH)
+ returns (bytes32 publicInputHashOld, bytes32 publicInputHashNew)
{
bytes32[256] memory inputs;
@@ -302,50 +209,56 @@ contract TaikoL2 is EssentialContract, TaikoL2Signer, ICrossChainSync {
inputs[255] = bytes32(block.chainid);
assembly {
- prevPIH := keccak256(inputs, mul(256, 32))
+ publicInputHashOld := keccak256(inputs, 8192 /*mul(256, 32)*/ )
}
inputs[blockId % 255] = blockhash(blockId);
assembly {
- currPIH := keccak256(inputs, mul(256, 32))
+ publicInputHashNew := keccak256(inputs, 8192 /*mul(256, 32)*/ )
}
}
- function _calcBasefee(
- EIP1559Config memory config,
- uint256 timeSinceParent,
+ function _calc1559BaseFee(
+ Config memory config,
+ uint64 l1Height,
uint32 parentGasUsed
)
private
view
returns (uint256 _basefee, uint64 _gasExcess)
{
- // Unchecked is safe because:
- // - gasExcess is capped at uint64 max ever, so multiplying with a
- // uint32 value is safe
- // - 'excess' is bigger than 'issued'
- unchecked {
- uint256 issued = timeSinceParent * config.gasIssuedPerSecond;
- uint256 excess = (uint256(gasExcess) + parentGasUsed).max(issued);
- // Very important to cap _gasExcess uint64
- _gasExcess = uint64((excess - issued).min(type(uint64).max));
- }
+ // gasExcess being 0 indicate the dynamic 1559 base fee is disabled.
+ if (gasExcess > 0) {
+ // We always add the gas used by parent block to the gas excess
+ // value as this has already happend
+ uint256 excess = uint256(gasExcess) + parentGasUsed;
+
+ // Calculate how much more gas to issue to offset gas excess.
+ // after each L1 block time, config.gasTarget more gas is issued,
+ // the gas excess will be reduced accordingly.
+ // Note that when latestSyncedL1Height is zero, we skip this step.
+ uint256 numL1Blocks;
+ if (latestSyncedL1Height > 0 && l1Height > latestSyncedL1Height) {
+ numL1Blocks = l1Height - latestSyncedL1Height;
+ }
- _basefee = Lib1559Math.calculatePrice({
- xscale: config.xscale,
- yscale: config.yscale,
- xExcess: _gasExcess,
- xPurchase: 0
- });
+ if (numL1Blocks > 0) {
+ uint256 issuance = numL1Blocks * config.gasTargetPerL1Block;
+ excess = excess > issuance ? excess - issuance : 1;
+ }
+
+ _gasExcess = uint64(excess.min(type(uint64).max));
- if (_basefee == 0) {
- // To make sure when EIP-1559 is enabled, the basefee is non-zero
- // (Geth never uses 0 values for basefee)
- _basefee = 1;
+ // The base fee per gas used by this block is the spot price at the
+ // bonding curve, regardless the actual amount of gas used by this
+ // block, however, the this block's gas used will affect the next
+ // block's base fee.
+ _basefee = Lib1559Math.basefee(
+ _gasExcess, uint256(config.basefeeAdjustmentQuotient) * config.gasTargetPerL1Block
+ );
}
+
+ // Always make sure basefee is nonzero, this is required by the node.
+ if (_basefee == 0) _basefee = 1;
}
}
-
-/// @title ProxiedTaikoL2
-/// @notice Proxied version of the TaikoL2 contract.
-contract ProxiedTaikoL2 is Proxied, TaikoL2 { }
diff --git a/packages/protocol/contracts/L2/TaikoL2EIP1559Configurable.sol b/packages/protocol/contracts/L2/TaikoL2EIP1559Configurable.sol
new file mode 100644
index 00000000000..1d0b023af88
--- /dev/null
+++ b/packages/protocol/contracts/L2/TaikoL2EIP1559Configurable.sol
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "./TaikoL2.sol";
+
+/// @title TaikoL2EIP1559Configurable
+/// @notice Taiko L2 with a setter to change EIP-1559 configurations and states.
+contract TaikoL2EIP1559Configurable is TaikoL2 {
+ Config private _config;
+ uint256[49] private __gap;
+
+ event ConfigAndExcessChanged(Config config, uint64 gasExcess);
+
+ error L2_INVALID_CONFIG();
+
+ /// @notice Sets EIP1559 configuration and gas excess.
+ /// @param config The new EIP1559 config.
+ /// @param newGasExcess The new gas excess
+ function setConfigAndExcess(
+ Config memory config,
+ uint64 newGasExcess
+ )
+ external
+ virtual
+ onlyOwner
+ {
+ if (config.gasTargetPerL1Block == 0) revert L2_INVALID_CONFIG();
+ if (config.basefeeAdjustmentQuotient == 0) revert L2_INVALID_CONFIG();
+
+ _config = config;
+ gasExcess = newGasExcess;
+
+ emit ConfigAndExcessChanged(config, newGasExcess);
+ }
+
+ function getConfig() public view override returns (Config memory) {
+ return _config;
+ }
+}
diff --git a/packages/protocol/contracts/L2/TaikoL2Signer.sol b/packages/protocol/contracts/L2/TaikoL2Signer.sol
index 82fbeffcd5f..29b449a3a50 100644
--- a/packages/protocol/contracts/L2/TaikoL2Signer.sol
+++ b/packages/protocol/contracts/L2/TaikoL2Signer.sol
@@ -6,31 +6,27 @@
pragma solidity ^0.8.20;
-import { LibUint512Math } from "../libs/LibUint512Math.sol";
+import "../thirdparty/LibUint512Math.sol";
/// @title TaikoL2Signer
/// @notice This contract allows for signing operations required on Taiko L2.
/// @dev It uses precomputed values for optimized signature creation.
abstract contract TaikoL2Signer {
// Constants related to the golden touch signature.
- address public constant GOLDEN_TOUCH_ADDRESS =
- 0x0000777735367b36bC9B61C50022d9D0700dB4Ec;
+ address public constant GOLDEN_TOUCH_ADDRESS = 0x0000777735367b36bC9B61C50022d9D0700dB4Ec;
uint256 public constant GOLDEN_TOUCH_PRIVATEKEY =
0x92954368afd3caa1f3ce3ead0069c1af414054aefe1ef9aeacc1bf426222ce38;
// Precomputed curve constants.
- uint256 private constant GX =
- 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798;
- uint256 private constant GY =
- 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8;
+ uint256 private constant GX = 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798;
+ uint256 private constant GY = 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8;
uint256 private constant GX2 =
0xc6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5;
uint256 private constant GY2 =
0x1ae168fea63dc339a3c58419466ceaeef7f632653266d0e1236431a950cfe52a;
// Curve order.
- uint256 private constant N =
- 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141;
+ uint256 private constant N = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141;
// Precomputed multiplication results for optimization.
uint256 private constant GX_MUL_GOLDEN_TOUCH_PRIVATEKEY_LOW =
@@ -66,21 +62,17 @@ abstract contract TaikoL2Signer {
r = k == 1 ? GX : GX2;
- uint256 low256 = k == 1
- ? GX_MUL_GOLDEN_TOUCH_PRIVATEKEY_LOW
- : GX2_MUL_GOLDEN_TOUCH_PRIVATEKEY_LOW;
- uint256 high256 = k == 1
- ? GX_MUL_GOLDEN_TOUCH_PRIVATEKEY_HIGH
- : GX2_MUL_GOLDEN_TOUCH_PRIVATEKEY_HIGH;
+ uint256 low256 =
+ k == 1 ? GX_MUL_GOLDEN_TOUCH_PRIVATEKEY_LOW : GX2_MUL_GOLDEN_TOUCH_PRIVATEKEY_LOW;
+ uint256 high256 =
+ k == 1 ? GX_MUL_GOLDEN_TOUCH_PRIVATEKEY_HIGH : GX2_MUL_GOLDEN_TOUCH_PRIVATEKEY_HIGH;
- (low256, high256) =
- LibUint512Math.add(low256, high256, uint256(digest), 0);
+ (low256, high256) = LibUint512Math.add(low256, high256, uint256(digest), 0);
if (k == 1) {
s = _expmod(low256, high256, 1, N);
} else {
- (low256, high256) =
- LibUint512Math.mul(K_2_INVM_N, _expmod(low256, high256, 1, N));
+ (low256, high256) = LibUint512Math.mul(K_2_INVM_N, _expmod(low256, high256, 1, N));
s = _expmod(low256, high256, 1, N);
}
@@ -118,9 +110,7 @@ abstract contract TaikoL2Signer {
mstore(add(p, 0xa0), e) // Exponent
mstore(add(p, 0xc0), m) // Modulus
- if iszero(staticcall(sub(gas(), 2000), 0x05, p, 0xe0, p, 0x20)) {
- revert(0, 0)
- }
+ if iszero(staticcall(sub(gas(), 2000), 0x05, p, 0xe0, p, 0x20)) { revert(0, 0) }
o := mload(p)
}
}
diff --git a/packages/protocol/contracts/L2/eip1559_util.py b/packages/protocol/contracts/L2/eip1559_util.py
new file mode 100644
index 00000000000..0e633df8c83
--- /dev/null
+++ b/packages/protocol/contracts/L2/eip1559_util.py
@@ -0,0 +1,135 @@
+import math
+import matplotlib.pyplot as plt
+
+SCALE = int(1e18) ## fix point scale
+MAX_EXP_INPUT = 135_305_999_368_893_231_588
+
+# Python function that matches the `exp(int256 x)` function in LibFixedPointMath.sol
+def fixed_point_exp(x):
+ if x <= -42_139_678_854_452_767_551:
+ return 0
+
+ if x >= 135_305_999_368_893_231_589:
+ raise OverflowError("Overflow")
+
+ x = (x << 78) // (5**18)
+
+ k = ((x << 96) // 54_916_777_467_707_473_351_141_471_128 + (2**95)) >> 96
+ x = x - k * 54_916_777_467_707_473_351_141_471_128
+
+ y = x + 1_346_386_616_545_796_478_920_950_773_328
+ y = ((y * x) >> 96) + 57_155_421_227_552_351_082_224_309_758_442
+ p = y + x - 94_201_549_194_550_492_254_356_042_504_812
+ p = ((p * y) >> 96) + 28_719_021_644_029_726_153_956_944_680_412_240
+ p = p * x + (4_385_272_521_454_847_904_659_076_985_693_276 << 96)
+
+ q = x - 2_855_989_394_907_223_263_936_484_059_900
+ q = ((q * x) >> 96) + 50_020_603_652_535_783_019_961_831_881_945
+ q = ((q * x) >> 96) - 533_845_033_583_426_703_283_633_433_725_380
+ q = ((q * x) >> 96) + 3_604_857_256_930_695_427_073_651_918_091_429
+ q = ((q * x) >> 96) - 14_423_608_567_350_463_180_887_372_962_807_573
+ q = ((q * x) >> 96) + 26_449_188_498_355_588_339_934_803_723_976_023
+
+ r = p // q # Integer division
+
+ r = (r * 3_822_833_074_963_236_453_042_738_258_902_158_003_155_416_615_667) >> (
+ 195 - k
+ )
+
+ return r
+
+
+# Test exp(1)
+print("exp(1) =", fixed_point_exp(SCALE) / SCALE)
+print("exp(MAX) =", fixed_point_exp(MAX_EXP_INPUT) / SCALE)
+
+## Calculate initial gas_excess_issued
+GWEI = 1e9
+ETHEREUM_TARGET = 15 * 1e6
+ETHEREUM_BASE_FEE = 10 * GWEI
+TAIKO_TARGET = ETHEREUM_TARGET * 10
+TAIKO_BASE_FEE = ETHEREUM_BASE_FEE // 10
+ADJUSTMENT_QUOTIENT = 8
+ADJUSTMENT_FACTOR = TAIKO_TARGET * 8
+
+
+def calc_eth_qty(qty):
+ return math.exp(qty / TAIKO_TARGET / ADJUSTMENT_QUOTIENT)
+
+
+def calc_basefee(excess, gas_in_block):
+ diff = calc_eth_qty(excess + gas_in_block) - calc_eth_qty(excess)
+ return diff / gas_in_block
+
+
+def calculate_excess_gas_issued(expected_base_fee, gas_used):
+ numerator = expected_base_fee * gas_used / (calc_eth_qty(gas_used) - 1) + 1
+ excess_gas_issued = math.log(numerator) * ADJUSTMENT_FACTOR
+ return excess_gas_issued
+
+
+expected_basefee = TAIKO_BASE_FEE
+gas_in_block = 1
+gas_excess_issued = int(calculate_excess_gas_issued(expected_basefee, gas_in_block))
+print("gas_excess_issued : ", gas_excess_issued)
+print("actual_basefee : ", calc_basefee(gas_excess_issued, gas_in_block))
+print("expected_basefee : ", expected_basefee)
+
+
+# See https://ethresear.ch/t/make-eip-1559-more-like-an-amm-curve/9082
+def eth_qty(gas_qty):
+ v = int(int(gas_qty) * SCALE // ADJUSTMENT_FACTOR)
+ if v > MAX_EXP_INPUT:
+ v = MAX_EXP_INPUT
+ return fixed_point_exp(v)
+
+
+def calc_purchase_basefee(gas_used):
+ # Returns the average base fee per gas for purchasing gas_used gas
+ diff = eth_qty(gas_excess_issued + gas_used) - eth_qty(gas_excess_issued)
+ return int(int(diff // gas_used) // SCALE)
+
+
+def calc_spot_basefee():
+ # Returns the spot price
+ return int(int(eth_qty(gas_excess_issued) // SCALE) // ADJUSTMENT_FACTOR)
+
+
+print("purchase basefee (1 gas) [fix point]1 : ", calc_purchase_basefee(gas_in_block))
+print("spot basefee [fix point]1 : ", calc_spot_basefee())
+
+
+# Set the excess value to the max possible
+bkup = gas_excess_issued
+gas_excess_issued = MAX_EXP_INPUT * ADJUSTMENT_FACTOR // SCALE
+print("spot basefee [fix point]2 : ", calc_spot_basefee())
+
+
+exit()
+gas_excess_issued = bkup
+# one L2 block per L1 block vs multiple L2 blocks per L1 block
+x1 = []
+y1 = []
+for i in range(10):
+ x1.append(i * 12)
+ y1.append(calc_spot_basefee())
+
+x2 = []
+y2 = []
+
+for i in range(10):
+ for j in range(12):
+ x2.append(i * 12 + j)
+ y2.append(calc_spot_basefee())
+ gas_excess_issued += TAIKO_TARGET / 12
+ gas_excess_issued -= TAIKO_TARGET
+
+plt.scatter(x2, y2, label="1s", color="red", marker="o")
+plt.scatter(x1, y1, label="12s", color="blue", marker="x")
+
+plt.xlabel("basefee")
+plt.ylabel("time")
+plt.ylim(expected_basefee * 0.75, expected_basefee * 1.25)
+plt.legend()
+plt.title("EIP1559 Bond Curve")
+plt.show()
diff --git a/packages/protocol/contracts/bridge/Bridge.sol b/packages/protocol/contracts/bridge/Bridge.sol
index 719dfd2f21c..01866378dbd 100644
--- a/packages/protocol/contracts/bridge/Bridge.sol
+++ b/packages/protocol/contracts/bridge/Bridge.sol
@@ -5,234 +5,407 @@
// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
pragma solidity ^0.8.20;
-import { AddressResolver } from "../common/AddressResolver.sol";
-import { BridgeErrors } from "./BridgeErrors.sol";
-import { EssentialContract } from "../common/EssentialContract.sol";
-import { IBridge } from "./IBridge.sol";
-import { LibBridgeData } from "./libs/LibBridgeData.sol";
-import { LibBridgeProcess } from "./libs/LibBridgeProcess.sol";
-import { LibBridgeRecall } from "./libs/LibBridgeRecall.sol";
-import { LibBridgeRetry } from "./libs/LibBridgeRetry.sol";
-import { LibBridgeSend } from "./libs/LibBridgeSend.sol";
-import { LibBridgeStatus } from "./libs/LibBridgeStatus.sol";
-import { Proxied } from "../common/Proxied.sol";
+import "../common/EssentialContract.sol";
+import "../libs/LibAddress.sol";
+import "../signal/ISignalService.sol";
+import "./IBridge.sol";
/// @title Bridge
+/// @dev Labeled in AddressResolver as "bridge"
/// @notice See the documentation for {IBridge}.
/// @dev The code hash for the same address on L1 and L2 may be different.
-contract Bridge is EssentialContract, IBridge, BridgeErrors {
- using LibBridgeData for Message;
+contract Bridge is EssentialContract, IBridge {
+ using LibAddress for address;
+ using LibAddress for address payable;
- LibBridgeData.State private _state; // 50 slots reserved
+ enum Status {
+ NEW,
+ RETRIABLE,
+ DONE,
+ FAILED
+ }
+
+ uint256 internal constant PLACEHOLDER = type(uint256).max;
- event MessageStatusChanged(
- bytes32 indexed msgHash,
- LibBridgeStatus.MessageStatus status,
- address transactor
- );
+ uint128 public nextMessageId; // slot 1
+ mapping(bytes32 msgHash => bool recalled) public isMessageRecalled;
+ mapping(bytes32 msgHash => Status) public messageStatus; // slot 3
+ Context private _ctx; // // slot 4,5,6pnpm
+ uint256[44] private __gap;
- event DestChainEnabled(uint256 indexed chainId, bool enabled);
+ event SignalSent(address indexed sender, bytes32 msgHash);
+ event MessageSent(bytes32 indexed msgHash, Message message);
+ event MessageRecalled(bytes32 indexed msgHash);
+ event DestChainEnabled(uint64 indexed chainId, bool enabled);
+ event MessageStatusChanged(bytes32 indexed msgHash, Status status);
+
+ error B_INVALID_CHAINID();
+ error B_INVALID_CONTEXT();
+ error B_INVALID_GAS_LIMIT();
+ error B_INVALID_SIGNAL();
+ error B_INVALID_USER();
+ error B_INVALID_VALUE();
+ error B_NON_RETRIABLE();
+ error B_NOT_FAILED();
+ error B_NOT_RECEIVED();
+ error B_PERMISSION_DENIED();
+ error B_RECALLED_ALREADY();
+ error B_STATUS_MISMATCH();
+
+ modifier sameChain(uint64 chainId) {
+ if (chainId != block.chainid) revert B_INVALID_CHAINID();
+ _;
+ }
receive() external payable { }
/// @notice Initializes the contract.
/// @param _addressManager The address of the {AddressManager} contract.
function init(address _addressManager) external initializer {
- EssentialContract._init(_addressManager);
+ __Essential_init(_addressManager);
+ _ctx.msgHash == bytes32(PLACEHOLDER);
}
- /// @notice Sends a message from the current chain to the destination chain
- /// specified in the message.
+ /// @notice Sends a message to the destination chain and takes custody
+ /// of Ether required in this contract. All extra Ether will be refunded.
/// @inheritdoc IBridge
function sendMessage(Message calldata message)
external
payable
+ override
nonReentrant
- returns (bytes32 msgHash)
+ whenNotPaused
+ returns (bytes32 msgHash, Message memory _message)
{
- return LibBridgeSend.sendMessage({
- state: _state,
- resolver: AddressResolver(this),
- message: message
- });
+ // Ensure the message user is not null.
+ if (message.owner == address(0)) revert B_INVALID_USER();
+
+ // Check if the destination chain is enabled.
+ (bool destChainEnabled,) = isDestChainEnabled(message.destChainId);
+
+ // Verify destination chain and to address.
+ if (!destChainEnabled) revert B_INVALID_CHAINID();
+ if (message.destChainId == block.chainid) {
+ revert B_INVALID_CHAINID();
+ }
+
+ // Ensure the sent value matches the expected amount.
+ uint256 expectedAmount = message.value + message.fee;
+ if (expectedAmount != msg.value) revert B_INVALID_VALUE();
+
+ _message = message;
+ // Configure message details and send signal to indicate message
+ // sending.
+ _message.id = nextMessageId++;
+ _message.from = msg.sender;
+ _message.srcChainId = uint64(block.chainid);
+
+ msgHash = hashMessage(_message);
+
+ ISignalService(resolve("signal_service", false)).sendSignal(msgHash);
+ emit MessageSent(msgHash, _message);
}
- /// @notice Processes a message received from another chain.
- /// @inheritdoc IBridge
- function processMessage(
+ /// @notice Recalls a failed message on its source chain, releasing
+ /// associated assets.
+ /// @dev This function checks if the message failed on the source chain and
+ /// releases associated Ether or tokens.
+ /// @param message The message whose associated Ether should be released.
+ /// @param proof The merkle inclusion proof.
+ function recallMessage(
Message calldata message,
bytes calldata proof
)
external
nonReentrant
+ whenNotPaused
+ sameChain(message.srcChainId)
{
- return LibBridgeProcess.processMessage({
- state: _state,
- resolver: AddressResolver(this),
- message: message,
- proof: proof,
- checkProof: shouldCheckProof()
- });
+ bytes32 msgHash = hashMessage(message);
+ if (isMessageRecalled[msgHash]) revert B_RECALLED_ALREADY();
+
+ bool received =
+ _proveSignalReceived(_signalForFailedMessage(msgHash), message.destChainId, proof);
+ if (!received) revert B_NOT_FAILED();
+
+ isMessageRecalled[msgHash] = true;
+
+ // Execute the recall logic based on the contract's support for the
+ // IRecallableSender interface
+ bool support = message.from.supportsInterface(type(IRecallableSender).interfaceId);
+ if (support) {
+ _ctx =
+ Context({ msgHash: msgHash, from: address(this), srcChainId: message.srcChainId });
+
+ // Perform recall
+ IRecallableSender(message.from).onMessageRecalled{ value: message.value }(
+ message, msgHash
+ );
+
+ // Reset the context after the message call
+ _ctx = Context({
+ msgHash: bytes32(PLACEHOLDER),
+ from: address(uint160(PLACEHOLDER)),
+ srcChainId: uint64(PLACEHOLDER)
+ });
+ } else {
+ message.owner.sendEther(message.value);
+ }
+
+ emit MessageRecalled(msgHash);
}
- /// @notice Retries executing a message that previously failed on its
- /// destination chain.
- /// @inheritdoc IBridge
- function retryMessage(
+ /// @notice Processes a bridge message on the destination chain. This
+ /// function is callable by any address, including the `message.owner`.
+ /// @dev The process begins by hashing the message and checking the message
+ /// status in the bridge If the status is "NEW", the message is invoked. The
+ /// status is updated accordingly, and processing fees are refunded as
+ /// needed.
+ /// @param message The message to be processed.
+ /// @param proof The merkle inclusion proof.
+ function processMessage(
Message calldata message,
- bool isLastAttempt
+ bytes calldata proof
)
external
nonReentrant
+ whenNotPaused
+ sameChain(message.destChainId)
{
- return LibBridgeRetry.retryMessage({
- state: _state,
- resolver: AddressResolver(this),
- message: message,
- isLastAttempt: isLastAttempt
- });
+ // If the gas limit is set to zero, only the owner can process the
+ // message.
+ if (message.gasLimit == 0 && msg.sender != message.owner) {
+ revert B_PERMISSION_DENIED();
+ }
+
+ bytes32 msgHash = hashMessage(message);
+
+ if (messageStatus[msgHash] != Status.NEW) revert B_STATUS_MISMATCH();
+
+ bool received = _proveSignalReceived(msgHash, message.srcChainId, proof);
+ if (!received) revert B_NOT_RECEIVED();
+
+ Status status;
+ uint256 refundAmount;
+
+ // Process message differently based on the target address
+ if (message.to == address(0) || message.to == address(this)) {
+ // Handle special addresses that don't require actual invocation but
+ // mark message as DONE
+ status = Status.DONE;
+ refundAmount = message.value;
+ } else {
+ // Use the specified message gas limit if called by the owner, else
+ // use remaining gas
+ uint256 gasLimit = msg.sender == message.owner ? gasleft() : message.gasLimit;
+
+ if (_invokeMessageCall(message, msgHash, gasLimit)) {
+ status = Status.DONE;
+ } else {
+ status = Status.RETRIABLE;
+ }
+ }
+
+ // Update the message status
+ _updateMessageStatus(msgHash, status);
+
+ // Determine the refund recipient
+ address refundTo = message.refundTo == address(0) ? message.owner : message.refundTo;
+
+ // Refund the processing fee
+ if (msg.sender == refundTo) {
+ refundTo.sendEther(message.fee + refundAmount);
+ } else {
+ // If sender is another address, reward it and refund the rest
+ msg.sender.sendEther(message.fee);
+ refundTo.sendEther(refundAmount);
+ }
}
- /// @notice Recalls a failed message on its source chain
- /// @inheritdoc IBridge
- function recallMessage(
- IBridge.Message calldata message,
- bytes calldata proof
+ /// @notice Retries to invoke the messageCall after releasing associated
+ /// Ether and tokens.
+ /// @dev This function can be called by any address, including the
+ /// `message.owner`.
+ /// It attempts to invoke the messageCall and updates the message status
+ /// accordingly.
+ /// @param message The message to retry.
+ /// @param isLastAttempt Specifies if this is the last attempt to retry the
+ /// message.
+ function retryMessage(
+ Message calldata message,
+ bool isLastAttempt
)
external
nonReentrant
+ whenNotPaused
+ sameChain(message.destChainId)
{
- return LibBridgeRecall.recallMessage({
- state: _state,
- resolver: AddressResolver(this),
- message: message,
- proof: proof,
- checkProof: shouldCheckProof()
- });
+ // If the gasLimit is set to 0 or isLastAttempt is true, the caller must
+ // be the message.owner.
+ if (message.gasLimit == 0 || isLastAttempt) {
+ if (msg.sender != message.owner) revert B_PERMISSION_DENIED();
+ }
+
+ bytes32 msgHash = hashMessage(message);
+ if (messageStatus[msgHash] != Status.RETRIABLE) {
+ revert B_NON_RETRIABLE();
+ }
+
+ // Attempt to invoke the messageCall.
+ if (_invokeMessageCall(message, msgHash, gasleft())) {
+ // Update the message status to "DONE" on successful invocation.
+ _updateMessageStatus(msgHash, Status.DONE);
+ } else {
+ // Update the message status to "FAILED"
+ _updateMessageStatus(msgHash, Status.FAILED);
+ }
}
- /// @notice Checks if the message with the given hash has been sent on its
- /// source chain.
- /// @inheritdoc IBridge
- function isMessageSent(bytes32 msgHash)
- public
- view
- virtual
- returns (bool)
- {
- return LibBridgeSend.isMessageSent(AddressResolver(this), msgHash);
+ /// @notice Checks if the message was sent.
+ /// @param message The message.
+ /// @return True if the message was sent.
+ function isMessageSent(Message calldata message) public view returns (bool) {
+ if (message.srcChainId != block.chainid) return false;
+ return ISignalService(resolve("signal_service", false)).isSignalSent({
+ app: address(this),
+ signal: hashMessage(message)
+ });
}
- /// @notice Checks if the message with the given hash has been received on
- /// its destination chain.
- /// @inheritdoc IBridge
- function isMessageReceived(
- bytes32 msgHash,
- uint256 srcChainId,
+ /// @notice Checks if a msgHash has failed on its destination chain.
+ /// @param message The message.
+ /// @param proof The merkle inclusion proof.
+ /// @return Returns true if the message has failed, false otherwise.
+ function proveMessageFailed(
+ Message calldata message,
bytes calldata proof
)
public
view
- virtual
- override
returns (bool)
{
- return LibBridgeSend.isMessageReceived({
- resolver: AddressResolver(this),
- msgHash: msgHash,
- srcChainId: srcChainId,
- proof: proof
- });
+ if (message.srcChainId != block.chainid) return false;
+ return _proveSignalReceived(
+ _signalForFailedMessage(hashMessage(message)), message.destChainId, proof
+ );
}
/// @notice Checks if a msgHash has failed on its destination chain.
- /// @inheritdoc IBridge
- function isMessageFailed(
- bytes32 msgHash,
- uint256 destChainId,
+ /// @param message The message.
+ /// @param proof The merkle inclusion proof.
+ /// @return Returns true if the message has failed, false otherwise.
+ function proveMessageReceived(
+ Message calldata message,
bytes calldata proof
)
public
view
- virtual
- override
returns (bool)
{
- return LibBridgeStatus.isMessageFailed({
- resolver: AddressResolver(this),
- msgHash: msgHash,
- destChainId: destChainId,
- proof: proof
- });
- }
-
- /// @notice Checks if a failed message has been recalled on its source
- /// chain.
- /// @inheritdoc IBridge
- function isMessageRecalled(bytes32 msgHash) public view returns (bool) {
- return _state.recalls[msgHash];
+ if (message.destChainId != block.chainid) return false;
+ return _proveSignalReceived(hashMessage(message), message.srcChainId, proof);
}
- /// @notice Gets the execution status of the message with the given hash on
- /// its destination chain.
- /// @param msgHash The hash of the message.
- /// @return Returns the status of the message.
- function getMessageStatus(bytes32 msgHash)
+ /// @notice Checks if the destination chain is enabled.
+ /// @param chainId The destination chain ID.
+ /// @return enabled True if the destination chain is enabled.
+ /// @return destBridge The bridge of the destination chain.
+ function isDestChainEnabled(uint64 chainId)
public
view
- virtual
- returns (LibBridgeStatus.MessageStatus)
+ returns (bool enabled, address destBridge)
{
- return LibBridgeStatus.getMessageStatus(msgHash);
+ destBridge = resolve(chainId, "bridge", true);
+ enabled = destBridge != address(0);
}
/// @notice Gets the current context.
/// @inheritdoc IBridge
function context() public view returns (Context memory) {
- return _state.ctx;
+ if (_ctx.msgHash == bytes32(PLACEHOLDER) || _ctx.msgHash == 0) {
+ revert B_INVALID_CONTEXT();
+ }
+ return _ctx;
}
- /// @notice Checks if the destination chain with the given ID is enabled.
- /// @param _chainId The ID of the chain.
- /// @return enabled Returns true if the destination chain is enabled, false
- /// otherwise.
- function isDestChainEnabled(uint256 _chainId)
- public
- view
- returns (bool enabled)
- {
- (enabled,) =
- LibBridgeSend.isDestChainEnabled(AddressResolver(this), _chainId);
+ /// @notice Hash the message
+ function hashMessage(Message memory message) public pure returns (bytes32) {
+ return keccak256(abi.encode("TAIKO_MESSAGE", message));
}
- /// @notice Computes the hash of a given message.
- /// @inheritdoc IBridge
- function hashMessage(Message calldata message)
- public
- pure
- returns (bytes32)
+ /// @notice Invokes a call message on the Bridge.
+ /// @param message The call message to be invoked.
+ /// @param msgHash The hash of the message.
+ /// @param gasLimit The gas limit for the message call.
+ /// @return success A boolean value indicating whether the message call was
+ /// successful.
+ /// @dev This function updates the context in the state before and after the
+ /// message call.
+ function _invokeMessageCall(
+ Message calldata message,
+ bytes32 msgHash,
+ uint256 gasLimit
+ )
+ private
+ returns (bool success)
{
- return LibBridgeData.hashMessage(message);
+ if (gasLimit == 0) revert B_INVALID_GAS_LIMIT();
+ assert(message.from != address(this));
+
+ _ctx = Context({ msgHash: msgHash, from: message.from, srcChainId: message.srcChainId });
+
+ // Perform the message call and capture the success value
+ (success,) = message.to.call{ value: message.value, gas: gasLimit }(message.data);
+
+ // Reset the context after the message call
+ _ctx = Context({
+ msgHash: bytes32(PLACEHOLDER),
+ from: address(uint160(PLACEHOLDER)),
+ srcChainId: uint64(PLACEHOLDER)
+ });
}
- /// @notice Gets the slot associated with a given message hash status.
+ /// @notice Updates the status of a bridge message.
+ /// @dev If the new status is different from the current status in the
+ /// mapping, the status is updated and an event is emitted.
/// @param msgHash The hash of the message.
- /// @return Returns the slot associated with the given message hash status.
- function getMessageStatusSlot(bytes32 msgHash)
- public
- pure
- returns (bytes32)
+ /// @param status The new status of the message.
+ function _updateMessageStatus(bytes32 msgHash, Status status) private {
+ if (messageStatus[msgHash] == status) return;
+
+ messageStatus[msgHash] = status;
+ emit MessageStatusChanged(msgHash, status);
+
+ if (status != Status.FAILED) return;
+
+ ISignalService(resolve("signal_service", false)).sendSignal(
+ _signalForFailedMessage(msgHash)
+ );
+ }
+
+ /// @notice Checks if the signal was received.
+ /// @param signal The signal.
+ /// @param srcChainId The ID of the source chain.
+ /// @param proof The merkle inclusion proof.
+ /// @return True if the message was received.
+ function _proveSignalReceived(
+ bytes32 signal,
+ uint64 srcChainId,
+ bytes calldata proof
+ )
+ private
+ view
+ returns (bool)
{
- return LibBridgeStatus.getMessageStatusSlot(msgHash);
+ return ISignalService(resolve("signal_service", false)).proveSignalReceived({
+ srcChainId: srcChainId,
+ app: resolve(srcChainId, "bridge", false),
+ signal: signal,
+ proof: proof
+ });
}
- /// @notice Tells if we need to check real proof or it is a test.
- /// @return Returns true if this contract, or can be false if mock/test.
- function shouldCheckProof() internal pure virtual returns (bool) {
- return true;
+ function _signalForFailedMessage(bytes32 msgHash) private pure returns (bytes32) {
+ return msgHash ^ bytes32(uint256(Status.FAILED));
}
}
-
-/// @title ProxiedBridge
-/// @notice Proxied version of the parent contract.
-contract ProxiedBridge is Proxied, Bridge { }
diff --git a/packages/protocol/contracts/bridge/BridgeErrors.sol b/packages/protocol/contracts/bridge/BridgeErrors.sol
deleted file mode 100644
index 3b90dc0acfb..00000000000
--- a/packages/protocol/contracts/bridge/BridgeErrors.sol
+++ /dev/null
@@ -1,34 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-/// @title BridgeErrors
-/// @dev This abstract contract defines custom errors that are used throughout
-/// the Bridge contract.
-abstract contract BridgeErrors {
- error B_DENIED();
- error B_ERC20_CANNOT_RECEIVE();
- error B_MSG_RECALLED_ALREADY();
- error B_EV_DO_NOT_BURN();
- error B_EV_NOT_AUTHORIZED();
- error B_EV_PARAM();
- error B_FAILED_TRANSFER();
- error B_FORBIDDEN();
- error B_GAS_LIMIT();
- error B_INCORRECT_VALUE();
- error B_INIT_PARAM_ERROR();
- error B_MSG_HASH_NULL();
- error B_MSG_NON_RETRIABLE();
- error B_MSG_NOT_FAILED();
- error B_NULL_APP_ADDR();
- error B_USER_IS_NULL();
- error B_SIGNAL_NOT_RECEIVED();
- error B_STATUS_MISMATCH();
- error B_WRONG_CHAIN_ID();
- error B_WRONG_TO_ADDRESS();
- error B_ZERO_SIGNAL();
-}
diff --git a/packages/protocol/contracts/bridge/EtherVault.sol b/packages/protocol/contracts/bridge/EtherVault.sol
deleted file mode 100644
index 7ee83595c70..00000000000
--- a/packages/protocol/contracts/bridge/EtherVault.sol
+++ /dev/null
@@ -1,104 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { BridgeErrors } from "./BridgeErrors.sol";
-import { Create2Upgradeable } from
- "@openzeppelin/contracts-upgradeable/utils/Create2Upgradeable.sol";
-import { EssentialContract } from "../common/EssentialContract.sol";
-import { LibAddress } from "../libs/LibAddress.sol";
-import { Proxied } from "../common/Proxied.sol";
-import { SafeERC20Upgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
-
-/// @title EtherVault
-/// @notice This contract is initialized with 2^128 Ether and allows authorized
-/// addresses to release Ether.
-/// @dev Only the contract owner can authorize or deauthorize addresses.
-contract EtherVault is EssentialContract, BridgeErrors {
- using LibAddress for address;
-
- mapping(address addr => bool isAuthorized) private _authorizedAddrs; // Authorized
- // addresses
- uint256[49] private __gap;
-
- event Authorized(address indexed addr, bool authorized);
- event EtherReleased(address indexed to, uint256 amount);
-
- modifier onlyAuthorized() {
- // Ensure the caller is authorized to perform the action
- if (!isAuthorized(msg.sender)) {
- revert B_EV_NOT_AUTHORIZED();
- }
- _;
- }
-
- /// @notice Function to receive Ether.
- /// @dev Only authorized addresses can send Ether to the contract.
- receive() external payable {
- // EthVault's balance must == 0 OR the sender isAuthorized.
- if (address(this).balance != 0 && !isAuthorized(msg.sender)) {
- revert B_EV_NOT_AUTHORIZED();
- }
- }
-
- /// @notice Initializes the contract with an {AddressManager}.
- /// @param addressManager The address of the {AddressManager} contract.
- function init(address addressManager) external initializer {
- EssentialContract._init(addressManager);
- }
-
- /// @notice Transfers Ether from EtherVault to the sender, checking that the
- /// sender is authorized.
- /// @param amount Amount of Ether to send.
- function releaseEther(uint256 amount) public onlyAuthorized nonReentrant {
- msg.sender.sendEther(amount);
- emit EtherReleased(msg.sender, amount);
- }
-
- /// @notice Transfers Ether from EtherVault to a designated address,
- /// checking that the sender is authorized.
- /// @param recipient Address to receive Ether.
- /// @param amount Amount of ether to send.
- function releaseEther(
- address recipient,
- uint256 amount
- )
- public
- onlyAuthorized
- nonReentrant
- {
- if (amount == 0) return;
- if (recipient == address(0)) {
- revert B_EV_DO_NOT_BURN();
- }
- recipient.sendEther(amount);
- emit EtherReleased(recipient, amount);
- }
-
- /// @notice Sets the authorized status of an address, only the owner can
- /// call this function.
- /// @param addr Address to set the authorized status of.
- /// @param authorized Authorized status to set.
- function authorize(address addr, bool authorized) public onlyOwner {
- if (addr == address(0) || _authorizedAddrs[addr] == authorized) {
- revert B_EV_PARAM();
- }
- _authorizedAddrs[addr] = authorized;
- emit Authorized(addr, authorized);
- }
-
- /// @notice Gets the authorized status of an address.
- /// @param addr Address to get the authorized status of.
- function isAuthorized(address addr) public view returns (bool) {
- return _authorizedAddrs[addr];
- }
-}
-
-/// @title ProxiedEtherVault
-/// @notice Proxied version of the parent contract.
-contract ProxiedEtherVault is Proxied, EtherVault { }
diff --git a/packages/protocol/contracts/bridge/IBridge.sol b/packages/protocol/contracts/bridge/IBridge.sol
index dffd7aa54d4..3c96a0635a4 100644
--- a/packages/protocol/contracts/bridge/IBridge.sol
+++ b/packages/protocol/contracts/bridge/IBridge.sol
@@ -6,42 +6,32 @@
pragma solidity ^0.8.20;
-/// @title IRecallableMessageSender
-/// @notice An interface that all recallable message senders shall implement.
-interface IRecallableMessageSender {
- function onMessageRecalled(IBridge.Message calldata message)
- external
- payable;
-}
-
/// @title IBridge
/// @notice The bridge used in conjunction with the {ISignalService}.
-/// @dev Ether is held by Bridges on L1 and by the EtherVault on L2,
-/// not by token vaults.
+/// @dev Ether is held by Bridges on L1 and L2s.
interface IBridge {
- // Struct representing a message sent across the bridge.
struct Message {
// Message ID.
- uint256 id;
- // Message sender address (auto filled).
+ uint128 id;
+ // The address, EOA or contract, that interacts with this bridge.
address from;
- // Source chain ID (auto filled).
- uint256 srcChainId;
- // Destination chain ID where the `to` address lives (auto filled).
- uint256 destChainId;
- // User address of the bridged asset.
- address user;
- // Destination address.
+ // Source chain ID.
+ uint64 srcChainId;
+ // Destination chain ID where the `to` address lives.
+ uint64 destChainId;
+ // The owner of the message.
+ address owner;
+ // The destination address on the destination chain.
address to;
- // Alternate address to send any refund. If blank, defaults to user.
+ // Alternate address to send any refund. If blank, defaults to owner.
address refundTo;
- // value to invoke on the destination chain, for ERC20 transfers.
+ // value to invoke on the destination chain.
uint256 value;
- // Processing fee for the relayer. Zero if user will process themself.
+ // Processing fee for the relayer. Zero if owner will process themself.
uint256 fee;
- // gasLimit to invoke on the destination chain, for ERC20 transfers.
+ // gasLimit to invoke on the destination chain.
uint256 gasLimit;
- // callData to invoke on the destination chain, for ERC20 transfers.
+ // callData to invoke on the destination chain.
bytes data;
// Optional memo.
string memo;
@@ -51,101 +41,31 @@ interface IBridge {
struct Context {
bytes32 msgHash; // Message hash.
address from; // Sender's address.
- uint256 srcChainId; // Source chain ID.
+ uint64 srcChainId; // Source chain ID.
}
- event SignalSent(address indexed sender, bytes32 msgHash);
- event MessageSent(bytes32 indexed msgHash, Message message);
- event MessageRecalled(bytes32 indexed msgHash);
-
/// @notice Sends a message to the destination chain and takes custody
/// of Ether required in this contract. All extra Ether will be refunded.
/// @param message The message to be sent.
/// @return msgHash The hash of the sent message.
- function sendMessage(Message memory message)
+ /// @return updatedMessage The updated message sent.
+ function sendMessage(Message calldata message)
external
payable
- returns (bytes32 msgHash);
-
- /// @notice Processes a message received from another chain.
- /// @param message The message to process.
- /// @param proof The proof of the cross-chain transfer.
- function processMessage(
- Message calldata message,
- bytes calldata proof
- )
- external;
-
- /// @notice Retries executing a message that previously failed on its
- /// destination chain.
- /// @param message The message to retry.
- /// @param isLastAttempt Specifies whether this is the last attempt to send
- /// the message.
- function retryMessage(
- Message calldata message,
- bool isLastAttempt
- )
- external;
-
- /// @notice Recalls a failed message on its source chain.
- /// @param message The message to be recalled.
- /// @param proof The proof of message processing failure.
- function recallMessage(
- IBridge.Message calldata message,
- bytes calldata proof
- )
- external;
-
- /// @notice Checks if the message with the given hash has been sent on its
- /// source chain.
- /// @param msgHash The hash of the message.
- /// @return Returns true if the message has been sent, false otherwise.
- function isMessageSent(bytes32 msgHash) external view returns (bool);
-
- /// @notice Checks if the message with the given hash has been received on
- /// its destination chain.
- /// @param msgHash The hash of the message.
- /// @param srcChainId The source chain ID.
- /// @param proof The proof of message receipt.
- /// @return Returns true if the message has been received, false otherwise.
- function isMessageReceived(
- bytes32 msgHash,
- uint256 srcChainId,
- bytes calldata proof
- )
- external
- view
- returns (bool);
-
- /// @notice Checks if a msgHash has failed on its destination chain.
- /// @param msgHash The hash of the message.
- /// @param destChainId The destination chain ID.
- /// @param proof The proof of message failure.
- /// @return Returns true if the message has failed, false otherwise.
- function isMessageFailed(
- bytes32 msgHash,
- uint256 destChainId,
- bytes calldata proof
- )
- external
- view
- returns (bool);
-
- /// @notice Checks if a failed message has been recalled on its source
- /// chain.
- /// @param msgHash The hash of the message.
- /// @return Returns true if the Ether has been released, false otherwise.
- function isMessageRecalled(bytes32 msgHash) external view returns (bool);
+ returns (bytes32 msgHash, Message memory updatedMessage);
/// @notice Returns the bridge state context.
/// @return context The context of the current bridge operation.
function context() external view returns (Context memory context);
+}
- /// @notice Computes the hash of a given message.
- /// @param message The message to compute the hash for.
- /// @return Returns the hash of the message.
- function hashMessage(IBridge.Message calldata message)
+/// @title IRecallableSender
+/// @notice An interface that all recallable message senders shall implement.
+interface IRecallableSender {
+ function onMessageRecalled(
+ IBridge.Message calldata message,
+ bytes32 msgHash
+ )
external
- pure
- returns (bytes32);
+ payable;
}
diff --git a/packages/protocol/contracts/bridge/README.md b/packages/protocol/contracts/bridge/README.md
index 42db4057b36..803d93d4949 100644
--- a/packages/protocol/contracts/bridge/README.md
+++ b/packages/protocol/contracts/bridge/README.md
@@ -15,8 +15,7 @@ Let's go deeper into the steps that occur when bridging ETH from srcChain to des
### Send message / Send token
-The bridge distinguishes 4 different token types: `Ether`, `Erc20`, `Erc1155`, `Erc721`.
-Each type has its own vault contract both deployed to the source and destination chain. (Except `EtherVault`, which is only deployed on L1 and Bridge itself holds the funds on L2.)
+The bridge distinguishes 4 different token types: `Ether`, `ERC20`, `ERC1155`, `ERC721`. Ether is kept in the Bridge contract, and token vaults for ERC20, ERC1155, and ERC721 tokens must be deployed to the source and destination chain,
#### Bridging Ether
@@ -26,25 +25,25 @@ If user wants to bridge ether, he/she will initiate a bridge transaction with `s
struct Message {
// Message ID.
uint256 id;
- // Message sender address (auto filled).
+ // Message sender address.
address from;
- // Source chain ID (auto filled).
- uint256 srcChainId;
- // Destination chain ID where the `to` address lives (auto filled).
- uint256 destChainId;
+ // Source chain ID.
+ uint64 srcChainId;
+ // Destination chain ID where the `to` address lives.
+ uint64 destChainId;
// User address of the bridged asset.
address user;
// Destination user address.
address to;
// Alternate address to send any refund. If blank, defaults to user.
address refundAddress;
- // value to invoke on the destination chain, for ERC20 transfers.
+ // value to invoke on the destination chain.
uint256 value;
// Processing fee for the relayer. Zero if user will process themselves.
uint256 fee;
- // gasLimit to invoke on the destination chain, for ERC20 transfers.
+ // gasLimit to invoke on the destination chain.
uint256 gasLimit;
- // callData to invoke on the destination chain, for ERC20 transfers.
+ // callData to invoke on the destination chain.
bytes data;
// Optional memo.
string memo;
@@ -54,11 +53,11 @@ If user wants to bridge ether, he/she will initiate a bridge transaction with `s
- `value` and `fee` must sum to `msg.value`.
- The destination chain's ID (must be enabled via setting `addressResolver` for `${chainID}.bridge`).
-Inside the `sendMessage` call, the `msg.value` amount of Ether is sent to the srcChain `EtherVault` contract. Next, a `signal` is created from the message, and a `key` is stored on the srcChain bridge contract address. The `key` is a hash of the `signal` and the srcChain bridge contract address. The `key` is stored on the `Bridge` contract with a value of `1`, and a `MessageSent` event is emitted for the relayer to pick up.
+Inside the `sendMessage` call, the `msg.value` amount of Ether is kept in the Bridge contract, then a `signal` is created from the message, and a `key` is stored on the srcChain bridge contract address. The `key` is a hash of the `signal` and the srcChain bridge contract address. The `key` is stored on the `Bridge` contract with a value of `1`, and a `MessageSent` event is emitted for the relayer to pick up.
#### Bridging other tokens
-If user wants to bridge other tokens (`Erc20`, `Erc1155` or `Erc721`.) he/she will just indirectly initiate a bridge transaction (`sendMessage`) by interacting with the corresponding token vault contracts.
+If user wants to bridge other tokens (`ERC20`, `ERC1155` or `ERC721`.) he/she will just indirectly initiate a bridge transaction (`sendMessage`) by interacting with the corresponding token vault contracts.
In case of ERC20 the transaction can be initiated by initializing a struct (below) and calling `sendToken`:
@@ -75,7 +74,7 @@ In case of ERC20 the transaction can be initiated by initializing a struct (belo
}
```
-In case of `Erc1155` or `Erc721`, the mechanism is the same but struct looks like this:
+In case of `ERC1155` or `ERC721`, the mechanism is the same but struct looks like this:
```
struct BridgeTransferOp {
@@ -95,7 +94,7 @@ struct BridgeTransferOp {
If the `processingFee` is set to 0, only the user can call `processMessage`. Otherwise, either the user or an off-chain relayer can process the message. Let's explain the next steps in the case of a relayer -- the user will have to do the same steps anyways. In the case of a relayer, the relayer picks up the event and **generates a proof from srcChain** -- this can be obtained with `eth_getProof` on the srcChain bridge contract. This proof is sent along with the signal to `processMessage` on the destChain bridge contract.
-The `processMessage` call will first check that the message has not been processed yet, this status is stored in the destination chain's bridge contract state as `messageStatus`. Next, the proof (that the message is indeed sent to the SignalService on the source chain) is checked inside `isSignalReceived`. The proof demonstrates that the storage on the `Bridge` contract on srcChain contains the `key` with a value of `1`. `LibTrieProof` takes the proof, the signal, and the message sender address to check the `key` is set on the srcChain bridge contract state. This verifies that the message is sent on srcChain. Next, `isSignalReceived` gets the header hash on destChain of the header height specified in the proof. It then checks that this hash is equal to the hash specified in the proof. This will verify that the message is received on destChain.
+The `processMessage` call will first check that the message has not been processed yet, this status is stored in the destination chain's bridge contract state as `statuses`. Next, the proof (that the message is indeed sent to the SignalService on the source chain) is checked inside `proveSignalReceived`. The proof demonstrates that the storage on the `Bridge` contract on srcChain contains the `key` with a value of `1`. `LibSecureMerkleTrie` takes the proof, the signal, and the message sender address to check the `key` is set on the srcChain bridge contract state. This verifies that the message is sent on srcChain. Next, `proveSignalReceived` gets the header hash on destChain of the header height specified in the proof. It then checks that this hash is equal to the hash specified in the proof. This will verify that the message is received on destChain.
The `processMessage` call will then proceed to invoke the message call, which will actually take the Ether from the vault and send it to the specified address. If it succeeds, it will mark the message as "DONE" on the srcChain bridge state. If it fails, it will mark the message as "RETRIABLE" and send the Ether back to the vault. Later, `retryMessage` can be called **only** by the user (`processMessage` cannot be called again for this message by the relayer).
@@ -103,4 +102,4 @@ Finally, any unused funds are sent back to the user as a refund.
### Failed bridging
-If the `messageStatus` is "RETRIABLE" and - for whatever reason - the second try also cannot successfully initiate releasing the funds/tokens to the recipient on the destination chain, the `messageStatus` will be set to "FAILED". In this case the `recallMessage` shall be called on the source chain's Bridge contract (with `message` and `proof` input params), which will send the assets back to the user.
+If the `statuses` is "RETRIABLE" and - for whatever reason - the second try also cannot successfully initiate releasing the funds/tokens to the recipient on the destination chain, the `statuses` will be set to "FAILED". In this case the `recallMessage` shall be called on the source chain's Bridge contract (with `message` and `proof` input params), which will send the assets back to the user.
diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeData.sol b/packages/protocol/contracts/bridge/libs/LibBridgeData.sol
deleted file mode 100644
index d278167b09f..00000000000
--- a/packages/protocol/contracts/bridge/libs/LibBridgeData.sol
+++ /dev/null
@@ -1,56 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-pragma solidity ^0.8.20;
-
-import { AddressResolver } from "../../common/AddressResolver.sol";
-import { BlockHeader } from "../../libs/LibBlockHeader.sol";
-import { IBridge } from "../IBridge.sol";
-import { LibAddress } from "../../libs/LibAddress.sol";
-import { LibMath } from "../../libs/LibMath.sol";
-
-/// @title LibBridgeData
-/// @notice This library provides functions and data structures for storing and
-/// managing message metadata on the Bridge.
-/// The library is used to keep track of the state of messages that are being
-/// transferred across the bridge, and it contains functions to hash messages
-/// and check their status.
-library LibBridgeData {
- /// @dev The State struct stores the state of messages in the Bridge
- /// contract.
- struct State {
- uint256 nextMessageId;
- IBridge.Context ctx; // 3 slots
- mapping(bytes32 msgHash => bool recalled) recalls;
- uint256[45] __gap;
- }
-
- /// @dev StatusProof holds the block header and proof for a particular
- /// status.
- struct StatusProof {
- BlockHeader header;
- bytes proof;
- }
-
- bytes32 internal constant MESSAGE_HASH_PLACEHOLDER = bytes32(uint256(1));
- uint256 internal constant CHAINID_PLACEHOLDER = type(uint256).max;
- address internal constant SRC_CHAIN_SENDER_PLACEHOLDER =
- address(uint160(uint256(1)));
-
- // Note: These events must match the ones defined in Bridge.sol.
- event MessageSent(bytes32 indexed msgHash, IBridge.Message message);
- event DestChainEnabled(uint256 indexed chainId, bool enabled);
-
- /// @notice Calculates the keccak256 hash of the message.
- /// @param message The message to be hashed.
- /// @return msgHash The keccak256 hash of the message.
- function hashMessage(IBridge.Message memory message)
- internal
- pure
- returns (bytes32)
- {
- return keccak256(abi.encode(message));
- }
-}
diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeInvoke.sol b/packages/protocol/contracts/bridge/libs/LibBridgeInvoke.sol
deleted file mode 100644
index cab58ed9de0..00000000000
--- a/packages/protocol/contracts/bridge/libs/LibBridgeInvoke.sol
+++ /dev/null
@@ -1,65 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { IBridge } from "../IBridge.sol";
-import { LibAddress } from "../../libs/LibAddress.sol";
-import { LibBridgeData } from "./LibBridgeData.sol";
-
-/// @title LibBridgeInvoke
-/// @notice This library provides functions for handling the invocation of call
-/// messages on the Bridge.
-/// The library facilitates the interaction with messages sent across the
-/// bridge, allowing for call execution and state updates.
-library LibBridgeInvoke {
- using LibAddress for address;
- using LibBridgeData for IBridge.Message;
-
- error B_GAS_LIMIT();
-
- /// @notice Invokes a call message on the Bridge.
- /// @param state The current state of the Bridge.
- /// @param message The call message to be invoked.
- /// @param msgHash The hash of the message.
- /// @param gasLimit The gas limit for the message call.
- /// @return success A boolean value indicating whether the message call was
- /// successful.
- /// @dev This function updates the context in the state before and after the
- /// message call.
- function invokeMessageCall(
- LibBridgeData.State storage state,
- IBridge.Message calldata message,
- bytes32 msgHash,
- uint256 gasLimit
- )
- internal
- returns (bool success)
- {
- if (gasLimit == 0) {
- revert B_GAS_LIMIT();
- }
- // Update the context for the message call
- // Should we simply provide the message itself rather than
- // a context object?
- state.ctx = IBridge.Context({
- msgHash: msgHash,
- from: message.from,
- srcChainId: message.srcChainId
- });
-
- // Perform the message call and capture the success value
- (success,) =
- message.to.call{ value: message.value, gas: gasLimit }(message.data);
-
- // Reset the context after the message call
- state.ctx = IBridge.Context({
- msgHash: LibBridgeData.MESSAGE_HASH_PLACEHOLDER,
- from: LibBridgeData.SRC_CHAIN_SENDER_PLACEHOLDER,
- srcChainId: LibBridgeData.CHAINID_PLACEHOLDER
- });
- }
-}
diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeProcess.sol b/packages/protocol/contracts/bridge/libs/LibBridgeProcess.sol
deleted file mode 100644
index 67c8f727445..00000000000
--- a/packages/protocol/contracts/bridge/libs/LibBridgeProcess.sol
+++ /dev/null
@@ -1,149 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { AddressResolver } from "../../common/AddressResolver.sol";
-import { EtherVault } from "../EtherVault.sol";
-import { IBridge } from "../IBridge.sol";
-import { ISignalService } from "../../signal/ISignalService.sol";
-import { LibAddress } from "../../libs/LibAddress.sol";
-import { LibBridgeData } from "./LibBridgeData.sol";
-import { LibBridgeInvoke } from "./LibBridgeInvoke.sol";
-import { LibBridgeStatus } from "./LibBridgeStatus.sol";
-import { LibMath } from "../../libs/LibMath.sol";
-
-/// @title LibBridgeProcess Library
-/// @notice This library provides functions for processing bridge messages on
-/// the destination chain.
-/// The library handles the execution of bridge messages, status updates, and
-/// fee refunds.
-library LibBridgeProcess {
- using LibMath for uint256;
- using LibAddress for address;
- using LibBridgeData for IBridge.Message;
- using LibBridgeData for LibBridgeData.State;
-
- error B_FORBIDDEN();
- error B_SIGNAL_NOT_RECEIVED();
- error B_STATUS_MISMATCH();
- error B_WRONG_CHAIN_ID();
-
- /// @notice Processes a bridge message on the destination chain. This
- /// function is callable by any address, including the `message.user`.
- /// @dev The process begins by hashing the message and checking the message
- /// status in the bridge state. If the status is "NEW", custody of Ether is
- /// taken from the EtherVault, and the message is invoked. The status is
- /// updated accordingly, and processing fees are refunded as needed.
- /// @param state The state of the bridge.
- /// @param resolver The address resolver.
- /// @param message The message to be processed.
- /// @param proof The proof of the message hash from the source chain.
- /// @param checkProof A boolean flag indicating whether to verify the signal
- /// receipt proof.
- function processMessage(
- LibBridgeData.State storage state,
- AddressResolver resolver,
- IBridge.Message calldata message,
- bytes calldata proof,
- bool checkProof
- )
- internal
- {
- // If the gas limit is set to zero, only the user can process the
- // message.
- if (message.gasLimit == 0 && msg.sender != message.user) {
- revert B_FORBIDDEN();
- }
-
- if (message.destChainId != block.chainid) {
- revert B_WRONG_CHAIN_ID();
- }
-
- // The message status must be "NEW"; "RETRIABLE" is managed in
- // LibBridgeRetry.sol.
- bytes32 msgHash = message.hashMessage();
- if (
- LibBridgeStatus.getMessageStatus(msgHash)
- != LibBridgeStatus.MessageStatus.NEW
- ) {
- revert B_STATUS_MISMATCH();
- }
-
- // Check if the signal has been received on the source chain
- address srcBridge =
- resolver.resolve(message.srcChainId, "bridge", false);
-
- if (
- checkProof
- && !ISignalService(resolver.resolve("signal_service", false))
- .isSignalReceived({
- srcChainId: message.srcChainId,
- app: srcBridge,
- signal: msgHash,
- proof: proof
- })
- ) {
- revert B_SIGNAL_NOT_RECEIVED();
- }
-
- // Release necessary Ether from EtherVault if on Taiko, otherwise it's
- // already available on this Bridge.
- address ethVault = resolver.resolve("ether_vault", true);
- if (ethVault != address(0)) {
- EtherVault(payable(ethVault)).releaseEther(
- address(this), message.value + message.fee
- );
- }
-
- LibBridgeStatus.MessageStatus status;
- uint256 refundAmount;
-
- // Process message differently based on the target address
- if (message.to == address(this) || message.to == address(0)) {
- // Handle special addresses that don't require actual invocation but
- // mark message as DONE
- status = LibBridgeStatus.MessageStatus.DONE;
- refundAmount = message.value;
- } else {
- // Use the specified message gas limit if called by the user, else
- // use remaining gas
- uint256 gasLimit =
- msg.sender == message.user ? gasleft() : message.gasLimit;
-
- bool success = LibBridgeInvoke.invokeMessageCall({
- state: state,
- message: message,
- msgHash: msgHash,
- gasLimit: gasLimit
- });
-
- if (success) {
- status = LibBridgeStatus.MessageStatus.DONE;
- } else {
- status = LibBridgeStatus.MessageStatus.RETRIABLE;
- ethVault.sendEther(message.value);
- }
- }
-
- // Update the message status
- LibBridgeStatus.updateMessageStatus(msgHash, status);
-
- // Determine the refund recipient
- address refundTo =
- message.refundTo == address(0) ? message.user : message.refundTo;
-
- // Refund the processing fee
- if (msg.sender == refundTo) {
- uint256 amount = message.fee + refundAmount;
- refundTo.sendEther(amount);
- } else {
- // If sender is another address, reward it and refund the rest
- msg.sender.sendEther(message.fee);
- refundTo.sendEther(refundAmount);
- }
- }
-}
diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeRecall.sol b/packages/protocol/contracts/bridge/libs/LibBridgeRecall.sol
deleted file mode 100644
index cf8727f09c7..00000000000
--- a/packages/protocol/contracts/bridge/libs/LibBridgeRecall.sol
+++ /dev/null
@@ -1,91 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { AddressResolver } from "../../common/AddressResolver.sol";
-import { EtherVault } from "../EtherVault.sol";
-import { IRecallableMessageSender, IBridge } from "../IBridge.sol";
-import { LibBridgeData } from "./LibBridgeData.sol";
-import { LibBridgeStatus } from "./LibBridgeStatus.sol";
-import { LibAddress } from "../../libs/LibAddress.sol";
-
-/// @title LibBridgeRecall
-/// @notice This library provides functions for releasing Ether and tokens
-/// related to message execution on the Bridge.
-/// The library allows recalling failed messages on their source chain,
-/// releasing associated assets.
-library LibBridgeRecall {
- using LibBridgeData for IBridge.Message;
- using LibAddress for address;
-
- event MessageRecalled(bytes32 indexed msgHash);
-
- error B_MSG_NOT_FAILED();
- error B_MSG_RECALLED_ALREADY();
-
- /// @notice Recalls a failed message on its source chain, releasing
- /// associated assets.
- /// @dev This function checks if the message failed on the source chain and
- /// releases associated Ether or tokens.
- /// @param state The current state of the Bridge.
- /// @param resolver The AddressResolver instance.
- /// @param message The message whose associated Ether should be released.
- /// @param proof The proof data.
- /// @param checkProof A flag indicating whether to check the proof (test
- /// version).
- function recallMessage(
- LibBridgeData.State storage state,
- AddressResolver resolver,
- IBridge.Message calldata message,
- bytes calldata proof,
- bool checkProof
- )
- internal
- {
- bytes32 msgHash = message.hashMessage();
-
- if (state.recalls[msgHash]) {
- revert B_MSG_RECALLED_ALREADY();
- }
-
- if (
- checkProof
- && !LibBridgeStatus.isMessageFailed(
- resolver, msgHash, message.destChainId, proof
- )
- ) {
- revert B_MSG_NOT_FAILED();
- }
-
- state.recalls[msgHash] = true;
-
- // Release necessary Ether from EtherVault if on Taiko, otherwise it's
- // already available on this Bridge.
- address ethVault = resolver.resolve("ether_vault", true);
- if (ethVault != address(0)) {
- EtherVault(payable(ethVault)).releaseEther(
- address(this), message.value
- );
- }
-
- // Execute the recall logic based on the contract's support for the
- // IRecallableMessageSender interface
- if (
- message.from.supportsInterface(
- type(IRecallableMessageSender).interfaceId
- )
- ) {
- IRecallableMessageSender(message.from).onMessageRecalled{
- value: message.value
- }(message);
- } else {
- message.user.sendEther(message.value);
- }
-
- emit MessageRecalled(msgHash);
- }
-}
diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeRetry.sol b/packages/protocol/contracts/bridge/libs/LibBridgeRetry.sol
deleted file mode 100644
index fedb8f831b2..00000000000
--- a/packages/protocol/contracts/bridge/libs/LibBridgeRetry.sol
+++ /dev/null
@@ -1,97 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { AddressResolver } from "../../common/AddressResolver.sol";
-import { EtherVault } from "../EtherVault.sol";
-import { IBridge } from "../IBridge.sol";
-import { LibAddress } from "../../libs/LibAddress.sol";
-import { LibBridgeData } from "./LibBridgeData.sol";
-import { LibBridgeInvoke } from "./LibBridgeInvoke.sol";
-import { LibBridgeStatus } from "./LibBridgeStatus.sol";
-
-/// @title LibBridgeRetry
-/// @notice This library provides functions for retrying bridge messages that
-/// are marked as "RETRIABLE".
-/// The library facilitates the process of invoking the messageCall after
-/// releasing any associated Ether, allowing for retries.
-/// It handles the transition of message status from "RETRIABLE" to "DONE" on
-/// success, and to "FAILED" on the last attempt if unsuccessful.
-library LibBridgeRetry {
- using LibAddress for address;
- using LibBridgeData for IBridge.Message;
- using LibBridgeData for LibBridgeData.State;
-
- error B_DENIED();
- error B_MSG_NON_RETRIABLE();
-
- /// @notice Retries to invoke the messageCall after releasing associated
- /// Ether and tokens.
- /// @dev This function can be called by any address, including the
- /// `message.user`.
- /// It attempts to invoke the messageCall and updates the message status
- /// accordingly.
- /// @param state The current state of the Bridge.
- /// @param resolver The address resolver.
- /// @param message The message to retry.
- /// @param isLastAttempt Specifies if this is the last attempt to retry the
- /// message.
- function retryMessage(
- LibBridgeData.State storage state,
- AddressResolver resolver,
- IBridge.Message calldata message,
- bool isLastAttempt
- )
- internal
- {
- // If the gasLimit is set to 0 or isLastAttempt is true, the caller must
- // be the message.user.
- if (message.gasLimit == 0 || isLastAttempt) {
- if (msg.sender != message.user) revert B_DENIED();
- }
-
- bytes32 msgHash = message.hashMessage();
- if (
- LibBridgeStatus.getMessageStatus(msgHash)
- != LibBridgeStatus.MessageStatus.RETRIABLE
- ) {
- revert B_MSG_NON_RETRIABLE();
- }
-
- // Release necessary Ether from EtherVault if on Taiko, otherwise it's
- // already available on this Bridge.
- address ethVault = resolver.resolve("ether_vault", true);
- if (ethVault != address(0)) {
- EtherVault(payable(ethVault)).releaseEther(
- address(this), message.value
- );
- }
-
- // Attempt to invoke the messageCall.
- bool success = LibBridgeInvoke.invokeMessageCall({
- state: state,
- message: message,
- msgHash: msgHash,
- gasLimit: gasleft()
- });
-
- if (success) {
- // Update the message status to "DONE" on successful invocation.
- LibBridgeStatus.updateMessageStatus(
- msgHash, LibBridgeStatus.MessageStatus.DONE
- );
- } else {
- // Update the message status to "FAILED"
- LibBridgeStatus.updateMessageStatus(
- msgHash, LibBridgeStatus.MessageStatus.FAILED
- );
- // Release Ether back to EtherVault (if on Taiko it is OK)
- // otherwise funds stay at Bridge anyways.
- ethVault.sendEther(message.value);
- }
- }
-}
diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeSend.sol b/packages/protocol/contracts/bridge/libs/LibBridgeSend.sol
deleted file mode 100644
index e4ea4e222b8..00000000000
--- a/packages/protocol/contracts/bridge/libs/LibBridgeSend.sol
+++ /dev/null
@@ -1,145 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { AddressResolver } from "../../common/AddressResolver.sol";
-import { IBridge } from "../IBridge.sol";
-import { ISignalService } from "../../signal/ISignalService.sol";
-import { LibAddress } from "../../libs/LibAddress.sol";
-import { LibBridgeData } from "./LibBridgeData.sol";
-
-/// @title LibBridgeSend
-/// @notice This library provides functions for sending bridge messages and
-/// checking their status.
-/// The library facilitates the process of sending messages to the Bridge,
-/// validating input parameters, and managing Ether custody based on destination
-/// chains.
-library LibBridgeSend {
- using LibAddress for address;
- using LibBridgeData for IBridge.Message;
-
- error B_INCORRECT_VALUE();
- error B_USER_IS_NULL();
- error B_WRONG_CHAIN_ID();
- error B_WRONG_TO_ADDRESS();
-
- /// @notice Sends a message to the Bridge with the details of the request.
- /// @dev This function takes custody of the specified funds, sending them to
- /// the EtherVault on Taiko or storing them on the Bridge for processing on
- /// the destination chain.
- /// @param state The current state of the Bridge.
- /// @param resolver The address resolver.
- /// @param message The message to be sent, including value and fee details.
- /// @return msgHash The hash of the sent message.
- function sendMessage(
- LibBridgeData.State storage state,
- AddressResolver resolver,
- IBridge.Message memory message
- )
- internal
- returns (bytes32 msgHash)
- {
- // Ensure the message user is not null.
- if (message.user == address(0)) {
- revert B_USER_IS_NULL();
- }
-
- // Check if the destination chain is enabled.
- (bool destChainEnabled, address destBridge) =
- isDestChainEnabled(resolver, message.destChainId);
-
- // Verify destination chain and to address.
- if (!destChainEnabled || message.destChainId == block.chainid) {
- revert B_WRONG_CHAIN_ID();
- }
- if (message.to == address(0) || message.to == destBridge) {
- revert B_WRONG_TO_ADDRESS();
- }
-
- // Ensure the sent value matches the expected amount.
- uint256 expectedAmount = message.value + message.fee;
- if (expectedAmount != msg.value) {
- revert B_INCORRECT_VALUE();
- }
-
- // On Taiko, send the expectedAmount to the EtherVault; otherwise, store
- // it on the Bridge.
- address ethVault = resolver.resolve("ether_vault", true);
- ethVault.sendEther(expectedAmount);
-
- // Configure message details and send signal to indicate message
- // sending.
- message.id = state.nextMessageId++;
- message.from = msg.sender;
- message.srcChainId = block.chainid;
-
- msgHash = message.hashMessage();
- ISignalService(resolver.resolve("signal_service", false)).sendSignal(
- msgHash
- );
- emit LibBridgeData.MessageSent(msgHash, message);
- }
-
- /// @notice Checks if the destination chain is enabled.
- /// @param resolver The address resolver.
- /// @param chainId The destination chain ID.
- /// @return enabled True if the destination chain is enabled.
- /// @return destBridge The bridge of the destination chain.
- function isDestChainEnabled(
- AddressResolver resolver,
- uint256 chainId
- )
- internal
- view
- returns (bool enabled, address destBridge)
- {
- destBridge = resolver.resolve(chainId, "bridge", true);
- enabled = destBridge != address(0);
- }
-
- /// @notice Checks if the message was sent.
- /// @param resolver The address resolver.
- /// @param msgHash The hash of the sent message.
- /// @return True if the message was sent.
- function isMessageSent(
- AddressResolver resolver,
- bytes32 msgHash
- )
- internal
- view
- returns (bool)
- {
- return ISignalService(resolver.resolve("signal_service", false))
- .isSignalSent({ app: address(this), signal: msgHash });
- }
-
- /// @notice Checks if the message was received.
- /// @param resolver The address resolver.
- /// @param msgHash The hash of the received message.
- /// @param srcChainId The ID of the source chain.
- /// @param proof The proof of message receipt.
- /// @return True if the message was received.
- function isMessageReceived(
- AddressResolver resolver,
- bytes32 msgHash,
- uint256 srcChainId,
- bytes calldata proof
- )
- internal
- view
- returns (bool)
- {
- address srcBridge = resolver.resolve(srcChainId, "bridge", false);
- return ISignalService(resolver.resolve("signal_service", false))
- .isSignalReceived({
- srcChainId: srcChainId,
- app: srcBridge,
- signal: msgHash,
- proof: proof
- });
- }
-}
diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeStatus.sol b/packages/protocol/contracts/bridge/libs/LibBridgeStatus.sol
deleted file mode 100644
index b87dfb4eb47..00000000000
--- a/packages/protocol/contracts/bridge/libs/LibBridgeStatus.sol
+++ /dev/null
@@ -1,139 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { AddressResolver } from "../../common/AddressResolver.sol";
-import { BlockHeader, LibBlockHeader } from "../../libs/LibBlockHeader.sol";
-import { ICrossChainSync } from "../../common/ICrossChainSync.sol";
-import { LibBridgeData } from "./LibBridgeData.sol";
-import { LibTrieProof } from "../../libs/LibTrieProof.sol";
-
-/// @title LibBridgeStatus
-/// @notice This library provides functions for getting and updating the status
-/// of bridge messages.
-/// The library handles various aspects of message statuses, including their
-/// retrieval, update, and verification of failure status on the destination
-/// chain.
-library LibBridgeStatus {
- using LibBlockHeader for BlockHeader;
-
- enum MessageStatus {
- NEW,
- RETRIABLE,
- DONE,
- FAILED
- }
-
- event MessageStatusChanged(
- bytes32 indexed msgHash, MessageStatus status, address transactor
- );
-
- error B_MSG_HASH_NULL();
- error B_WRONG_CHAIN_ID();
-
- /// @notice Updates the status of a bridge message.
- /// @dev If the new status is different from the current status in the
- /// mapping, the status is updated and an event is emitted.
- /// @param msgHash The hash of the message.
- /// @param status The new status of the message.
- function updateMessageStatus(
- bytes32 msgHash,
- MessageStatus status
- )
- internal
- {
- if (getMessageStatus(msgHash) != status) {
- _setMessageStatus(msgHash, status);
- emit MessageStatusChanged(msgHash, status, msg.sender);
- }
- }
-
- /// @notice Gets the status of a bridge message on the destination chain.
- /// @param msgHash The hash of the message.
- /// @return The status of the message.
- function getMessageStatus(bytes32 msgHash)
- internal
- view
- returns (MessageStatus)
- {
- bytes32 slot = getMessageStatusSlot(msgHash);
- uint256 value;
- assembly {
- value := sload(slot)
- }
- return MessageStatus(value);
- }
-
- /// @notice Checks whether a bridge message has failed on its destination
- /// chain.
- /// @param resolver The address resolver.
- /// @param msgHash The hash of the message.
- /// @param destChainId The ID of the destination chain.
- /// @param proof The proof of the status of the message.
- /// @return True if the message has failed, false otherwise.
- function isMessageFailed(
- AddressResolver resolver,
- bytes32 msgHash,
- uint256 destChainId,
- bytes calldata proof
- )
- internal
- view
- returns (bool)
- {
- if (destChainId == block.chainid) {
- revert B_WRONG_CHAIN_ID();
- }
- if (msgHash == 0x0) {
- revert B_MSG_HASH_NULL();
- }
-
- LibBridgeData.StatusProof memory sp =
- abi.decode(proof, (LibBridgeData.StatusProof));
-
- bytes32 syncedHeaderHash = ICrossChainSync(
- resolver.resolve("taiko", false)
- ).getCrossChainBlockHash(uint64(sp.header.height));
-
- if (
- syncedHeaderHash == 0
- || syncedHeaderHash != sp.header.hashBlockHeader()
- ) {
- return false;
- }
-
- return LibTrieProof.verifyWithFullMerkleProof({
- stateRoot: sp.header.stateRoot,
- addr: resolver.resolve(destChainId, "bridge", false),
- slot: getMessageStatusSlot(msgHash),
- value: bytes32(uint256(LibBridgeStatus.MessageStatus.FAILED)),
- mkproof: sp.proof
- });
- }
-
- /// @notice Gets the storage slot for a bridge message status.
- /// @param msgHash The hash of the message.
- /// @return The storage slot for the message status.
- function getMessageStatusSlot(bytes32 msgHash)
- internal
- pure
- returns (bytes32)
- {
- return keccak256(bytes.concat(bytes("MESSAGE_STATUS"), msgHash));
- }
-
- /// @notice Sets the status of a bridge message.
- /// @param msgHash The hash of the message.
- /// @param status The new status of the message.
- function _setMessageStatus(bytes32 msgHash, MessageStatus status) private {
- bytes32 slot = getMessageStatusSlot(msgHash);
- uint256 value = uint256(status);
- assembly {
- sstore(slot, value)
- }
- }
-}
diff --git a/packages/protocol/contracts/common/AddressManager.sol b/packages/protocol/contracts/common/AddressManager.sol
index 5c3f73837e0..79cbf3bc486 100644
--- a/packages/protocol/contracts/common/AddressManager.sol
+++ b/packages/protocol/contracts/common/AddressManager.sol
@@ -6,60 +6,42 @@
pragma solidity ^0.8.20;
-import { OwnableUpgradeable } from
- "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
-import { Proxied } from "./Proxied.sol";
-
+import "./OwnerUUPSUpgradable.sol";
/// @title IAddressManager
-/// @notice Specifies methods to manage address mappings for given domain-name
+/// @notice Specifies methods to manage address mappings for given chainId-name
/// pairs.
-interface IAddressManager {
- /// @notice Sets the address for a specific domain-name pair.
- /// @param domain The domain to which the address will be mapped.
- /// @param name The name to which the address will be mapped.
- /// @param newAddress The Ethereum address to be mapped.
- function setAddress(
- uint256 domain,
- bytes32 name,
- address newAddress
- )
- external;
- /// @notice Gets the address mapped to a specific domain-name pair.
- /// @param domain The domain for which the address needs to be fetched.
+interface IAddressManager {
+ /// @notice Gets the address mapped to a specific chainId-name pair.
+ /// @dev Note that in production, this method shall be a pure function
+ /// without any storage access.
+ /// @param chainId The chainId for which the address needs to be fetched.
/// @param name The name for which the address needs to be fetched.
- /// @return Address associated with the domain-name pair.
- function getAddress(
- uint256 domain,
- bytes32 name
- )
- external
- view
- returns (address);
+ /// @return Address associated with the chainId-name pair.
+ function getAddress(uint64 chainId, bytes32 name) external view returns (address);
}
/// @title AddressManager
-/// @notice Manages a mapping of domain-name pairs to Ethereum addresses.
-contract AddressManager is OwnableUpgradeable, IAddressManager {
+/// @notice Manages a mapping of chainId-name pairs to Ethereum addresses.
+contract AddressManager is OwnerUUPSUpgradable, IAddressManager {
mapping(uint256 => mapping(bytes32 => address)) private addresses;
+ uint256[49] private __gap;
event AddressSet(
- uint256 indexed domain,
- bytes32 indexed name,
- address newAddress,
- address oldAddress
+ uint64 indexed chainId, bytes32 indexed name, address newAddress, address oldAddress
);
- error EOA_OWNER_NOT_ALLOWED();
-
/// @notice Initializes the owner for the upgradable contract.
function init() external initializer {
- OwnableUpgradeable.__Ownable_init();
+ __OwnerUUPSUpgradable_init();
}
- /// @inheritdoc IAddressManager
+ /// @notice Sets the address for a specific chainId-name pair.
+ /// @param chainId The chainId to which the address will be mapped.
+ /// @param name The name to which the address will be mapped.
+ /// @param newAddress The Ethereum address to be mapped.
function setAddress(
- uint256 domain,
+ uint64 chainId,
bytes32 name,
address newAddress
)
@@ -67,29 +49,13 @@ contract AddressManager is OwnableUpgradeable, IAddressManager {
virtual
onlyOwner
{
- if (newAddress.code.length == 0 && newAddress == msg.sender) {
- revert EOA_OWNER_NOT_ALLOWED();
- }
-
- address oldAddress = addresses[domain][name];
- addresses[domain][name] = newAddress;
- emit AddressSet(domain, name, newAddress, oldAddress);
+ address oldAddress = addresses[chainId][name];
+ addresses[chainId][name] = newAddress;
+ emit AddressSet(chainId, name, newAddress, oldAddress);
}
/// @inheritdoc IAddressManager
- function getAddress(
- uint256 domain,
- bytes32 name
- )
- external
- view
- virtual
- returns (address)
- {
- return addresses[domain][name];
+ function getAddress(uint64 chainId, bytes32 name) public view override returns (address) {
+ return addresses[chainId][name];
}
}
-
-/// @title ProxiedAddressManager
-/// @notice Proxied version of the parent contract.
-contract ProxiedAddressManager is Proxied, AddressManager { }
diff --git a/packages/protocol/contracts/common/AddressResolver.sol b/packages/protocol/contracts/common/AddressResolver.sol
index 82befee3963..8c6a1dae0ad 100644
--- a/packages/protocol/contracts/common/AddressResolver.sol
+++ b/packages/protocol/contracts/common/AddressResolver.sol
@@ -6,24 +6,28 @@
pragma solidity ^0.8.20;
-import { IAddressManager } from "./AddressManager.sol";
-import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
+import "lib/openzeppelin-contracts/contracts/utils/Strings.sol";
+import "./AddressManager.sol";
/// @title AddressResolver
/// @notice This contract acts as a bridge for name-to-address resolution.
/// It delegates the resolution to the AddressManager. By separating the logic,
/// we can maintain flexibility in address management without affecting the
/// resolving process.
+///
+/// Note that the address manager should be changed using upgradability, there
+/// is no setAddressManager() function go guarantee atomicness across all
+/// contracts that are resolvers.
abstract contract AddressResolver {
- IAddressManager internal _addressManager;
+ using Strings for uint256;
+ address public addressManager;
uint256[49] private __gap;
- event AddressManagerChanged(address indexed addressManager);
-
error RESOLVER_DENIED();
- error RESOLVER_INVALID_ADDR();
- error RESOLVER_ZERO_ADDR(uint256 chainId, bytes32 name);
+ error RESOLVER_INVALID_MANAGER();
+ error RESOLVER_UNEXPECTED_CHAINID();
+ error RESOLVER_ZERO_ADDR(uint64 chainId, string name);
/// @dev Modifier that ensures the caller is the resolved address of a given
/// name.
@@ -33,19 +37,7 @@ abstract contract AddressResolver {
_;
}
- /// @dev Modifier that ensures the caller is the resolved address of two
- /// given names.
- /// @param name1 The first name to check against.
- /// @param name2 The second name to check against.
- modifier onlyFromNamed2(bytes32 name1, bytes32 name2) {
- if (
- msg.sender != resolve(name1, true)
- && msg.sender != resolve(name2, true)
- ) revert RESOLVER_DENIED();
- _;
- }
-
- /// @notice Resolves a name to its address on the current chain.
+ /// @notice Resolves a name to its address deployed on this chain.
/// @param name Name whose address is to be resolved.
/// @param allowZeroAddress If set to true, does not throw if the resolved
/// address is `address(0)`.
@@ -59,10 +51,10 @@ abstract contract AddressResolver {
virtual
returns (address payable addr)
{
- return _resolve(block.chainid, name, allowZeroAddress);
+ return _resolve(uint64(block.chainid), name, allowZeroAddress);
}
- /// @notice Resolves a name to its address on a specified chain.
+ /// @notice Resolves a name to its address deployed on a specified chain.
/// @param chainId The chainId of interest.
/// @param name Name whose address is to be resolved.
/// @param allowZeroAddress If set to true, does not throw if the resolved
@@ -70,7 +62,7 @@ abstract contract AddressResolver {
/// @return addr Address associated with the given name on the specified
/// chain.
function resolve(
- uint256 chainId,
+ uint64 chainId,
bytes32 name,
bool allowZeroAddress
)
@@ -82,17 +74,14 @@ abstract contract AddressResolver {
return _resolve(chainId, name, allowZeroAddress);
}
- /// @notice Fetches the AddressManager's address.
- /// @return The current address of the AddressManager.
- function addressManager() public view returns (address) {
- return address(_addressManager);
- }
-
/// @dev Initialization method for setting up AddressManager reference.
- /// @param addressManager_ Address of the AddressManager.
- function _init(address addressManager_) internal virtual {
- if (addressManager_ == address(0)) revert RESOLVER_INVALID_ADDR();
- _addressManager = IAddressManager(addressManager_);
+ /// @param _addressManager Address of the AddressManager.
+ // solhint-disable-next-line func-name-mixedcase
+ function __AddressResolver_init(address _addressManager) internal virtual {
+ if (block.chainid >= type(uint64).max) {
+ revert RESOLVER_UNEXPECTED_CHAINID();
+ }
+ addressManager = _addressManager;
}
/// @dev Helper method to resolve name-to-address.
@@ -103,7 +92,7 @@ abstract contract AddressResolver {
/// @return addr Address associated with the given name on the specified
/// chain.
function _resolve(
- uint256 chainId,
+ uint64 chainId,
bytes32 name,
bool allowZeroAddress
)
@@ -111,10 +100,12 @@ abstract contract AddressResolver {
view
returns (address payable addr)
{
- addr = payable(_addressManager.getAddress(chainId, name));
+ if (addressManager == address(0)) revert RESOLVER_INVALID_MANAGER();
+
+ addr = payable(IAddressManager(addressManager).getAddress(chainId, name));
if (!allowZeroAddress && addr == address(0)) {
- revert RESOLVER_ZERO_ADDR(chainId, name);
+ revert RESOLVER_ZERO_ADDR(chainId, uint256(name).toString());
}
}
}
diff --git a/packages/protocol/contracts/common/AuthorizableContract.sol b/packages/protocol/contracts/common/AuthorizableContract.sol
new file mode 100644
index 00000000000..82e57a24be9
--- /dev/null
+++ b/packages/protocol/contracts/common/AuthorizableContract.sol
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "../common/EssentialContract.sol";
+
+/// @title AuthorizableContract
+abstract contract AuthorizableContract is EssentialContract {
+ mapping(address => bytes32 label) public authorizedAddresses;
+ uint256[49] private __gap;
+
+ event Authorized(address indexed addr, bytes32 oldLabel, bytes32 newLabel);
+
+ error INVALID_ADDRESS();
+ error INVALID_LABEL();
+
+ function authorize(address addr, bytes32 label) external onlyOwner {
+ if (addr == address(0)) revert INVALID_ADDRESS();
+
+ bytes32 oldLabel = authorizedAddresses[addr];
+ if (oldLabel == label) revert INVALID_LABEL();
+ authorizedAddresses[addr] = label;
+
+ emit Authorized(addr, oldLabel, label);
+ }
+
+ function isAuthorizedAs(address addr, bytes32 label) public view returns (bool) {
+ return label != 0 && authorizedAddresses[addr] == label;
+ }
+}
diff --git a/packages/protocol/contracts/common/EssentialContract.sol b/packages/protocol/contracts/common/EssentialContract.sol
index 62ba94836a7..4ba7b71a16f 100644
--- a/packages/protocol/contracts/common/EssentialContract.sol
+++ b/packages/protocol/contracts/common/EssentialContract.sol
@@ -6,33 +6,30 @@
pragma solidity ^0.8.20;
-import { AddressResolver } from "./AddressResolver.sol";
-import { IAddressManager } from "./AddressManager.sol";
-import { OwnableUpgradeable } from
- "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
-import { ReentrancyGuardUpgradeable } from
- "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
+import "./AddressResolver.sol";
+import "./OwnerUUPSUpgradable.sol";
-/// @title EssentialContract
-/// @notice This contract serves as the base contract for many core components.
-abstract contract EssentialContract is
- ReentrancyGuardUpgradeable,
- OwnableUpgradeable,
- AddressResolver
-{
- /// @notice Sets a new address manager.
- /// @param newAddressManager Address of the new address manager.
- function setAddressManager(address newAddressManager) external onlyOwner {
- if (newAddressManager == address(0)) revert RESOLVER_INVALID_ADDR();
- _addressManager = IAddressManager(newAddressManager);
- emit AddressManagerChanged(newAddressManager);
+abstract contract EssentialContract is OwnerUUPSUpgradable, AddressResolver {
+ uint256[50] private __gap;
+
+ /// @dev Modifier that ensures the caller is the owner or resolved address of a given name.
+ /// @param name The name to check against.
+ modifier onlyFromOwnerOrNamed(bytes32 name) {
+ if (msg.sender != owner() && msg.sender != resolve(name, true)) revert RESOLVER_DENIED();
+ _;
}
/// @notice Initializes the contract with an address manager.
/// @param _addressManager The address of the address manager.
- function _init(address _addressManager) internal virtual override {
- ReentrancyGuardUpgradeable.__ReentrancyGuard_init();
- OwnableUpgradeable.__Ownable_init();
- AddressResolver._init(_addressManager);
+ // solhint-disable-next-line func-name-mixedcase
+ function __Essential_init(address _addressManager) internal virtual {
+ __OwnerUUPSUpgradable_init();
+ __AddressResolver_init(_addressManager);
+ }
+
+ /// @notice Initializes the contract with an address manager.
+ // solhint-disable-next-line func-name-mixedcase
+ function __Essential_init() internal virtual {
+ __Essential_init(address(0));
}
}
diff --git a/packages/protocol/contracts/common/ICrossChainSync.sol b/packages/protocol/contracts/common/ICrossChainSync.sol
index b075e7531e2..87fdf59cf70 100644
--- a/packages/protocol/contracts/common/ICrossChainSync.sol
+++ b/packages/protocol/contracts/common/ICrossChainSync.sol
@@ -13,30 +13,27 @@ pragma solidity ^0.8.20;
/// block hashes across chains. The core idea is to ensure that data between
/// both chains remain consistent and can be cross-referenced with integrity.
interface ICrossChainSync {
+ struct Snippet {
+ uint64 remoteBlockId;
+ uint64 syncedInBlock;
+ bytes32 blockHash;
+ bytes32 signalRoot;
+ }
+
/// @dev Emitted when a block has been synced across chains.
- /// @param srcHeight The height (block id) that was synced.
+ /// @param syncedInBlock The ID of this chain's block where the sync
+ /// happened.
+ /// @param blockId The ID of the remote block whose block hash and
+ /// signal root are synced.
/// @param blockHash The hash of the synced block.
/// @param signalRoot The root hash representing cross-chain signals.
event CrossChainSynced(
- uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot
+ uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot
);
/// @notice Fetches the hash of a block from the opposite chain.
/// @param blockId The target block id. Specifying 0 retrieves the hash
/// of the latest block.
- /// @return The hash of the desired block from the other chain.
- function getCrossChainBlockHash(uint64 blockId)
- external
- view
- returns (bytes32);
-
- /// @notice Retrieves the root hash of the signal service storage for a
- /// given block from the opposite chain.
- /// @param blockId The target block id. Specifying 0 retrieves the root
- /// of the latest block.
- /// @return The root hash for the specified block's signal service.
- function getCrossChainSignalRoot(uint64 blockId)
- external
- view
- returns (bytes32);
+ /// @return snippet The block hash and signal root synced.
+ function getSyncedSnippet(uint64 blockId) external view returns (Snippet memory snippet);
}
diff --git a/packages/protocol/contracts/common/OwnerUUPSUpgradable.sol b/packages/protocol/contracts/common/OwnerUUPSUpgradable.sol
new file mode 100644
index 00000000000..f38f8aeb1f0
--- /dev/null
+++ b/packages/protocol/contracts/common/OwnerUUPSUpgradable.sol
@@ -0,0 +1,79 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "lib/openzeppelin-contracts/contracts/proxy/utils/UUPSUpgradeable.sol";
+import "lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol";
+
+/// @title OwnerUUPSUpgradable
+/// @notice This contract serves as the base contract for many core components.
+/// @dev We didn't use OpenZeppelin's PausableUpgradeable and
+/// ReentrancyGuardUpgradeable contract to optimize storage reads.
+abstract contract OwnerUUPSUpgradable is UUPSUpgradeable, OwnableUpgradeable {
+ uint8 private constant _FALSE = 1;
+ uint8 private constant _TRUE = 2;
+
+ uint8 private _reentry; // slot 1
+ uint8 private _paused;
+ uint256[49] private __gap;
+
+ event Paused(address account);
+ event Unpaused(address account);
+
+ error REENTRANT_CALL();
+ error INVALID_PAUSE_STATUS();
+
+ modifier nonReentrant() {
+ if (_reentry == _TRUE) revert REENTRANT_CALL();
+ _reentry = _TRUE;
+ _;
+ _reentry = _FALSE;
+ }
+
+ modifier whenPaused() {
+ if (!paused()) revert INVALID_PAUSE_STATUS();
+ _;
+ }
+
+ modifier whenNotPaused() {
+ if (paused()) revert INVALID_PAUSE_STATUS();
+ _;
+ }
+
+ /// @custom:oz-upgrades-unsafe-allow constructor
+ constructor() {
+ _disableInitializers();
+ }
+
+ function pause() external whenNotPaused onlyOwner {
+ _paused = _TRUE;
+ emit Paused(msg.sender);
+ }
+
+ function unpause() external whenPaused onlyOwner {
+ _paused = _FALSE;
+ emit Unpaused(msg.sender);
+ }
+
+ function paused() public view returns (bool) {
+ return _paused == _TRUE;
+ }
+
+ function _authorizeUpgrade(address) internal override onlyOwner { }
+
+ /// @notice Initializes the contract with an address manager.
+ // solhint-disable-next-line func-name-mixedcase
+ function __OwnerUUPSUpgradable_init() internal virtual {
+ __Ownable_init();
+ _reentry = _FALSE;
+ _paused = _FALSE;
+ }
+
+ function _inNonReentrant() internal view returns (bool) {
+ return _reentry == _TRUE;
+ }
+}
diff --git a/packages/protocol/contracts/common/Proxied.sol b/packages/protocol/contracts/common/Proxied.sol
deleted file mode 100644
index 26b2472ae2a..00000000000
--- a/packages/protocol/contracts/common/Proxied.sol
+++ /dev/null
@@ -1,21 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { Initializable } from
- "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
-
-/// @title Proxied
-/// @dev This abstract contract extends Initializable from OpenZeppelin's
-/// upgradeable contracts library. It is intended to be used for proxy pattern
-/// implementations where constructors are non-traditional.
-abstract contract Proxied is Initializable {
- /// @custom:oz-upgrades-unsafe-allow constructor
- constructor() {
- _disableInitializers();
- }
-}
diff --git a/packages/protocol/contracts/compiled/FiatTokenProxy.json b/packages/protocol/contracts/compiled/FiatTokenProxy.json
new file mode 100644
index 00000000000..cebc9f3ceca
--- /dev/null
+++ b/packages/protocol/contracts/compiled/FiatTokenProxy.json
@@ -0,0 +1,552 @@
+{
+ "abi": [
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "implementationContract",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "previousAdmin",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "newAdmin",
+ "type": "address"
+ }
+ ],
+ "name": "AdminChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "implementation",
+ "type": "address"
+ }
+ ],
+ "name": "Upgraded",
+ "type": "event"
+ },
+ {
+ "stateMutability": "payable",
+ "type": "fallback"
+ },
+ {
+ "inputs": [],
+ "name": "admin",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newAdmin",
+ "type": "address"
+ }
+ ],
+ "name": "changeAdmin",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "implementation",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ }
+ ],
+ "name": "upgradeTo",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ }
+ ],
+ "name": "upgradeToAndCall",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ }
+ ],
+ "bytecode": {
+ "object": "0x608060405234801561001057600080fd5b506040516108a93803806108a98339818101604052602081101561003357600080fd5b5051808061004081610051565b5061004a336100c3565b5050610123565b610064816100e760201b61042a1760201c565b61009f5760405162461bcd60e51b815260040180806020018281038252603b81526020018061086e603b913960400191505060405180910390fd5b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c355565b7f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b55565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061011b57508115155b949350505050565b61073c806101326000396000f3fe60806040526004361061005a5760003560e01c80635c60da1b116100435780635c60da1b146101315780638f2839701461016f578063f851a440146101af5761005a565b80633659cfe6146100645780634f1ef286146100a4575b6100626101c4565b005b34801561007057600080fd5b506100626004803603602081101561008757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101de565b610062600480360360408110156100ba57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156100f257600080fd5b82018360208201111561010457600080fd5b8035906020019184600183028401116401000000008311171561012657600080fd5b509092509050610232565b34801561013d57600080fd5b50610146610309565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561017b57600080fd5b506100626004803603602081101561019257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610318565b3480156101bb57600080fd5b50610146610420565b6101cc610466565b6101dc6101d76104fa565b61051f565b565b6101e6610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102275761022281610568565b61022f565b61022f6101c4565b50565b61023a610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102fc5761027683610568565b60003073ffffffffffffffffffffffffffffffffffffffff16348484604051808383808284376040519201945060009350909150508083038185875af1925050503d80600081146102e3576040519150601f19603f3d011682016040523d82523d6000602084013e6102e8565b606091505b50509050806102f657600080fd5b50610304565b6103046101c4565b505050565b60006103136104fa565b905090565b610320610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102275773ffffffffffffffffffffffffffffffffffffffff81166103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806106966036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103e8610543565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301528051918290030190a1610222816105bd565b6000610313610543565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061045e57508115155b949350505050565b61046e610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156104f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806106646032913960400191505060405180910390fd5b6101dc6101dc565b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c35490565b3660008037600080366000845af43d6000803e80801561053e573d6000f35b3d6000fd5b7f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b5490565b610571816105e1565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b9181900360200190a150565b7f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b55565b6105ea8161042a565b61063f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b8152602001806106cc603b913960400191505060405180910390fd5b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c35556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a264697066735822122001b610efbebc57927addec087895f40a32b15707f9bbcd4d028e2ffcc8cd241f64736f6c634300060c003343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373",
+ "sourceMap": "1385:182:20:-:0;;;1443:122;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1443:122:20;;;2686:42:19;2705:22;2686:18;:42::i;:::-;-1:-1:-1;3044:21:17::1;3054:10;3044:9;:21::i;:::-;2847:225:::0;1443:122:20;1385:182;;3492:342:19;3586:37;3605:17;3586:18;;;;;:37;;:::i;:::-;3565:143;;;;-1:-1:-1;;;3565:143:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2298:66;3787:31;3773:55::o;5448:153:17:-;2256:66;5563:22;5549:46::o;718:610:21:-;778:4;1239:20;;1084:66;1278:23;;;;;;:42;;-1:-1:-1;1305:15:21;;;1278:42;1270:51;718:610;-1:-1:-1;;;;718:610:21:o;1385:182:20:-;;;;;;;",
+ "linkReferences": {}
+ },
+ "deployedBytecode": {
+ "object": "0x60806040526004361061005a5760003560e01c80635c60da1b116100435780635c60da1b146101315780638f2839701461016f578063f851a440146101af5761005a565b80633659cfe6146100645780634f1ef286146100a4575b6100626101c4565b005b34801561007057600080fd5b506100626004803603602081101561008757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101de565b610062600480360360408110156100ba57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156100f257600080fd5b82018360208201111561010457600080fd5b8035906020019184600183028401116401000000008311171561012657600080fd5b509092509050610232565b34801561013d57600080fd5b50610146610309565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561017b57600080fd5b506100626004803603602081101561019257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610318565b3480156101bb57600080fd5b50610146610420565b6101cc610466565b6101dc6101d76104fa565b61051f565b565b6101e6610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102275761022281610568565b61022f565b61022f6101c4565b50565b61023a610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102fc5761027683610568565b60003073ffffffffffffffffffffffffffffffffffffffff16348484604051808383808284376040519201945060009350909150508083038185875af1925050503d80600081146102e3576040519150601f19603f3d011682016040523d82523d6000602084013e6102e8565b606091505b50509050806102f657600080fd5b50610304565b6103046101c4565b505050565b60006103136104fa565b905090565b610320610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102275773ffffffffffffffffffffffffffffffffffffffff81166103bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806106966036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103e8610543565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301528051918290030190a1610222816105bd565b6000610313610543565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061045e57508115155b949350505050565b61046e610543565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156104f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806106646032913960400191505060405180910390fd5b6101dc6101dc565b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c35490565b3660008037600080366000845af43d6000803e80801561053e573d6000f35b3d6000fd5b7f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b5490565b610571816105e1565b6040805173ffffffffffffffffffffffffffffffffffffffff8316815290517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b9181900360200190a150565b7f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b55565b6105ea8161042a565b61063f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b8152602001806106cc603b913960400191505060405180910390fd5b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c35556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a264697066735822122001b610efbebc57927addec087895f40a32b15707f9bbcd4d028e2ffcc8cd241f64736f6c634300060c0033",
+ "sourceMap": "1385:182:20:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1836:11:18;:9;:11::i;:::-;1385:182:20;4049:109:17;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4049:109:17;;;;:::i;4702:406::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4702:406:17;;-1:-1:-1;4702:406:17;-1:-1:-1;4702:406:17;:::i;3294:99::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3581:272;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3581:272:17;;;;:::i;3141:81::-;;;;;;;;;;;;;:::i;3688:100:18:-;3728:15;:13;:15::i;:::-;3753:28;3763:17;:15;:17::i;:::-;3753:9;:28::i;:::-;3688:100::o;4049:109:17:-;2571:8;:6;:8::i;:::-;2557:22;;:10;:22;;;2553:96;;;4122:29:::1;4133:17;4122:10;:29::i;:::-;2553:96:::0;;;2627:11;:9;:11::i;:::-;4049:109;:::o;4702:406::-;2571:8;:6;:8::i;:::-;2557:22;;:10;:22;;;2553:96;;;4839:29:::1;4850:17;4839:10;:29::i;:::-;4965:12;4990:4;4982:18;;5008:9;5019:4;;4982:42;;;;;;;;;;::::0;;::::1;::::0;-1:-1:-1;4982:42:17::1;::::0;-1:-1:-1;4982:42:17;;-1:-1:-1;;4982:42:17;;::::1;::::0;;;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4964:60;;;5093:7;5085:16;;;::::0;::::1;;2595:1;2553:96:::0;;;2627:11;:9;:11::i;:::-;4702:406;;;:::o;3294:99::-;3343:7;3369:17;:15;:17::i;:::-;3362:24;;3294:99;:::o;3581:272::-;2571:8;:6;:8::i;:::-;2557:22;;:10;:22;;;2553:96;;;3668:22:::1;::::0;::::1;3647:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3785:32;3798:8;:6;:8::i;:::-;3785:32;::::0;;::::1;::::0;;::::1;::::0;;;;::::1;;::::0;::::1;::::0;;;;;;;;;::::1;3827:19;3837:8;3827:9;:19::i;3141:81::-:0;3181:7;3207:8;:6;:8::i;718:610:21:-;778:4;1239:20;;1084:66;1278:23;;;;;;:42;;-1:-1:-1;1305:15:21;;;1278:42;1270:51;718:610;-1:-1:-1;;;;718:610:21:o;5684:210:17:-;5772:8;:6;:8::i;:::-;5758:22;;:10;:22;;;;5737:119;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5866:21;:19;:21::i;2863:185:19:-;2298:66;3021:11;;2999:43::o;2293:1025:18:-;2623:14;2620:1;2617;2604:34;2934:1;2915;2883:14;2864:1;2832:14;2809:5;2779:170;3023:16;3020:1;3017;3002:38;3061:6;3136:74;;;;3267:16;3264:1;3257:27;3136:74;3175:16;3172:1;3165:27;5165:157:17;2256:66;5295:11;;5274:42::o;3193:152:19:-;3259:37;3278:17;3259:18;:37::i;:::-;3311:27;;;;;;;;;;;;;;;;;;;3193:152;:::o;5448:153:17:-;2256:66;5563:22;5549:46::o;3492:342:19:-;3586:37;3605:17;3586:18;:37::i;:::-;3565:143;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2298:66;3787:31;3773:55::o",
+ "linkReferences": {}
+ },
+ "methodIdentifiers": {
+ "admin()": "f851a440",
+ "changeAdmin(address)": "8f283970",
+ "implementation()": "5c60da1b",
+ "upgradeTo(address)": "3659cfe6",
+ "upgradeToAndCall(address,bytes)": "4f1ef286"
+ },
+ "rawMetadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementationContract\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This contract proxies FiatToken calls and enables FiatToken upgrades\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"returns\":{\"_0\":\"The address of the proxy admin.\"}},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Only the current admin can call this function.\",\"params\":{\"newAdmin\":\"Address to transfer proxy administration to.\"}},\"implementation()\":{\"returns\":{\"_0\":\"The address of the implementation.\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the backing implementation of the proxy. Only the admin can call this function.\",\"params\":{\"newImplementation\":\"Address of the new implementation.\"}},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the backing implementation of the proxy and call a function on the new implementation. This is useful to initialize the proxied contract.\",\"params\":{\"data\":\"Data to send as msg.data in the low level call. It should include the signature and the parameters of the function to be called, as described in https://solidity.readthedocs.io/en/develop/abi-spec.html#function-selector-and-argument-encoding.\",\"newImplementation\":\"Address of the new implementation.\"}}},\"title\":\"FiatTokenProxy\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/FiatTokenProxy/centre-tokens/contracts/v1/FiatTokenProxy.sol\":\"FiatTokenProxy\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000000},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"src/FiatTokenProxy/centre-tokens/contracts/upgradeability/AdminUpgradeabilityProxy.sol\":{\"keccak256\":\"0xc93cb352d8b777ea96e743124af5386eeee32a9fdef0b2fbd89623988e66caad\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d0407b40cd936bdf6f6ae141fef3da54824a786affc9a459cd6cd83478043683\",\"dweb:/ipfs/QmQh2LjAVdU2HKc7w1fXxuPEfFvTcBifHiYzgdrZtDB9rk\"]},\"src/FiatTokenProxy/centre-tokens/contracts/upgradeability/Proxy.sol\":{\"keccak256\":\"0x6cc252e2b80c8ecaf6d29b950ba3591e4366caf06c3ccba89a8f9cbd2ee807e3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d60d210ae173d21b90b989e69c50789fb09dc27ccb0736b41907471248ee3087\",\"dweb:/ipfs/QmQbijUGm48UDyqnefEJExWsxBViKj1M5TAWY82Jn6sJW7\"]},\"src/FiatTokenProxy/centre-tokens/contracts/upgradeability/UpgradeabilityProxy.sol\":{\"keccak256\":\"0x3086b8904fb474eb3d8d701f8ec6991796c5e8a7345ace9c3aabc140973f6c85\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cde7d942bb42ee3fb09ed643751151bc192522a1dc9ccb5d28aff7fdadf8b9e6\",\"dweb:/ipfs/QmQBVbxYcZjRFH66R1ZByXx8rQym3Sx7jjFtFKRWhLXxdg\"]},\"src/FiatTokenProxy/centre-tokens/contracts/v1/FiatTokenProxy.sol\":{\"keccak256\":\"0x7e640892ac0fd6efafe4a9dc08cbc7ba5e825dafe8a6a8ebf717e7026b8fb69f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2e84a985f3271652e16eec4df9be1829f042a98b5723db5b87aeeb8eadc9c207\",\"dweb:/ipfs/QmU4JWGMzd3rA64BiDVejhnapKRJG4WHLuw3g866hFPLTx\"]},\"src/FiatTokenProxy/openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xdfb4f812600ba4ce6738c35584ceb8c9433472583051b48ba5b1f66cb758a498\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://df02dffe1c1de089d9b4f6192f0dcf464526f2230f420b3deec4645e0cdd2bff\",\"dweb:/ipfs/QmcqXGAU3KJqwrgUVoGJ2W8osomhSJ4R5kdsRpbuW3fELS\"]}},\"version\":1}",
+ "metadata": {
+ "compiler": {
+ "version": "0.6.12+commit.27d51765"
+ },
+ "language": "Solidity",
+ "output": {
+ "abi": [
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "implementationContract",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "constructor"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "previousAdmin",
+ "type": "address",
+ "indexed": false
+ },
+ {
+ "internalType": "address",
+ "name": "newAdmin",
+ "type": "address",
+ "indexed": false
+ }
+ ],
+ "type": "event",
+ "name": "AdminChanged",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "implementation",
+ "type": "address",
+ "indexed": false
+ }
+ ],
+ "type": "event",
+ "name": "Upgraded",
+ "anonymous": false
+ },
+ {
+ "inputs": [],
+ "stateMutability": "payable",
+ "type": "fallback"
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "admin",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newAdmin",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "changeAdmin"
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "implementation",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "upgradeTo"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ }
+ ],
+ "stateMutability": "payable",
+ "type": "function",
+ "name": "upgradeToAndCall"
+ }
+ ],
+ "devdoc": {
+ "kind": "dev",
+ "methods": {
+ "admin()": {
+ "returns": {
+ "_0": "The address of the proxy admin."
+ }
+ },
+ "changeAdmin(address)": {
+ "details": "Changes the admin of the proxy. Only the current admin can call this function.",
+ "params": {
+ "newAdmin": "Address to transfer proxy administration to."
+ }
+ },
+ "implementation()": {
+ "returns": {
+ "_0": "The address of the implementation."
+ }
+ },
+ "upgradeTo(address)": {
+ "details": "Upgrade the backing implementation of the proxy. Only the admin can call this function.",
+ "params": {
+ "newImplementation": "Address of the new implementation."
+ }
+ },
+ "upgradeToAndCall(address,bytes)": {
+ "details": "Upgrade the backing implementation of the proxy and call a function on the new implementation. This is useful to initialize the proxied contract.",
+ "params": {
+ "data": "Data to send as msg.data in the low level call. It should include the signature and the parameters of the function to be called, as described in https://solidity.readthedocs.io/en/develop/abi-spec.html#function-selector-and-argument-encoding.",
+ "newImplementation": "Address of the new implementation."
+ }
+ }
+ },
+ "version": 1
+ },
+ "userdoc": {
+ "kind": "user",
+ "methods": {},
+ "version": 1
+ }
+ },
+ "settings": {
+ "remappings": [
+ "ds-test/=lib/forge-std/lib/ds-test/src/",
+ "forge-std/=lib/forge-std/src/"
+ ],
+ "optimizer": {
+ "enabled": true,
+ "runs": 10000000
+ },
+ "metadata": {
+ "bytecodeHash": "ipfs"
+ },
+ "compilationTarget": {
+ "src/FiatTokenProxy/centre-tokens/contracts/v1/FiatTokenProxy.sol": "FiatTokenProxy"
+ },
+ "libraries": {}
+ },
+ "sources": {
+ "src/FiatTokenProxy/centre-tokens/contracts/upgradeability/AdminUpgradeabilityProxy.sol": {
+ "keccak256": "0xc93cb352d8b777ea96e743124af5386eeee32a9fdef0b2fbd89623988e66caad",
+ "urls": [
+ "bzz-raw://d0407b40cd936bdf6f6ae141fef3da54824a786affc9a459cd6cd83478043683",
+ "dweb:/ipfs/QmQh2LjAVdU2HKc7w1fXxuPEfFvTcBifHiYzgdrZtDB9rk"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenProxy/centre-tokens/contracts/upgradeability/Proxy.sol": {
+ "keccak256": "0x6cc252e2b80c8ecaf6d29b950ba3591e4366caf06c3ccba89a8f9cbd2ee807e3",
+ "urls": [
+ "bzz-raw://d60d210ae173d21b90b989e69c50789fb09dc27ccb0736b41907471248ee3087",
+ "dweb:/ipfs/QmQbijUGm48UDyqnefEJExWsxBViKj1M5TAWY82Jn6sJW7"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenProxy/centre-tokens/contracts/upgradeability/UpgradeabilityProxy.sol": {
+ "keccak256": "0x3086b8904fb474eb3d8d701f8ec6991796c5e8a7345ace9c3aabc140973f6c85",
+ "urls": [
+ "bzz-raw://cde7d942bb42ee3fb09ed643751151bc192522a1dc9ccb5d28aff7fdadf8b9e6",
+ "dweb:/ipfs/QmQBVbxYcZjRFH66R1ZByXx8rQym3Sx7jjFtFKRWhLXxdg"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenProxy/centre-tokens/contracts/v1/FiatTokenProxy.sol": {
+ "keccak256": "0x7e640892ac0fd6efafe4a9dc08cbc7ba5e825dafe8a6a8ebf717e7026b8fb69f",
+ "urls": [
+ "bzz-raw://2e84a985f3271652e16eec4df9be1829f042a98b5723db5b87aeeb8eadc9c207",
+ "dweb:/ipfs/QmU4JWGMzd3rA64BiDVejhnapKRJG4WHLuw3g866hFPLTx"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenProxy/openzeppelin/contracts/utils/Address.sol": {
+ "keccak256": "0xdfb4f812600ba4ce6738c35584ceb8c9433472583051b48ba5b1f66cb758a498",
+ "urls": [
+ "bzz-raw://df02dffe1c1de089d9b4f6192f0dcf464526f2230f420b3deec4645e0cdd2bff",
+ "dweb:/ipfs/QmcqXGAU3KJqwrgUVoGJ2W8osomhSJ4R5kdsRpbuW3fELS"
+ ],
+ "license": "MIT"
+ }
+ },
+ "version": 1
+ },
+ "ast": {
+ "absolutePath": "src/FiatTokenProxy/centre-tokens/contracts/v1/FiatTokenProxy.sol",
+ "id": 40713,
+ "exportedSymbols": {
+ "FiatTokenProxy": [40712]
+ },
+ "nodeType": "SourceUnit",
+ "src": "1154:414:20",
+ "nodes": [
+ {
+ "id": 40697,
+ "nodeType": "PragmaDirective",
+ "src": "1154:23:20",
+ "nodes": [],
+ "literals": ["solidity", "0.6", ".12"]
+ },
+ {
+ "id": 40699,
+ "nodeType": "ImportDirective",
+ "src": "1179:94:20",
+ "nodes": [],
+ "absolutePath": "src/FiatTokenProxy/centre-tokens/contracts/upgradeability/AdminUpgradeabilityProxy.sol",
+ "file": "../upgradeability/AdminUpgradeabilityProxy.sol",
+ "scope": 40713,
+ "sourceUnit": 40566,
+ "symbolAliases": [
+ {
+ "foreign": {
+ "argumentTypes": null,
+ "id": 40698,
+ "name": "AdminUpgradeabilityProxy",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": null,
+ "src": "1192:24:20",
+ "typeDescriptions": {
+ "typeIdentifier": null,
+ "typeString": null
+ }
+ },
+ "local": null
+ }
+ ],
+ "unitAlias": ""
+ },
+ {
+ "id": 40712,
+ "nodeType": "ContractDefinition",
+ "src": "1385:182:20",
+ "nodes": [
+ {
+ "id": 40711,
+ "nodeType": "FunctionDefinition",
+ "src": "1443:122:20",
+ "nodes": [],
+ "body": {
+ "id": 40710,
+ "nodeType": "Block",
+ "src": "1563:2:20",
+ "nodes": [],
+ "statements": []
+ },
+ "documentation": null,
+ "implemented": true,
+ "kind": "constructor",
+ "modifiers": [
+ {
+ "arguments": [
+ {
+ "argumentTypes": null,
+ "id": 40707,
+ "name": "implementationContract",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 40704,
+ "src": "1535:22:20",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ }
+ ],
+ "id": 40708,
+ "modifierName": {
+ "argumentTypes": null,
+ "id": 40706,
+ "name": "AdminUpgradeabilityProxy",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 40565,
+ "src": "1510:24:20",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_contract$_AdminUpgradeabilityProxy_$40565_$",
+ "typeString": "type(contract AdminUpgradeabilityProxy)"
+ }
+ },
+ "nodeType": "ModifierInvocation",
+ "src": "1510:48:20"
+ }
+ ],
+ "name": "",
+ "overrides": null,
+ "parameters": {
+ "id": 40705,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 40704,
+ "mutability": "mutable",
+ "name": "implementationContract",
+ "nodeType": "VariableDeclaration",
+ "overrides": null,
+ "scope": 40711,
+ "src": "1455:30:20",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 40703,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1455:7:20",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "value": null,
+ "visibility": "internal"
+ }
+ ],
+ "src": "1454:32:20"
+ },
+ "returnParameters": {
+ "id": 40709,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "1563:0:20"
+ },
+ "scope": 40712,
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "public"
+ }
+ ],
+ "abstract": false,
+ "baseContracts": [
+ {
+ "arguments": null,
+ "baseName": {
+ "contractScope": null,
+ "id": 40701,
+ "name": "AdminUpgradeabilityProxy",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 40565,
+ "src": "1412:24:20",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_AdminUpgradeabilityProxy_$40565",
+ "typeString": "contract AdminUpgradeabilityProxy"
+ }
+ },
+ "id": 40702,
+ "nodeType": "InheritanceSpecifier",
+ "src": "1412:24:20"
+ }
+ ],
+ "contractDependencies": [40565, 40609, 40695],
+ "contractKind": "contract",
+ "documentation": {
+ "id": 40700,
+ "nodeType": "StructuredDocumentation",
+ "src": "1275:109:20",
+ "text": " @title FiatTokenProxy\n @dev This contract proxies FiatToken calls and enables FiatToken upgrades"
+ },
+ "fullyImplemented": true,
+ "linearizedBaseContracts": [40712, 40565, 40695, 40609],
+ "name": "FiatTokenProxy",
+ "scope": 40713
+ }
+ ],
+ "license": "MIT"
+ },
+ "id": 20
+}
diff --git a/packages/protocol/contracts/compiled/FiatTokenV2_1.json b/packages/protocol/contracts/compiled/FiatTokenV2_1.json
new file mode 100644
index 00000000000..ecde2cf6579
--- /dev/null
+++ b/packages/protocol/contracts/compiled/FiatTokenV2_1.json
@@ -0,0 +1,3852 @@
+{
+ "abi": [
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "Approval",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "authorizer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "bytes32",
+ "name": "nonce",
+ "type": "bytes32"
+ }
+ ],
+ "name": "AuthorizationCanceled",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "authorizer",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "bytes32",
+ "name": "nonce",
+ "type": "bytes32"
+ }
+ ],
+ "name": "AuthorizationUsed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "_account",
+ "type": "address"
+ }
+ ],
+ "name": "Blacklisted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newBlacklister",
+ "type": "address"
+ }
+ ],
+ "name": "BlacklisterChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "burner",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "Burn",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newMasterMinter",
+ "type": "address"
+ }
+ ],
+ "name": "MasterMinterChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "minter",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "Mint",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "minter",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "minterAllowedAmount",
+ "type": "uint256"
+ }
+ ],
+ "name": "MinterConfigured",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "oldMinter",
+ "type": "address"
+ }
+ ],
+ "name": "MinterRemoved",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "previousOwner",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "OwnershipTransferred",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [],
+ "name": "Pause",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newAddress",
+ "type": "address"
+ }
+ ],
+ "name": "PauserChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "newRescuer",
+ "type": "address"
+ }
+ ],
+ "name": "RescuerChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "Transfer",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "_account",
+ "type": "address"
+ }
+ ],
+ "name": "UnBlacklisted",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [],
+ "name": "Unpause",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "CANCEL_AUTHORIZATION_TYPEHASH",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "DOMAIN_SEPARATOR",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "PERMIT_TYPEHASH",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "RECEIVE_WITH_AUTHORIZATION_TYPEHASH",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "TRANSFER_WITH_AUTHORIZATION_TYPEHASH",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ }
+ ],
+ "name": "allowance",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "approve",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "authorizer",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "nonce",
+ "type": "bytes32"
+ }
+ ],
+ "name": "authorizationState",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "balanceOf",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_account",
+ "type": "address"
+ }
+ ],
+ "name": "blacklist",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "blacklister",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "_amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "burn",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "authorizer",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "nonce",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint8",
+ "name": "v",
+ "type": "uint8"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "r",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "s",
+ "type": "bytes32"
+ }
+ ],
+ "name": "cancelAuthorization",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "minter",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "minterAllowedAmount",
+ "type": "uint256"
+ }
+ ],
+ "name": "configureMinter",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "currency",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "decimals",
+ "outputs": [
+ {
+ "internalType": "uint8",
+ "name": "",
+ "type": "uint8"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "decrement",
+ "type": "uint256"
+ }
+ ],
+ "name": "decreaseAllowance",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "increment",
+ "type": "uint256"
+ }
+ ],
+ "name": "increaseAllowance",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "string",
+ "name": "tokenName",
+ "type": "string"
+ },
+ {
+ "internalType": "string",
+ "name": "tokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "string",
+ "name": "tokenCurrency",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "tokenDecimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "address",
+ "name": "newMasterMinter",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "newPauser",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "newBlacklister",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "initialize",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "string",
+ "name": "newName",
+ "type": "string"
+ }
+ ],
+ "name": "initializeV2",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "lostAndFound",
+ "type": "address"
+ }
+ ],
+ "name": "initializeV2_1",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_account",
+ "type": "address"
+ }
+ ],
+ "name": "isBlacklisted",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "isMinter",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "masterMinter",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "_amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "mint",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "minter",
+ "type": "address"
+ }
+ ],
+ "name": "minterAllowance",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "name",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ }
+ ],
+ "name": "nonces",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "pause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "paused",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "pauser",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "deadline",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint8",
+ "name": "v",
+ "type": "uint8"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "r",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "s",
+ "type": "bytes32"
+ }
+ ],
+ "name": "permit",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "validAfter",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "validBefore",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "nonce",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint8",
+ "name": "v",
+ "type": "uint8"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "r",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "s",
+ "type": "bytes32"
+ }
+ ],
+ "name": "receiveWithAuthorization",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "minter",
+ "type": "address"
+ }
+ ],
+ "name": "removeMinter",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "contract IERC20",
+ "name": "tokenContract",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "rescueERC20",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "rescuer",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "symbol",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "totalSupply",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "transfer",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "name": "transferFrom",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "transferOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "validAfter",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "validBefore",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "nonce",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint8",
+ "name": "v",
+ "type": "uint8"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "r",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "s",
+ "type": "bytes32"
+ }
+ ],
+ "name": "transferWithAuthorization",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_account",
+ "type": "address"
+ }
+ ],
+ "name": "unBlacklist",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "unpause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_newBlacklister",
+ "type": "address"
+ }
+ ],
+ "name": "updateBlacklister",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_newMasterMinter",
+ "type": "address"
+ }
+ ],
+ "name": "updateMasterMinter",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_newPauser",
+ "type": "address"
+ }
+ ],
+ "name": "updatePauser",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newRescuer",
+ "type": "address"
+ }
+ ],
+ "name": "updateRescuer",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "version",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ }
+ ],
+ "bytecode": {
+ "object": "0x60806040526001805460ff60a01b191690556000600b553480156200002357600080fd5b506200002f3362000035565b62000057565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6153eb80620000676000396000f3fe608060405234801561001057600080fd5b50600436106103365760003560e01c80637f2eecc3116101b2578063b2118a8d116100f9578063e3ee160e116100a2578063ef55bec61161007c578063ef55bec614610cc1578063f2fde38b14610d2d578063f9f92be414610d60578063fe575a8714610d9357610336565b8063e3ee160e14610c14578063e5a6b10f14610c80578063e94a010214610c8857610336565b8063d608ea64116100d3578063d608ea6414610b61578063d916948714610bd1578063dd62ed3e14610bd957610336565b8063b2118a8d14610ab8578063bd10243014610afb578063d505accf14610b0357610336565b8063a0cc6a681161015b578063aa20e1e411610135578063aa20e1e414610a1f578063aa271e1a14610a52578063ad38bf2214610a8557610336565b8063a0cc6a68146109a5578063a457c2d7146109ad578063a9059cbb146109e657610336565b80638da5cb5b1161018c5780638da5cb5b1461098d57806395d89b41146109955780639fd0506d1461099d57610336565b80637f2eecc31461094a5780638456cb59146109525780638a6db9c31461095a57610336565b80633644e515116102815780634e44d9561161022a5780635a049a70116102045780635a049a701461088e5780635c975abb146108dc57806370a08231146108e45780637ecebe001461091757610336565b80634e44d9561461081a57806354fd4d5014610853578063554bab3c1461085b57610336565b80633f4ba83a1161025b5780633f4ba83a146107bc57806340c10f19146107c457806342966c68146107fd57610336565b80633644e5151461077357806338a631831461077b578063395093511461078357610336565b80632fc81e09116102e3578063313ce567116102bd578063313ce567146105385780633357162b1461055657806335d99f351461074257610336565b80632fc81e09146104ca5780633092afd5146104fd57806330adf81f1461053057610336565b80631a895266116103145780631a8952661461041f57806323b872dd146104545780632ab600451461049757610336565b806306fdde031461033b578063095ea7b3146103b857806318160ddd14610405575b600080fd5b610343610dc6565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561037d578181015183820152602001610365565b50505050905090810190601f1680156103aa5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103f1600480360360408110156103ce57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610e72565b604080519115158252519081900360200190f35b61040d610fff565b60408051918252519081900360200190f35b6104526004803603602081101561043557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611005565b005b6103f16004803603606081101561046a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356110e9565b610452600480360360208110156104ad57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113ef565b610452600480360360208110156104e057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611550565b6103f16004803603602081101561051357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166115ce565b61040d6116c7565b6105406116eb565b6040805160ff9092168252519081900360200190f35b610452600480360361010081101561056d57600080fd5b81019060208101813564010000000081111561058857600080fd5b82018360208201111561059a57600080fd5b803590602001918460018302840111640100000000831117156105bc57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561060f57600080fd5b82018360208201111561062157600080fd5b8035906020019184600183028401116401000000008311171561064357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561069657600080fd5b8201836020820111156106a857600080fd5b803590602001918460018302840111640100000000831117156106ca57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050813560ff16925050602081013573ffffffffffffffffffffffffffffffffffffffff908116916040810135821691606082013581169160800135166116f4565b61074a611a36565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61040d611a52565b61074a611a58565b6103f16004803603604081101561079957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611a74565b610452611bf6565b6103f1600480360360408110156107da57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611cb9565b6104526004803603602081101561081357600080fd5b50356120ee565b6103f16004803603604081101561083057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356123a8565b61034361253b565b6104526004803603602081101561087157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16612572565b610452600480360360a08110156108a457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060ff60408201351690606081013590608001356126d9565b6103f1612777565b61040d600480360360208110156108fa57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16612798565b61040d6004803603602081101561092d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166127c0565b61040d6127e8565b61045261280c565b61040d6004803603602081101561097057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166128e6565b61074a61290e565b61034361292a565b61074a6129a3565b61040d6129bf565b6103f1600480360360408110156109c357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356129e3565b6103f1600480360360408110156109fc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135612b65565b61045260048036036020811015610a3557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16612ce7565b6103f160048036036020811015610a6857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16612e4e565b61045260048036036020811015610a9b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16612e79565b61045260048036036060811015610ace57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135612fe0565b61074a613076565b610452600480360360e0811015610b1957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135613092565b61045260048036036020811015610b7757600080fd5b810190602081018135640100000000811115610b9257600080fd5b820183602082011115610ba457600080fd5b80359060200191846001830284011164010000000083111715610bc657600080fd5b509092509050613238565b61040d613321565b61040d60048036036040811015610bef57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516613345565b6104526004803603610120811015610c2b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e081013590610100013561337d565b610343613527565b6103f160048036036040811015610c9e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356135a0565b6104526004803603610120811015610cd857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e08101359061010001356135d8565b61045260048036036020811015610d4357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16613775565b61045260048036036020811015610d7657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166138c8565b6103f160048036036020811015610da957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166139af565b6004805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610e6a5780601f10610e3f57610100808354040283529160200191610e6a565b820191906000526020600020905b815481529060010190602001808311610e4d57829003601f168201915b505050505081565b60015460009074010000000000000000000000000000000000000000900460ff1615610eff57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b3360008181526003602052604090205460ff1615610f68576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260036020526040902054849060ff1615610fe9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b610ff43386866139da565b506001949350505050565b600b5490565b60025473ffffffffffffffffffffffffffffffffffffffff163314611075576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061506b602c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526003602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055517f117e3210bb9aa7d9baff172026820255c6f6c30ba8999d1c2fd88e2848137c4e9190a250565b60015460009074010000000000000000000000000000000000000000900460ff161561117657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b3360008181526003602052604090205460ff16156111df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516600090815260036020526040902054859060ff1615611260576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516600090815260036020526040902054859060ff16156112e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff87166000908152600a6020908152604080832033845290915290205485111561136a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806151316028913960400191505060405180910390fd5b611375878787613b21565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600a602090815260408083203384529091529020546113b09086613d4c565b73ffffffffffffffffffffffffffffffffffffffff88166000908152600a60209081526040808320338452909152902055600193505050509392505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461147557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166114e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614fc9602a913960400191505060405180910390fd5b600e80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fe475e580d85111348e40d8ca33cfdd74c30fe1655c2d8537a13abc10065ffa5a90600090a250565b60125460ff1660011461156257600080fd5b30600090815260096020526040902054801561158357611583308383613b21565b505030600090815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00908116600117909155601280549091166002179055565b60085460009073ffffffffffffffffffffffffffffffffffffffff163314611641576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806150426029913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000818152600c6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600d909152808220829055517fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb666929190a2506001919050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60065460ff1681565b60085474010000000000000000000000000000000000000000900460ff1615611768576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806151ac602a913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166117d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806150de602f913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611840576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180614fa06029913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166118ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615159602e913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116611918576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806152bf6028913960400191505060405180910390fd5b875161192b9060049060208b0190614d50565b50865161193f9060059060208a0190614d50565b508551611953906007906020890190614d50565b50600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff8716179055600880547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff87811691909117909255600180548216868416179055600280549091169184169190911790556119ed81613d95565b5050600880547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055505050505050565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b600f5481565b600e5473ffffffffffffffffffffffffffffffffffffffff1690565b60015460009074010000000000000000000000000000000000000000900460ff1615611b0157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b3360008181526003602052604090205460ff1615611b6a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260036020526040902054849060ff1615611beb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b610ff4338686613ddc565b60015473ffffffffffffffffffffffffffffffffffffffff163314611c66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061524d6022913960400191505060405180910390fd5b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b60015460009074010000000000000000000000000000000000000000900460ff1615611d4657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b336000908152600c602052604090205460ff16611dae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806150bd6021913960400191505060405180910390fd5b3360008181526003602052604090205460ff1615611e17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260036020526040902054849060ff1615611e98576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516611f04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614f0f6023913960400191505060405180910390fd5b60008411611f5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180614ff36029913960400191505060405180910390fd5b336000908152600d602052604090205480851115611fc6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061521f602e913960400191505060405180910390fd5b600b54611fd39086613e26565b600b5573ffffffffffffffffffffffffffffffffffffffff86166000908152600960205260409020546120069086613e26565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600960205260409020556120368186613d4c565b336000818152600d6020908152604091829020939093558051888152905173ffffffffffffffffffffffffffffffffffffffff8a16937fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8928290030190a360408051868152905173ffffffffffffffffffffffffffffffffffffffff8816916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600195945050505050565b60015474010000000000000000000000000000000000000000900460ff161561217857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b336000908152600c602052604090205460ff166121e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806150bd6021913960400191505060405180910390fd5b3360008181526003602052604090205460ff1615612249576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b33600090815260096020526040902054826122af576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180614ee66029913960400191505060405180910390fd5b82811015612308576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806150976026913960400191505060405180910390fd5b600b546123159084613d4c565b600b556123228184613d4c565b33600081815260096020908152604091829020939093558051868152905191927fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca592918290030190a260408051848152905160009133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3505050565b60015460009074010000000000000000000000000000000000000000900460ff161561243557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b60085473ffffffffffffffffffffffffffffffffffffffff1633146124a5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806150426029913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000818152600c6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600d825291829020859055815185815291517f46980fca912ef9bcdbd36877427b6b90e860769f604e89c0e67720cece530d209281900390910190a250600192915050565b60408051808201909152600181527f3200000000000000000000000000000000000000000000000000000000000000602082015290565b60005473ffffffffffffffffffffffffffffffffffffffff1633146125f857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116612664576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180614e936028913960400191505060405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907fb80482a293ca2e013eda8683c9bd7fc8347cfdaeea5ede58cba46df502c2a60490600090a250565b60015474010000000000000000000000000000000000000000900460ff161561276357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127708585858585613e9a565b5050505050565b60015474010000000000000000000000000000000000000000900460ff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604090205490565b73ffffffffffffffffffffffffffffffffffffffff1660009081526011602052604090205490565b7fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de881565b60015473ffffffffffffffffffffffffffffffffffffffff16331461287c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061524d6022913960400191505060405180910390fd5b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b73ffffffffffffffffffffffffffffffffffffffff166000908152600d602052604090205490565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b6005805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610e6a5780601f10610e3f57610100808354040283529160200191610e6a565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b7f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226781565b60015460009074010000000000000000000000000000000000000000900460ff1615612a7057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b3360008181526003602052604090205460ff1615612ad9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260036020526040902054849060ff1615612b5a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b610ff4338686614023565b60015460009074010000000000000000000000000000000000000000900460ff1615612bf257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b3360008181526003602052604090205460ff1615612c5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260036020526040902054849060ff1615612cdc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b610ff4338686613b21565b60005473ffffffffffffffffffffffffffffffffffffffff163314612d6d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116612dd9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806150de602f913960400191505060405180910390fd5b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907fdb66dfa9c6b8f5226fe9aac7e51897ae8ee94ac31dc70bb6c9900b2574b707e690600090a250565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602052604090205460ff1690565b60005473ffffffffffffffffffffffffffffffffffffffff163314612eff57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116612f6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806153156032913960400191505060405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907fc67398012c111ce95ecb7429b933096c977380ee6c421175a71a4a4c6c88c06e90600090a250565b600e5473ffffffffffffffffffffffffffffffffffffffff163314613050576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061510d6024913960400191505060405180910390fd5b61307173ffffffffffffffffffffffffffffffffffffffff8416838361407f565b505050565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60015474010000000000000000000000000000000000000000900460ff161561311c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8716600090815260036020526040902054879060ff161561319d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8716600090815260036020526040902054879060ff161561321e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b61322d8989898989898961410c565b505050505050505050565b60085474010000000000000000000000000000000000000000900460ff168015613265575060125460ff16155b61326e57600080fd5b61327a60048383614dce565b506132ef82828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600181527f3200000000000000000000000000000000000000000000000000000000000000602082015291506142b59050565b600f555050601280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b7f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742981565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600a6020908152604080832093909416825291909152205490565b60015474010000000000000000000000000000000000000000900460ff161561340757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8916600090815260036020526040902054899060ff1615613488576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8916600090815260036020526040902054899060ff1615613509576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b61351a8b8b8b8b8b8b8b8b8b614327565b5050505050505050505050565b6007805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610e6a5780601f10610e3f57610100808354040283529160200191610e6a565b73ffffffffffffffffffffffffffffffffffffffff919091166000908152601060209081526040808320938352929052205460ff1690565b60015474010000000000000000000000000000000000000000900460ff161561366257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8916600090815260036020526040902054899060ff16156136e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8916600090815260036020526040902054899060ff1615613764576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b61351a8b8b8b8b8b8b8b8b8b614469565b60005473ffffffffffffffffffffffffffffffffffffffff1633146137fb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116613867576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180614f586026913960400191505060405180910390fd5b6000546040805173ffffffffffffffffffffffffffffffffffffffff9283168152918316602083015280517f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09281900390910190a16138c581613d95565b50565b60025473ffffffffffffffffffffffffffffffffffffffff163314613938576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061506b602c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526003602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517fffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b8559190a250565b73ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205460ff1690565b73ffffffffffffffffffffffffffffffffffffffff8316613a46576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806151fb6024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216613ab2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180614f7e6022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8084166000818152600a6020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316613b8d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806151d66025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216613bf9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614e706023913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260096020526040902054811115613c77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061501c6026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260096020526040902054613ca79082613d4c565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600960205260408082209390935590841681522054613ce39082613e26565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526009602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000613d8e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614576565b9392505050565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600a60209081526040808320938616835292905220546130719084908490613e219085613e26565b6139da565b600082820183811015613d8e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b613ea48585614627565b604080517f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a1597429602082015273ffffffffffffffffffffffffffffffffffffffff87168183018190526060828101889052835180840390910181526080909201909252600f54909190613f1890868686866146b5565b73ffffffffffffffffffffffffffffffffffffffff1614613f9a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f46696174546f6b656e56323a20696e76616c6964207369676e61747572650000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8616600081815260106020908152604080832089845290915280822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055518792917f1cdd46ff242716cdaa72d159d339a485b3438398348d68f09d7c8c0a59353d8191a3505050505050565b6130718383613e21846040518060600160405280602581526020016153916025913973ffffffffffffffffffffffffffffffffffffffff808a166000908152600a60209081526040808320938c16835292905220549190614576565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052613071908490614727565b4284101561417b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f46696174546f6b656e56323a207065726d697420697320657870697265640000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff80881660008181526011602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c992810192909252818301849052938a1660608201526080810189905260a081019390935260c08084018890528151808503909101815260e09093019052600f5461421e90868686866146b5565b73ffffffffffffffffffffffffffffffffffffffff16146142a057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f454950323631323a20696e76616c6964207369676e6174757265000000000000604482015290519081900360640190fd5b6142ab8888886139da565b5050505050505050565b8151602092830120815191830191909120604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818601528082019390935260608301919091524660808301523060a0808401919091528151808403909101815260c09092019052805191012090565b614333898588886147ff565b604080517f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267602082015273ffffffffffffffffffffffffffffffffffffffff808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e080830188905283518084039091018152610100909201909252600f549091906143c690868686866146b5565b73ffffffffffffffffffffffffffffffffffffffff161461444857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f46696174546f6b656e56323a20696e76616c6964207369676e61747572650000604482015290519081900360640190fd5b6144528a866148bf565b61445d8a8a8a613b21565b50505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff881633146144d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806151876025913960400191505060405180910390fd5b6144e3898588886147ff565b604080517fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de8602082015273ffffffffffffffffffffffffffffffffffffffff808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e080830188905283518084039091018152610100909201909252600f549091906143c690868686866146b5565b6000818484111561461f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156145e45781810151838201526020016145cc565b50505050905090810190601f1680156146115780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260106020908152604080832084845290915290205460ff16156146b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806152e7602e913960400191505060405180910390fd5b5050565b8051602080830191909120604080517f19010000000000000000000000000000000000000000000000000000000000008185015260228101899052604280820193909352815180820390930183526062019052805191012060009061471c81878787614944565b979650505050505050565b6060614789826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16614b419092919063ffffffff16565b805190915015613071578080602001905160208110156147a857600080fd5b5051613071576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615295602a913960400191505060405180910390fd5b814211614857576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180614ebb602b913960400191505060405180910390fd5b8042106148af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061536c6025913960400191505060405180910390fd5b6148b98484614627565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260106020908152604080832085845290915280822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055518392917f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a591a35050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156149bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061526f6026913960400191505060405180910390fd5b8360ff16601b141580156149d757508360ff16601c14155b15614a2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180614f326026913960400191505060405180910390fd5b600060018686868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015614a89573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116614b3657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45435265636f7665723a20696e76616c6964207369676e617475726500000000604482015290519081900360640190fd5b90505b949350505050565b6060614b3984846000856060614b5685614d17565b614bc157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310614c2b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101614bee565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614c8d576040519150601f19603f3d011682016040523d82523d6000602084013e614c92565b606091505b50915091508115614ca6579150614b399050565b805115614cb65780518082602001fd5b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528651602484015286518793919283926044019190850190808383600083156145e45781810151838201526020016145cc565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590614b39575050151592915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614d9157805160ff1916838001178555614dbe565b82800160010185558215614dbe579182015b82811115614dbe578251825591602001919060010190614da3565b50614dca929150614e5a565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614e2d578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555614dbe565b82800160010185558215614dbe579182015b82811115614dbe578235825591602001919060010190614e3f565b5b80821115614dca5760008155600101614e5b56fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573735061757361626c653a206e65772070617573657220697320746865207a65726f206164647265737346696174546f6b656e56323a20617574686f72697a6174696f6e206973206e6f74207965742076616c696446696174546f6b656e3a206275726e20616d6f756e74206e6f742067726561746572207468616e203046696174546f6b656e3a206d696e7420746f20746865207a65726f206164647265737345435265636f7665723a20696e76616c6964207369676e6174757265202776272076616c75654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737346696174546f6b656e3a206e65772070617573657220697320746865207a65726f2061646472657373526573637561626c653a206e6577207265736375657220697320746865207a65726f206164647265737346696174546f6b656e3a206d696e7420616d6f756e74206e6f742067726561746572207468616e203045524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636546696174546f6b656e3a2063616c6c6572206973206e6f7420746865206d61737465724d696e746572426c61636b6c69737461626c653a2063616c6c6572206973206e6f742074686520626c61636b6c697374657246696174546f6b656e3a206275726e20616d6f756e7420657863656564732062616c616e636546696174546f6b656e3a2063616c6c6572206973206e6f742061206d696e74657246696174546f6b656e3a206e6577206d61737465724d696e74657220697320746865207a65726f2061646472657373526573637561626c653a2063616c6c6572206973206e6f7420746865207265736375657245524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636546696174546f6b656e3a206e657720626c61636b6c697374657220697320746865207a65726f206164647265737346696174546f6b656e56323a2063616c6c6572206d7573742062652074686520706179656546696174546f6b656e3a20636f6e747261637420697320616c726561647920696e697469616c697a656445524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737346696174546f6b656e3a206d696e7420616d6f756e742065786365656473206d696e746572416c6c6f77616e63655061757361626c653a2063616c6c6572206973206e6f74207468652070617573657245435265636f7665723a20696e76616c6964207369676e6174757265202773272076616c75655361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656446696174546f6b656e3a206e6577206f776e657220697320746865207a65726f206164647265737346696174546f6b656e56323a20617574686f72697a6174696f6e2069732075736564206f722063616e63656c6564426c61636b6c69737461626c653a206e657720626c61636b6c697374657220697320746865207a65726f2061646472657373426c61636b6c69737461626c653a206163636f756e7420697320626c61636b6c697374656446696174546f6b656e56323a20617574686f72697a6174696f6e206973206578706972656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212203ccc7055acd0820f4e7d094fa75ff2d3b0c27bdd446079aeef6bd6d02c56938e64736f6c634300060c0033",
+ "sourceMap": "1362:764:41:-:0;;;2106:26:35;;;-1:-1:-1;2106:26:35;;;-1:-1:-1;1940:33:33;;1362:764:41;;;;;;;;;-1:-1:-1;2223:20:34;2232:10;2223:8;:20::i;:::-;1362:764:41;;2493:79:34;2548:6;:17;;-1:-1:-1;2548:17:34;-1:-1:-1;2548:17:34;;;;;;;;;;2493:79::o;1362:764:41:-;;;;;;;",
+ "linkReferences": {}
+ },
+ "deployedBytecode": {
+ "object": "0x608060405234801561001057600080fd5b50600436106103365760003560e01c80637f2eecc3116101b2578063b2118a8d116100f9578063e3ee160e116100a2578063ef55bec61161007c578063ef55bec614610cc1578063f2fde38b14610d2d578063f9f92be414610d60578063fe575a8714610d9357610336565b8063e3ee160e14610c14578063e5a6b10f14610c80578063e94a010214610c8857610336565b8063d608ea64116100d3578063d608ea6414610b61578063d916948714610bd1578063dd62ed3e14610bd957610336565b8063b2118a8d14610ab8578063bd10243014610afb578063d505accf14610b0357610336565b8063a0cc6a681161015b578063aa20e1e411610135578063aa20e1e414610a1f578063aa271e1a14610a52578063ad38bf2214610a8557610336565b8063a0cc6a68146109a5578063a457c2d7146109ad578063a9059cbb146109e657610336565b80638da5cb5b1161018c5780638da5cb5b1461098d57806395d89b41146109955780639fd0506d1461099d57610336565b80637f2eecc31461094a5780638456cb59146109525780638a6db9c31461095a57610336565b80633644e515116102815780634e44d9561161022a5780635a049a70116102045780635a049a701461088e5780635c975abb146108dc57806370a08231146108e45780637ecebe001461091757610336565b80634e44d9561461081a57806354fd4d5014610853578063554bab3c1461085b57610336565b80633f4ba83a1161025b5780633f4ba83a146107bc57806340c10f19146107c457806342966c68146107fd57610336565b80633644e5151461077357806338a631831461077b578063395093511461078357610336565b80632fc81e09116102e3578063313ce567116102bd578063313ce567146105385780633357162b1461055657806335d99f351461074257610336565b80632fc81e09146104ca5780633092afd5146104fd57806330adf81f1461053057610336565b80631a895266116103145780631a8952661461041f57806323b872dd146104545780632ab600451461049757610336565b806306fdde031461033b578063095ea7b3146103b857806318160ddd14610405575b600080fd5b610343610dc6565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561037d578181015183820152602001610365565b50505050905090810190601f1680156103aa5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103f1600480360360408110156103ce57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610e72565b604080519115158252519081900360200190f35b61040d610fff565b60408051918252519081900360200190f35b6104526004803603602081101561043557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611005565b005b6103f16004803603606081101561046a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356110e9565b610452600480360360208110156104ad57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166113ef565b610452600480360360208110156104e057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611550565b6103f16004803603602081101561051357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166115ce565b61040d6116c7565b6105406116eb565b6040805160ff9092168252519081900360200190f35b610452600480360361010081101561056d57600080fd5b81019060208101813564010000000081111561058857600080fd5b82018360208201111561059a57600080fd5b803590602001918460018302840111640100000000831117156105bc57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561060f57600080fd5b82018360208201111561062157600080fd5b8035906020019184600183028401116401000000008311171561064357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561069657600080fd5b8201836020820111156106a857600080fd5b803590602001918460018302840111640100000000831117156106ca57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050813560ff16925050602081013573ffffffffffffffffffffffffffffffffffffffff908116916040810135821691606082013581169160800135166116f4565b61074a611a36565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61040d611a52565b61074a611a58565b6103f16004803603604081101561079957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611a74565b610452611bf6565b6103f1600480360360408110156107da57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611cb9565b6104526004803603602081101561081357600080fd5b50356120ee565b6103f16004803603604081101561083057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356123a8565b61034361253b565b6104526004803603602081101561087157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16612572565b610452600480360360a08110156108a457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060208101359060ff60408201351690606081013590608001356126d9565b6103f1612777565b61040d600480360360208110156108fa57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16612798565b61040d6004803603602081101561092d57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166127c0565b61040d6127e8565b61045261280c565b61040d6004803603602081101561097057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166128e6565b61074a61290e565b61034361292a565b61074a6129a3565b61040d6129bf565b6103f1600480360360408110156109c357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356129e3565b6103f1600480360360408110156109fc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135612b65565b61045260048036036020811015610a3557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16612ce7565b6103f160048036036020811015610a6857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16612e4e565b61045260048036036020811015610a9b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16612e79565b61045260048036036060811015610ace57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135612fe0565b61074a613076565b610452600480360360e0811015610b1957600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135613092565b61045260048036036020811015610b7757600080fd5b810190602081018135640100000000811115610b9257600080fd5b820183602082011115610ba457600080fd5b80359060200191846001830284011164010000000083111715610bc657600080fd5b509092509050613238565b61040d613321565b61040d60048036036040811015610bef57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516613345565b6104526004803603610120811015610c2b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e081013590610100013561337d565b610343613527565b6103f160048036036040811015610c9e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356135a0565b6104526004803603610120811015610cd857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e08101359061010001356135d8565b61045260048036036020811015610d4357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16613775565b61045260048036036020811015610d7657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166138c8565b6103f160048036036020811015610da957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166139af565b6004805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610e6a5780601f10610e3f57610100808354040283529160200191610e6a565b820191906000526020600020905b815481529060010190602001808311610e4d57829003601f168201915b505050505081565b60015460009074010000000000000000000000000000000000000000900460ff1615610eff57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b3360008181526003602052604090205460ff1615610f68576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260036020526040902054849060ff1615610fe9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b610ff43386866139da565b506001949350505050565b600b5490565b60025473ffffffffffffffffffffffffffffffffffffffff163314611075576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061506b602c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526003602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055517f117e3210bb9aa7d9baff172026820255c6f6c30ba8999d1c2fd88e2848137c4e9190a250565b60015460009074010000000000000000000000000000000000000000900460ff161561117657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b3360008181526003602052604090205460ff16156111df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516600090815260036020526040902054859060ff1615611260576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516600090815260036020526040902054859060ff16156112e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff87166000908152600a6020908152604080832033845290915290205485111561136a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806151316028913960400191505060405180910390fd5b611375878787613b21565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600a602090815260408083203384529091529020546113b09086613d4c565b73ffffffffffffffffffffffffffffffffffffffff88166000908152600a60209081526040808320338452909152902055600193505050509392505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461147557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166114e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614fc9602a913960400191505060405180910390fd5b600e80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fe475e580d85111348e40d8ca33cfdd74c30fe1655c2d8537a13abc10065ffa5a90600090a250565b60125460ff1660011461156257600080fd5b30600090815260096020526040902054801561158357611583308383613b21565b505030600090815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00908116600117909155601280549091166002179055565b60085460009073ffffffffffffffffffffffffffffffffffffffff163314611641576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806150426029913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166000818152600c6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600d909152808220829055517fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb666929190a2506001919050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60065460ff1681565b60085474010000000000000000000000000000000000000000900460ff1615611768576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806151ac602a913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166117d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806150de602f913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316611840576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180614fa06029913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166118ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615159602e913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116611918576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806152bf6028913960400191505060405180910390fd5b875161192b9060049060208b0190614d50565b50865161193f9060059060208a0190614d50565b508551611953906007906020890190614d50565b50600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff8716179055600880547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff87811691909117909255600180548216868416179055600280549091169184169190911790556119ed81613d95565b5050600880547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055505050505050565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b600f5481565b600e5473ffffffffffffffffffffffffffffffffffffffff1690565b60015460009074010000000000000000000000000000000000000000900460ff1615611b0157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b3360008181526003602052604090205460ff1615611b6a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260036020526040902054849060ff1615611beb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b610ff4338686613ddc565b60015473ffffffffffffffffffffffffffffffffffffffff163314611c66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061524d6022913960400191505060405180910390fd5b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b60015460009074010000000000000000000000000000000000000000900460ff1615611d4657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b336000908152600c602052604090205460ff16611dae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806150bd6021913960400191505060405180910390fd5b3360008181526003602052604090205460ff1615611e17576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260036020526040902054849060ff1615611e98576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516611f04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614f0f6023913960400191505060405180910390fd5b60008411611f5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180614ff36029913960400191505060405180910390fd5b336000908152600d602052604090205480851115611fc6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061521f602e913960400191505060405180910390fd5b600b54611fd39086613e26565b600b5573ffffffffffffffffffffffffffffffffffffffff86166000908152600960205260409020546120069086613e26565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600960205260409020556120368186613d4c565b336000818152600d6020908152604091829020939093558051888152905173ffffffffffffffffffffffffffffffffffffffff8a16937fab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8928290030190a360408051868152905173ffffffffffffffffffffffffffffffffffffffff8816916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600195945050505050565b60015474010000000000000000000000000000000000000000900460ff161561217857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b336000908152600c602052604090205460ff166121e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806150bd6021913960400191505060405180910390fd5b3360008181526003602052604090205460ff1615612249576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b33600090815260096020526040902054826122af576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180614ee66029913960400191505060405180910390fd5b82811015612308576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806150976026913960400191505060405180910390fd5b600b546123159084613d4c565b600b556123228184613d4c565b33600081815260096020908152604091829020939093558051868152905191927fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca592918290030190a260408051848152905160009133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3505050565b60015460009074010000000000000000000000000000000000000000900460ff161561243557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b60085473ffffffffffffffffffffffffffffffffffffffff1633146124a5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806150426029913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83166000818152600c6020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600d825291829020859055815185815291517f46980fca912ef9bcdbd36877427b6b90e860769f604e89c0e67720cece530d209281900390910190a250600192915050565b60408051808201909152600181527f3200000000000000000000000000000000000000000000000000000000000000602082015290565b60005473ffffffffffffffffffffffffffffffffffffffff1633146125f857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116612664576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180614e936028913960400191505060405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907fb80482a293ca2e013eda8683c9bd7fc8347cfdaeea5ede58cba46df502c2a60490600090a250565b60015474010000000000000000000000000000000000000000900460ff161561276357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127708585858585613e9a565b5050505050565b60015474010000000000000000000000000000000000000000900460ff1681565b73ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604090205490565b73ffffffffffffffffffffffffffffffffffffffff1660009081526011602052604090205490565b7fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de881565b60015473ffffffffffffffffffffffffffffffffffffffff16331461287c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061524d6022913960400191505060405180910390fd5b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b73ffffffffffffffffffffffffffffffffffffffff166000908152600d602052604090205490565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b6005805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610e6a5780601f10610e3f57610100808354040283529160200191610e6a565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b7f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226781565b60015460009074010000000000000000000000000000000000000000900460ff1615612a7057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b3360008181526003602052604090205460ff1615612ad9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260036020526040902054849060ff1615612b5a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b610ff4338686614023565b60015460009074010000000000000000000000000000000000000000900460ff1615612bf257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b3360008181526003602052604090205460ff1615612c5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416600090815260036020526040902054849060ff1615612cdc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b610ff4338686613b21565b60005473ffffffffffffffffffffffffffffffffffffffff163314612d6d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116612dd9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806150de602f913960400191505060405180910390fd5b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907fdb66dfa9c6b8f5226fe9aac7e51897ae8ee94ac31dc70bb6c9900b2574b707e690600090a250565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602052604090205460ff1690565b60005473ffffffffffffffffffffffffffffffffffffffff163314612eff57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116612f6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806153156032913960400191505060405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907fc67398012c111ce95ecb7429b933096c977380ee6c421175a71a4a4c6c88c06e90600090a250565b600e5473ffffffffffffffffffffffffffffffffffffffff163314613050576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061510d6024913960400191505060405180910390fd5b61307173ffffffffffffffffffffffffffffffffffffffff8416838361407f565b505050565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60015474010000000000000000000000000000000000000000900460ff161561311c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8716600090815260036020526040902054879060ff161561319d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8716600090815260036020526040902054879060ff161561321e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b61322d8989898989898961410c565b505050505050505050565b60085474010000000000000000000000000000000000000000900460ff168015613265575060125460ff16155b61326e57600080fd5b61327a60048383614dce565b506132ef82828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600181527f3200000000000000000000000000000000000000000000000000000000000000602082015291506142b59050565b600f555050601280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b7f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742981565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600a6020908152604080832093909416825291909152205490565b60015474010000000000000000000000000000000000000000900460ff161561340757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8916600090815260036020526040902054899060ff1615613488576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8916600090815260036020526040902054899060ff1615613509576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b61351a8b8b8b8b8b8b8b8b8b614327565b5050505050505050505050565b6007805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610e6a5780601f10610e3f57610100808354040283529160200191610e6a565b73ffffffffffffffffffffffffffffffffffffffff919091166000908152601060209081526040808320938352929052205460ff1690565b60015474010000000000000000000000000000000000000000900460ff161561366257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8916600090815260036020526040902054899060ff16156136e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8916600090815260036020526040902054899060ff1615613764576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806153476025913960400191505060405180910390fd5b61351a8b8b8b8b8b8b8b8b8b614469565b60005473ffffffffffffffffffffffffffffffffffffffff1633146137fb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116613867576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180614f586026913960400191505060405180910390fd5b6000546040805173ffffffffffffffffffffffffffffffffffffffff9283168152918316602083015280517f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09281900390910190a16138c581613d95565b50565b60025473ffffffffffffffffffffffffffffffffffffffff163314613938576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061506b602c913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660008181526003602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517fffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b8559190a250565b73ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205460ff1690565b73ffffffffffffffffffffffffffffffffffffffff8316613a46576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806151fb6024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216613ab2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180614f7e6022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8084166000818152600a6020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316613b8d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806151d66025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216613bf9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614e706023913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260096020526040902054811115613c77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061501c6026913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260096020526040902054613ca79082613d4c565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600960205260408082209390935590841681522054613ce39082613e26565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526009602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000613d8e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614576565b9392505050565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600a60209081526040808320938616835292905220546130719084908490613e219085613e26565b6139da565b600082820183811015613d8e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b613ea48585614627565b604080517f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a1597429602082015273ffffffffffffffffffffffffffffffffffffffff87168183018190526060828101889052835180840390910181526080909201909252600f54909190613f1890868686866146b5565b73ffffffffffffffffffffffffffffffffffffffff1614613f9a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f46696174546f6b656e56323a20696e76616c6964207369676e61747572650000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8616600081815260106020908152604080832089845290915280822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055518792917f1cdd46ff242716cdaa72d159d339a485b3438398348d68f09d7c8c0a59353d8191a3505050505050565b6130718383613e21846040518060600160405280602581526020016153916025913973ffffffffffffffffffffffffffffffffffffffff808a166000908152600a60209081526040808320938c16835292905220549190614576565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052613071908490614727565b4284101561417b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f46696174546f6b656e56323a207065726d697420697320657870697265640000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff80881660008181526011602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c992810192909252818301849052938a1660608201526080810189905260a081019390935260c08084018890528151808503909101815260e09093019052600f5461421e90868686866146b5565b73ffffffffffffffffffffffffffffffffffffffff16146142a057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f454950323631323a20696e76616c6964207369676e6174757265000000000000604482015290519081900360640190fd5b6142ab8888886139da565b5050505050505050565b8151602092830120815191830191909120604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818601528082019390935260608301919091524660808301523060a0808401919091528151808403909101815260c09092019052805191012090565b614333898588886147ff565b604080517f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267602082015273ffffffffffffffffffffffffffffffffffffffff808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e080830188905283518084039091018152610100909201909252600f549091906143c690868686866146b5565b73ffffffffffffffffffffffffffffffffffffffff161461444857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f46696174546f6b656e56323a20696e76616c6964207369676e61747572650000604482015290519081900360640190fd5b6144528a866148bf565b61445d8a8a8a613b21565b50505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff881633146144d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806151876025913960400191505060405180910390fd5b6144e3898588886147ff565b604080517fd099cc98ef71107a616c4f0f941f04c322d8e254fe26b3c6668db87aae413de8602082015273ffffffffffffffffffffffffffffffffffffffff808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e080830188905283518084039091018152610100909201909252600f549091906143c690868686866146b5565b6000818484111561461f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156145e45781810151838201526020016145cc565b50505050905090810190601f1680156146115780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260106020908152604080832084845290915290205460ff16156146b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806152e7602e913960400191505060405180910390fd5b5050565b8051602080830191909120604080517f19010000000000000000000000000000000000000000000000000000000000008185015260228101899052604280820193909352815180820390930183526062019052805191012060009061471c81878787614944565b979650505050505050565b6060614789826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16614b419092919063ffffffff16565b805190915015613071578080602001905160208110156147a857600080fd5b5051613071576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180615295602a913960400191505060405180910390fd5b814211614857576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180614ebb602b913960400191505060405180910390fd5b8042106148af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061536c6025913960400191505060405180910390fd5b6148b98484614627565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260106020908152604080832085845290915280822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055518392917f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a591a35050565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156149bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061526f6026913960400191505060405180910390fd5b8360ff16601b141580156149d757508360ff16601c14155b15614a2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180614f326026913960400191505060405180910390fd5b600060018686868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015614a89573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116614b3657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45435265636f7665723a20696e76616c6964207369676e617475726500000000604482015290519081900360640190fd5b90505b949350505050565b6060614b3984846000856060614b5685614d17565b614bc157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310614c2b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101614bee565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614c8d576040519150601f19603f3d011682016040523d82523d6000602084013e614c92565b606091505b50915091508115614ca6579150614b399050565b805115614cb65780518082602001fd5b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528651602484015286518793919283926044019190850190808383600083156145e45781810151838201526020016145cc565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590614b39575050151592915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614d9157805160ff1916838001178555614dbe565b82800160010185558215614dbe579182015b82811115614dbe578251825591602001919060010190614da3565b50614dca929150614e5a565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614e2d578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555614dbe565b82800160010185558215614dbe579182015b82811115614dbe578235825591602001919060010190614e3f565b5b80821115614dca5760008155600101614e5b56fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573735061757361626c653a206e65772070617573657220697320746865207a65726f206164647265737346696174546f6b656e56323a20617574686f72697a6174696f6e206973206e6f74207965742076616c696446696174546f6b656e3a206275726e20616d6f756e74206e6f742067726561746572207468616e203046696174546f6b656e3a206d696e7420746f20746865207a65726f206164647265737345435265636f7665723a20696e76616c6964207369676e6174757265202776272076616c75654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737346696174546f6b656e3a206e65772070617573657220697320746865207a65726f2061646472657373526573637561626c653a206e6577207265736375657220697320746865207a65726f206164647265737346696174546f6b656e3a206d696e7420616d6f756e74206e6f742067726561746572207468616e203045524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636546696174546f6b656e3a2063616c6c6572206973206e6f7420746865206d61737465724d696e746572426c61636b6c69737461626c653a2063616c6c6572206973206e6f742074686520626c61636b6c697374657246696174546f6b656e3a206275726e20616d6f756e7420657863656564732062616c616e636546696174546f6b656e3a2063616c6c6572206973206e6f742061206d696e74657246696174546f6b656e3a206e6577206d61737465724d696e74657220697320746865207a65726f2061646472657373526573637561626c653a2063616c6c6572206973206e6f7420746865207265736375657245524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636546696174546f6b656e3a206e657720626c61636b6c697374657220697320746865207a65726f206164647265737346696174546f6b656e56323a2063616c6c6572206d7573742062652074686520706179656546696174546f6b656e3a20636f6e747261637420697320616c726561647920696e697469616c697a656445524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737346696174546f6b656e3a206d696e7420616d6f756e742065786365656473206d696e746572416c6c6f77616e63655061757361626c653a2063616c6c6572206973206e6f74207468652070617573657245435265636f7665723a20696e76616c6964207369676e6174757265202773272076616c75655361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656446696174546f6b656e3a206e6577206f776e657220697320746865207a65726f206164647265737346696174546f6b656e56323a20617574686f72697a6174696f6e2069732075736564206f722063616e63656c6564426c61636b6c69737461626c653a206e657720626c61636b6c697374657220697320746865207a65726f2061646472657373426c61636b6c69737461626c653a206163636f756e7420697320626c61636b6c697374656446696174546f6b656e56323a20617574686f72697a6174696f6e206973206578706972656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212203ccc7055acd0820f4e7d094fa75ff2d3b0c27bdd446079aeef6bd6d02c56938e64736f6c634300060c0033",
+ "sourceMap": "1362:764:41:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1649:18:33;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6725:273;;;;;;;;;;;;;;;;-1:-1:-1;6725:273:33;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;6132:100;;;:::i;:::-;;;;;;;;;;;;;;;;2772:148:32;;;;;;;;;;;;;;;;-1:-1:-1;2772:148:32;;;;:::i;:::-;;7776:536:33;;;;;;;;;;;;;;;;-1:-1:-1;7776:536:33;;;;;;;;;;;;;;;;;;:::i;2466:264:30:-;;;;;;;;;;;;;;;;-1:-1:-1;2466:264:30;;;;:::i;1528:398:41:-;;;;;;;;;;;;;;;;-1:-1:-1;1528:398:41;;;;:::i;10209:239:33:-;;;;;;;;;;;;;;;;-1:-1:-1;10209:239:33;;;;:::i;1612:116:37:-;;;:::i;1699:21:33:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2413:1160;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2413:1160:33;;;;;;;;-1:-1:-1;2413:1160:33;;-1:-1:-1;;2413:1160:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2413:1160:33;;;;;;;;-1:-1:-1;2413:1160:33;;-1:-1:-1;;2413:1160:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2413:1160:33;;-1:-1:-1;;;2413:1160:33;;;;;-1:-1:-1;;2413:1160:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;1754:27::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1291:31:39;;;:::i;1636:83:30:-;;;:::i;2269:284:40:-;;;;;;;;;;;;;;;;-1:-1:-1;2269:284:40;;;;;;;;;:::i;2802:94:35:-;;;:::i;4097:840:33:-;;;;;;;;;;;;;;;;-1:-1:-1;4097:840:33;;;;;;;;;:::i;10737:538::-;;;;;;;;;;;;;;;;-1:-1:-1;10737:538:33;;:::i;9703:334::-;;;;;;;;;;;;;;;;-1:-1:-1;9703:334:33;;;;;;;;;:::i;2040:84:41:-;;;:::i;2953:254:35:-;;;;;;;;;;;;;;;;-1:-1:-1;2953:254:35;;;;:::i;5782:229:40:-;;;;;;;;;;;;;;;;-1:-1:-1;5782:229:40;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;2106:26:35:-;;;:::i;6340:154:33:-;;;;;;;;;;;;;;;;-1:-1:-1;6340:154:33;;;;:::i;1921:107:37:-;;;;;;;;;;;;;;;;-1:-1:-1;1921:107:37;;;;:::i;2068:136:38:-;;;:::i;2623:89:35:-;;;:::i;5318:118:33:-;;;;;;;;;;;;;;;;-1:-1:-1;5318:118:33;;;;:::i;2355:79:34:-;;;:::i;1673:20:33:-;;;:::i;2079:21:35:-;;;:::i;1787:137:38:-;;;:::i;2766:284:40:-;;;;;;;;;;;;;;;;-1:-1:-1;2766:284:40;;;;;;;;;:::i;8487:260:33:-;;;;;;;;;;;;;;;;-1:-1:-1;8487:260:33;;;;;;;;;:::i;11281:303::-;;;;;;;;;;;;;;;;-1:-1:-1;11281:303:33;;;;:::i;5543:104::-;;;;;;;;;;;;;;;;-1:-1:-1;5543:104:33;;;;:::i;2926:299:32:-;;;;;;;;;;;;;;;;-1:-1:-1;2926:299:32;;;;:::i;2161:177:30:-;;;;;;;;;;;;;;;;-1:-1:-1;2161:177:30;;;;;;;;;;;;;;;;;;:::i;1365:26:32:-;;;:::i;6439:309:40:-;;;;;;;;;;;;;;;;-1:-1:-1;6439:309:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;1758:298::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1758:298:40;;-1:-1:-1;1758:298:40;-1:-1:-1;1758:298:40;:::i;2285:130:38:-;;;:::i;5898:175:33:-;;;;;;;;;;;;;;;;-1:-1:-1;5898:175:33;;;;;;;;;;;:::i;3621:523:40:-;;;;;;;;;;;;;;;;-1:-1:-1;3621:523:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;1726:22:33:-;;;:::i;3088:183:38:-;;;;;;;;;;;;;;;;-1:-1:-1;3088:183:38;;;;;;;;;:::i;4883:521:40:-;;;;;;;;;;;;;;;;-1:-1:-1;4883:521:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;2945:269:34:-;;;;;;;;;;;;;;;;-1:-1:-1;2945:269:34;;;;:::i;2500:143:32:-;;;;;;;;;;;;;;;;-1:-1:-1;2500:143:32;;;;:::i;2277:115::-;;;;;;;;;;;;;;;;-1:-1:-1;2277:115:32;;;;:::i;1649:18:33:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;6725:273::-;2286:6:35;;6914:4:33;;2286:6:35;;;;;2285:7;2277:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6853:10:33::1;2064:21:32;::::0;;;:11:::1;:21;::::0;;;;;::::1;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2064:21:::2;::::0;::::2;;::::0;;;:11:::2;:21;::::0;;;;;6888:7:33;;2064:21:32::2;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6934:36:33::3;6943:10;6955:7;6964:5;6934:8;:36::i;:::-;-1:-1:-1::0;6987:4:33::3;::::0;6725:273;-1:-1:-1;;;;6725:273:33:o;6132:100::-;6213:12;;6132:100;:::o;2772:148:32:-;1771:11;;;;1757:10;:25;1736:116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2846:21:::1;::::0;::::1;2870:5;2846:21:::0;;;:11:::1;:21;::::0;;;;;:29;;;::::1;::::0;;2890:23;::::1;::::0;2870:5;2890:23:::1;2772:148:::0;:::o;7776:536:33:-;2286:6:35;;8033:4:33;;2286:6:35;;;;;2285:7;2277:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7948:10:33::1;2064:21:32;::::0;;;:11:::1;:21;::::0;;;;;::::1;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2064:21:::2;::::0;::::2;;::::0;;;:11:::2;:21;::::0;;;;;7983:4:33;;2064:21:32::2;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2064:21:::3;::::0;::::3;;::::0;;;:11:::3;:21;::::0;;;;;8012:2:33;;2064:21:32::3;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8083:13:33::4;::::0;::::4;;::::0;;;:7:::4;:13;::::0;;;;;;;8097:10:::4;8083:25:::0;;;;;;;;8074:34;::::4;;8053:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8184:26;8194:4;8200:2;8204:5;8184:9;:26::i;:::-;8248:13;::::0;::::4;;::::0;;;:7:::4;:13;::::0;;;;;;;8262:10:::4;8248:25:::0;;;;;;;;:36:::4;::::0;8278:5;8248:29:::4;:36::i;:::-;8220:13;::::0;::::4;;::::0;;;:7:::4;:13;::::0;;;;;;;8234:10:::4;8220:25:::0;;;;;;;:64;8301:4:::4;::::0;-1:-1:-1;2158:1:32::3;::::2;2323::35::1;7776:536:33::0;;;;;:::o;2466:264:30:-;2713:6:34;;;;2699:10;:20;2691:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2559:24:30::1;::::0;::::1;2538:113;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2661:8;:21:::0;;;::::1;;::::0;::::1;::::0;;::::1;::::0;;;2697:26:::1;::::0;::::1;::::0;-1:-1:-1;;2697:26:30::1;2466:264:::0;:::o;1528:398:41:-;1652:19;;;;;:24;1644:33;;;;;;1728:4;1688:20;1711:23;;;:8;:23;;;;;;1748:16;;1744:99;;1780:52;1798:4;1805:12;1819;1780:9;:52::i;:::-;-1:-1:-1;;1872:4:41;1852:26;;;;:11;:26;;;;;:33;;;;;;1881:4;1852:33;;;;1896:19;:23;;;;;1918:1;1896:23;;;1528:398::o;10209:239:33:-;5104:12;;10306:4;;5104:12;;5090:10;:26;5069:114;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10326:15:::1;::::0;::::1;10344:5;10326:15:::0;;;:7:::1;:15;::::0;;;;;;;:23;;;::::1;::::0;;10359:13:::1;:21:::0;;;;;;:25;;;10399:21;::::1;::::0;10344:5;10399:21:::1;-1:-1:-1::0;10437:4:33::1;10209:239:::0;;;:::o;1612:116:37:-;1662:66;1612:116;:::o;1699:21:33:-;;;;;;:::o;2413:1160::-;2717:11;;;;;;;2716:12;2708:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2806:29;;;2785:123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2939:23;;;2918:111;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3060:28;;;3039:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3191:22;;;3170:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3290:16;;;;:4;;:16;;;;;:::i;:::-;-1:-1:-1;3316:20:33;;;;:6;;:20;;;;;:::i;:::-;-1:-1:-1;3346:24:33;;;;:8;;:24;;;;;:::i;:::-;-1:-1:-1;3380:8:33;:24;;;;;;;;;;3414:12;:30;;;;;;;;;;;;;;;;;-1:-1:-1;3454:18:33;;;;;;;;;;3482:11;:28;;;;;;;;;;;;;;3520:18;3529:8;3520;:18::i;:::-;-1:-1:-1;;3548:11:33;:18;;;;;;;;-1:-1:-1;;;;;;2413:1160:33:o;1754:27::-;;;;;;:::o;1291:31:39:-;;;;:::o;1636:83:30:-;1704:8;;;;1636:83;:::o;2269:284:40:-;2286:6:35;;2455:4:40;;2286:6:35;;;;;2285:7;2277:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2394:10:40::1;2064:21:32;::::0;;;:11:::1;:21;::::0;;;;;::::1;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2064:21:::2;::::0;::::2;;::::0;;;:11:::2;:21;::::0;;;;;2429:7:40;;2064:21:32::2;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2475:50:40::3;2494:10;2506:7;2515:9;2475:18;:50::i;2802:94:35:-:0;2473:6;;;;2459:10;:20;2451:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2851:6:::1;:14:::0;;;::::1;::::0;;2880:9:::1;::::0;::::1;::::0;2860:5:::1;::::0;2880:9:::1;2802:94::o:0;4097:840:33:-;2286:6:35;;4280:4:33;;2286:6:35;;;;;2285:7;2277:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3708:10:33::1;3700:19;::::0;;;:7:::1;:19;::::0;;;;;::::1;;3692:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4223:10:::2;2064:21:32;::::0;;;:11:::2;:21;::::0;;;;;::::2;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2064:21:::3;::::0;::::3;;::::0;;;:11:::3;:21;::::0;;;;;4258:3:33;;2064:21:32::3;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4308:17:33::4;::::0;::::4;4300:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4393:1;4383:7;:11;4375:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4496:10;4451:28;4482:25:::0;;;:13:::4;:25;::::0;;;;;4538:31;;::::4;;4517:124;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4667:12;::::0;:25:::4;::::0;4684:7;4667:16:::4;:25::i;:::-;4652:12;:40:::0;4718:13:::4;::::0;::::4;;::::0;;;:8:::4;:13;::::0;;;;;:26:::4;::::0;4736:7;4718:17:::4;:26::i;:::-;4702:13;::::0;::::4;;::::0;;;:8:::4;:13;::::0;;;;:42;4782:33:::4;:20:::0;4807:7;4782:24:::4;:33::i;:::-;4768:10;4754:25;::::0;;;:13:::4;:25;::::0;;;;;;;;:61;;;;4830:30;;;;;;;4754:25:::4;4830:30:::0;::::4;::::0;::::4;::::0;;;;;;::::4;4875:34;::::0;;;;;;;::::4;::::0;::::4;::::0;4892:1:::4;::::0;4875:34:::4;::::0;;;;::::4;::::0;;::::4;-1:-1:-1::0;4926:4:33::4;::::0;4097:840;-1:-1:-1;;;;;4097:840:33:o;10737:538::-;2286:6:35;;;;;;;2285:7;2277:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3708:10:33::1;3700:19;::::0;;;:7:::1;:19;::::0;;;;;::::1;;3692:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10850:10:::2;2064:21:32;::::0;;;:11:::2;:21;::::0;;;;;::::2;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10903:10:33::3;10876:15;10894:20:::0;;;:8:::3;:20;::::0;;;;;10932:11;10924:65:::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11018:7;11007;:18;;10999:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11094:12;::::0;:25:::3;::::0;11111:7;11094:16:::3;:25::i;:::-;11079:12;:40:::0;11152:20:::3;:7:::0;11164;11152:11:::3;:20::i;:::-;11138:10;11129:20;::::0;;;:8:::3;:20;::::0;;;;;;;;:43;;;;11187:25;;;;;;;11138:10;;11187:25:::3;::::0;;;;;;;::::3;11227:41;::::0;;;;;;;11256:1:::3;::::0;11236:10:::3;::::0;11227:41:::3;::::0;;;;::::3;::::0;;::::3;2158:1:32;3767::33::2;10737:538:::0;:::o;9703:334::-;2286:6:35;;9854:4:33;;2286:6:35;;;;;2285:7;2277:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5104:12:33::1;::::0;::::1;;5090:10;:26;5069:114;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9874:15:::2;::::0;::::2;;::::0;;;:7:::2;:15;::::0;;;;;;;:22;;;::::2;9892:4;9874:22;::::0;;9906:13:::2;:21:::0;;;;;;:43;;;9964:45;;;;;;;::::2;::::0;;;;;;;;::::2;-1:-1:-1::0;10026:4:33::2;9703:334:::0;;;;:::o;2040:84:41:-;2107:10;;;;;;;;;;;;;;;;;2040:84;:::o;2953:254:35:-;2713:6:34;;;;2699:10;:20;2691:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3045:24:35::1;::::0;::::1;3024:111;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3145:6;:19:::0;;;::::1;;::::0;;::::1;::::0;;;::::1;::::0;;;;3179:21:::1;::::0;3193:6;::::1;::::0;3179:21:::1;::::0;-1:-1:-1;;3179:21:35::1;2953:254:::0;:::o;5782:229:40:-;2286:6:35;;;;;;;2285:7;2277:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5956:48:40::1;5977:10;5989:5;5996:1;5999;6002;5956:20;:48::i;:::-;5782:229:::0;;;;;:::o;2106:26:35:-;;;;;;;;;:::o;6340:154:33:-;6470:17;;6440:7;6470:17;;;:8;:17;;;;;;;6340:154::o;1921:107:37:-;2001:20;;1975:7;2001:20;;;:13;:20;;;;;;;1921:107::o;2068:136:38:-;2138:66;2068:136;:::o;2623:89:35:-;2473:6;;;;2459:10;:20;2451:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2679:4:::1;2670:13:::0;;;::::1;::::0;::::1;::::0;;2698:7:::1;::::0;::::1;::::0;2670:13;;2698:7:::1;2623:89::o:0;5318:118:33:-;5408:21;;5382:7;5408:21;;;:13;:21;;;;;;;5318:118::o;2355:79:34:-;2395:7;2421:6;;;2355:79;:::o;1673:20:33:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2079:21:35;;;;;;:::o;1787:137:38:-;1858:66;1787:137;:::o;2766:284:40:-;2286:6:35;;2952:4:40;;2286:6:35;;;;;2285:7;2277:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2891:10:40::1;2064:21:32;::::0;;;:11:::1;:21;::::0;;;;;::::1;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2064:21:::2;::::0;::::2;;::::0;;;:11:::2;:21;::::0;;;;;2926:7:40;;2064:21:32::2;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2972:50:40::3;2991:10;3003:7;3012:9;2972:18;:50::i;8487:260:33:-:0;2286:6:35;;8667:4:33;;2286:6:35;;;;;2285:7;2277:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8611:10:33::1;2064:21:32;::::0;;;:11:::1;:21;::::0;;;;;::::1;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2064:21:::2;::::0;::::2;;::::0;;;:11:::2;:21;::::0;;;;;8646:2:33;;2064:21:32::2;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8687:32:33::3;8697:10;8709:2;8713:5;8687:9;:32::i;11281:303::-:0;2713:6:34;;;;2699:10;:20;2691:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11385:30:33::1;::::0;::::1;11364:124;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11498:12;:31:::0;;;::::1;;::::0;;::::1;::::0;;;::::1;::::0;;;;11544:33:::1;::::0;11564:12;::::1;::::0;11544:33:::1;::::0;-1:-1:-1;;11544:33:33::1;11281:303:::0;:::o;5543:104::-;5624:16;;5601:4;5624:16;;;:7;:16;;;;;;;;;5543:104::o;2926:299:32:-;2713:6:34;;;;2699:10;:20;2691:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3028:29:32::1;::::0;::::1;3007:126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3143:11;:29:::0;;;::::1;;::::0;;::::1;::::0;;;::::1;::::0;;;;3187:31:::1;::::0;3206:11;::::1;::::0;3187:31:::1;::::0;-1:-1:-1;;3187:31:32::1;2926:299:::0;:::o;2161:177:30:-;1867:8;;;;1853:10;:22;1845:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2293:38:::1;:26;::::0;::::1;2320:2:::0;2324:6;2293:26:::1;:38::i;:::-;2161:177:::0;;;:::o;1365:26:32:-;;;;;;:::o;6439:309:40:-;2286:6:35;;;;;;;2285:7;2277:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2064:21:32::1;::::0;::::1;;::::0;;;:11:::1;:21;::::0;;;;;6651:5:40;;2064:21:32::1;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2064:21:::2;::::0;::::2;;::::0;;;:11:::2;:21;::::0;;;;;6673:7:40;;2064:21:32::2;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6692:49:40::3;6700:5;6707:7;6716:5;6723:8;6733:1;6736;6739;6692:7;:49::i;:::-;2158:1:32::2;2323::35::1;6439:309:40::0;;;;;;;:::o;1758:298::-;1883:11;;;;;;;:39;;;;-1:-1:-1;1898:19:40;;;;:24;1883:39;1875:48;;;;;;1933:14;:4;1940:7;;1933:14;:::i;:::-;;1976:40;2003:7;;1976:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1976:40:40;;;;;;;;;;;;;;;;;;-1:-1:-1;1976:26:40;;-1:-1:-1;1976:40:40:i;:::-;1957:16;:59;-1:-1:-1;;2026:19:40;:23;;;;2048:1;2026:23;;;1758:298::o;2285:130:38:-;2349:66;2285:130;:::o;5898:175:33:-;6043:14;;;;6013:7;6043:14;;;:7;:14;;;;;;;;:23;;;;;;;;;;;;;5898:175::o;3621:523:40:-;2286:6:35;;;;;;;2285:7;2277:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2064:21:32::1;::::0;::::1;;::::0;;;:11:::1;:21;::::0;;;;;3900:4:40;;2064:21:32::1;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2064:21:::2;::::0;::::2;;::::0;;;:11:::2;:21;::::0;;;;;3921:2:40;;2064:21:32::2;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3935:202:40::3;3975:4;3993:2;4009:5;4028:10;4052:11;4077:5;4096:1;4111;4126;3935:26;:202::i;:::-;2158:1:32::2;2323::35::1;3621:523:40::0;;;;;;;;;:::o;1726:22:33:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3088:183:38;3225:32;;;;;3198:4;3225:32;;;:20;:32;;;;;;;;:39;;;;;;;;;;;3088:183::o;4883:521:40:-;2286:6:35;;;;;;;2285:7;2277:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2064:21:32::1;::::0;::::1;;::::0;;;:11:::1;:21;::::0;;;;;5161:4:40;;2064:21:32::1;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2064:21:::2;::::0;::::2;;::::0;;;:11:::2;:21;::::0;;;;;5182:2:40;;2064:21:32::2;;2063:22;2042:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5196:201:40::3;5235:4;5253:2;5269:5;5288:10;5312:11;5337:5;5356:1;5371;5386;5196:25;:201::i;2945:269:34:-:0;2713:6;;;;2699:10;:20;2691:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3040:22:::1;::::0;::::1;3019:107;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3162:6;::::0;3141:38:::1;::::0;;3162:6:::1;::::0;;::::1;3141:38:::0;;;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;;::::1;3189:18;3198:8;3189;:18::i;:::-;2945:269:::0;:::o;2500:143:32:-;1771:11;;;;1757:10;:25;1736:116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2572:21:::1;::::0;::::1;;::::0;;;:11:::1;:21;::::0;;;;;:28;;;::::1;2596:4;2572:28;::::0;;2615:21;::::1;::::0;2572;2615::::1;2500:143:::0;:::o;2277:115::-;2364:21;;2341:4;2364:21;;;:11;:21;;;;;;;;;2277:115::o;7196:363:33:-;7327:19;;;7319:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7405:21;;;7397:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7475:14;;;;;;;;:7;:14;;;;;;;;:23;;;;;;;;;;;;;:31;;;7521;;;;;;;;;;;;;;;;;7196:363;;;:::o;8931:526::-;9057:18;;;9049:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9135:16;;;9127:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9231:14;;;;;;;:8;:14;;;;;;9222:23;;;9201:108;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9337:14;;;;;;;:8;:14;;;;;;:25;;9356:5;9337:18;:25::i;:::-;9320:14;;;;;;;;:8;:14;;;;;;:42;;;;9387:12;;;;;;;:23;;9404:5;9387:16;:23::i;:::-;9372:12;;;;;;;;:8;:12;;;;;;;;;:38;;;;9425:25;;;;;;;9372:12;;9425:25;;;;;;;;;;;;;8931:526;;;:::o;1321:134:42:-;1379:7;1405:43;1409:1;1412;1405:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;1398:50;1321:134;-1:-1:-1;;;1321:134:42:o;2493:79:34:-;2548:6;:17;;;;;;;;;;;;;;;2493:79::o;6981:208:40:-;7143:14;;;;;;;;:7;:14;;;;;;;;:23;;;;;;;;;;7118:64;;7127:5;;7134:7;;7143:38;;7171:9;7143:27;:38::i;:::-;7118:8;:64::i;874:176:42:-;932:7;963:5;;;986:6;;;;978:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6532:611:38;6693:46;6721:10;6733:5;6693:27;:46::i;:::-;6770:106;;;2349:66;6770:106;;;;;;;;;;;;;6750:17;6770:106;;;;;;;;;;;;;;;;;;;;;;;6922:16;;6770:106;;;6907:47;;6940:1;6943;6946;6770:106;6907:14;:47::i;:::-;:61;;;6886:138;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7035:32;;;;;;;:20;:32;;;;;;;;:39;;;;;;;;;:46;;;;7077:4;7035:46;;;7096:40;7068:5;;7035:32;7096:40;;;6532:611;;;;;;:::o;7422:341:40:-;7559:197;7581:5;7600:7;7621:125;7666:9;7621:125;;;;;;;;;;;;;;;;;:14;;;;;;;;:7;:14;;;;;;;;:23;;;;;;;;;;;:125;:27;:125::i;696:175:44:-;805:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;828:23;805:58;;;778:86;;798:5;;778:19;:86::i;2459:637:37:-;2673:3;2661:8;:15;;2653:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2854:20;;;;2766:15;2854:20;;;:13;:20;;;;;;;;;:22;;;;;;;;2742:166;;1662:66;2742:166;;;;;;;;;;;;;;;;2722:17;2742:166;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2954:16;;2939:47;;2972:1;2975;2978;2742:166;2939:14;:47::i;:::-;:56;;;2918:129;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3058:31;3067:5;3074:7;3083:5;3058:8;:31::i;:::-;2459:637;;;;;;;;:::o;1501:686:28:-;2015:22;;;;;;;2059:25;;;;;;;;;1776:390;;;1927:66;1776:390;;;;;;;;;;;;;;;;;;1702:9;1776:390;;;;2143:4;1776:390;;;;;;;;;;;;;;;;;;;;;;;;1749:431;;;;;;1501:686::o;3842:780:38:-;4103:64;4130:4;4136:5;4143:10;4155:11;4103:26;:64::i;:::-;4198:191;;;1858:66;4198:191;;;;;;;;;;;;;;;;;4178:17;4198:191;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4435:16;;4198:191;;;4420:47;;4453:1;4456;4459;4198:191;4420:14;:47::i;:::-;:55;;;4399:132;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4542:37;4567:4;4573:5;4542:24;:37::i;:::-;4589:26;4599:4;4605:2;4609:5;4589:9;:26::i;:::-;3842:780;;;;;;;;;;:::o;5361:854::-;5629:16;;;5635:10;5629:16;5621:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5697:64;5724:4;5730:5;5737:10;5749:11;5697:26;:64::i;:::-;5792:190;;;2138:66;5792:190;;;;;;;;;;;;;;;;;5772:17;5792:190;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6028:16;;5792:190;;;6013:47;;6046:1;6049;6052;5792:190;6013:14;:47::i;1746:187:42:-;1832:7;1867:12;1859:6;;;;1851:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1902:5:42;;;1746:187::o;7322:255:38:-;7459:32;;;;;;;:20;:32;;;;;;;;:39;;;;;;;;;;;7458:40;7437:133;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7322:255;;:::o;2572:434:28:-;2898:26;;;;;;;;;;2803:135;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2780:168;;;;;2744:7;;2965:34;2780:168;2991:1;2994;2997;2965:17;:34::i;:::-;2958:41;2572:434;-1:-1:-1;;;;;;;2572:434:28:o;2959:751:44:-;3378:23;3404:69;3432:4;3404:69;;;;;;;;;;;;;;;;;3412:5;3404:27;;;;:69;;;;;:::i;:::-;3487:17;;3378:95;;-1:-1:-1;3487:21:44;3483:221;;3627:10;3616:30;;;;;;;;;;;;;;;-1:-1:-1;3616:30:44;3608:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7903:419:38;8103:10;8097:3;:16;8076:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8206:11;8200:3;:17;8192:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8269:46;8297:10;8309:5;8269:27;:46::i;:::-;7903:419;;;;:::o;8493:203::-;8592:32;;;;;;;:20;:32;;;;;;;;:39;;;;;;;;;:46;;;;8634:4;8592:46;;;8653:36;8625:5;;8592:32;8653:36;;;8493:203;;:::o;1872:1556:27:-;1997:7;2932:66;2907:91;;2890:192;;;3023:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2890:192;3096:1;:7;;3101:2;3096:7;;:18;;;;;3107:1;:7;;3112:2;3107:7;;3096:18;3092:97;;;3130:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3092:97;3283:14;3300:26;3310:6;3318:1;3321;3324;3300:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3300:26:27;;;;;;-1:-1:-1;;3344:20:27;;;3336:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3415:6;-1:-1:-1;1872:1556:27;;;;;;;:::o;3770:194:45:-;3873:12;3904:53;3927:6;3935:4;3941:1;3944:12;5247;5279:18;5290:6;5279:10;:18::i;:::-;5271:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5402:12;5416:23;5443:6;:11;;5463:8;5474:4;5443:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5401:78;;;;5493:7;5489:580;;;5523:10;-1:-1:-1;5516:17:45;;-1:-1:-1;5516:17:45;5489:580;5634:17;;:21;5630:429;;5892:10;5886:17;5952:15;5939:10;5935:2;5931:19;5924:44;5841:145;6024:20;;;;;;;;;;;;;;;;;;;;6031:12;;6024:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;718:610;778:4;1239:20;;1084:66;1278:23;;;;;;:42;;-1:-1:-1;;1305:15:45;;;1270:51;-1:-1:-1;;718:610:45:o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
+ "linkReferences": {}
+ },
+ "methodIdentifiers": {
+ "CANCEL_AUTHORIZATION_TYPEHASH()": "d9169487",
+ "DOMAIN_SEPARATOR()": "3644e515",
+ "PERMIT_TYPEHASH()": "30adf81f",
+ "RECEIVE_WITH_AUTHORIZATION_TYPEHASH()": "7f2eecc3",
+ "TRANSFER_WITH_AUTHORIZATION_TYPEHASH()": "a0cc6a68",
+ "allowance(address,address)": "dd62ed3e",
+ "approve(address,uint256)": "095ea7b3",
+ "authorizationState(address,bytes32)": "e94a0102",
+ "balanceOf(address)": "70a08231",
+ "blacklist(address)": "f9f92be4",
+ "blacklister()": "bd102430",
+ "burn(uint256)": "42966c68",
+ "cancelAuthorization(address,bytes32,uint8,bytes32,bytes32)": "5a049a70",
+ "configureMinter(address,uint256)": "4e44d956",
+ "currency()": "e5a6b10f",
+ "decimals()": "313ce567",
+ "decreaseAllowance(address,uint256)": "a457c2d7",
+ "increaseAllowance(address,uint256)": "39509351",
+ "initialize(string,string,string,uint8,address,address,address,address)": "3357162b",
+ "initializeV2(string)": "d608ea64",
+ "initializeV2_1(address)": "2fc81e09",
+ "isBlacklisted(address)": "fe575a87",
+ "isMinter(address)": "aa271e1a",
+ "masterMinter()": "35d99f35",
+ "mint(address,uint256)": "40c10f19",
+ "minterAllowance(address)": "8a6db9c3",
+ "name()": "06fdde03",
+ "nonces(address)": "7ecebe00",
+ "owner()": "8da5cb5b",
+ "pause()": "8456cb59",
+ "paused()": "5c975abb",
+ "pauser()": "9fd0506d",
+ "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": "d505accf",
+ "receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)": "ef55bec6",
+ "removeMinter(address)": "3092afd5",
+ "rescueERC20(address,address,uint256)": "b2118a8d",
+ "rescuer()": "38a63183",
+ "symbol()": "95d89b41",
+ "totalSupply()": "18160ddd",
+ "transfer(address,uint256)": "a9059cbb",
+ "transferFrom(address,address,uint256)": "23b872dd",
+ "transferOwnership(address)": "f2fde38b",
+ "transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)": "e3ee160e",
+ "unBlacklist(address)": "1a895266",
+ "unpause()": "3f4ba83a",
+ "updateBlacklister(address)": "ad38bf22",
+ "updateMasterMinter(address)": "aa20e1e4",
+ "updatePauser(address)": "554bab3c",
+ "updateRescuer(address)": "2ab60045",
+ "version()": "54fd4d50"
+ },
+ "rawMetadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"authorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"nonce\",\"type\":\"bytes32\"}],\"name\":\"AuthorizationCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"authorizer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"nonce\",\"type\":\"bytes32\"}],\"name\":\"AuthorizationUsed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"Blacklisted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newBlacklister\",\"type\":\"address\"}],\"name\":\"BlacklisterChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"burner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newMasterMinter\",\"type\":\"address\"}],\"name\":\"MasterMinterChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minterAllowedAmount\",\"type\":\"uint256\"}],\"name\":\"MinterConfigured\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldMinter\",\"type\":\"address\"}],\"name\":\"MinterRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Pause\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"PauserChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newRescuer\",\"type\":\"address\"}],\"name\":\"RescuerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"UnBlacklisted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Unpause\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"CANCEL_AUTHORIZATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMIT_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RECEIVE_WITH_AUTHORIZATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TRANSFER_WITH_AUTHORIZATION_TYPEHASH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"authorizer\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"nonce\",\"type\":\"bytes32\"}],\"name\":\"authorizationState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"blacklist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blacklister\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"authorizer\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"nonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"cancelAuthorization\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minterAllowedAmount\",\"type\":\"uint256\"}],\"name\":\"configureMinter\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currency\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"decrement\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"increment\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenSymbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenCurrency\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"tokenDecimals\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"newMasterMinter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newPauser\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newBlacklister\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newName\",\"type\":\"string\"}],\"name\":\"initializeV2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"lostAndFound\",\"type\":\"address\"}],\"name\":\"initializeV2_1\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"isBlacklisted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isMinter\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"masterMinter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"}],\"name\":\"minterAllowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pauser\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"validAfter\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"validBefore\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"nonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"receiveWithAuthorization\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"}],\"name\":\"removeMinter\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"tokenContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"rescueERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rescuer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"validAfter\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"validBefore\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"nonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"transferWithAuthorization\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"unBlacklist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newBlacklister\",\"type\":\"address\"}],\"name\":\"updateBlacklister\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newMasterMinter\",\"type\":\"address\"}],\"name\":\"updateMasterMinter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newPauser\",\"type\":\"address\"}],\"name\":\"updatePauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRescuer\",\"type\":\"address\"}],\"name\":\"updateRescuer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"params\":{\"owner\":\"Token owner's address\",\"spender\":\"Spender's address\"},\"returns\":{\"_0\":\"Allowance amount\"}},\"approve(address,uint256)\":{\"params\":{\"spender\":\"Spender's address\",\"value\":\"Allowance amount\"},\"returns\":{\"_0\":\"True if successful\"}},\"authorizationState(address,bytes32)\":{\"details\":\"Nonces are randomly generated 32-byte data unique to the authorizer's address\",\"params\":{\"authorizer\":\"Authorizer's address\",\"nonce\":\"Nonce of the authorization\"},\"returns\":{\"_0\":\"True if the nonce is used\"}},\"balanceOf(address)\":{\"details\":\"Get token balance of an account\",\"params\":{\"account\":\"address The account\"}},\"blacklist(address)\":{\"details\":\"Adds account to blacklist\",\"params\":{\"_account\":\"The address to blacklist\"}},\"burn(uint256)\":{\"details\":\"allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance\",\"params\":{\"_amount\":\"uint256 the amount of tokens to be burned\"}},\"cancelAuthorization(address,bytes32,uint8,bytes32,bytes32)\":{\"details\":\"Works only if the authorization is not yet used.\",\"params\":{\"authorizer\":\"Authorizer's address\",\"nonce\":\"Nonce of the authorization\",\"r\":\"r of the signature\",\"s\":\"s of the signature\",\"v\":\"v of the signature\"}},\"configureMinter(address,uint256)\":{\"details\":\"Function to add/update a new minter\",\"params\":{\"minter\":\"The address of the minter\",\"minterAllowedAmount\":\"The minting amount allowed for the minter\"},\"returns\":{\"_0\":\"True if the operation was successful.\"}},\"decreaseAllowance(address,uint256)\":{\"params\":{\"decrement\":\"Amount of decrease in allowance\",\"spender\":\"Spender's address\"},\"returns\":{\"_0\":\"True if successful\"}},\"increaseAllowance(address,uint256)\":{\"params\":{\"increment\":\"Amount of increase in allowance\",\"spender\":\"Spender's address\"},\"returns\":{\"_0\":\"True if successful\"}},\"initializeV2(string)\":{\"params\":{\"newName\":\"New token name\"}},\"initializeV2_1(address)\":{\"params\":{\"lostAndFound\":\"The address to which the locked funds are sent\"}},\"isBlacklisted(address)\":{\"details\":\"Checks if account is blacklisted\",\"params\":{\"_account\":\"The address to check\"}},\"isMinter(address)\":{\"details\":\"Checks if account is a minter\",\"params\":{\"account\":\"The address to check\"}},\"mint(address,uint256)\":{\"details\":\"Function to mint tokens\",\"params\":{\"_amount\":\"The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller.\",\"_to\":\"The address that will receive the minted tokens.\"},\"returns\":{\"_0\":\"A boolean that indicates if the operation was successful.\"}},\"minterAllowance(address)\":{\"details\":\"Get minter allowance for an account\",\"params\":{\"minter\":\"The address of the minter\"}},\"nonces(address)\":{\"params\":{\"owner\":\"Token owner's address (Authorizer)\"},\"returns\":{\"_0\":\"Next nonce\"}},\"owner()\":{\"details\":\"Tells the address of the owner\",\"returns\":{\"_0\":\"the address of the owner\"}},\"pause()\":{\"details\":\"called by the owner to pause, triggers stopped state\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"params\":{\"deadline\":\"Expiration time, seconds since the epoch\",\"owner\":\"Token owner's address (Authorizer)\",\"r\":\"r of the signature\",\"s\":\"s of the signature\",\"spender\":\"Spender's address\",\"v\":\"v of the signature\",\"value\":\"Amount of allowance\"}},\"receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)\":{\"details\":\"This has an additional check to ensure that the payee's address matches the caller of this function to prevent front-running attacks.\",\"params\":{\"from\":\"Payer's address (Authorizer)\",\"nonce\":\"Unique nonce\",\"r\":\"r of the signature\",\"s\":\"s of the signature\",\"to\":\"Payee's address\",\"v\":\"v of the signature\",\"validAfter\":\"The time after which this is valid (unix time)\",\"validBefore\":\"The time before which this is valid (unix time)\",\"value\":\"Amount to be transferred\"}},\"removeMinter(address)\":{\"details\":\"Function to remove a minter\",\"params\":{\"minter\":\"The address of the minter to remove\"},\"returns\":{\"_0\":\"True if the operation was successful.\"}},\"rescueERC20(address,address,uint256)\":{\"params\":{\"amount\":\"Amount to withdraw\",\"to\":\"Recipient address\",\"tokenContract\":\"ERC20 token contract address\"}},\"rescuer()\":{\"returns\":{\"_0\":\"Rescuer's address\"}},\"totalSupply()\":{\"details\":\"Get totalSupply of token\"},\"transfer(address,uint256)\":{\"params\":{\"to\":\"Payee's address\",\"value\":\"Transfer amount\"},\"returns\":{\"_0\":\"True if successful\"}},\"transferFrom(address,address,uint256)\":{\"params\":{\"from\":\"Payer's address\",\"to\":\"Payee's address\",\"value\":\"Transfer amount\"},\"returns\":{\"_0\":\"True if successful\"}},\"transferOwnership(address)\":{\"details\":\"Allows the current owner to transfer control of the contract to a newOwner.\",\"params\":{\"newOwner\":\"The address to transfer ownership to.\"}},\"transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)\":{\"params\":{\"from\":\"Payer's address (Authorizer)\",\"nonce\":\"Unique nonce\",\"r\":\"r of the signature\",\"s\":\"s of the signature\",\"to\":\"Payee's address\",\"v\":\"v of the signature\",\"validAfter\":\"The time after which this is valid (unix time)\",\"validBefore\":\"The time before which this is valid (unix time)\",\"value\":\"Amount to be transferred\"}},\"unBlacklist(address)\":{\"details\":\"Removes account from blacklist\",\"params\":{\"_account\":\"The address to remove from the blacklist\"}},\"unpause()\":{\"details\":\"called by the owner to unpause, returns to normal state\"},\"updatePauser(address)\":{\"details\":\"update the pauser role\"},\"updateRescuer(address)\":{\"params\":{\"newRescuer\":\"New rescuer's address\"}},\"version()\":{\"returns\":{\"_0\":\"Version string\"}}},\"title\":\"FiatToken V2.1\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"allowance(address,address)\":{\"notice\":\"Amount of remaining tokens spender is allowed to transfer on behalf of the token owner\"},\"approve(address,uint256)\":{\"notice\":\"Set spender's allowance over the caller's tokens to be a given value.\"},\"authorizationState(address,bytes32)\":{\"notice\":\"Returns the state of an authorization\"},\"cancelAuthorization(address,bytes32,uint8,bytes32,bytes32)\":{\"notice\":\"Attempt to cancel an authorization\"},\"decreaseAllowance(address,uint256)\":{\"notice\":\"Decrease the allowance by a given decrement\"},\"increaseAllowance(address,uint256)\":{\"notice\":\"Increase the allowance by a given increment\"},\"initializeV2(string)\":{\"notice\":\"Initialize v2\"},\"initializeV2_1(address)\":{\"notice\":\"Initialize v2.1\"},\"nonces(address)\":{\"notice\":\"Nonces for permit\"},\"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)\":{\"notice\":\"Update allowance with a signed permit\"},\"receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)\":{\"notice\":\"Receive a transfer with a signed authorization from the payer\"},\"rescueERC20(address,address,uint256)\":{\"notice\":\"Rescue ERC20 tokens locked up in this contract.\"},\"rescuer()\":{\"notice\":\"Returns current rescuer\"},\"transfer(address,uint256)\":{\"notice\":\"Transfer tokens from the caller\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Transfer tokens by spending allowance\"},\"transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)\":{\"notice\":\"Execute a transfer with a signed authorization\"},\"updateRescuer(address)\":{\"notice\":\"Assign the rescuer role to a given address.\"},\"version()\":{\"notice\":\"Version string for the EIP712 domain separator\"}},\"notice\":\"ERC20 Token backed by fiat reserves, version 2.1\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/FiatTokenV2_1/centre-tokens/contracts/v2/FiatTokenV2_1.sol\":\"FiatTokenV2_1\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000000},\"remappings\":[\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\"]},\"sources\":{\"src/FiatTokenV2_1/centre-tokens/contracts/util/ECRecover.sol\":{\"keccak256\":\"0xb4e623304daaf25e40292e60a814ae60a60745d10003f1881a36be763dbc09aa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d6ef83bd777bfb13b0968b9cadd971216a95150427fa5d6b50f984e4b7268d31\",\"dweb:/ipfs/QmZS5TeT6n7tM36PBdYZNJW3wgYgAZE9zMcouNs4FuEDKj\"]},\"src/FiatTokenV2_1/centre-tokens/contracts/util/EIP712.sol\":{\"keccak256\":\"0x39319612a776e16f355d5ab71575b68c427a058839544f032733df228b5debd1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d5ac6450e881a4275f4b5baf7b5d6e15c0a0c7c2039edf39f106e0b821c9829d\",\"dweb:/ipfs/QmShHneDasAXQzjA8iKWXk3sbZgxbQGPiMQ1MUpJGF64N8\"]},\"src/FiatTokenV2_1/centre-tokens/contracts/v1.1/FiatTokenV1_1.sol\":{\"keccak256\":\"0xa5f8fc4b5e739ddcafe52dd76ebb7605e09eb9d52a5c1d77e48dd88e83106308\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24543f05d3eb4768ee9798768cb6c9ce8b88d30606a5def83118ad1ba9382ac8\",\"dweb:/ipfs/QmYREtrAvoxn6DKXehJPP1pbs8vciqMvRHVk2eFKLtmKVT\"]},\"src/FiatTokenV2_1/centre-tokens/contracts/v1.1/Rescuable.sol\":{\"keccak256\":\"0x8c02b979e06aa4133c93e47c743ebebd56d120dd10aeaf56b2da2a36f06b68b1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9d73d6f98bd494500a414ca616eabe9ad6e99f283e00a471bddd7f8ac5825334\",\"dweb:/ipfs/QmXesAuMcXJiG3r2og7adeT5wBcY6ntFncVUFjNPfEhJC9\"]},\"src/FiatTokenV2_1/centre-tokens/contracts/v1/AbstractFiatTokenV1.sol\":{\"keccak256\":\"0xb81ae053cff8eced79f29c3542b7693763ed2bfdd9a25d6b150439d21b3fa57d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e16ce40aef6188334cd0dbc2e3aead22c1f89101d782df821821061d5efa891b\",\"dweb:/ipfs/QmW2WnaMTzpUityk5Mpv7FFdKCh2CeueJaDneoABGVowVm\"]},\"src/FiatTokenV2_1/centre-tokens/contracts/v1/Blacklistable.sol\":{\"keccak256\":\"0xc4ff3bfe34c8ecf9f2c333f8373c111fdd4640ed15677c4891bb9cf3cbff9554\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://91cfc583d47eda58f356783698a130c1c6adf797c4ba55461598c0bac8159f33\",\"dweb:/ipfs/QmeWfmhcwUE7H5Ge8TVhWkJ4kDwDY8a4kExMaufukLqsh1\"]},\"src/FiatTokenV2_1/centre-tokens/contracts/v1/FiatTokenV1.sol\":{\"keccak256\":\"0xaed130ecb4b0714a887dccaaff61321915f2afbf0839ee8af10673507a010471\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3961d2ed8f4f2c69cc4ce0fdb2346b8bd5c09d644627704181fa03b82231ff31\",\"dweb:/ipfs/Qmb7sdix44isYUaD4TD4QsVmR8d86NN4koiFE6SsjRagGQ\"]},\"src/FiatTokenV2_1/centre-tokens/contracts/v1/Ownable.sol\":{\"keccak256\":\"0x654e645d6d09616fde908eba4d29abf318fede7e8cc3e31705203fc1d2599217\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fce1ff1458e817aaa5f87d3ef4207fbbdeb25e548d460f47d9cca4fb80175390\",\"dweb:/ipfs/QmfY7E5xfTyeiuU2nDXEdYfy5LKjGRh69fuKK4HV6YTv9v\"]},\"src/FiatTokenV2_1/centre-tokens/contracts/v1/Pausable.sol\":{\"keccak256\":\"0x873ce4f17eb8694cd0420ef6682c2da54290fe6e243f21ead37e90f211ac91b6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7df712210c8bb5fc08e0ff7b684ee4035530cd67b21f20d81766a17407606a3c\",\"dweb:/ipfs/QmYPFYAw4W8VdcBdknLhqfNfiUuGhGJD3ZZ7rAjrKjhtXd\"]},\"src/FiatTokenV2_1/centre-tokens/contracts/v2/AbstractFiatTokenV2.sol\":{\"keccak256\":\"0x5d393663d48e4bbb730630c117c2b703dd3c9968833e66dbbb18c92eab207afe\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b0ce642b7ab095d970e3e5d031e5de6b2a98a7ddd20fd94123a42ed81e21757e\",\"dweb:/ipfs/QmbPixwbbpHS7zBRcJV1idzhaSd1SPRm3LjpywxFnXxR8A\"]},\"src/FiatTokenV2_1/centre-tokens/contracts/v2/EIP2612.sol\":{\"keccak256\":\"0x8ed169be2f6423b8e7002241857d719e9eb9545f5dbad5209a8f6445132bdbe0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0646f70d57d072c0569ccbd9b02c922bbb183e6052f94c241c4fef9a267e73bc\",\"dweb:/ipfs/QmZK3D3qqTMenkdc5EpZSiyxETMpTVpRke61uuRH75ctVk\"]},\"src/FiatTokenV2_1/centre-tokens/contracts/v2/EIP3009.sol\":{\"keccak256\":\"0x74a81d5b1682cb6716f60c27254e8a15463797e1772b37c884390eb9c7985070\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1d3a6e220c2b8aab8c5070312cc9320ce2b79955b0bddafd99e5feec13851016\",\"dweb:/ipfs/QmQwc2nZtMKyDcGT8Scnv1R4ThP2Va9trUHnRiqMz4G2WN\"]},\"src/FiatTokenV2_1/centre-tokens/contracts/v2/EIP712Domain.sol\":{\"keccak256\":\"0x56d8c0259e7f0baa5bb0d0d94810f25d001fb2dbe4eaf54dbe369ba0f1b8fd2b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9356cfa1d42bfb8c4f84a3db535ab75b2088975bfbda30834d79c3eb678047ea\",\"dweb:/ipfs/QmSBeiLwNGEC4vnr82EWQinGZFZemxKwxvwLZ9bu48FWF2\"]},\"src/FiatTokenV2_1/centre-tokens/contracts/v2/FiatTokenV2.sol\":{\"keccak256\":\"0x59654e02023dd9d712bb160545854eae6cba80d707a547f6abfaadcd830af2e7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e22c43b71ea393e9910bd91a355f711803d6971be25e9dabc702aaefac2a597f\",\"dweb:/ipfs/QmRjopnHgyKh1mXBDETBaXaom3NJSaacGEJweB5b28BdSE\"]},\"src/FiatTokenV2_1/centre-tokens/contracts/v2/FiatTokenV2_1.sol\":{\"keccak256\":\"0x6328091a86a3ab02471fba7ff3bf44200f6daf9f0ff3b61fe4043ee14cc1a4f0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4fed880853c249f6f812ddfa37bf99633b688f0bfd734e03372e4523f6cd2af9\",\"dweb:/ipfs/QmUMD1SvykvTJ8jmAjnsW13Yo3Wt6KH5dfKRPKCRogLki8\"]},\"src/FiatTokenV2_1/openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x9a9cf02622cd7a64261b10534fc3260449da25c98c9e96d1b4ae8110a20e5806\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2df142592d1dc267d9549049ee3317fa190d2f87eaa565f86ab05ec83f7ab8f5\",\"dweb:/ipfs/QmSkJtcfWo7c42KnL5hho6GFxK6HRNV91XABx1P7xDtfLV\"]},\"src/FiatTokenV2_1/openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5c26b39d26f7ed489e555d955dcd3e01872972e71fdd1528e93ec164e4f23385\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://efdc632af6960cf865dbc113665ea1f5b90eab75cc40ec062b2f6ae6da582017\",\"dweb:/ipfs/QmfAZFDuG62vxmAN9DnXApv7e7PMzPqi4RkqqZHLMSQiY5\"]},\"src/FiatTokenV2_1/openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xf3b30f8a49631420635a8c35daacfcaa338012755f18a76fdd118730256f9a27\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0d7de652204c2ee291a61aa984103dfc7ae4392d651fbbc44a0079caee7c69a3\",\"dweb:/ipfs/Qmcw1cQnq9eWDnrCBwU3TNyqLfTMUFg5YKpYUkELoMPuUE\"]},\"src/FiatTokenV2_1/openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xdfb4f812600ba4ce6738c35584ceb8c9433472583051b48ba5b1f66cb758a498\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://df02dffe1c1de089d9b4f6192f0dcf464526f2230f420b3deec4645e0cdd2bff\",\"dweb:/ipfs/QmcqXGAU3KJqwrgUVoGJ2W8osomhSJ4R5kdsRpbuW3fELS\"]}},\"version\":1}",
+ "metadata": {
+ "compiler": {
+ "version": "0.6.12+commit.27d51765"
+ },
+ "language": "Solidity",
+ "output": {
+ "abi": [
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address",
+ "indexed": true
+ },
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address",
+ "indexed": true
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256",
+ "indexed": false
+ }
+ ],
+ "type": "event",
+ "name": "Approval",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "authorizer",
+ "type": "address",
+ "indexed": true
+ },
+ {
+ "internalType": "bytes32",
+ "name": "nonce",
+ "type": "bytes32",
+ "indexed": true
+ }
+ ],
+ "type": "event",
+ "name": "AuthorizationCanceled",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "authorizer",
+ "type": "address",
+ "indexed": true
+ },
+ {
+ "internalType": "bytes32",
+ "name": "nonce",
+ "type": "bytes32",
+ "indexed": true
+ }
+ ],
+ "type": "event",
+ "name": "AuthorizationUsed",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_account",
+ "type": "address",
+ "indexed": true
+ }
+ ],
+ "type": "event",
+ "name": "Blacklisted",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newBlacklister",
+ "type": "address",
+ "indexed": true
+ }
+ ],
+ "type": "event",
+ "name": "BlacklisterChanged",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "burner",
+ "type": "address",
+ "indexed": true
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256",
+ "indexed": false
+ }
+ ],
+ "type": "event",
+ "name": "Burn",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newMasterMinter",
+ "type": "address",
+ "indexed": true
+ }
+ ],
+ "type": "event",
+ "name": "MasterMinterChanged",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "minter",
+ "type": "address",
+ "indexed": true
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address",
+ "indexed": true
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256",
+ "indexed": false
+ }
+ ],
+ "type": "event",
+ "name": "Mint",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "minter",
+ "type": "address",
+ "indexed": true
+ },
+ {
+ "internalType": "uint256",
+ "name": "minterAllowedAmount",
+ "type": "uint256",
+ "indexed": false
+ }
+ ],
+ "type": "event",
+ "name": "MinterConfigured",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "oldMinter",
+ "type": "address",
+ "indexed": true
+ }
+ ],
+ "type": "event",
+ "name": "MinterRemoved",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "previousOwner",
+ "type": "address",
+ "indexed": false
+ },
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address",
+ "indexed": false
+ }
+ ],
+ "type": "event",
+ "name": "OwnershipTransferred",
+ "anonymous": false
+ },
+ {
+ "inputs": [],
+ "type": "event",
+ "name": "Pause",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newAddress",
+ "type": "address",
+ "indexed": true
+ }
+ ],
+ "type": "event",
+ "name": "PauserChanged",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newRescuer",
+ "type": "address",
+ "indexed": true
+ }
+ ],
+ "type": "event",
+ "name": "RescuerChanged",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address",
+ "indexed": true
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address",
+ "indexed": true
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256",
+ "indexed": false
+ }
+ ],
+ "type": "event",
+ "name": "Transfer",
+ "anonymous": false
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_account",
+ "type": "address",
+ "indexed": true
+ }
+ ],
+ "type": "event",
+ "name": "UnBlacklisted",
+ "anonymous": false
+ },
+ {
+ "inputs": [],
+ "type": "event",
+ "name": "Unpause",
+ "anonymous": false
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "CANCEL_AUTHORIZATION_TYPEHASH",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ]
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "DOMAIN_SEPARATOR",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ]
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "PERMIT_TYPEHASH",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ]
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "RECEIVE_WITH_AUTHORIZATION_TYPEHASH",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ]
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "TRANSFER_WITH_AUTHORIZATION_TYPEHASH",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "allowance",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "approve",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "authorizer",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "nonce",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "authorizationState",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "balanceOf",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_account",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "blacklist"
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "blacklister",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "_amount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "burn"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "authorizer",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "nonce",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint8",
+ "name": "v",
+ "type": "uint8"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "r",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "s",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "cancelAuthorization"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "minter",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "minterAllowedAmount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "configureMinter",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "currency",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "decimals",
+ "outputs": [
+ {
+ "internalType": "uint8",
+ "name": "",
+ "type": "uint8"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "decrement",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "decreaseAllowance",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "increment",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "increaseAllowance",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "string",
+ "name": "tokenName",
+ "type": "string"
+ },
+ {
+ "internalType": "string",
+ "name": "tokenSymbol",
+ "type": "string"
+ },
+ {
+ "internalType": "string",
+ "name": "tokenCurrency",
+ "type": "string"
+ },
+ {
+ "internalType": "uint8",
+ "name": "tokenDecimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "address",
+ "name": "newMasterMinter",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "newPauser",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "newBlacklister",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "initialize"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "string",
+ "name": "newName",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "initializeV2"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "lostAndFound",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "initializeV2_1"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_account",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "isBlacklisted",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "isMinter",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "masterMinter",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "_amount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "mint",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "minter",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "minterAllowance",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ]
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "name",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "nonces",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ]
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ]
+ },
+ {
+ "inputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "pause"
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "paused",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "pauser",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "spender",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "deadline",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint8",
+ "name": "v",
+ "type": "uint8"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "r",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "s",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "permit"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "validAfter",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "validBefore",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "nonce",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint8",
+ "name": "v",
+ "type": "uint8"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "r",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "s",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "receiveWithAuthorization"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "minter",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "removeMinter",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "contract IERC20",
+ "name": "tokenContract",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "rescueERC20"
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "rescuer",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ]
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "symbol",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ]
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "totalSupply",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "transfer",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "transferFrom",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "transferOwnership"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "validAfter",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "validBefore",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "nonce",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint8",
+ "name": "v",
+ "type": "uint8"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "r",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "s",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "transferWithAuthorization"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_account",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "unBlacklist"
+ },
+ {
+ "inputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "unpause"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_newBlacklister",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "updateBlacklister"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_newMasterMinter",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "updateMasterMinter"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_newPauser",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "updatePauser"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newRescuer",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "name": "updateRescuer"
+ },
+ {
+ "inputs": [],
+ "stateMutability": "view",
+ "type": "function",
+ "name": "version",
+ "outputs": [
+ {
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }
+ ]
+ }
+ ],
+ "devdoc": {
+ "kind": "dev",
+ "methods": {
+ "allowance(address,address)": {
+ "params": {
+ "owner": "Token owner's address",
+ "spender": "Spender's address"
+ },
+ "returns": {
+ "_0": "Allowance amount"
+ }
+ },
+ "approve(address,uint256)": {
+ "params": {
+ "spender": "Spender's address",
+ "value": "Allowance amount"
+ },
+ "returns": {
+ "_0": "True if successful"
+ }
+ },
+ "authorizationState(address,bytes32)": {
+ "details": "Nonces are randomly generated 32-byte data unique to the authorizer's address",
+ "params": {
+ "authorizer": "Authorizer's address",
+ "nonce": "Nonce of the authorization"
+ },
+ "returns": {
+ "_0": "True if the nonce is used"
+ }
+ },
+ "balanceOf(address)": {
+ "details": "Get token balance of an account",
+ "params": {
+ "account": "address The account"
+ }
+ },
+ "blacklist(address)": {
+ "details": "Adds account to blacklist",
+ "params": {
+ "_account": "The address to blacklist"
+ }
+ },
+ "burn(uint256)": {
+ "details": "allows a minter to burn some of its own tokens Validates that caller is a minter and that sender is not blacklisted amount is less than or equal to the minter's account balance",
+ "params": {
+ "_amount": "uint256 the amount of tokens to be burned"
+ }
+ },
+ "cancelAuthorization(address,bytes32,uint8,bytes32,bytes32)": {
+ "details": "Works only if the authorization is not yet used.",
+ "params": {
+ "authorizer": "Authorizer's address",
+ "nonce": "Nonce of the authorization",
+ "r": "r of the signature",
+ "s": "s of the signature",
+ "v": "v of the signature"
+ }
+ },
+ "configureMinter(address,uint256)": {
+ "details": "Function to add/update a new minter",
+ "params": {
+ "minter": "The address of the minter",
+ "minterAllowedAmount": "The minting amount allowed for the minter"
+ },
+ "returns": {
+ "_0": "True if the operation was successful."
+ }
+ },
+ "decreaseAllowance(address,uint256)": {
+ "params": {
+ "decrement": "Amount of decrease in allowance",
+ "spender": "Spender's address"
+ },
+ "returns": {
+ "_0": "True if successful"
+ }
+ },
+ "increaseAllowance(address,uint256)": {
+ "params": {
+ "increment": "Amount of increase in allowance",
+ "spender": "Spender's address"
+ },
+ "returns": {
+ "_0": "True if successful"
+ }
+ },
+ "initializeV2(string)": {
+ "params": {
+ "newName": "New token name"
+ }
+ },
+ "initializeV2_1(address)": {
+ "params": {
+ "lostAndFound": "The address to which the locked funds are sent"
+ }
+ },
+ "isBlacklisted(address)": {
+ "details": "Checks if account is blacklisted",
+ "params": {
+ "_account": "The address to check"
+ }
+ },
+ "isMinter(address)": {
+ "details": "Checks if account is a minter",
+ "params": {
+ "account": "The address to check"
+ }
+ },
+ "mint(address,uint256)": {
+ "details": "Function to mint tokens",
+ "params": {
+ "_amount": "The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller.",
+ "_to": "The address that will receive the minted tokens."
+ },
+ "returns": {
+ "_0": "A boolean that indicates if the operation was successful."
+ }
+ },
+ "minterAllowance(address)": {
+ "details": "Get minter allowance for an account",
+ "params": {
+ "minter": "The address of the minter"
+ }
+ },
+ "nonces(address)": {
+ "params": {
+ "owner": "Token owner's address (Authorizer)"
+ },
+ "returns": {
+ "_0": "Next nonce"
+ }
+ },
+ "owner()": {
+ "details": "Tells the address of the owner",
+ "returns": {
+ "_0": "the address of the owner"
+ }
+ },
+ "pause()": {
+ "details": "called by the owner to pause, triggers stopped state"
+ },
+ "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": {
+ "params": {
+ "deadline": "Expiration time, seconds since the epoch",
+ "owner": "Token owner's address (Authorizer)",
+ "r": "r of the signature",
+ "s": "s of the signature",
+ "spender": "Spender's address",
+ "v": "v of the signature",
+ "value": "Amount of allowance"
+ }
+ },
+ "receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)": {
+ "details": "This has an additional check to ensure that the payee's address matches the caller of this function to prevent front-running attacks.",
+ "params": {
+ "from": "Payer's address (Authorizer)",
+ "nonce": "Unique nonce",
+ "r": "r of the signature",
+ "s": "s of the signature",
+ "to": "Payee's address",
+ "v": "v of the signature",
+ "validAfter": "The time after which this is valid (unix time)",
+ "validBefore": "The time before which this is valid (unix time)",
+ "value": "Amount to be transferred"
+ }
+ },
+ "removeMinter(address)": {
+ "details": "Function to remove a minter",
+ "params": {
+ "minter": "The address of the minter to remove"
+ },
+ "returns": {
+ "_0": "True if the operation was successful."
+ }
+ },
+ "rescueERC20(address,address,uint256)": {
+ "params": {
+ "amount": "Amount to withdraw",
+ "to": "Recipient address",
+ "tokenContract": "ERC20 token contract address"
+ }
+ },
+ "rescuer()": {
+ "returns": {
+ "_0": "Rescuer's address"
+ }
+ },
+ "totalSupply()": {
+ "details": "Get totalSupply of token"
+ },
+ "transfer(address,uint256)": {
+ "params": {
+ "to": "Payee's address",
+ "value": "Transfer amount"
+ },
+ "returns": {
+ "_0": "True if successful"
+ }
+ },
+ "transferFrom(address,address,uint256)": {
+ "params": {
+ "from": "Payer's address",
+ "to": "Payee's address",
+ "value": "Transfer amount"
+ },
+ "returns": {
+ "_0": "True if successful"
+ }
+ },
+ "transferOwnership(address)": {
+ "details": "Allows the current owner to transfer control of the contract to a newOwner.",
+ "params": {
+ "newOwner": "The address to transfer ownership to."
+ }
+ },
+ "transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)": {
+ "params": {
+ "from": "Payer's address (Authorizer)",
+ "nonce": "Unique nonce",
+ "r": "r of the signature",
+ "s": "s of the signature",
+ "to": "Payee's address",
+ "v": "v of the signature",
+ "validAfter": "The time after which this is valid (unix time)",
+ "validBefore": "The time before which this is valid (unix time)",
+ "value": "Amount to be transferred"
+ }
+ },
+ "unBlacklist(address)": {
+ "details": "Removes account from blacklist",
+ "params": {
+ "_account": "The address to remove from the blacklist"
+ }
+ },
+ "unpause()": {
+ "details": "called by the owner to unpause, returns to normal state"
+ },
+ "updatePauser(address)": {
+ "details": "update the pauser role"
+ },
+ "updateRescuer(address)": {
+ "params": {
+ "newRescuer": "New rescuer's address"
+ }
+ },
+ "version()": {
+ "returns": {
+ "_0": "Version string"
+ }
+ }
+ },
+ "version": 1
+ },
+ "userdoc": {
+ "kind": "user",
+ "methods": {
+ "allowance(address,address)": {
+ "notice": "Amount of remaining tokens spender is allowed to transfer on behalf of the token owner"
+ },
+ "approve(address,uint256)": {
+ "notice": "Set spender's allowance over the caller's tokens to be a given value."
+ },
+ "authorizationState(address,bytes32)": {
+ "notice": "Returns the state of an authorization"
+ },
+ "cancelAuthorization(address,bytes32,uint8,bytes32,bytes32)": {
+ "notice": "Attempt to cancel an authorization"
+ },
+ "decreaseAllowance(address,uint256)": {
+ "notice": "Decrease the allowance by a given decrement"
+ },
+ "increaseAllowance(address,uint256)": {
+ "notice": "Increase the allowance by a given increment"
+ },
+ "initializeV2(string)": {
+ "notice": "Initialize v2"
+ },
+ "initializeV2_1(address)": {
+ "notice": "Initialize v2.1"
+ },
+ "nonces(address)": {
+ "notice": "Nonces for permit"
+ },
+ "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": {
+ "notice": "Update allowance with a signed permit"
+ },
+ "receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)": {
+ "notice": "Receive a transfer with a signed authorization from the payer"
+ },
+ "rescueERC20(address,address,uint256)": {
+ "notice": "Rescue ERC20 tokens locked up in this contract."
+ },
+ "rescuer()": {
+ "notice": "Returns current rescuer"
+ },
+ "transfer(address,uint256)": {
+ "notice": "Transfer tokens from the caller"
+ },
+ "transferFrom(address,address,uint256)": {
+ "notice": "Transfer tokens by spending allowance"
+ },
+ "transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)": {
+ "notice": "Execute a transfer with a signed authorization"
+ },
+ "updateRescuer(address)": {
+ "notice": "Assign the rescuer role to a given address."
+ },
+ "version()": {
+ "notice": "Version string for the EIP712 domain separator"
+ }
+ },
+ "version": 1
+ }
+ },
+ "settings": {
+ "remappings": [
+ "ds-test/=lib/forge-std/lib/ds-test/src/",
+ "forge-std/=lib/forge-std/src/"
+ ],
+ "optimizer": {
+ "enabled": true,
+ "runs": 10000000
+ },
+ "metadata": {
+ "bytecodeHash": "ipfs"
+ },
+ "compilationTarget": {
+ "src/FiatTokenV2_1/centre-tokens/contracts/v2/FiatTokenV2_1.sol": "FiatTokenV2_1"
+ },
+ "libraries": {}
+ },
+ "sources": {
+ "src/FiatTokenV2_1/centre-tokens/contracts/util/ECRecover.sol": {
+ "keccak256": "0xb4e623304daaf25e40292e60a814ae60a60745d10003f1881a36be763dbc09aa",
+ "urls": [
+ "bzz-raw://d6ef83bd777bfb13b0968b9cadd971216a95150427fa5d6b50f984e4b7268d31",
+ "dweb:/ipfs/QmZS5TeT6n7tM36PBdYZNJW3wgYgAZE9zMcouNs4FuEDKj"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/centre-tokens/contracts/util/EIP712.sol": {
+ "keccak256": "0x39319612a776e16f355d5ab71575b68c427a058839544f032733df228b5debd1",
+ "urls": [
+ "bzz-raw://d5ac6450e881a4275f4b5baf7b5d6e15c0a0c7c2039edf39f106e0b821c9829d",
+ "dweb:/ipfs/QmShHneDasAXQzjA8iKWXk3sbZgxbQGPiMQ1MUpJGF64N8"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/centre-tokens/contracts/v1.1/FiatTokenV1_1.sol": {
+ "keccak256": "0xa5f8fc4b5e739ddcafe52dd76ebb7605e09eb9d52a5c1d77e48dd88e83106308",
+ "urls": [
+ "bzz-raw://24543f05d3eb4768ee9798768cb6c9ce8b88d30606a5def83118ad1ba9382ac8",
+ "dweb:/ipfs/QmYREtrAvoxn6DKXehJPP1pbs8vciqMvRHVk2eFKLtmKVT"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/centre-tokens/contracts/v1.1/Rescuable.sol": {
+ "keccak256": "0x8c02b979e06aa4133c93e47c743ebebd56d120dd10aeaf56b2da2a36f06b68b1",
+ "urls": [
+ "bzz-raw://9d73d6f98bd494500a414ca616eabe9ad6e99f283e00a471bddd7f8ac5825334",
+ "dweb:/ipfs/QmXesAuMcXJiG3r2og7adeT5wBcY6ntFncVUFjNPfEhJC9"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/centre-tokens/contracts/v1/AbstractFiatTokenV1.sol": {
+ "keccak256": "0xb81ae053cff8eced79f29c3542b7693763ed2bfdd9a25d6b150439d21b3fa57d",
+ "urls": [
+ "bzz-raw://e16ce40aef6188334cd0dbc2e3aead22c1f89101d782df821821061d5efa891b",
+ "dweb:/ipfs/QmW2WnaMTzpUityk5Mpv7FFdKCh2CeueJaDneoABGVowVm"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/centre-tokens/contracts/v1/Blacklistable.sol": {
+ "keccak256": "0xc4ff3bfe34c8ecf9f2c333f8373c111fdd4640ed15677c4891bb9cf3cbff9554",
+ "urls": [
+ "bzz-raw://91cfc583d47eda58f356783698a130c1c6adf797c4ba55461598c0bac8159f33",
+ "dweb:/ipfs/QmeWfmhcwUE7H5Ge8TVhWkJ4kDwDY8a4kExMaufukLqsh1"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/centre-tokens/contracts/v1/FiatTokenV1.sol": {
+ "keccak256": "0xaed130ecb4b0714a887dccaaff61321915f2afbf0839ee8af10673507a010471",
+ "urls": [
+ "bzz-raw://3961d2ed8f4f2c69cc4ce0fdb2346b8bd5c09d644627704181fa03b82231ff31",
+ "dweb:/ipfs/Qmb7sdix44isYUaD4TD4QsVmR8d86NN4koiFE6SsjRagGQ"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/centre-tokens/contracts/v1/Ownable.sol": {
+ "keccak256": "0x654e645d6d09616fde908eba4d29abf318fede7e8cc3e31705203fc1d2599217",
+ "urls": [
+ "bzz-raw://fce1ff1458e817aaa5f87d3ef4207fbbdeb25e548d460f47d9cca4fb80175390",
+ "dweb:/ipfs/QmfY7E5xfTyeiuU2nDXEdYfy5LKjGRh69fuKK4HV6YTv9v"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/centre-tokens/contracts/v1/Pausable.sol": {
+ "keccak256": "0x873ce4f17eb8694cd0420ef6682c2da54290fe6e243f21ead37e90f211ac91b6",
+ "urls": [
+ "bzz-raw://7df712210c8bb5fc08e0ff7b684ee4035530cd67b21f20d81766a17407606a3c",
+ "dweb:/ipfs/QmYPFYAw4W8VdcBdknLhqfNfiUuGhGJD3ZZ7rAjrKjhtXd"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/centre-tokens/contracts/v2/AbstractFiatTokenV2.sol": {
+ "keccak256": "0x5d393663d48e4bbb730630c117c2b703dd3c9968833e66dbbb18c92eab207afe",
+ "urls": [
+ "bzz-raw://b0ce642b7ab095d970e3e5d031e5de6b2a98a7ddd20fd94123a42ed81e21757e",
+ "dweb:/ipfs/QmbPixwbbpHS7zBRcJV1idzhaSd1SPRm3LjpywxFnXxR8A"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/centre-tokens/contracts/v2/EIP2612.sol": {
+ "keccak256": "0x8ed169be2f6423b8e7002241857d719e9eb9545f5dbad5209a8f6445132bdbe0",
+ "urls": [
+ "bzz-raw://0646f70d57d072c0569ccbd9b02c922bbb183e6052f94c241c4fef9a267e73bc",
+ "dweb:/ipfs/QmZK3D3qqTMenkdc5EpZSiyxETMpTVpRke61uuRH75ctVk"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/centre-tokens/contracts/v2/EIP3009.sol": {
+ "keccak256": "0x74a81d5b1682cb6716f60c27254e8a15463797e1772b37c884390eb9c7985070",
+ "urls": [
+ "bzz-raw://1d3a6e220c2b8aab8c5070312cc9320ce2b79955b0bddafd99e5feec13851016",
+ "dweb:/ipfs/QmQwc2nZtMKyDcGT8Scnv1R4ThP2Va9trUHnRiqMz4G2WN"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/centre-tokens/contracts/v2/EIP712Domain.sol": {
+ "keccak256": "0x56d8c0259e7f0baa5bb0d0d94810f25d001fb2dbe4eaf54dbe369ba0f1b8fd2b",
+ "urls": [
+ "bzz-raw://9356cfa1d42bfb8c4f84a3db535ab75b2088975bfbda30834d79c3eb678047ea",
+ "dweb:/ipfs/QmSBeiLwNGEC4vnr82EWQinGZFZemxKwxvwLZ9bu48FWF2"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/centre-tokens/contracts/v2/FiatTokenV2.sol": {
+ "keccak256": "0x59654e02023dd9d712bb160545854eae6cba80d707a547f6abfaadcd830af2e7",
+ "urls": [
+ "bzz-raw://e22c43b71ea393e9910bd91a355f711803d6971be25e9dabc702aaefac2a597f",
+ "dweb:/ipfs/QmRjopnHgyKh1mXBDETBaXaom3NJSaacGEJweB5b28BdSE"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/centre-tokens/contracts/v2/FiatTokenV2_1.sol": {
+ "keccak256": "0x6328091a86a3ab02471fba7ff3bf44200f6daf9f0ff3b61fe4043ee14cc1a4f0",
+ "urls": [
+ "bzz-raw://4fed880853c249f6f812ddfa37bf99633b688f0bfd734e03372e4523f6cd2af9",
+ "dweb:/ipfs/QmUMD1SvykvTJ8jmAjnsW13Yo3Wt6KH5dfKRPKCRogLki8"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/openzeppelin/contracts/math/SafeMath.sol": {
+ "keccak256": "0x9a9cf02622cd7a64261b10534fc3260449da25c98c9e96d1b4ae8110a20e5806",
+ "urls": [
+ "bzz-raw://2df142592d1dc267d9549049ee3317fa190d2f87eaa565f86ab05ec83f7ab8f5",
+ "dweb:/ipfs/QmSkJtcfWo7c42KnL5hho6GFxK6HRNV91XABx1P7xDtfLV"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/openzeppelin/contracts/token/ERC20/IERC20.sol": {
+ "keccak256": "0x5c26b39d26f7ed489e555d955dcd3e01872972e71fdd1528e93ec164e4f23385",
+ "urls": [
+ "bzz-raw://efdc632af6960cf865dbc113665ea1f5b90eab75cc40ec062b2f6ae6da582017",
+ "dweb:/ipfs/QmfAZFDuG62vxmAN9DnXApv7e7PMzPqi4RkqqZHLMSQiY5"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/openzeppelin/contracts/token/ERC20/SafeERC20.sol": {
+ "keccak256": "0xf3b30f8a49631420635a8c35daacfcaa338012755f18a76fdd118730256f9a27",
+ "urls": [
+ "bzz-raw://0d7de652204c2ee291a61aa984103dfc7ae4392d651fbbc44a0079caee7c69a3",
+ "dweb:/ipfs/Qmcw1cQnq9eWDnrCBwU3TNyqLfTMUFg5YKpYUkELoMPuUE"
+ ],
+ "license": "MIT"
+ },
+ "src/FiatTokenV2_1/openzeppelin/contracts/utils/Address.sol": {
+ "keccak256": "0xdfb4f812600ba4ce6738c35584ceb8c9433472583051b48ba5b1f66cb758a498",
+ "urls": [
+ "bzz-raw://df02dffe1c1de089d9b4f6192f0dcf464526f2230f420b3deec4645e0cdd2bff",
+ "dweb:/ipfs/QmcqXGAU3KJqwrgUVoGJ2W8osomhSJ4R5kdsRpbuW3fELS"
+ ],
+ "license": "MIT"
+ }
+ },
+ "version": 1
+ },
+ "ast": {
+ "absolutePath": "src/FiatTokenV2_1/centre-tokens/contracts/v2/FiatTokenV2_1.sol",
+ "id": 47381,
+ "exportedSymbols": {
+ "FiatTokenV2_1": [47380]
+ },
+ "nodeType": "SourceUnit",
+ "src": "1154:973:41",
+ "nodes": [
+ {
+ "id": 47316,
+ "nodeType": "PragmaDirective",
+ "src": "1154:23:41",
+ "nodes": [],
+ "literals": ["solidity", "0.6", ".12"]
+ },
+ {
+ "id": 47318,
+ "nodeType": "ImportDirective",
+ "src": "1179:48:41",
+ "nodes": [],
+ "absolutePath": "src/FiatTokenV2_1/centre-tokens/contracts/v2/FiatTokenV2.sol",
+ "file": "./FiatTokenV2.sol",
+ "scope": 47381,
+ "sourceUnit": 47315,
+ "symbolAliases": [
+ {
+ "foreign": {
+ "argumentTypes": null,
+ "id": 47317,
+ "name": "FiatTokenV2",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": null,
+ "src": "1188:11:41",
+ "typeDescriptions": {
+ "typeIdentifier": null,
+ "typeString": null
+ }
+ },
+ "local": null
+ }
+ ],
+ "unitAlias": ""
+ },
+ {
+ "id": 47380,
+ "nodeType": "ContractDefinition",
+ "src": "1362:764:41",
+ "nodes": [
+ {
+ "id": 47370,
+ "nodeType": "FunctionDefinition",
+ "src": "1528:398:41",
+ "nodes": [],
+ "body": {
+ "id": 47369,
+ "nodeType": "Block",
+ "src": "1583:343:41",
+ "nodes": [],
+ "statements": [
+ {
+ "expression": {
+ "argumentTypes": null,
+ "arguments": [
+ {
+ "argumentTypes": null,
+ "commonType": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ },
+ "id": 47330,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "argumentTypes": null,
+ "id": 47328,
+ "name": "_initializedVersion",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 47025,
+ "src": "1652:19:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": "==",
+ "rightExpression": {
+ "argumentTypes": null,
+ "hexValue": "31",
+ "id": 47329,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "1675:1:41",
+ "subdenomination": null,
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_1_by_1",
+ "typeString": "int_const 1"
+ },
+ "value": "1"
+ },
+ "src": "1652:24:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ ],
+ "id": 47327,
+ "name": "require",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [-18, -18],
+ "referencedDeclaration": -18,
+ "src": "1644:7:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$",
+ "typeString": "function (bool) pure"
+ }
+ },
+ "id": 47331,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "1644:33:41",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 47332,
+ "nodeType": "ExpressionStatement",
+ "src": "1644:33:41"
+ },
+ {
+ "assignments": [47334],
+ "declarations": [
+ {
+ "constant": false,
+ "id": 47334,
+ "mutability": "mutable",
+ "name": "lockedAmount",
+ "nodeType": "VariableDeclaration",
+ "overrides": null,
+ "scope": 47369,
+ "src": "1688:20:41",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "typeName": {
+ "id": 47333,
+ "name": "uint256",
+ "nodeType": "ElementaryTypeName",
+ "src": "1688:7:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "value": null,
+ "visibility": "internal"
+ }
+ ],
+ "id": 47341,
+ "initialValue": {
+ "argumentTypes": null,
+ "baseExpression": {
+ "argumentTypes": null,
+ "id": 47335,
+ "name": "balances",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 45622,
+ "src": "1711:8:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
+ "typeString": "mapping(address => uint256)"
+ }
+ },
+ "id": 47340,
+ "indexExpression": {
+ "argumentTypes": null,
+ "arguments": [
+ {
+ "argumentTypes": null,
+ "id": 47338,
+ "name": "this",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -28,
+ "src": "1728:4:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_FiatTokenV2_1_$47380",
+ "typeString": "contract FiatTokenV2_1"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_FiatTokenV2_1_$47380",
+ "typeString": "contract FiatTokenV2_1"
+ }
+ ],
+ "id": 47337,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "1720:7:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 47336,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1720:7:41",
+ "typeDescriptions": {
+ "typeIdentifier": null,
+ "typeString": null
+ }
+ }
+ },
+ "id": 47339,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "1720:13:41",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": false,
+ "nodeType": "IndexAccess",
+ "src": "1711:23:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "nodeType": "VariableDeclarationStatement",
+ "src": "1688:46:41"
+ },
+ {
+ "condition": {
+ "argumentTypes": null,
+ "commonType": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ },
+ "id": 47344,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftExpression": {
+ "argumentTypes": null,
+ "id": 47342,
+ "name": "lockedAmount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 47334,
+ "src": "1748:12:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ },
+ "nodeType": "BinaryOperation",
+ "operator": ">",
+ "rightExpression": {
+ "argumentTypes": null,
+ "hexValue": "30",
+ "id": 47343,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "1763:1:41",
+ "subdenomination": null,
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_0_by_1",
+ "typeString": "int_const 0"
+ },
+ "value": "0"
+ },
+ "src": "1748:16:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "falseBody": null,
+ "id": 47355,
+ "nodeType": "IfStatement",
+ "src": "1744:99:41",
+ "trueBody": {
+ "id": 47354,
+ "nodeType": "Block",
+ "src": "1766:77:41",
+ "statements": [
+ {
+ "expression": {
+ "argumentTypes": null,
+ "arguments": [
+ {
+ "argumentTypes": null,
+ "arguments": [
+ {
+ "argumentTypes": null,
+ "id": 47348,
+ "name": "this",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -28,
+ "src": "1798:4:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_FiatTokenV2_1_$47380",
+ "typeString": "contract FiatTokenV2_1"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_FiatTokenV2_1_$47380",
+ "typeString": "contract FiatTokenV2_1"
+ }
+ ],
+ "id": 47347,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "1790:7:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 47346,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1790:7:41",
+ "typeDescriptions": {
+ "typeIdentifier": null,
+ "typeString": null
+ }
+ }
+ },
+ "id": 47349,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "1790:13:41",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "argumentTypes": null,
+ "id": 47350,
+ "name": "lostAndFound",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 47324,
+ "src": "1805:12:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ {
+ "argumentTypes": null,
+ "id": 47351,
+ "name": "lockedAmount",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 47334,
+ "src": "1819:12:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ {
+ "typeIdentifier": "t_uint256",
+ "typeString": "uint256"
+ }
+ ],
+ "id": 47345,
+ "name": "_transfer",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [46200],
+ "referencedDeclaration": 46200,
+ "src": "1780:9:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$",
+ "typeString": "function (address,address,uint256)"
+ }
+ },
+ "id": 47352,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "functionCall",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "1780:52:41",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_tuple$__$",
+ "typeString": "tuple()"
+ }
+ },
+ "id": 47353,
+ "nodeType": "ExpressionStatement",
+ "src": "1780:52:41"
+ }
+ ]
+ }
+ },
+ {
+ "expression": {
+ "argumentTypes": null,
+ "id": 47363,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "argumentTypes": null,
+ "baseExpression": {
+ "argumentTypes": null,
+ "id": 47356,
+ "name": "blacklisted",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 45464,
+ "src": "1852:11:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
+ "typeString": "mapping(address => bool)"
+ }
+ },
+ "id": 47361,
+ "indexExpression": {
+ "argumentTypes": null,
+ "arguments": [
+ {
+ "argumentTypes": null,
+ "id": 47359,
+ "name": "this",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": -28,
+ "src": "1872:4:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_FiatTokenV2_1_$47380",
+ "typeString": "contract FiatTokenV2_1"
+ }
+ }
+ ],
+ "expression": {
+ "argumentTypes": [
+ {
+ "typeIdentifier": "t_contract$_FiatTokenV2_1_$47380",
+ "typeString": "contract FiatTokenV2_1"
+ }
+ ],
+ "id": 47358,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "lValueRequested": false,
+ "nodeType": "ElementaryTypeNameExpression",
+ "src": "1864:7:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_type$_t_address_$",
+ "typeString": "type(address)"
+ },
+ "typeName": {
+ "id": 47357,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1864:7:41",
+ "typeDescriptions": {
+ "typeIdentifier": null,
+ "typeString": null
+ }
+ }
+ },
+ "id": 47360,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "kind": "typeConversion",
+ "lValueRequested": false,
+ "names": [],
+ "nodeType": "FunctionCall",
+ "src": "1864:13:41",
+ "tryCall": false,
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "isConstant": false,
+ "isLValue": true,
+ "isPure": false,
+ "lValueRequested": true,
+ "nodeType": "IndexAccess",
+ "src": "1852:26:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "argumentTypes": null,
+ "hexValue": "74727565",
+ "id": 47362,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "bool",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "1881:4:41",
+ "subdenomination": null,
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ },
+ "value": "true"
+ },
+ "src": "1852:33:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_bool",
+ "typeString": "bool"
+ }
+ },
+ "id": 47364,
+ "nodeType": "ExpressionStatement",
+ "src": "1852:33:41"
+ },
+ {
+ "expression": {
+ "argumentTypes": null,
+ "id": 47367,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": false,
+ "lValueRequested": false,
+ "leftHandSide": {
+ "argumentTypes": null,
+ "id": 47365,
+ "name": "_initializedVersion",
+ "nodeType": "Identifier",
+ "overloadedDeclarations": [],
+ "referencedDeclaration": 47025,
+ "src": "1896:19:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "nodeType": "Assignment",
+ "operator": "=",
+ "rightHandSide": {
+ "argumentTypes": null,
+ "hexValue": "32",
+ "id": 47366,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "number",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "1918:1:41",
+ "subdenomination": null,
+ "typeDescriptions": {
+ "typeIdentifier": "t_rational_2_by_1",
+ "typeString": "int_const 2"
+ },
+ "value": "2"
+ },
+ "src": "1896:23:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_uint8",
+ "typeString": "uint8"
+ }
+ },
+ "id": 47368,
+ "nodeType": "ExpressionStatement",
+ "src": "1896:23:41"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 47322,
+ "nodeType": "StructuredDocumentation",
+ "src": "1406:117:41",
+ "text": " @notice Initialize v2.1\n @param lostAndFound The address to which the locked funds are sent"
+ },
+ "functionSelector": "2fc81e09",
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "initializeV2_1",
+ "overrides": null,
+ "parameters": {
+ "id": 47325,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 47324,
+ "mutability": "mutable",
+ "name": "lostAndFound",
+ "nodeType": "VariableDeclaration",
+ "overrides": null,
+ "scope": 47370,
+ "src": "1552:20:41",
+ "stateVariable": false,
+ "storageLocation": "default",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ },
+ "typeName": {
+ "id": 47323,
+ "name": "address",
+ "nodeType": "ElementaryTypeName",
+ "src": "1552:7:41",
+ "stateMutability": "nonpayable",
+ "typeDescriptions": {
+ "typeIdentifier": "t_address",
+ "typeString": "address"
+ }
+ },
+ "value": null,
+ "visibility": "internal"
+ }
+ ],
+ "src": "1551:22:41"
+ },
+ "returnParameters": {
+ "id": 47326,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "1583:0:41"
+ },
+ "scope": 47380,
+ "stateMutability": "nonpayable",
+ "virtual": false,
+ "visibility": "external"
+ },
+ {
+ "id": 47379,
+ "nodeType": "FunctionDefinition",
+ "src": "2040:84:41",
+ "nodes": [],
+ "body": {
+ "id": 47378,
+ "nodeType": "Block",
+ "src": "2097:27:41",
+ "nodes": [],
+ "statements": [
+ {
+ "expression": {
+ "argumentTypes": null,
+ "hexValue": "32",
+ "id": 47376,
+ "isConstant": false,
+ "isLValue": false,
+ "isPure": true,
+ "kind": "string",
+ "lValueRequested": false,
+ "nodeType": "Literal",
+ "src": "2114:3:41",
+ "subdenomination": null,
+ "typeDescriptions": {
+ "typeIdentifier": "t_stringliteral_ad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5",
+ "typeString": "literal_string \"2\""
+ },
+ "value": "2"
+ },
+ "functionReturnParameters": 47375,
+ "id": 47377,
+ "nodeType": "Return",
+ "src": "2107:10:41"
+ }
+ ]
+ },
+ "documentation": {
+ "id": 47371,
+ "nodeType": "StructuredDocumentation",
+ "src": "1932:103:41",
+ "text": " @notice Version string for the EIP712 domain separator\n @return Version string"
+ },
+ "functionSelector": "54fd4d50",
+ "implemented": true,
+ "kind": "function",
+ "modifiers": [],
+ "name": "version",
+ "overrides": null,
+ "parameters": {
+ "id": 47372,
+ "nodeType": "ParameterList",
+ "parameters": [],
+ "src": "2056:2:41"
+ },
+ "returnParameters": {
+ "id": 47375,
+ "nodeType": "ParameterList",
+ "parameters": [
+ {
+ "constant": false,
+ "id": 47374,
+ "mutability": "mutable",
+ "name": "",
+ "nodeType": "VariableDeclaration",
+ "overrides": null,
+ "scope": 47379,
+ "src": "2082:13:41",
+ "stateVariable": false,
+ "storageLocation": "memory",
+ "typeDescriptions": {
+ "typeIdentifier": "t_string_memory_ptr",
+ "typeString": "string"
+ },
+ "typeName": {
+ "id": 47373,
+ "name": "string",
+ "nodeType": "ElementaryTypeName",
+ "src": "2082:6:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_string_storage_ptr",
+ "typeString": "string"
+ }
+ },
+ "value": null,
+ "visibility": "internal"
+ }
+ ],
+ "src": "2081:15:41"
+ },
+ "scope": 47380,
+ "stateMutability": "view",
+ "virtual": false,
+ "visibility": "external"
+ }
+ ],
+ "abstract": false,
+ "baseContracts": [
+ {
+ "arguments": null,
+ "baseName": {
+ "contractScope": null,
+ "id": 47320,
+ "name": "FiatTokenV2",
+ "nodeType": "UserDefinedTypeName",
+ "referencedDeclaration": 47314,
+ "src": "1388:11:41",
+ "typeDescriptions": {
+ "typeIdentifier": "t_contract$_FiatTokenV2_$47314",
+ "typeString": "contract FiatTokenV2"
+ }
+ },
+ "id": 47321,
+ "nodeType": "InheritanceSpecifier",
+ "src": "1388:11:41"
+ }
+ ],
+ "contractDependencies": [
+ 45337, 45426, 45451, 45582, 46359, 46443, 46543, 46568, 46663, 46995,
+ 47002, 47314, 47654
+ ],
+ "contractKind": "contract",
+ "documentation": {
+ "id": 47319,
+ "nodeType": "StructuredDocumentation",
+ "src": "1269:92:41",
+ "text": " @title FiatToken V2.1\n @notice ERC20 Token backed by fiat reserves, version 2.1"
+ },
+ "fullyImplemented": true,
+ "linearizedBaseContracts": [
+ 47380, 47314, 46663, 46995, 47002, 46568, 45337, 45426, 46359, 45582,
+ 46543, 46443, 45451, 47654
+ ],
+ "name": "FiatTokenV2_1",
+ "scope": 47381
+ }
+ ],
+ "license": "MIT"
+ },
+ "id": 41
+}
diff --git a/packages/protocol/contracts/compiled/README.md b/packages/protocol/contracts/compiled/README.md
new file mode 100644
index 00000000000..076670757c3
--- /dev/null
+++ b/packages/protocol/contracts/compiled/README.md
@@ -0,0 +1,24 @@
+## About the compiled contracts
+
+Following Circle's recommendation for native token support (USDC, EURC), one needs to follow the standard proposed below:
+
+https://github.com/circlefin/stablecoin-evm/blob/master/doc/bridged_USDC_standard.md
+
+According to this document:
+
+> The third-party team’s bridged USDC token contract is expected to be identical to native USDC token contracts on other EVM blockchains. USDC uses a proxy pattern, so the standard applies to both the implementation contract code and the token proxy.
+>
+> Using identical code facilitates trustless contract verification by Circle and supports a seamless integration with existing USDC services. To facilitate this, the third-party team may choose one of the following:
+>
+> Copy previously deployed bytecode from a recent, native USDC token contract deployment (both proxy and implementation) on an EVM blockchain, for example Arbitrum, Base, OP Mainnet, or Polygon PoS Note that you must supply different constructor and initializer parameters where needed.
+>
+> Build the FiatToken contracts from source. In this case, the compiler metadata must be published or made available to support full contract verification. Various suggested compiler settings that Circle uses can be found here, which will allow the third-party team to reach the same bytecode if followed consistently.
+
+Following the recommendations the contracts were built with the same compiler settings (version + optimization) and they have bytecode equivalance with the other contracts (mentioned in the doc, and can be found on links below (Arbitrum, Scroll, Polygon, etc.)).
+
+For reference, here are Arbitrum's proxy + token contracts:
+
+- Proxy: https://arbiscan.io/token/0xaf88d065e77c8cc2239327c5edb3a432268e5831#code
+- Implementation: https://arbiscan.io/address/0x0f4fb9474303d10905AB86aA8d5A65FE44b6E04A#code
+
+As a cross-reference, one can compare the bytecode of the ones present on arbiscan and here in the .json files (under bytcode key), the additional (meta)data could be helpful for contracts verfication.
diff --git a/packages/protocol/contracts/libs/Lib1559Math.sol b/packages/protocol/contracts/libs/Lib1559Math.sol
deleted file mode 100644
index 1a1e4baec71..00000000000
--- a/packages/protocol/contracts/libs/Lib1559Math.sol
+++ /dev/null
@@ -1,95 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { LibFixedPointMath } from "../thirdparty/LibFixedPointMath.sol";
-import { SafeCastUpgradeable } from
- "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
-
-/// @title Lib1559Math
-/// @dev This library provides utilities related to the L2 EIP-1559
-/// implementation.
-/// Additional info about the arithmetic formula:
-/// https://github.com/taikoxyz/taiko-mono/blob/main/packages/protocol/docs/L2EIP1559.md
-library Lib1559Math {
- using SafeCastUpgradeable for uint256;
-
- error L2_1559_UNEXPECTED_CHANGE(uint64 expected, uint64 actual);
- error L2_1559_OUT_OF_STOCK();
-
- /// @dev Calculates xscale and yscale values used for pricing.
- /// @param xExcessMax The maximum excess value.
- /// @param price The current price.
- /// @param target The target gas value.
- /// @param ratio2x1x Expected ratio of gas price for two blocks.
- /// @return xscale Calculated x scale value.
- /// @return yscale Calculated y scale value.
- function calculateScales(
- uint64 xExcessMax,
- uint64 price,
- uint64 target,
- uint64 ratio2x1x
- )
- internal
- pure
- returns (uint128 xscale, uint128 yscale)
- {
- assert(xExcessMax != 0);
- uint64 x = xExcessMax / 2;
-
- // Calculate xscale
- xscale = LibFixedPointMath.MAX_EXP_INPUT / xExcessMax;
-
- // Calculate yscale
- yscale = calculatePrice(xscale, price, x, target).toUint128();
-
- // Verify the gas price ratio between two blocks, one has
- // target * 2 gas and the other one has target gas.
- uint256 price1x = calculatePrice(xscale, yscale, x, target);
- uint256 price2x = calculatePrice(xscale, yscale, x, target * 2);
- uint64 ratio = uint64((price2x * 10_000) / price1x);
-
- if (ratio2x1x != ratio) {
- revert L2_1559_UNEXPECTED_CHANGE(ratio2x1x, ratio);
- }
- }
-
- /// @dev Calculates the price based on provided scales.
- /// @param xscale The x scale value.
- /// @param yscale The y scale value.
- /// @param xExcess Current excess value.
- /// @param xPurchase Amount of gas purchased.
- /// @return The calculated price.
- function calculatePrice(
- uint128 xscale,
- uint128 yscale,
- uint64 xExcess,
- uint64 xPurchase
- )
- internal
- pure
- returns (uint256)
- {
- assert(xscale != 0 && yscale != 0);
- uint64 _xPurchase = xPurchase == 0 ? 1 : xPurchase;
- uint256 _before = _calcY(xExcess, xscale);
- uint256 _after = _calcY(xExcess + _xPurchase, xscale);
- return (_after - _before) / _xPurchase / yscale;
- }
-
- /// @dev Internal function to calculate y value based on x value and scale.
- /// @param x The x value.
- /// @param xscale The x scale value.
- /// @return The calculated y value.
- function _calcY(uint256 x, uint128 xscale) private pure returns (uint256) {
- uint256 _x = x * xscale;
- if (_x >= LibFixedPointMath.MAX_EXP_INPUT) {
- revert L2_1559_OUT_OF_STOCK();
- }
- return uint256(LibFixedPointMath.exp(int256(_x)));
- }
-}
diff --git a/packages/protocol/contracts/libs/LibAddress.sol b/packages/protocol/contracts/libs/LibAddress.sol
index 3aabb8e2d1f..a865732508e 100644
--- a/packages/protocol/contracts/libs/LibAddress.sol
+++ b/packages/protocol/contracts/libs/LibAddress.sol
@@ -6,27 +6,41 @@
pragma solidity ^0.8.20;
-import { IERC165Upgradeable } from
- "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol";
+import "lib/openzeppelin-contracts/contracts/utils/Address.sol";
+import "lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol";
+import "lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol";
+import "lib/openzeppelin-contracts/contracts/interfaces/IERC1271.sol";
/// @title LibAddress
/// @dev Provides utilities for address-related operations.
library LibAddress {
- /// @dev Sends Ether to the specified address. It is recommended to avoid
- /// using `.transfer()` due to potential reentrancy issues.
- /// Reference:
- /// https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now
+ bytes4 private constant EIP1271_MAGICVALUE = 0x1626ba7e;
+
+ error ETH_TRANSFER_FAILED();
+
+ /// @dev Sends Ether to the specified address.
/// @param to The recipient address.
/// @param amount The amount of Ether to send in wei.
- function sendEther(address to, uint256 amount) internal {
+ /// @param gasLimit The max amount gas to pay for this transaction.
+ function sendEther(address to, uint256 amount, uint256 gasLimit) internal {
// Check for zero-value or zero-address transactions
- if (amount == 0 || to == address(0)) return;
+ if (to == address(0)) revert ETH_TRANSFER_FAILED();
// Attempt to send Ether to the recipient address
- (bool success,) = payable(to).call{ value: amount }("");
+ // WARNING: call() functions do not have an upper gas cost limit, so
+ // it's important to note that it may not reliably execute as expected
+ // when invoked with untrusted addresses.
+ (bool success,) = payable(to).call{ value: amount, gas: gasLimit }("");
// Ensure the transfer was successful
- require(success, "ETH transfer failed");
+ if (!success) revert ETH_TRANSFER_FAILED();
+ }
+
+ /// @dev Sends Ether to the specified address.
+ /// @param to The recipient address.
+ /// @param amount The amount of Ether to send in wei.
+ function sendEther(address to, uint256 amount) internal {
+ sendEther(to, amount, gasleft());
}
function supportsInterface(
@@ -37,10 +51,30 @@ library LibAddress {
view
returns (bool result)
{
- try IERC165Upgradeable(addr).supportsInterface(interfaceId) returns (
- bool _result
- ) {
+ if (!Address.isContract(addr)) return false;
+
+ try IERC165(addr).supportsInterface(interfaceId) returns (bool _result) {
result = _result;
} catch { }
}
+
+ function isValidSignature(
+ address addr,
+ bytes32 hash,
+ bytes memory sig
+ )
+ internal
+ view
+ returns (bool valid)
+ {
+ if (Address.isContract(addr)) {
+ return IERC1271(addr).isValidSignature(hash, sig) == EIP1271_MAGICVALUE;
+ } else {
+ return ECDSA.recover(hash, sig) == addr;
+ }
+ }
+
+ function isSenderEOA() internal view returns (bool) {
+ return msg.sender == tx.origin;
+ }
}
diff --git a/packages/protocol/contracts/libs/LibBlockHeader.sol b/packages/protocol/contracts/libs/LibBlockHeader.sol
deleted file mode 100644
index c2becfd739c..00000000000
--- a/packages/protocol/contracts/libs/LibBlockHeader.sol
+++ /dev/null
@@ -1,96 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { LibRLPWriter } from "../thirdparty/LibRLPWriter.sol";
-
-/// @dev Defines the data structure for an Ethereum block header.
-struct BlockHeader {
- bytes32 parentHash;
- bytes32 ommersHash;
- address proposer;
- bytes32 stateRoot;
- bytes32 transactionsRoot;
- bytes32 receiptsRoot;
- bytes32[8] logsBloom;
- uint256 difficulty;
- uint128 height;
- uint64 gasLimit;
- uint64 gasUsed;
- uint64 timestamp;
- bytes extraData;
- bytes32 mixHash;
- uint64 nonce;
- uint256 baseFeePerGas;
- bytes32 withdrawalsRoot;
-}
-
-/// @title LibBlockHeader
-/// @dev Provides utilities for Ethereum block headers.
-library LibBlockHeader {
- /// @dev Returns the hash of a block header.
- /// @param header The block header.
- /// @return The hash of the block header.
- function hashBlockHeader(BlockHeader memory header)
- internal
- pure
- returns (bytes32)
- {
- bytes memory rlpHeader =
- LibRLPWriter.writeList(_getBlockHeaderRLPItemsList(header, 0));
- return keccak256(rlpHeader);
- }
-
- /// @dev Constructs the RLP item list for a block header.
- /// @param header The block header.
- /// @param extraCapacity Additional capacity for the list.
- /// @return list The RLP item list for the block header.
- function _getBlockHeaderRLPItemsList(
- BlockHeader memory header,
- uint256 extraCapacity
- )
- private
- pure
- returns (bytes[] memory list)
- {
- if (header.withdrawalsRoot != 0) {
- // EIP-4895 transaction
- list = new bytes[](17 + extraCapacity);
- } else if (header.baseFeePerGas != 0) {
- // EIP-1559 transaction
- list = new bytes[](16 + extraCapacity);
- } else {
- // non-EIP-1559 transaction
- list = new bytes[](15 + extraCapacity);
- }
- list[0] = LibRLPWriter.writeHash(header.parentHash);
- list[1] = LibRLPWriter.writeHash(header.ommersHash);
- list[2] = LibRLPWriter.writeAddress(header.proposer);
- list[3] = LibRLPWriter.writeHash(header.stateRoot);
- list[4] = LibRLPWriter.writeHash(header.transactionsRoot);
- list[5] = LibRLPWriter.writeHash(header.receiptsRoot);
- list[6] = LibRLPWriter.writeBytes(abi.encodePacked(header.logsBloom));
- list[7] = LibRLPWriter.writeUint(header.difficulty);
- list[8] = LibRLPWriter.writeUint(header.height);
- list[9] = LibRLPWriter.writeUint64(header.gasLimit);
- list[10] = LibRLPWriter.writeUint64(header.gasUsed);
- list[11] = LibRLPWriter.writeUint64(header.timestamp);
- list[12] = LibRLPWriter.writeBytes(header.extraData);
- list[13] = LibRLPWriter.writeHash(header.mixHash);
- // According to the Ethereum yellow paper, we should treat `nonce`
- // as [8]byte when hashing the block.
- list[14] = LibRLPWriter.writeBytes(abi.encodePacked(header.nonce));
- if (header.baseFeePerGas != 0) {
- // EIP-1559 transaction
- list[15] = LibRLPWriter.writeUint(header.baseFeePerGas);
- }
- if (header.withdrawalsRoot != 0) {
- // EIP-4895 transaction
- list[16] = LibRLPWriter.writeHash(header.withdrawalsRoot);
- }
- }
-}
diff --git a/packages/protocol/contracts/libs/LibDeploy.sol b/packages/protocol/contracts/libs/LibDeploy.sol
new file mode 100644
index 00000000000..98f2eceee8e
--- /dev/null
+++ b/packages/protocol/contracts/libs/LibDeploy.sol
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol";
+import "lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol";
+
+/// @title LibDeploy
+/// @dev Provides utilities for deploying contracts
+library LibDeploy {
+ error NULL_IMPL_ADDR();
+
+ function deployERC1967Proxy(
+ address impl,
+ address owner,
+ bytes memory data
+ )
+ internal
+ returns (address proxy)
+ {
+ if (impl == address(0)) revert NULL_IMPL_ADDR();
+ proxy = address(new ERC1967Proxy(impl, data));
+
+ if (owner != address(0) && owner != OwnableUpgradeable(proxy).owner()) {
+ OwnableUpgradeable(proxy).transferOwnership(owner);
+ }
+ }
+}
diff --git a/packages/protocol/contracts/libs/LibTrieProof.sol b/packages/protocol/contracts/libs/LibTrieProof.sol
deleted file mode 100644
index dfc87b63eb6..00000000000
--- a/packages/protocol/contracts/libs/LibTrieProof.sol
+++ /dev/null
@@ -1,71 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { LibRLPReader } from "../thirdparty/LibRLPReader.sol";
-import { LibRLPWriter } from "../thirdparty/LibRLPWriter.sol";
-import { LibSecureMerkleTrie } from "../thirdparty/LibSecureMerkleTrie.sol";
-
-/// @title LibTrieProof
-/// @dev This library is used for verifying the proof of values within the
-/// storage trie of an Ethereum account.
-library LibTrieProof {
- // Constant defining the index for the storage hash in the RLP-encoded
- // account structure.
- // It follows the order: nonce, balance, storageHash, codeHash.
- uint256 private constant ACCOUNT_FIELD_INDEX_STORAGE_HASH = 2;
-
- error INVALID_ACCOUNT_PROOF();
-
- /// @dev Verifies that the value of a specific slot in the storage of an
- /// account equals the given value.
- /// @param stateRoot The merkle root of the state tree.
- /// @param addr The address of the account.
- /// @param slot The specific slot within the storage of the contract.
- /// @param value The value to be verified against the proof.
- /// @param mkproof The concatenated proof containing both account and
- /// storage proofs.
- /// @return verified Boolean result indicating if the proof is valid.
- function verifyWithFullMerkleProof(
- bytes32 stateRoot,
- address addr,
- bytes32 slot,
- bytes32 value,
- bytes calldata mkproof
- )
- public
- pure
- returns (bool)
- {
- // Decoding the proof into account and storage proofs
- (bytes memory accountProof, bytes memory storageProof) =
- abi.decode(mkproof, (bytes, bytes));
-
- // Retrieving the RLP-encoded account and verifying existence
- (bool exists, bytes memory rlpAccount) = LibSecureMerkleTrie.get(
- abi.encodePacked(addr), accountProof, stateRoot
- );
-
- if (!exists) revert INVALID_ACCOUNT_PROOF();
-
- // Reading the RLP-encoded account into a structured list
- LibRLPReader.RLPItem[] memory accountState =
- LibRLPReader.readList(rlpAccount);
- // Extracting the storage root from the RLP-encoded account
- bytes32 storageRoot = LibRLPReader.readBytes32(
- accountState[ACCOUNT_FIELD_INDEX_STORAGE_HASH]
- );
-
- // Verifying the inclusion proof for the value within the storage root
- return LibSecureMerkleTrie.verifyInclusionProof(
- abi.encodePacked(slot),
- LibRLPWriter.writeBytes32(value),
- storageProof,
- storageRoot
- );
- }
-}
diff --git a/packages/protocol/contracts/signal/ISignalService.sol b/packages/protocol/contracts/signal/ISignalService.sol
index f5c43c92411..8b7b54a4229 100644
--- a/packages/protocol/contracts/signal/ISignalService.sol
+++ b/packages/protocol/contracts/signal/ISignalService.sol
@@ -20,21 +20,13 @@ interface ISignalService {
/// of 1.
/// @param signal The signal (message) to send.
/// @return storageSlot The location in storage where this signal is stored.
- function sendSignal(bytes32 signal)
- external
- returns (bytes32 storageSlot);
+ function sendSignal(bytes32 signal) external returns (bytes32 storageSlot);
/// @notice Verifies if a particular signal has already been sent.
/// @param app The address that initiated the signal.
/// @param signal The signal (message) to send.
/// @return True if the signal has been sent, otherwise false.
- function isSignalSent(
- address app,
- bytes32 signal
- )
- external
- view
- returns (bool);
+ function isSignalSent(address app, bytes32 signal) external view returns (bool);
/// @notice Verifies if a signal has been received on the target chain.
/// @param srcChainId The identifier for the source chain from which the
@@ -44,8 +36,8 @@ interface ISignalService {
/// @param proof Merkle proof that the signal was persisted on the
/// source chain.
/// @return True if the signal has been received, otherwise false.
- function isSignalReceived(
- uint256 srcChainId,
+ function proveSignalReceived(
+ uint64 srcChainId,
address app,
bytes32 signal,
bytes calldata proof
diff --git a/packages/protocol/contracts/signal/SignalService.sol b/packages/protocol/contracts/signal/SignalService.sol
index 9b770cda67d..9ba3918e1e7 100644
--- a/packages/protocol/contracts/signal/SignalService.sol
+++ b/packages/protocol/contracts/signal/SignalService.sol
@@ -6,68 +6,62 @@
pragma solidity ^0.8.20;
-import { EssentialContract } from "../common/EssentialContract.sol";
-import { ICrossChainSync } from "../common/ICrossChainSync.sol";
-import { ISignalService } from "./ISignalService.sol";
-import { LibSecureMerkleTrie } from "../thirdparty/LibSecureMerkleTrie.sol";
-import { Proxied } from "../common/Proxied.sol";
+import "lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol";
+import "../common/AuthorizableContract.sol";
+import "../common/ICrossChainSync.sol";
+import "../thirdparty/LibSecureMerkleTrie.sol";
+import "./ISignalService.sol";
/// @title SignalService
+/// @dev Labeled in AddressResolver as "signal_service"
/// @notice See the documentation in {ISignalService} for more details.
-contract SignalService is ISignalService, EssentialContract {
- struct SignalProof {
- uint64 height;
- bytes proof; // A storage proof
- }
-
- error B_ZERO_SIGNAL();
- error B_NULL_APP_ADDR();
- error B_WRONG_CHAIN_ID();
+///
+/// @dev Authorization Guide for Multi-Hop Bridging:
+/// For facilitating multi-hop bridging, authorize all deployed TaikoL1 and
+/// TaikoL2 contracts involved in the bridging path.
+/// Use the respective chain IDs as labels for authorization.
+/// Note: SignalService should not authorize Bridges or other Bridgable
+/// applications.
+contract SignalService is AuthorizableContract, ISignalService {
+ using SafeCast for uint256;
- modifier validApp(address app) {
- if (app == address(0)) revert B_NULL_APP_ADDR();
- _;
+ // storageProof represents ABI-encoded tuple of (key, value, and proof)
+ // returned from the eth_getProof() API.
+ struct Hop {
+ address signalRootRelay;
+ bytes32 signalRoot;
+ bytes storageProof;
}
- modifier validSignal(bytes32 signal) {
- if (signal == 0) revert B_ZERO_SIGNAL();
- _;
+ struct Proof {
+ address crossChainSync;
+ uint64 height;
+ bytes storageProof;
+ Hop[] hops;
}
- modifier validChainId(uint256 srcChainId) {
- if (srcChainId == block.chainid) revert B_WRONG_CHAIN_ID();
- _;
- }
+ error SS_INVALID_APP();
+ error SS_INVALID_SIGNAL();
/// @dev Initializer to be called after being deployed behind a proxy.
- function init(address _addressManager) external initializer {
- EssentialContract._init(_addressManager);
+ function init() external initializer {
+ __OwnerUUPSUpgradable_init();
}
/// @inheritdoc ISignalService
- function sendSignal(bytes32 signal)
- public
- validSignal(signal)
- returns (bytes32 storageSlot)
- {
- storageSlot = getSignalSlot(msg.sender, signal);
+ function sendSignal(bytes32 signal) public returns (bytes32 slot) {
+ if (signal == 0) revert SS_INVALID_SIGNAL();
+ slot = getSignalSlot(uint64(block.chainid), msg.sender, signal);
assembly {
- sstore(storageSlot, 1)
+ sstore(slot, 1)
}
}
/// @inheritdoc ISignalService
- function isSignalSent(
- address app,
- bytes32 signal
- )
- public
- view
- validApp(app)
- validSignal(signal)
- returns (bool)
- {
- bytes32 slot = getSignalSlot(app, signal);
+ function isSignalSent(address app, bytes32 signal) public view returns (bool) {
+ if (signal == 0) revert SS_INVALID_SIGNAL();
+ if (app == address(0)) revert SS_INVALID_APP();
+ bytes32 slot = getSignalSlot(uint64(block.chainid), app, signal);
uint256 value;
assembly {
value := sload(slot)
@@ -76,60 +70,92 @@ contract SignalService is ISignalService, EssentialContract {
}
/// @inheritdoc ISignalService
- function isSignalReceived(
- uint256 srcChainId,
+ function proveSignalReceived(
+ uint64 srcChainId,
address app,
bytes32 signal,
bytes calldata proof
)
public
view
- validChainId(srcChainId)
- validApp(app)
- validSignal(signal)
returns (bool)
{
- SignalProof memory signalProof = abi.decode(proof, (SignalProof));
- bytes32 syncedSignalRoot = ICrossChainSync(resolve("taiko", false))
- .getCrossChainSignalRoot(signalProof.height);
+ if (skipProofCheck()) return true;
+
+ if (app == address(0) || signal == 0 || srcChainId == 0 || srcChainId == block.chainid) {
+ return false;
+ }
+
+ Proof memory p = abi.decode(proof, (Proof));
+ if (p.crossChainSync == address(0) || p.storageProof.length == 0) {
+ return false;
+ }
+
+ for (uint256 i; i < p.hops.length; ++i) {
+ if (p.hops[i].signalRoot == 0) return false;
+ if (p.hops[i].storageProof.length == 0) return false;
+ }
+
+ // Check a chain of inclusion proofs. If this chain is chainA, and the
+ // message is sent on chainC, and we have chainB in the middle, we
+ // verify that chainB's signalRoot has been sent as a signal by chainB's
+ // "taiko" contract, then using chainB's signalRoot, we further check
+ // the signal is sent by chainC's "bridge" contract.
+ if (!isAuthorizedAs(p.crossChainSync, bytes32(block.chainid))) {
+ return false;
+ }
+
+ bytes32 signalRoot = ICrossChainSync(p.crossChainSync).getSyncedSnippet(p.height).signalRoot;
+
+ if (signalRoot == 0) return false;
+
+ for (uint256 i; i < p.hops.length; ++i) {
+ Hop memory hop = p.hops[i];
+
+ bytes32 label = authorizedAddresses[hop.signalRootRelay];
+ if (label == 0) return false;
+ uint64 chainId = uint256(label).toUint64();
+
+ bytes32 slot = getSignalSlot(
+ chainId, // use label as chainId
+ hop.signalRootRelay,
+ hop.signalRoot // as a signal
+ );
+ bool verified = LibSecureMerkleTrie.verifyInclusionProof(
+ bytes.concat(slot), hex"01", hop.storageProof, signalRoot
+ );
+ if (!verified) return false;
+
+ signalRoot = hop.signalRoot;
+ }
return LibSecureMerkleTrie.verifyInclusionProof(
- bytes.concat(getSignalSlot(app, signal)),
+ bytes.concat(getSignalSlot(srcChainId, app, signal)),
hex"01",
- signalProof.proof,
- syncedSignalRoot
+ p.storageProof,
+ signalRoot
);
}
/// @notice Get the storage slot of the signal.
+ /// @param chainId The address's chainId.
/// @param app The address that initiated the signal.
/// @param signal The signal to get the storage slot of.
- /// @return signalSlot The unique storage slot of the signal which is
+ /// @return The unique storage slot of the signal which is
/// created by encoding the sender address with the signal (message).
function getSignalSlot(
+ uint64 chainId,
address app,
bytes32 signal
)
public
pure
- returns (bytes32 signalSlot)
+ returns (bytes32)
{
- // Equivalent to `keccak256(abi.encodePacked(app, signal))`
- assembly {
- // Load the free memory pointer
- let ptr := mload(0x40)
- // Store the app address and signal bytes32 value in the allocated
- // memory
- mstore(ptr, app)
- mstore(add(ptr, 32), signal)
- // Calculate the hash of the concatenated arguments using keccak256
- signalSlot := keccak256(add(ptr, 12), 52)
- // Update free memory pointer
- mstore(0x40, add(ptr, 64))
- }
+ return keccak256(abi.encodePacked("SIGNAL", chainId, app, signal));
}
-}
-/// @title ProxiedSignalService
-/// @notice Proxied version of the parent contract.
-contract ProxiedSignalService is Proxied, SignalService { }
+ /// @notice Tells if we need to check real proof or it is a test.
+ /// @return Returns true to skip checking inclusion proofs.
+ function skipProofCheck() public pure virtual returns (bool) { }
+}
diff --git a/packages/protocol/contracts/team/TimelockTokenPool.sol b/packages/protocol/contracts/team/TimelockTokenPool.sol
new file mode 100644
index 00000000000..e32463ae309
--- /dev/null
+++ b/packages/protocol/contracts/team/TimelockTokenPool.sol
@@ -0,0 +1,231 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol";
+import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
+import "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
+import "../common/EssentialContract.sol";
+
+/// @title TimelockTokenPool
+/// Contract for managing Taiko tokens allocated to different roles and
+/// individuals.
+///
+/// Manages Taiko tokens through a three-state lifecycle: "allocated" to
+/// "granted, owned, and locked," and finally to "granted, owned, and unlocked."
+/// Allocation doesn't transfer ownership unless specified by grant settings.
+/// Conditional allocated tokens can be canceled by invoking `void()`, making
+/// them available for other uses. Once granted and owned, tokens are
+/// irreversible and their unlock schedules are immutable.
+///
+/// We should deploy multiple instances of this contract for different roles:
+/// - investors
+/// - team members, advisors, etc.
+/// - grant program grantees
+contract TimelockTokenPool is EssentialContract {
+ using SafeERC20 for IERC20;
+
+ struct Grant {
+ uint128 amount;
+ // If non-zero, indicates the start time for the recipient to receive
+ // tokens, subject to an unlocking schedule.
+ uint64 grantStart;
+ // If non-zero, indicates the time after which the token to be received
+ // will be actually non-zero
+ uint64 grantCliff;
+ // If non-zero, specifies the total seconds required for the recipient
+ // to fully own all granted tokens.
+ uint32 grantPeriod;
+ // If non-zero, indicates the start time for the recipient to unlock
+ // tokens.
+ uint64 unlockStart;
+ // If non-zero, indicates the time after which the unlock will be
+ // actually non-zero
+ uint64 unlockCliff;
+ // If non-zero, specifies the total seconds required for the recipient
+ // to fully unlock all owned tokens.
+ uint32 unlockPeriod;
+ }
+
+ struct Recipient {
+ uint128 amountWithdrawn;
+ Grant[] grants;
+ }
+
+ uint256 public constant MAX_GRANTS_PER_ADDRESS = 8;
+
+ address public taikoToken;
+ address public sharedVault;
+ uint128 public totalAmountGranted;
+ uint128 public totalAmountVoided;
+ uint128 public totalAmountWithdrawn;
+ mapping(address recipient => Recipient) public recipients;
+ uint128[44] private __gap;
+
+ event Granted(address indexed recipient, Grant grant);
+ event Voided(address indexed recipient, uint128 amount);
+ event Withdrawn(address indexed recipient, address to, uint128 amount);
+
+ error INVALID_GRANT();
+ error INVALID_PARAM();
+ error NOTHING_TO_VOID();
+ error NOTHING_TO_WITHDRAW();
+ error TOO_MANY();
+
+ function init(address _taikoToken, address _sharedVault) external initializer {
+ __Essential_init();
+
+ if (_taikoToken == address(0)) revert INVALID_PARAM();
+ taikoToken = _taikoToken;
+
+ if (_sharedVault == address(0)) revert INVALID_PARAM();
+ sharedVault = _sharedVault;
+ }
+
+ /// @notice Gives a new grant to a address with its own unlock schedule.
+ /// This transaction should happen on a regular basis, e.g., quarterly.
+ /// @dev It is strongly recommended to add one Grant per receipient address
+ /// so that such a grant can be voided without voiding other grants for the
+ /// same recipient.
+ function grant(address recipient, Grant memory g) external onlyOwner {
+ if (recipient == address(0)) revert INVALID_PARAM();
+ if (recipients[recipient].grants.length >= MAX_GRANTS_PER_ADDRESS) {
+ revert TOO_MANY();
+ }
+
+ _validateGrant(g);
+
+ totalAmountGranted += g.amount;
+ recipients[recipient].grants.push(g);
+ emit Granted(recipient, g);
+ }
+
+ /// @notice Puts a stop to all grants for a given recipient.Tokens already
+ /// granted to the recipient will NOT be voided but are subject to the
+ /// original unlock schedule.
+ function void(address recipient) external onlyOwner {
+ Recipient storage r = recipients[recipient];
+ uint128 amountVoided;
+ for (uint128 i; i < r.grants.length; ++i) {
+ amountVoided += _voidGrant(r.grants[i]);
+ }
+ if (amountVoided == 0) revert NOTHING_TO_VOID();
+
+ totalAmountVoided += amountVoided;
+ emit Voided(recipient, amountVoided);
+ }
+
+ /// @notice Withdraws all withdrawable tokens.
+ function withdraw() external {
+ _withdraw(msg.sender, msg.sender);
+ }
+
+ /// @notice Withdraws all withdrawable tokens.
+ function withdraw(address to, bytes memory sig) external {
+ if (to == address(0)) revert INVALID_PARAM();
+ bytes32 hash = keccak256(abi.encodePacked("Withdraw unlocked Taiko token to: ", to));
+ address recipient = ECDSA.recover(hash, sig);
+ _withdraw(recipient, to);
+ }
+
+ function getMyGrantSummary(address recipient)
+ public
+ view
+ returns (
+ uint128 amountOwned,
+ uint128 amountUnlocked,
+ uint128 amountWithdrawn,
+ uint128 amountWithdrawable
+ )
+ {
+ Recipient storage r = recipients[recipient];
+ for (uint128 i; i < r.grants.length; ++i) {
+ amountOwned += _getAmountOwned(r.grants[i]);
+ amountUnlocked += _getAmountUnlocked(r.grants[i]);
+ }
+
+ amountWithdrawn = r.amountWithdrawn;
+ amountWithdrawable = amountUnlocked - amountWithdrawn;
+ }
+
+ function getMyGrants(address recipient) public view returns (Grant[] memory) {
+ return recipients[recipient].grants;
+ }
+
+ function _withdraw(address recipient, address to) private {
+ Recipient storage r = recipients[recipient];
+ uint128 amount;
+
+ for (uint128 i; i < r.grants.length; ++i) {
+ amount += _getAmountUnlocked(r.grants[i]);
+ }
+
+ amount -= r.amountWithdrawn;
+ if (amount == 0) revert NOTHING_TO_WITHDRAW();
+
+ r.amountWithdrawn += amount;
+ totalAmountWithdrawn += amount;
+ IERC20(taikoToken).transferFrom(sharedVault, to, amount);
+
+ emit Withdrawn(recipient, to, amount);
+ }
+
+ function _voidGrant(Grant storage g) private returns (uint128 amountVoided) {
+ uint128 amountOwned = _getAmountOwned(g);
+
+ amountVoided = g.amount - amountOwned;
+ g.amount = amountOwned;
+
+ g.grantStart = 0;
+ g.grantPeriod = 0;
+ }
+
+ function _getAmountOwned(Grant memory g) private view returns (uint128) {
+ return _calcAmount(g.amount, g.grantStart, g.grantCliff, g.grantPeriod);
+ }
+
+ function _getAmountUnlocked(Grant memory g) private view returns (uint128) {
+ return _calcAmount(_getAmountOwned(g), g.unlockStart, g.unlockCliff, g.unlockPeriod);
+ }
+
+ function _calcAmount(
+ uint128 amount,
+ uint64 start,
+ uint64 cliff,
+ uint64 period
+ )
+ private
+ view
+ returns (uint128)
+ {
+ if (amount == 0) return 0;
+ if (start == 0) return amount;
+ if (block.timestamp <= start) return 0;
+
+ if (period == 0) return amount;
+ if (block.timestamp >= start + period) return amount;
+
+ if (block.timestamp <= cliff) return 0;
+
+ return amount * uint64(block.timestamp - start) / period;
+ }
+
+ function _validateGrant(Grant memory g) private pure {
+ if (g.amount == 0) revert INVALID_GRANT();
+ _validateCliff(g.grantStart, g.grantCliff, g.grantPeriod);
+ _validateCliff(g.unlockStart, g.unlockCliff, g.unlockPeriod);
+ }
+
+ function _validateCliff(uint64 start, uint64 cliff, uint32 period) private pure {
+ if (start == 0 || period == 0) {
+ if (cliff > 0) revert INVALID_GRANT();
+ } else {
+ if (cliff > 0 && cliff <= start) revert INVALID_GRANT();
+ if (cliff >= start + period) revert INVALID_GRANT();
+ }
+ }
+}
diff --git a/packages/protocol/contracts/team/airdrop/ERC20Airdrop.sol b/packages/protocol/contracts/team/airdrop/ERC20Airdrop.sol
new file mode 100644
index 00000000000..dfa35eb1305
--- /dev/null
+++ b/packages/protocol/contracts/team/airdrop/ERC20Airdrop.sol
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol";
+import "./MerkleClaimable.sol";
+
+/// @title ERC20Airdrop
+/// Contract for managing Taiko token airdrop for eligible users
+contract ERC20Airdrop is MerkleClaimable {
+ address public token;
+ address public vault;
+ uint256[48] private __gap;
+
+ function init(
+ uint64 _claimStarts,
+ uint64 _claimEnds,
+ bytes32 _merkleRoot,
+ address _token,
+ address _vault
+ )
+ external
+ initializer
+ {
+ __Essential_init();
+ _setConfig(_claimStarts, _claimEnds, _merkleRoot);
+
+ token = _token;
+ vault = _vault;
+ }
+
+ function _claimWithData(bytes calldata data) internal override {
+ (address user, uint256 amount) = abi.decode(data, (address, uint256));
+ IERC20Upgradeable(token).transferFrom(vault, user, amount);
+ }
+}
diff --git a/packages/protocol/contracts/team/airdrop/ERC20Airdrop2.sol b/packages/protocol/contracts/team/airdrop/ERC20Airdrop2.sol
new file mode 100644
index 00000000000..1a9f45a63f8
--- /dev/null
+++ b/packages/protocol/contracts/team/airdrop/ERC20Airdrop2.sol
@@ -0,0 +1,102 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol";
+import "../../libs/LibMath.sol";
+import "./MerkleClaimable.sol";
+
+/// @title ERC20Airdrop2
+/// Contract for managing Taiko token airdrop for eligible users but the
+/// withdrawal is not immediate and is subject to a withdrawal window.
+contract ERC20Airdrop2 is MerkleClaimable {
+ using LibMath for uint256;
+
+ address public token;
+ address public vault;
+ // Represents the token amount for which the user is (by default) eligible
+ mapping(address => uint256) public claimedAmount;
+ // Represents the already withdrawn amount
+ mapping(address => uint256) public withdrawnAmount;
+ // Length of the withdrawal window
+ uint64 public withdrawalWindow;
+
+ uint256[45] private __gap;
+
+ event Withdrawn(address user, uint256 amount);
+
+ error WITHDRAWALS_NOT_ONGOING();
+
+ modifier ongoingWithdrawals() {
+ if (claimEnd > block.timestamp || claimEnd + withdrawalWindow < block.timestamp) {
+ revert WITHDRAWALS_NOT_ONGOING();
+ }
+ _;
+ }
+
+ function init(
+ uint64 _claimStarts,
+ uint64 _claimEnds,
+ bytes32 _merkleRoot,
+ address _token,
+ address _vault,
+ uint64 _withdrawalWindow
+ )
+ external
+ initializer
+ {
+ __Essential_init();
+ // Unix timestamp=_claimEnds+1 marks the first timestamp the users are able to withdraw.
+ _setConfig(_claimStarts, _claimEnds, _merkleRoot);
+
+ token = _token;
+ vault = _vault;
+ withdrawalWindow = _withdrawalWindow;
+ }
+
+ /// @notice External withdraw function
+ /// @param user User address
+ function withdraw(address user) external ongoingWithdrawals {
+ (, uint256 amount) = getBalance(user);
+ withdrawnAmount[user] += amount;
+ IERC20Upgradeable(token).transferFrom(vault, user, amount);
+
+ emit Withdrawn(user, amount);
+ }
+
+ /// @notice Getter for the balance and withdrawal amount per given user
+ /// The 2nd airdrop is subject to an unlock period. User has to claim his
+ /// tokens (within claimStart and claimEnd), but not immediately
+ /// withdrawable. With a time of X (withdrawalWindow) it becomes fully
+ /// withdrawable - and unlocks linearly.
+ /// @param user User address
+ /// @return balance The balance the user successfully claimed
+ /// @return withdrawableAmount The amount available to withdraw
+ function getBalance(address user)
+ public
+ view
+ returns (uint256 balance, uint256 withdrawableAmount)
+ {
+ balance = claimedAmount[user];
+ // If balance is 0 then there is no balance and withdrawable amount
+ if (balance == 0) return (0, 0);
+ // Balance might be positive before end of claiming (claimEnd - if claimed already) but
+ // withdrawable is 0.
+ if (block.timestamp < claimEnd) return (balance, 0);
+
+ // Hard cap timestamp - so range cannot go over - to get more allocation over time.
+ uint256 timeBasedAllowance = balance
+ * (block.timestamp.min(claimEnd + withdrawalWindow) - claimEnd) / withdrawalWindow;
+
+ withdrawableAmount = timeBasedAllowance - withdrawnAmount[user];
+ }
+
+ function _claimWithData(bytes calldata data) internal override {
+ (address user, uint256 amount) = abi.decode(data, (address, uint256));
+ claimedAmount[user] += amount;
+ }
+}
diff --git a/packages/protocol/contracts/team/airdrop/ERC721Airdrop.sol b/packages/protocol/contracts/team/airdrop/ERC721Airdrop.sol
new file mode 100644
index 00000000000..aeda1c0a759
--- /dev/null
+++ b/packages/protocol/contracts/team/airdrop/ERC721Airdrop.sol
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/ERC721Upgradeable.sol";
+import "./MerkleClaimable.sol";
+
+/// @title ERC721Airdrop
+contract ERC721Airdrop is MerkleClaimable {
+ address public token;
+ address public vault;
+ uint256[48] private __gap;
+
+ function init(
+ uint64 _claimStarts,
+ uint64 _claimEnds,
+ bytes32 _merkleRoot,
+ address _token,
+ address _vault
+ )
+ external
+ initializer
+ {
+ __Essential_init();
+ _setConfig(_claimStarts, _claimEnds, _merkleRoot);
+
+ token = _token;
+ vault = _vault;
+ }
+
+ function _claimWithData(bytes calldata data) internal override {
+ (address user, uint256[] memory tokenIds) = abi.decode(data, (address, uint256[]));
+
+ for (uint256 i; i < tokenIds.length; ++i) {
+ IERC721Upgradeable(token).safeTransferFrom(vault, user, tokenIds[i]);
+ }
+ }
+}
diff --git a/packages/protocol/contracts/team/airdrop/MerkleClaimable.sol b/packages/protocol/contracts/team/airdrop/MerkleClaimable.sol
new file mode 100644
index 00000000000..02263b80ed4
--- /dev/null
+++ b/packages/protocol/contracts/team/airdrop/MerkleClaimable.sol
@@ -0,0 +1,81 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import { MerkleProofUpgradeable } from
+ "lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/MerkleProofUpgradeable.sol";
+import "../../common/EssentialContract.sol";
+
+/// @title MerkleClaimable
+/// Contract for managing Taiko token airdrop for eligible users
+abstract contract MerkleClaimable is EssentialContract {
+ mapping(bytes32 => bool) public isClaimed;
+ bytes32 public merkleRoot;
+ uint64 public claimStart;
+ uint64 public claimEnd;
+
+ uint256[47] private __gap;
+
+ event Claimed(bytes32 hash);
+
+ error CLAIM_NOT_ONGOING();
+ error CLAIMED_ALREADY();
+ error INVALID_PROOF();
+
+ modifier ongoingClaim() {
+ if (
+ merkleRoot == 0x0 || claimStart == 0 || claimEnd == 0 || claimStart > block.timestamp
+ || claimEnd < block.timestamp
+ ) revert CLAIM_NOT_ONGOING();
+ _;
+ }
+
+ function claim(
+ bytes calldata data,
+ bytes32[] calldata proof
+ )
+ external
+ nonReentrant
+ ongoingClaim
+ {
+ bytes32 hash = keccak256(abi.encode("CLAIM_TAIKO_AIRDROP", data));
+
+ if (isClaimed[hash]) revert CLAIMED_ALREADY();
+
+ if (!MerkleProofUpgradeable.verify(proof, merkleRoot, hash)) {
+ revert INVALID_PROOF();
+ }
+
+ isClaimed[hash] = true;
+ _claimWithData(data);
+ emit Claimed(hash);
+ }
+
+ /// @notice Set config parameters
+ /// @param _claimStart Unix timestamp for claim start
+ /// @param _claimEnd Unix timestamp for claim end
+ /// @param _merkleRoot Merkle root of the tree
+ function setConfig(
+ uint64 _claimStart,
+ uint64 _claimEnd,
+ bytes32 _merkleRoot
+ )
+ external
+ onlyOwner
+ {
+ _setConfig(_claimStart, _claimEnd, _merkleRoot);
+ }
+
+ function _setConfig(uint64 _claimStart, uint64 _claimEnd, bytes32 _merkleRoot) internal {
+ claimStart = _claimStart;
+ claimEnd = _claimEnd;
+ merkleRoot = _merkleRoot;
+ }
+
+ /// @dev Must revert in case of errors.
+ function _claimWithData(bytes calldata data) internal virtual;
+}
diff --git a/packages/protocol/contracts/test/erc20/FreeMintERC20.sol b/packages/protocol/contracts/test/erc20/FreeMintERC20.sol
index 81ae7b7176c..90c09e74208 100644
--- a/packages/protocol/contracts/test/erc20/FreeMintERC20.sol
+++ b/packages/protocol/contracts/test/erc20/FreeMintERC20.sol
@@ -6,7 +6,7 @@
pragma solidity ^0.8.20;
-import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
+import "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";
// An ERC20 Token with a mint function anyone can call, for free, to receive
// 5 tokens.
diff --git a/packages/protocol/contracts/test/erc20/MayFailFreeMintERC20.sol b/packages/protocol/contracts/test/erc20/MayFailFreeMintERC20.sol
index 3c836083c2d..3883d0bd01c 100644
--- a/packages/protocol/contracts/test/erc20/MayFailFreeMintERC20.sol
+++ b/packages/protocol/contracts/test/erc20/MayFailFreeMintERC20.sol
@@ -6,7 +6,7 @@
pragma solidity ^0.8.20;
-import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
+import "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";
// An ERC20 token for testing the Taiko Bridge on testnets.
// This token has 50% of failure on transfers so we can
@@ -15,6 +15,7 @@ contract MayFailFreeMintERC20 is ERC20 {
mapping(address minter => bool hasMinted) public minters;
error HasMinted();
+ error Failed();
constructor(string memory name, string memory symbol) ERC20(name, symbol) { }
@@ -27,14 +28,7 @@ contract MayFailFreeMintERC20 is ERC20 {
_mint(to, 50 * (10 ** decimals()));
}
- function transfer(
- address to,
- uint256 amount
- )
- public
- override
- returns (bool)
- {
+ function transfer(address to, uint256 amount) public override returns (bool) {
_mayFail();
return ERC20.transfer(to, amount);
}
@@ -55,7 +49,7 @@ contract MayFailFreeMintERC20 is ERC20 {
// Have a 50% change of failure.
function _mayFail() private view {
if (block.number % 2 == 0) {
- revert("Failed");
+ revert Failed();
}
}
}
diff --git a/packages/protocol/contracts/test/erc20/RegularERC20.sol b/packages/protocol/contracts/test/erc20/RegularERC20.sol
index aee036b35d6..086a787512c 100644
--- a/packages/protocol/contracts/test/erc20/RegularERC20.sol
+++ b/packages/protocol/contracts/test/erc20/RegularERC20.sol
@@ -2,7 +2,7 @@
pragma solidity ^0.8.20;
-import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
+import "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";
contract RegularERC20 is ERC20 {
constructor(uint256 initialSupply) ERC20("RegularERC20", "RGL") {
diff --git a/packages/protocol/contracts/thirdparty/LibBytesUtils.sol b/packages/protocol/contracts/thirdparty/LibBytesUtils.sol
index 53f17fd4154..24210d7c8fb 100644
--- a/packages/protocol/contracts/thirdparty/LibBytesUtils.sol
+++ b/packages/protocol/contracts/thirdparty/LibBytesUtils.sol
@@ -68,21 +68,14 @@ library LibBytesUtils {
// because when slicing multiples of 32 bytes (lengthmod == 0)
// the following copy loop was copying the origin's length
// and then ending prematurely not copying everything it should.
- let mc :=
- add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))
+ let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))
let end := add(mc, _length)
for {
// The multiplication in the next line has the same exact
// purpose
// as the one above.
- let cc :=
- add(
- add(
- add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))
- ),
- _start
- )
+ let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)
} lt(mc, end) {
mc := add(mc, 0x20)
cc := add(cc, 0x20)
@@ -90,18 +83,17 @@ library LibBytesUtils {
mstore(tempBytes, _length)
- //update free-memory pointer
- //allocating the array padded to 32 bytes like the compiler does
- // now
+ // update free-memory pointer allocating the array padded to 32
+ // bytes like the compiler does now
mstore(0x40, and(add(mc, 31), not(31)))
}
- //if we want a zero-length slice let's just return a zero-length
+ // if we want a zero-length slice let's just return a zero-length
// array
default {
tempBytes := mload(0x40)
- //zero out the 32 bytes slice we are about to return
- //we need to do it because Solidity does not garbage collect
+ // zero out the 32 bytes slice we are about to return
+ // we need to do it because Solidity does not garbage collect
mstore(tempBytes, 0)
mstore(0x40, add(tempBytes, 0x20))
@@ -111,14 +103,7 @@ library LibBytesUtils {
return tempBytes;
}
- function slice(
- bytes memory _bytes,
- uint256 _start
- )
- internal
- pure
- returns (bytes memory)
- {
+ function slice(bytes memory _bytes, uint256 _start) internal pure returns (bytes memory) {
if (_start >= _bytes.length) {
return bytes("");
}
@@ -139,11 +124,7 @@ library LibBytesUtils {
// 32 bytes
}
- function toNibbles(bytes memory _bytes)
- internal
- pure
- returns (bytes memory)
- {
+ function toNibbles(bytes memory _bytes) internal pure returns (bytes memory) {
bytes memory nibbles = new bytes(_bytes.length * 2);
for (uint256 i; i < _bytes.length; ++i) {
@@ -154,14 +135,7 @@ library LibBytesUtils {
return nibbles;
}
- function equal(
- bytes memory _bytes,
- bytes memory _other
- )
- internal
- pure
- returns (bool)
- {
+ function equal(bytes memory _bytes, bytes memory _other) internal pure returns (bool) {
return keccak256(_bytes) == keccak256(_other);
}
}
diff --git a/packages/protocol/contracts/thirdparty/LibFixedPointMath.sol b/packages/protocol/contracts/thirdparty/LibFixedPointMath.sol
index 6ae5d2e1c46..2a4fba95fc7 100644
--- a/packages/protocol/contracts/thirdparty/LibFixedPointMath.sol
+++ b/packages/protocol/contracts/thirdparty/LibFixedPointMath.sol
@@ -5,7 +5,7 @@ pragma solidity ^0.8.20;
library LibFixedPointMath {
uint128 public constant MAX_EXP_INPUT = 135_305_999_368_893_231_588;
- uint256 public constant SCALING_FACTOR_1E18 = 1e18; // For fixed point
+ uint256 public constant SCALING_FACTOR = 1e18; // For fixed point
// representation factor
error Overflow();
@@ -37,9 +37,7 @@ library LibFixedPointMath {
// powers of two
// such that exp(x) = exp(x') * 2**k, where k is an integer.
// Solving this gives k = round(x / log(2)) and x' = x - k * log(2).
- int256 k = (
- (x << 96) / 54_916_777_467_707_473_351_141_471_128 + 2 ** 95
- ) >> 96;
+ int256 k = ((x << 96) / 54_916_777_467_707_473_351_141_471_128 + 2 ** 95) >> 96;
x = x - k * 54_916_777_467_707_473_351_141_471_128;
// k is in the range [-61, 195].
@@ -77,11 +75,8 @@ library LibFixedPointMath {
// basis
// so the final right shift is always by a positive amount.
r = int256(
- (
- uint256(r)
- *
- 3_822_833_074_963_236_453_042_738_258_902_158_003_155_416_615_667
- ) >> uint256(195 - k)
+ (uint256(r) * 3_822_833_074_963_236_453_042_738_258_902_158_003_155_416_615_667)
+ >> uint256(195 - k)
);
}
}
diff --git a/packages/protocol/contracts/thirdparty/LibMerkleTrie.sol b/packages/protocol/contracts/thirdparty/LibMerkleTrie.sol
index 4332b42da6d..77cb64d991d 100644
--- a/packages/protocol/contracts/thirdparty/LibMerkleTrie.sol
+++ b/packages/protocol/contracts/thirdparty/LibMerkleTrie.sol
@@ -28,8 +28,8 @@
pragma solidity ^0.8.20;
/* Library Imports */
-import { LibBytesUtils } from "./LibBytesUtils.sol";
-import { LibRLPReader } from "./LibRLPReader.sol";
+import "./LibBytesUtils.sol";
+import "./LibRLPReader.sol";
/**
* @title LibMerkleTrie
@@ -120,8 +120,7 @@ library LibMerkleTrie {
require(exists || isFinalNode, "Provided proof is invalid.");
- bytes memory value =
- exists ? _getNodeValue(proof[pathLength - 1]) : bytes("");
+ bytes memory value = exists ? _getNodeValue(proof[pathLength - 1]) : bytes("");
return (exists, value);
}
@@ -142,11 +141,7 @@ library LibMerkleTrie {
)
private
pure
- returns (
- uint256 _pathLength,
- bytes memory _keyRemainder,
- bool _isFinalNode
- )
+ returns (uint256 _pathLength, bytes memory _keyRemainder, bool _isFinalNode)
{
uint256 pathLength;
bytes memory key = LibBytesUtils.toNibbles(_key);
@@ -168,21 +163,16 @@ library LibMerkleTrie {
if (currentKeyIndex == 0) {
// First proof element is always the root node.
- require(
- keccak256(currentNode.encoded) == currentNodeID,
- "Invalid root hash"
- );
+ require(keccak256(currentNode.encoded) == currentNodeID, "Invalid root hash");
} else if (currentNode.encoded.length >= 32) {
// Nodes 32 bytes or larger are hashed inside branch nodes.
require(
- keccak256(currentNode.encoded) == currentNodeID,
- "Invalid large internal hash"
+ keccak256(currentNode.encoded) == currentNodeID, "Invalid large internal hash"
);
} else {
// Nodes smaller than 31 bytes aren't hashed.
require(
- LibBytesUtils.toBytes32(currentNode.encoded)
- == currentNodeID,
+ LibBytesUtils.toBytes32(currentNode.encoded) == currentNodeID,
"Invalid internal node hash"
);
}
@@ -196,23 +186,18 @@ library LibMerkleTrie {
// We're not at the end of the key yet.
// Figure out what the next node ID should be and continue.
uint8 branchKey = uint8(key[currentKeyIndex]);
- LibRLPReader.RLPItem memory nextNode =
- currentNode.decoded[branchKey];
+ LibRLPReader.RLPItem memory nextNode = currentNode.decoded[branchKey];
currentNodeID = _getNodeID(nextNode);
currentKeyIncrement = 1;
continue;
}
- } else if (
- currentNode.decoded.length == LEAF_OR_EXTENSION_NODE_LENGTH
- ) {
+ } else if (currentNode.decoded.length == LEAF_OR_EXTENSION_NODE_LENGTH) {
bytes memory path = _getNodePath(currentNode);
uint8 prefix = uint8(path[0]);
uint8 offset = 2 - (prefix % 2);
bytes memory pathRemainder = LibBytesUtils.slice(path, offset);
- bytes memory keyRemainder =
- LibBytesUtils.slice(key, currentKeyIndex);
- uint256 sharedNibbleLength =
- _getSharedNibbleLength(pathRemainder, keyRemainder);
+ bytes memory keyRemainder = LibBytesUtils.slice(key, currentKeyIndex);
+ uint256 sharedNibbleLength = _getSharedNibbleLength(pathRemainder, keyRemainder);
if (prefix == PREFIX_LEAF_EVEN || prefix == PREFIX_LEAF_ODD) {
if (
@@ -228,10 +213,7 @@ library LibMerkleTrie {
// We've hit a leaf node, so our next node should be NULL.
currentNodeID = bytes32(RLP_NULL);
break;
- } else if (
- prefix == PREFIX_EXTENSION_EVEN
- || prefix == PREFIX_EXTENSION_ODD
- ) {
+ } else if (prefix == PREFIX_EXTENSION_EVEN || prefix == PREFIX_EXTENSION_ODD) {
if (sharedNibbleLength != pathRemainder.length) {
// Our extension node is not identical to the remainder.
// We've hit the end of this path
@@ -255,8 +237,7 @@ library LibMerkleTrie {
// If our node ID is NULL, then we're at a dead end.
bool isFinalNode = currentNodeID == bytes32(RLP_NULL);
- return
- (pathLength, LibBytesUtils.slice(key, currentKeyIndex), isFinalNode);
+ return (pathLength, LibBytesUtils.slice(key, currentKeyIndex), isFinalNode);
}
/**
@@ -264,20 +245,13 @@ library LibMerkleTrie {
* @param _proof RLP-encoded proof to parse.
* @return _parsed Proof parsed into easily accessible structs.
*/
- function _parseProof(bytes memory _proof)
- private
- pure
- returns (TrieNode[] memory _parsed)
- {
+ function _parseProof(bytes memory _proof) private pure returns (TrieNode[] memory _parsed) {
LibRLPReader.RLPItem[] memory nodes = LibRLPReader.readList(_proof);
TrieNode[] memory proof = new TrieNode[](nodes.length);
for (uint256 i; i < nodes.length; ++i) {
bytes memory encoded = LibRLPReader.readBytes(nodes[i]);
- proof[i] = TrieNode({
- encoded: encoded,
- decoded: LibRLPReader.readList(encoded)
- });
+ proof[i] = TrieNode({ encoded: encoded, decoded: LibRLPReader.readList(encoded) });
}
return proof;
@@ -290,11 +264,7 @@ library LibMerkleTrie {
* @param _node Node to pull an ID for.
* @return _nodeID ID for the node, depending on the size of its contents.
*/
- function _getNodeID(LibRLPReader.RLPItem memory _node)
- private
- pure
- returns (bytes32 _nodeID)
- {
+ function _getNodeID(LibRLPReader.RLPItem memory _node) private pure returns (bytes32 _nodeID) {
bytes memory nodeID;
if (_node.length < 32) {
@@ -313,11 +283,7 @@ library LibMerkleTrie {
* @param _node Node to get a path for.
* @return _path Node path, converted to an array of nibbles.
*/
- function _getNodePath(TrieNode memory _node)
- private
- pure
- returns (bytes memory _path)
- {
+ function _getNodePath(TrieNode memory _node) private pure returns (bytes memory _path) {
return LibBytesUtils.toNibbles(LibRLPReader.readBytes(_node.decoded[0]));
}
@@ -326,11 +292,7 @@ library LibMerkleTrie {
* @param _node Node to get a value for.
* @return _value Node value, as hex bytes.
*/
- function _getNodeValue(TrieNode memory _node)
- private
- pure
- returns (bytes memory _value)
- {
+ function _getNodeValue(TrieNode memory _node) private pure returns (bytes memory _value) {
return LibRLPReader.readBytes(_node.decoded[_node.decoded.length - 1]);
}
diff --git a/packages/protocol/contracts/thirdparty/LibRLPReader.sol b/packages/protocol/contracts/thirdparty/LibRLPReader.sol
index 7f354acbf36..e1c367fb159 100644
--- a/packages/protocol/contracts/thirdparty/LibRLPReader.sol
+++ b/packages/protocol/contracts/thirdparty/LibRLPReader.sol
@@ -49,11 +49,7 @@ library LibRLPReader {
* @param _in Input bytes to convert.
* @return Output memory reference.
*/
- function toRLPItem(bytes memory _in)
- internal
- pure
- returns (RLPItem memory)
- {
+ function toRLPItem(bytes memory _in) internal pure returns (RLPItem memory) {
uint256 ptr;
assembly {
ptr := add(_in, 32)
@@ -67,11 +63,7 @@ library LibRLPReader {
* @param _in RLP list value.
* @return Decoded RLP list items.
*/
- function readList(RLPItem memory _in)
- internal
- pure
- returns (RLPItem[] memory)
- {
+ function readList(RLPItem memory _in) internal pure returns (RLPItem[] memory) {
(uint256 listOffset,, RLPItemType itemType) = _decodeLength(_in);
require(itemType == RLPItemType.LIST_ITEM, "Invalid RLP list value.");
@@ -89,19 +81,12 @@ library LibRLPReader {
uint256 itemCount;
uint256 offset = listOffset;
while (offset < _in.length) {
- require(
- itemCount < MAX_LIST_LENGTH,
- "Provided RLP list exceeds max list length."
- );
+ require(itemCount < MAX_LIST_LENGTH, "Provided RLP list exceeds max list length.");
- (uint256 itemOffset, uint256 itemLength,) = _decodeLength(
- RLPItem({ length: _in.length - offset, ptr: _in.ptr + offset })
- );
+ (uint256 itemOffset, uint256 itemLength,) =
+ _decodeLength(RLPItem({ length: _in.length - offset, ptr: _in.ptr + offset }));
- out[itemCount] = RLPItem({
- length: itemLength + itemOffset,
- ptr: _in.ptr + offset
- });
+ out[itemCount] = RLPItem({ length: itemLength + itemOffset, ptr: _in.ptr + offset });
itemCount += 1;
offset += itemOffset + itemLength;
@@ -120,11 +105,7 @@ library LibRLPReader {
* @param _in RLP list value.
* @return Decoded RLP list items.
*/
- function readList(bytes memory _in)
- internal
- pure
- returns (RLPItem[] memory)
- {
+ function readList(bytes memory _in) internal pure returns (RLPItem[] memory) {
return readList(toRLPItem(_in));
}
@@ -133,13 +114,8 @@ library LibRLPReader {
* @param _in RLP bytes value.
* @return Decoded bytes.
*/
- function readBytes(RLPItem memory _in)
- internal
- pure
- returns (bytes memory)
- {
- (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) =
- _decodeLength(_in);
+ function readBytes(RLPItem memory _in) internal pure returns (bytes memory) {
+ (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) = _decodeLength(_in);
require(itemType == RLPItemType.DATA_ITEM, "Invalid RLP bytes value.");
@@ -160,11 +136,7 @@ library LibRLPReader {
* @param _in RLP string value.
* @return Decoded string.
*/
- function readString(RLPItem memory _in)
- internal
- pure
- returns (string memory)
- {
+ function readString(RLPItem memory _in) internal pure returns (string memory) {
return string(readBytes(_in));
}
@@ -173,11 +145,7 @@ library LibRLPReader {
* @param _in RLP string value.
* @return Decoded string.
*/
- function readString(bytes memory _in)
- internal
- pure
- returns (string memory)
- {
+ function readString(bytes memory _in) internal pure returns (string memory) {
return readString(toRLPItem(_in));
}
@@ -189,8 +157,7 @@ library LibRLPReader {
function readBytes32(RLPItem memory _in) internal pure returns (bytes32) {
require(_in.length <= 33, "Invalid RLP bytes32 value.");
- (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) =
- _decodeLength(_in);
+ (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) = _decodeLength(_in);
require(itemType == RLPItemType.DATA_ITEM, "Invalid RLP bytes32 value.");
@@ -200,9 +167,7 @@ library LibRLPReader {
out := mload(ptr)
// Shift the bytes over to match the item size.
- if lt(itemLength, 32) {
- out := div(out, exp(256, sub(32, itemLength)))
- }
+ if lt(itemLength, 32) { out := div(out, exp(256, sub(32, itemLength))) }
}
return out;
@@ -249,10 +214,7 @@ library LibRLPReader {
out := byte(0, mload(ptr))
}
- require(
- out == 0 || out == 1,
- "LibRLPReader: Invalid RLP boolean value, must be 0 or 1"
- );
+ require(out == 0 || out == 1, "LibRLPReader: Invalid RLP boolean value, must be 0 or 1");
return out != 0;
}
@@ -295,11 +257,7 @@ library LibRLPReader {
* @param _in RLP item to read.
* @return Raw RLP bytes.
*/
- function readRawBytes(RLPItem memory _in)
- internal
- pure
- returns (bytes memory)
- {
+ function readRawBytes(RLPItem memory _in) internal pure returns (bytes memory) {
return _copy(_in);
}
@@ -345,13 +303,10 @@ library LibRLPReader {
uint256 strLen;
assembly {
// Pick out the string length.
- strLen :=
- div(mload(add(ptr, 1)), exp(256, sub(32, lenOfStrLen)))
+ strLen := div(mload(add(ptr, 1)), exp(256, sub(32, lenOfStrLen)))
}
- require(
- _in.length > lenOfStrLen + strLen, "Invalid RLP long string."
- );
+ require(_in.length > lenOfStrLen + strLen, "Invalid RLP long string.");
return (1 + lenOfStrLen, strLen, RLPItemType.DATA_ITEM);
} else if (prefix <= 0xf7) {
@@ -371,13 +326,10 @@ library LibRLPReader {
uint256 listLen;
assembly {
// Pick out the list length.
- listLen :=
- div(mload(add(ptr, 1)), exp(256, sub(32, lenOfListLen)))
+ listLen := div(mload(add(ptr, 1)), exp(256, sub(32, lenOfListLen)))
}
- require(
- _in.length > lenOfListLen + listLen, "Invalid RLP long list."
- );
+ require(_in.length > lenOfListLen + listLen, "Invalid RLP long list.");
return (1 + lenOfListLen, listLen, RLPItemType.LIST_ITEM);
}
diff --git a/packages/protocol/contracts/thirdparty/LibRLPWriter.sol b/packages/protocol/contracts/thirdparty/LibRLPWriter.sol
deleted file mode 100644
index e6c90933c03..00000000000
--- a/packages/protocol/contracts/thirdparty/LibRLPWriter.sol
+++ /dev/null
@@ -1,293 +0,0 @@
-// SPDX-License-Identifier: MIT
-// Taken from
-// https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts/contracts/libraries/rlp/LibRLPWriter.sol
-// Modified to support writeBytes32/writeUint64
-// (The MIT License)
-//
-// Copyright 2020-2021 Optimism
-// Copyright 2022-2023 Taiko Labs
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-pragma solidity ^0.8.20;
-
-/**
- * @title LibRLPWriter
- * @author Bakaoh (with modifications)
- */
-library LibRLPWriter {
- /**
- * RLP encodes a byte string.
- * @param _in The byte string to encode.
- * @return The RLP encoded string in bytes.
- */
- function writeBytes(bytes memory _in)
- internal
- pure
- returns (bytes memory)
- {
- bytes memory encoded;
-
- if (_in.length == 1 && uint8(_in[0]) < 128) {
- encoded = _in;
- } else {
- encoded = abi.encodePacked(_writeLength(_in.length, 128), _in);
- }
-
- return encoded;
- }
-
- /**
- * RLP encodes a list of RLP encoded byte byte strings.
- * @param _in The list of RLP encoded byte strings.
- * @return The RLP encoded list of items in bytes.
- */
- function writeList(bytes[] memory _in)
- internal
- pure
- returns (bytes memory)
- {
- bytes memory list = _flatten(_in);
- return abi.encodePacked(_writeLength(list.length, 192), list);
- }
-
- /**
- * RLP encodes a string.
- * @param _in The string to encode.
- * @return The RLP encoded string in bytes.
- */
- function writeString(string memory _in)
- internal
- pure
- returns (bytes memory)
- {
- return writeBytes(bytes(_in));
- }
-
- /**
- * RLP encodes an address.
- * @param _in The address to encode.
- * @return The RLP encoded address in bytes.
- */
- function writeAddress(address _in) internal pure returns (bytes memory) {
- return writeBytes(abi.encodePacked(_in));
- }
-
- /**
- * RLP encodes a uint.
- * @param _in The uint256 to encode.
- * @return The RLP encoded uint256 in bytes.
- */
- function writeUint(uint256 _in) internal pure returns (bytes memory) {
- return writeBytes(_toBinary(_in));
- }
-
- function writeBytes32(bytes32 _in) internal pure returns (bytes memory) {
- return writeBytes(_toBinary(uint256(_in)));
- }
-
- /**
- * RLP encodes a hash, we should use this function but not writeBytes32 to
- * encode a hash, since writeBytes32 will remove the leading zeros of the
- * given bytes.
- * @param _in The hash to encode.
- * @return The RLP encoded hash in bytes.
- */
- function writeHash(bytes32 _in) internal pure returns (bytes memory) {
- return writeBytes(_toBinaryWithLeadingZeros(uint256(_in)));
- }
-
- function writeUint64(uint64 _in) internal pure returns (bytes memory) {
- return writeBytes(_toBinary(_in));
- }
-
- /**
- * RLP encodes a bool.
- * @param _in The bool to encode.
- * @return The RLP encoded bool in bytes.
- */
- function writeBool(bool _in) internal pure returns (bytes memory) {
- bytes memory encoded = new bytes(1);
- encoded[0] = (_in ? bytes1(0x01) : bytes1(0x80));
- return encoded;
- }
-
- /*//////////////////////////////////////////////////////////////
- PRIVATE FUNCTIONS
- //////////////////////////////////////////////////////////////*/
-
- /**
- * Encode the first byte, followed by the `len` in binary form if `length`
- * is more than 55.
- * @param _len The length of the string or the payload.
- * @param _offset 128 if item is string, 192 if item is list.
- * @return RLP encoded bytes.
- */
- function _writeLength(
- uint256 _len,
- uint256 _offset
- )
- private
- pure
- returns (bytes memory)
- {
- bytes memory encoded;
-
- if (_len < 56) {
- encoded = new bytes(1);
- encoded[0] = bytes1(uint8(_len) + uint8(_offset));
- } else {
- uint256 lenLen;
- uint256 i = 1;
- while (_len / i != 0) {
- ++lenLen;
- i *= 256;
- }
-
- encoded = new bytes(lenLen + 1);
- encoded[0] = bytes1(uint8(lenLen) + uint8(_offset) + 55);
- for (i = 1; i <= lenLen; ++i) {
- encoded[i] = bytes1(uint8((_len / (256 ** (lenLen - i))) % 256));
- }
- }
-
- return encoded;
- }
-
- /**
- * Encode integer in big endian binary form with no leading zeroes.
- * @param _x The integer to encode.
- * @return RLP encoded bytes.
- */
- function _toBinary(uint256 _x) private pure returns (bytes memory) {
- bytes memory b = abi.encodePacked(_x);
-
- uint256 i;
- for (; i < 32; ++i) {
- if (b[i] != 0) {
- break;
- }
- }
-
- bytes memory res = new bytes(32 - i);
- for (uint256 j; j < res.length; ++j) {
- res[j] = b[i++];
- }
-
- return res;
- }
-
- /**
- * Encode integer in big endian binary form with leading zeroes.
- * @param _x The integer to encode.
- * @return RLP encoded bytes.
- */
- function _toBinaryWithLeadingZeros(uint256 _x)
- private
- pure
- returns (bytes memory)
- {
- bytes memory b = abi.encodePacked(_x);
-
- uint256 i;
-
- bytes memory res = new bytes(32);
- for (uint256 j; j < res.length; ++j) {
- res[j] = b[i++];
- }
-
- return res;
- }
-
- /**
- * Copies a piece of memory to another location.
- * @notice From:
- * https://github.com/Arachnid/solidity-stringutils/blob/master/src/strings.sol.
- * @param _dest Destination location.
- * @param _src Source location.
- * @param _len Length of memory to copy.
- */
- function _memcpy(uint256 _dest, uint256 _src, uint256 _len) private pure {
- uint256 dest = _dest;
- uint256 src = _src;
- uint256 len = _len;
-
- for (; len >= 32; len -= 32) {
- assembly {
- mstore(dest, mload(src))
- }
- dest += 32;
- src += 32;
- }
-
- uint256 mask;
- unchecked {
- mask = 256 ** (32 - len) - 1;
- }
- assembly {
- let srcpart := and(mload(src), not(mask))
- let destpart := and(mload(dest), mask)
- mstore(dest, or(destpart, srcpart))
- }
- }
-
- /**
- * Flattens a list of byte strings into one byte string.
- * @notice From:
- * https://github.com/sammayo/solidity-rlp-encoder/blob/master/RLPEncode.sol.
- * @param _list List of byte strings to flatten.
- * @return The flattened byte string.
- */
- function _flatten(bytes[] memory _list)
- private
- pure
- returns (bytes memory)
- {
- if (_list.length == 0) {
- return new bytes(0);
- }
-
- uint256 len;
- uint256 i;
- for (; i < _list.length; ++i) {
- len += _list[i].length;
- }
-
- bytes memory flattened = new bytes(len);
- uint256 flattenedPtr;
- assembly {
- flattenedPtr := add(flattened, 0x20)
- }
-
- for (i = 0; i < _list.length; ++i) {
- bytes memory item = _list[i];
-
- uint256 listPtr;
- assembly {
- listPtr := add(item, 0x20)
- }
-
- _memcpy(flattenedPtr, listPtr, item.length);
- flattenedPtr += _list[i].length;
- }
-
- return flattened;
- }
-}
diff --git a/packages/protocol/contracts/thirdparty/LibSecureMerkleTrie.sol b/packages/protocol/contracts/thirdparty/LibSecureMerkleTrie.sol
index 7cc18a129a4..bfefe125f0b 100644
--- a/packages/protocol/contracts/thirdparty/LibSecureMerkleTrie.sol
+++ b/packages/protocol/contracts/thirdparty/LibSecureMerkleTrie.sol
@@ -28,7 +28,7 @@
pragma solidity ^0.8.20;
/* Library Imports */
-import { LibMerkleTrie } from "./LibMerkleTrie.sol";
+import "./LibMerkleTrie.sol";
/**
* @title LibSecureMerkleTrie
@@ -95,11 +95,7 @@ library LibSecureMerkleTrie {
* @param _key Key to get a secure key from.
* @return _secureKey Secure version of the key.
*/
- function _getSecureKey(bytes memory _key)
- private
- pure
- returns (bytes memory _secureKey)
- {
+ function _getSecureKey(bytes memory _key) private pure returns (bytes memory _secureKey) {
return bytes.concat(keccak256(_key));
}
}
diff --git a/packages/protocol/contracts/libs/LibUint512Math.sol b/packages/protocol/contracts/thirdparty/LibUint512Math.sol
similarity index 95%
rename from packages/protocol/contracts/libs/LibUint512Math.sol
rename to packages/protocol/contracts/thirdparty/LibUint512Math.sol
index baf623c39e8..60eef4bc0a6 100644
--- a/packages/protocol/contracts/libs/LibUint512Math.sol
+++ b/packages/protocol/contracts/thirdparty/LibUint512Math.sol
@@ -33,14 +33,7 @@ library LibUint512Math {
/// @param b The second uint256 operand.
/// @return r0 The lower 256 bits of the result.
/// @return r1 The higher 256 bits of the result.
- function mul(
- uint256 a,
- uint256 b
- )
- internal
- pure
- returns (uint256 r0, uint256 r1)
- {
+ function mul(uint256 a, uint256 b) internal pure returns (uint256 r0, uint256 r1) {
assembly {
// Calculate modulo of the multiplication by the largest 256-bit
// number.
diff --git a/packages/protocol/contracts/tokenvault/BaseNFTVault.sol b/packages/protocol/contracts/tokenvault/BaseNFTVault.sol
index b7dd9d3c0e8..c232545fa86 100644
--- a/packages/protocol/contracts/tokenvault/BaseNFTVault.sol
+++ b/packages/protocol/contracts/tokenvault/BaseNFTVault.sol
@@ -6,28 +6,15 @@
pragma solidity ^0.8.20;
-import { EssentialContract } from "../common/EssentialContract.sol";
-import { IERC1155Receiver } from
- "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
-import { IERC165 } from
- "@openzeppelin/contracts/utils/introspection/IERC165.sol";
-import { IERC721Receiver } from
- "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
-import { IERC721Upgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";
-import { IRecallableMessageSender, IBridge } from "../bridge/IBridge.sol";
-import { Proxied } from "../common/Proxied.sol";
+import "./BaseVault.sol";
/// @title BaseNFTVault
/// @notice Abstract contract for bridging NFTs across different chains.
-abstract contract BaseNFTVault is
- EssentialContract,
- IRecallableMessageSender
-{
+abstract contract BaseNFTVault is BaseVault {
// Struct representing the canonical NFT on another chain.
struct CanonicalNFT {
// Chain ID of the NFT.
- uint256 chainId;
+ uint64 chainId;
// Address of the NFT contract.
address addr;
// Symbol of the NFT.
@@ -39,7 +26,7 @@ abstract contract BaseNFTVault is
// Struct representing the details of a bridged token transfer operation.
struct BridgeTransferOp {
// Destination chain ID.
- uint256 destChainId;
+ uint64 destChainId;
// Recipient address.
address to;
// Address of the token.
@@ -61,9 +48,7 @@ abstract contract BaseNFTVault is
// Constants for interface IDs.
bytes4 public constant ERC1155_INTERFACE_ID = 0xd9b67a26;
bytes4 public constant ERC721_INTERFACE_ID = 0x80ac58cd;
-
- // Mapping to track bridged tokens.
- mapping(address => bool) public isBridgedToken;
+ uint256 public constant MAX_TOKEN_PER_TXN = 10;
// Mapping to store bridged NFTs and their canonical counterparts.
mapping(address => CanonicalNFT) public bridgedToCanonical;
@@ -71,10 +56,10 @@ abstract contract BaseNFTVault is
// Mapping to store canonical NFTs and their bridged counterparts.
mapping(uint256 => mapping(address => address)) public canonicalToBridged;
- uint256[47] private __gap;
+ uint256[48] private __gap;
event BridgedTokenDeployed(
- uint256 indexed chainId,
+ uint64 indexed chainId,
address indexed ctoken,
address indexed btoken,
string ctokenSymbol,
@@ -85,7 +70,7 @@ abstract contract BaseNFTVault is
bytes32 indexed msgHash,
address indexed from,
address indexed to,
- uint256 destChainId,
+ uint64 destChainId,
address token,
uint256[] tokenIds,
uint256[] amounts
@@ -103,27 +88,30 @@ abstract contract BaseNFTVault is
bytes32 indexed msgHash,
address indexed from,
address indexed to,
- uint256 srcChainId,
+ uint64 srcChainId,
address token,
uint256[] tokenIds,
uint256[] amounts
);
- error VAULT_INVALID_TO();
error VAULT_INVALID_TOKEN();
error VAULT_INVALID_AMOUNT();
error VAULT_INVALID_USER();
- error VAULT_INVALID_FROM();
error VAULT_INVALID_SRC_CHAIN_ID();
error VAULT_INTERFACE_NOT_SUPPORTED();
- error VAULT_MESSAGE_NOT_FAILED();
- error VAULT_MESSAGE_RELEASED_ALREADY();
error VAULT_TOKEN_ARRAY_MISMATCH();
error VAULT_MAX_TOKEN_PER_TXN_EXCEEDED();
- /// @notice Initializes the contract with an address manager.
- /// @param addressManager The address of the address manager.
- function init(address addressManager) external initializer {
- EssentialContract._init(addressManager);
+ modifier withValidOperation(BridgeTransferOp calldata op) {
+ if (op.tokenIds.length != op.amounts.length) {
+ revert VAULT_TOKEN_ARRAY_MISMATCH();
+ }
+
+ if (op.tokenIds.length > MAX_TOKEN_PER_TXN) {
+ revert VAULT_MAX_TOKEN_PER_TXN_EXCEEDED();
+ }
+
+ if (op.token == address(0)) revert VAULT_INVALID_TOKEN();
+ _;
}
}
diff --git a/packages/protocol/contracts/tokenvault/BaseVault.sol b/packages/protocol/contracts/tokenvault/BaseVault.sol
new file mode 100644
index 00000000000..3fecdfbdd0c
--- /dev/null
+++ b/packages/protocol/contracts/tokenvault/BaseVault.sol
@@ -0,0 +1,59 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+pragma solidity ^0.8.20;
+
+import "lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/IERC165Upgradeable.sol";
+import "../bridge/IBridge.sol";
+import "../common/EssentialContract.sol";
+import "../libs/LibAddress.sol";
+import "../libs/LibDeploy.sol";
+
+abstract contract BaseVault is EssentialContract, IRecallableSender, IERC165Upgradeable {
+ error VAULT_PERMISSION_DENIED();
+
+ modifier onlyFromBridge() {
+ if (msg.sender != resolve("bridge", false)) {
+ revert VAULT_PERMISSION_DENIED();
+ }
+ _;
+ }
+ /// @notice Initializes the contract with the address manager.
+ /// @param addressManager Address manager contract address.
+
+ function init(address addressManager) external initializer {
+ __Essential_init(addressManager);
+ }
+
+ /// @notice Checks if the contract supports the given interface.
+ /// @param interfaceId The interface identifier.
+ /// @return true if the contract supports the interface, false otherwise.
+ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
+ return interfaceId == type(IRecallableSender).interfaceId;
+ }
+
+ function name() public pure virtual returns (bytes32);
+
+ function checkProcessMessageContext()
+ internal
+ view
+ onlyFromBridge
+ returns (IBridge.Context memory ctx)
+ {
+ ctx = IBridge(msg.sender).context();
+ address sender = resolve(ctx.srcChainId, name(), false);
+ if (ctx.from != sender) revert VAULT_PERMISSION_DENIED();
+ }
+
+ function checkRecallMessageContext()
+ internal
+ view
+ onlyFromBridge
+ returns (IBridge.Context memory ctx)
+ {
+ ctx = IBridge(msg.sender).context();
+ if (ctx.from != msg.sender) revert VAULT_PERMISSION_DENIED();
+ }
+}
diff --git a/packages/protocol/contracts/tokenvault/BridgedERC1155.sol b/packages/protocol/contracts/tokenvault/BridgedERC1155.sol
index f0a3d4b8b10..97425d5af36 100644
--- a/packages/protocol/contracts/tokenvault/BridgedERC1155.sol
+++ b/packages/protocol/contracts/tokenvault/BridgedERC1155.sol
@@ -6,15 +6,13 @@
pragma solidity ^0.8.20;
-import { ERC1155Upgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";
-import { EssentialContract } from "../common/EssentialContract.sol";
-import { IERC1155MetadataURIUpgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol";
-import { IERC1155Upgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol";
-import { Proxied } from "../common/Proxied.sol";
-import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
+import "lib/openzeppelin-contracts/contracts/utils/Strings.sol";
+import "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/ERC1155Upgradeable.sol";
+import
+ "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol";
+import "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/IERC1155Upgradeable.sol";
+import "../common/EssentialContract.sol";
+import "./LibBridgedToken.sol";
/// @title BridgedERC1155
/// @notice Contract for bridging ERC1155 tokens across different chains.
@@ -26,21 +24,16 @@ contract BridgedERC1155 is
{
address public srcToken; // Address of the source token contract.
uint256 public srcChainId; // Source chain ID where the token originates.
- string public symbol; // Symbol of the bridged token.
+ string private symbol_; // Symbol of the bridged token.
string private name_; // Name of the bridged token.
uint256[46] private __gap;
// Event triggered upon token transfer.
- event Transfer(
- address indexed from,
- address indexed to,
- uint256 tokenId,
- uint256 amount
- );
+ event Transfer(address indexed from, address indexed to, uint256 tokenId, uint256 amount);
- error BRIDGED_TOKEN_CANNOT_RECEIVE();
- error BRIDGED_TOKEN_INVALID_PARAMS();
+ error BTOKEN_CANNOT_RECEIVE();
+ error BTOKEN_INVALID_PARAMS();
/// @dev Initializer function to be called after deployment.
/// @param _addressManager The address of the address manager.
@@ -58,19 +51,14 @@ contract BridgedERC1155 is
external
initializer
{
- if (
- _srcToken == address(0) || _srcChainId == 0
- || _srcChainId == block.chainid
- ) {
- revert BRIDGED_TOKEN_INVALID_PARAMS();
+ if (_srcToken == address(0) || _srcChainId == 0 || _srcChainId == block.chainid) {
+ revert BTOKEN_INVALID_PARAMS();
}
- EssentialContract._init(_addressManager);
+ __Essential_init(_addressManager);
__ERC1155_init("");
srcToken = _srcToken;
srcChainId = _srcChainId;
- // Note: name and symbol can intentionally be empty ("") as it's not
- // part of the ERC1155 standard.
- symbol = _symbol;
+ symbol_ = _symbol;
name_ = _name;
}
@@ -84,10 +72,11 @@ contract BridgedERC1155 is
uint256 amount
)
public
+ nonReentrant
+ whenNotPaused
onlyFromNamed("erc1155_vault")
{
_mint(account, tokenId, amount, "");
- emit Transfer(address(0), account, tokenId, amount);
}
/// @dev Burns tokens.
@@ -100,10 +89,11 @@ contract BridgedERC1155 is
uint256 amount
)
public
+ nonReentrant
+ whenNotPaused
onlyFromNamed("erc1155_vault")
{
_burn(account, tokenId, amount);
- emit Transfer(account, address(0), tokenId, amount);
}
/// @dev Safely transfers tokens from one address to another.
@@ -121,21 +111,24 @@ contract BridgedERC1155 is
)
public
override(ERC1155Upgradeable, IERC1155Upgradeable)
+ nonReentrant
+ whenNotPaused
{
if (to == address(this)) {
- revert BRIDGED_TOKEN_CANNOT_RECEIVE();
+ revert BTOKEN_CANNOT_RECEIVE();
}
- return
- ERC1155Upgradeable.safeTransferFrom(from, to, tokenId, amount, data);
+ return ERC1155Upgradeable.safeTransferFrom(from, to, tokenId, amount, data);
}
- /// @notice Gets the concatenated name of the bridged token.
- /// @return The concatenated name.
+ /// @notice Gets the name of the bridged token.
+ /// @return The name.
function name() public view returns (string memory) {
- return string.concat(name_, unicode" â€", Strings.toString(srcChainId));
+ return LibBridgedToken.buildName(name_, srcChainId);
}
-}
-/// @title ProxiedBridgedERC1155
-/// @notice Proxied version of the parent contract.
-contract ProxiedBridgedERC1155 is Proxied, BridgedERC1155 { }
+ /// @notice Gets the symbol of the bridged token.
+ /// @return The symbol.
+ function symbol() public view returns (string memory) {
+ return LibBridgedToken.buildSymbol(symbol_);
+ }
+}
diff --git a/packages/protocol/contracts/tokenvault/BridgedERC20.sol b/packages/protocol/contracts/tokenvault/BridgedERC20.sol
index d3b7b709d06..683090bb574 100644
--- a/packages/protocol/contracts/tokenvault/BridgedERC20.sol
+++ b/packages/protocol/contracts/tokenvault/BridgedERC20.sol
@@ -6,34 +6,25 @@
pragma solidity ^0.8.20;
-import {
- ERC20Upgradeable,
- IERC20Upgradeable
-} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
-import { IERC20MetadataUpgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol";
-import { EssentialContract } from "../common/EssentialContract.sol";
-import { IMintableERC20 } from "../common/IMintableERC20.sol";
-import { Proxied } from "../common/Proxied.sol";
-import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
+import
+ "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/IERC20MetadataUpgradeable.sol";
+import "lib/openzeppelin-contracts/contracts/utils/Strings.sol";
+
+import "./LibBridgedToken.sol";
+import "./BridgedERC20Base.sol";
/// @title BridgedERC20
/// @notice An upgradeable ERC20 contract that represents tokens bridged from
/// another chain.
-contract BridgedERC20 is
- EssentialContract,
- IMintableERC20,
- IERC20MetadataUpgradeable,
- ERC20Upgradeable
-{
- address public srcToken;
- uint256 public srcChainId;
+contract BridgedERC20 is BridgedERC20Base, IERC20MetadataUpgradeable, ERC20Upgradeable {
+ address public srcToken; // slot 1
uint8 private srcDecimals;
+ uint256 public srcChainId; // slot 2
- uint256[47] private __gap;
+ uint256[48] private __gap;
- error BRIDGED_TOKEN_CANNOT_RECEIVE();
- error BRIDGED_TOKEN_INVALID_PARAMS();
+ error BTOKEN_CANNOT_RECEIVE();
+ error BTOKEN_INVALID_PARAMS();
/// @notice Initializes the contract.
/// @dev Different BridgedERC20 Contract is deployed per unique _srcToken
@@ -57,16 +48,15 @@ contract BridgedERC20 is
{
// Check if provided parameters are valid
if (
- _srcToken == address(0) || _srcChainId == 0
- || _srcChainId == block.chainid || bytes(_symbol).length == 0
- || bytes(_name).length == 0
+ _srcToken == address(0) || _srcChainId == 0 || _srcChainId == block.chainid
+ || bytes(_symbol).length == 0 || bytes(_name).length == 0
) {
- revert BRIDGED_TOKEN_INVALID_PARAMS();
+ revert BTOKEN_INVALID_PARAMS();
}
- // Initialize EssentialContract and ERC20Upgradeable
- EssentialContract._init(_addressManager);
- ERC20Upgradeable.__ERC20_init({ name_: _name, symbol_: _symbol });
+ // Initialize OwnerUUPSUpgradable and ERC20Upgradeable
+ __Essential_init(_addressManager);
+ __ERC20_init({ name_: _name, symbol_: _symbol });
// Set contract properties
srcToken = _srcToken;
@@ -74,36 +64,6 @@ contract BridgedERC20 is
srcDecimals = _decimals;
}
- /// @notice Mints tokens to an account.
- /// @dev Only an ERC20Vault can call this function.
- /// @param account The account to mint tokens to.
- /// @param amount The amount of tokens to mint.
- function mint(
- address account,
- uint256 amount
- )
- public
- onlyFromNamed2("erc20_vault", "taiko")
- {
- _mint(account, amount);
- emit Transfer(address(0), account, amount);
- }
-
- /// @notice Burns tokens from an account.
- /// @dev Only an ERC20Vault can call this function.
- /// @param account The account to burn tokens from.
- /// @param amount The amount of tokens to burn.
- function burn(
- address account,
- uint256 amount
- )
- public
- onlyFromNamed("erc20_vault")
- {
- _burn(account, amount);
- emit Transfer(account, address(0), amount);
- }
-
/// @notice Transfers tokens from the caller to another account.
/// @dev Any address can call this. Caller must have at least 'amount' to
/// call this.
@@ -115,11 +75,11 @@ contract BridgedERC20 is
)
public
override(ERC20Upgradeable, IERC20Upgradeable)
+ nonReentrant
+ whenNotPaused
returns (bool)
{
- if (to == address(this)) {
- revert BRIDGED_TOKEN_CANNOT_RECEIVE();
- }
+ if (to == address(this)) revert BTOKEN_CANNOT_RECEIVE();
return ERC20Upgradeable.transfer(to, amount);
}
@@ -136,25 +96,36 @@ contract BridgedERC20 is
)
public
override(ERC20Upgradeable, IERC20Upgradeable)
+ nonReentrant
+ whenNotPaused
returns (bool)
{
if (to == address(this)) {
- revert BRIDGED_TOKEN_CANNOT_RECEIVE();
+ revert BTOKEN_CANNOT_RECEIVE();
}
return ERC20Upgradeable.transferFrom(from, to, amount);
}
/// @notice Gets the name of the token.
- /// @return The name of the token with the source chain ID appended.
+ /// @return The name.
function name()
public
view
override(ERC20Upgradeable, IERC20MetadataUpgradeable)
returns (string memory)
{
- return string.concat(
- super.name(), unicode" â€", Strings.toString(srcChainId)
- );
+ return LibBridgedToken.buildName(super.name(), srcChainId);
+ }
+
+ /// @notice Gets the symbol of the bridged token.
+ /// @return The symbol.
+ function symbol()
+ public
+ view
+ override(ERC20Upgradeable, IERC20MetadataUpgradeable)
+ returns (string memory)
+ {
+ return LibBridgedToken.buildSymbol(super.symbol());
}
/// @notice Gets the number of decimal places of the token.
@@ -173,8 +144,12 @@ contract BridgedERC20 is
function canonical() public view returns (address, uint256) {
return (srcToken, srcChainId);
}
-}
-/// @title ProxiedBridgedERC20
-/// @notice Proxied version of the parent contract.
-contract ProxiedBridgedERC20 is Proxied, BridgedERC20 { }
+ function _mintToken(address account, uint256 amount) internal override {
+ _mint(account, amount);
+ }
+
+ function _burnToken(address from, uint256 amount) internal override {
+ _burn(from, amount);
+ }
+}
diff --git a/packages/protocol/contracts/tokenvault/BridgedERC20Base.sol b/packages/protocol/contracts/tokenvault/BridgedERC20Base.sol
new file mode 100644
index 00000000000..28276fb29b1
--- /dev/null
+++ b/packages/protocol/contracts/tokenvault/BridgedERC20Base.sol
@@ -0,0 +1,79 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol";
+import "../common/EssentialContract.sol";
+import "./IBridgedERC20.sol";
+
+abstract contract BridgedERC20Base is EssentialContract, IBridgedERC20 {
+ address public migratingAddress; // slot 1
+ bool public migratingInbound;
+ uint256[49] private __gap;
+
+ event MigrationStatusChanged(address addr, bool inbound);
+
+ event MigratedTo(address indexed fromToken, address indexed account, uint256 amount);
+ event MigratedFrom(address indexed toToken, address indexed account, uint256 amount);
+
+ error BB_PERMISSION_DENIED();
+ error BB_INVALID_PARAMS();
+ error BB_MINT_DISALLOWED();
+
+ function changeMigrationStatus(
+ address addr,
+ bool inbound
+ )
+ external
+ whenNotPaused
+ onlyFromOwnerOrNamed("erc20_vault")
+ {
+ if (addr == migratingAddress && inbound == migratingInbound) {
+ revert BB_INVALID_PARAMS();
+ }
+
+ migratingAddress = addr;
+ migratingInbound = inbound;
+ emit MigrationStatusChanged(addr, inbound);
+ }
+
+ function mint(address account, uint256 amount) public nonReentrant whenNotPaused {
+ // mint is disabled while migrating outbound.
+ if (migratingAddress != address(0) && !migratingInbound) revert BB_MINT_DISALLOWED();
+
+ if (msg.sender == migratingAddress) {
+ // Inbound migration
+ emit MigratedTo(migratingAddress, account, amount);
+ } else if (msg.sender != resolve("erc20_vault", true)) {
+ // Bridging from vault
+ revert BB_PERMISSION_DENIED();
+ }
+
+ _mintToken(account, amount);
+ }
+
+ function burn(address account, uint256 amount) public nonReentrant whenNotPaused {
+ if (migratingAddress != address(0) && !migratingInbound) {
+ // Outbond migration
+ emit MigratedTo(migratingAddress, account, amount);
+ // Ask the new bridged token to mint token for the user.
+ IBridgedERC20(migratingAddress).mint(account, amount);
+ } else if (msg.sender != resolve("erc20_vault", true)) {
+ // Bridging to vault
+ revert RESOLVER_DENIED();
+ }
+
+ _burnToken(account, amount);
+ }
+
+ function owner() public view override(IBridgedERC20, OwnableUpgradeable) returns (address) {
+ return super.owner();
+ }
+
+ function _mintToken(address account, uint256 amount) internal virtual;
+ function _burnToken(address from, uint256 amount) internal virtual;
+}
diff --git a/packages/protocol/contracts/tokenvault/BridgedERC721.sol b/packages/protocol/contracts/tokenvault/BridgedERC721.sol
index 53317f7214d..45262fa976a 100644
--- a/packages/protocol/contracts/tokenvault/BridgedERC721.sol
+++ b/packages/protocol/contracts/tokenvault/BridgedERC721.sol
@@ -6,11 +6,10 @@
pragma solidity ^0.8.20;
-import { EssentialContract } from "../common/EssentialContract.sol";
-import { ERC721Upgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
-import { Proxied } from "../common/Proxied.sol";
-import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
+import "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/ERC721Upgradeable.sol";
+import "lib/openzeppelin-contracts/contracts/utils/Strings.sol";
+import "../common/EssentialContract.sol";
+import "./LibBridgedToken.sol";
/// @title BridgedERC721
/// @notice Contract for bridging ERC721 tokens across different chains.
@@ -20,9 +19,9 @@ contract BridgedERC721 is EssentialContract, ERC721Upgradeable {
uint256[48] private __gap;
- error BRIDGED_TOKEN_CANNOT_RECEIVE();
- error BRIDGED_TOKEN_INVALID_PARAMS();
- error BRIDGED_TOKEN_INVALID_BURN();
+ error BTOKEN_CANNOT_RECEIVE();
+ error BTOKEN_INVALID_PARAMS();
+ error BTOKEN_INVALID_BURN();
/// @dev Initializer function to be called after deployment.
/// @param _addressManager The address of the address manager.
@@ -41,13 +40,12 @@ contract BridgedERC721 is EssentialContract, ERC721Upgradeable {
initializer
{
if (
- _srcToken == address(0) || _srcChainId == 0
- || _srcChainId == block.chainid || bytes(_symbol).length == 0
- || bytes(_name).length == 0
+ _srcToken == address(0) || _srcChainId == 0 || _srcChainId == block.chainid
+ || bytes(_symbol).length == 0 || bytes(_name).length == 0
) {
- revert BRIDGED_TOKEN_INVALID_PARAMS();
+ revert BTOKEN_INVALID_PARAMS();
}
- EssentialContract._init(_addressManager);
+ __Essential_init(_addressManager);
__ERC721_init(_name, _symbol);
srcToken = _srcToken;
srcChainId = _srcChainId;
@@ -61,10 +59,11 @@ contract BridgedERC721 is EssentialContract, ERC721Upgradeable {
uint256 tokenId
)
public
+ nonReentrant
+ whenNotPaused
onlyFromNamed("erc721_vault")
{
_mint(account, tokenId);
- emit Transfer(address(0), account, tokenId);
}
/// @dev Burns tokens.
@@ -75,15 +74,15 @@ contract BridgedERC721 is EssentialContract, ERC721Upgradeable {
uint256 tokenId
)
public
+ nonReentrant
+ whenNotPaused
onlyFromNamed("erc721_vault")
{
// Check if the caller is the owner of the token.
if (ownerOf(tokenId) != account) {
- revert BRIDGED_TOKEN_INVALID_BURN();
+ revert BTOKEN_INVALID_BURN();
}
-
_burn(tokenId);
- emit Transfer(account, address(0), tokenId);
}
/// @dev Safely transfers tokens from one address to another.
@@ -97,24 +96,25 @@ contract BridgedERC721 is EssentialContract, ERC721Upgradeable {
)
public
override(ERC721Upgradeable)
+ nonReentrant
+ whenNotPaused
{
if (to == address(this)) {
- revert BRIDGED_TOKEN_CANNOT_RECEIVE();
+ revert BTOKEN_CANNOT_RECEIVE();
}
return ERC721Upgradeable.transferFrom(from, to, tokenId);
}
- /// @notice Gets the concatenated name of the bridged token.
- /// @return The concatenated name.
- function name()
- public
- view
- override(ERC721Upgradeable)
- returns (string memory)
- {
- return string.concat(
- super.name(), unicode" â€", Strings.toString(srcChainId)
- );
+ /// @notice Gets the name of the token.
+ /// @return The name.
+ function name() public view override(ERC721Upgradeable) returns (string memory) {
+ return LibBridgedToken.buildName(super.name(), srcChainId);
+ }
+
+ /// @notice Gets the symbol of the bridged token.
+ /// @return The symbol.
+ function symbol() public view override(ERC721Upgradeable) returns (string memory) {
+ return LibBridgedToken.buildSymbol(super.symbol());
}
/// @notice Gets the source token and source chain ID being bridged.
@@ -124,19 +124,7 @@ contract BridgedERC721 is EssentialContract, ERC721Upgradeable {
}
/// @notice Returns an empty token URI.
- /// @param tokenId ID of the token.
- /// @return An empty string.
- function tokenURI(uint256 tokenId)
- public
- pure
- virtual
- override
- returns (string memory)
- {
+ function tokenURI(uint256) public pure virtual override returns (string memory) {
return "";
}
}
-
-/// @title ProxiedBridgedERC721
-/// @notice Proxied version of the parent contract.
-contract ProxiedBridgedERC721 is Proxied, BridgedERC721 { }
diff --git a/packages/protocol/contracts/tokenvault/ERC1155Vault.sol b/packages/protocol/contracts/tokenvault/ERC1155Vault.sol
index d8ebe768317..81bfc2fb1b9 100644
--- a/packages/protocol/contracts/tokenvault/ERC1155Vault.sol
+++ b/packages/protocol/contracts/tokenvault/ERC1155Vault.sol
@@ -6,25 +6,12 @@
pragma solidity ^0.8.20;
-import { Create2Upgradeable } from
- "@openzeppelin/contracts-upgradeable/utils/Create2Upgradeable.sol";
-import { ERC1155ReceiverUpgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol";
-import { ERC1155Upgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";
-import { IERC1155Receiver } from
- "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
-import { IERC1155Upgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol";
-import { IERC165Upgradeable } from
- "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol";
-import { IRecallableMessageSender, IBridge } from "../bridge/IBridge.sol";
-import { BaseNFTVault } from "./BaseNFTVault.sol";
-import { LibAddress } from "../libs/LibAddress.sol";
-import { LibVaultUtils } from "./libs/LibVaultUtils.sol";
-import { Proxied } from "../common/Proxied.sol";
-import { ProxiedBridgedERC1155 } from "./BridgedERC1155.sol";
-import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
+import "lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol";
+import
+ "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC1155/utils/ERC1155ReceiverUpgradeable.sol";
+import "../bridge/IBridge.sol";
+import "./BaseNFTVault.sol";
+import "./BridgedERC1155.sol";
/// @title ERC1155NameAndSymbol
/// @notice Interface for ERC1155 contracts that provide name() and symbol()
@@ -37,6 +24,7 @@ interface ERC1155NameAndSymbol {
}
/// @title ERC1155Vault
+/// @dev Labeled in AddressResolver as "erc1155_vault"
/// @notice This vault holds all ERC1155 tokens that users have deposited.
/// It also manages the mapping between canonical tokens and their bridged
/// tokens.
@@ -48,51 +36,51 @@ contract ERC1155Vault is BaseNFTVault, ERC1155ReceiverUpgradeable {
/// @notice Transfers ERC1155 tokens to this vault and sends a message to
/// the destination chain so the user can receive the same (bridged) tokens
/// by invoking the message call.
- /// @param opt Option for sending the ERC1155 token.
- function sendToken(BridgeTransferOp memory opt)
+ /// @param op Option for sending the ERC1155 token.
+ function sendToken(BridgeTransferOp calldata op)
external
payable
nonReentrant
+ whenNotPaused
+ withValidOperation(op)
+ returns (IBridge.Message memory _message)
{
- // Validate amounts and addresses
- LibVaultUtils.checkIfValidAmounts(opt.amounts, opt.tokenIds, false);
- LibVaultUtils.checkIfValidAddresses(
- resolve(opt.destChainId, "erc1155_vault", false), opt.to, opt.token
- );
-
+ for (uint256 i; i < op.amounts.length; ++i) {
+ if (op.amounts[i] == 0) revert VAULT_INVALID_AMOUNT();
+ }
// Check token interface support
- if (!opt.token.supportsInterface(ERC1155_INTERFACE_ID)) {
+ if (!op.token.supportsInterface(ERC1155_INTERFACE_ID)) {
revert VAULT_INTERFACE_NOT_SUPPORTED();
}
// Store variables in memory to avoid stack-too-deep error
- uint256[] memory _amounts = opt.amounts;
- address _token = opt.token;
- uint256[] memory _tokenIds = opt.tokenIds;
+ uint256[] memory _amounts = op.amounts;
+ address _token = op.token;
+ uint256[] memory _tokenIds = op.tokenIds;
// Create a message to send to the destination chain
IBridge.Message memory message;
- message.destChainId = opt.destChainId;
- message.data = _encodeDestinationCall(msg.sender, opt);
- message.user = msg.sender;
- message.to = resolve(message.destChainId, "erc1155_vault", false);
- message.gasLimit = opt.gasLimit;
- message.value = msg.value - opt.fee;
- message.fee = opt.fee;
- message.refundTo = opt.refundTo;
- message.memo = opt.memo;
+ message.destChainId = op.destChainId;
+ message.data = _handleMessage(msg.sender, op);
+ message.owner = msg.sender;
+ message.to = resolve(message.destChainId, name(), false);
+ message.gasLimit = op.gasLimit;
+ message.value = msg.value - op.fee;
+ message.fee = op.fee;
+ message.refundTo = op.refundTo;
+ message.memo = op.memo;
// Send the message and obtain the message hash
- bytes32 msgHash = IBridge(resolve("bridge", false)).sendMessage{
- value: msg.value
- }(message);
+ bytes32 msgHash;
+ (msgHash, _message) =
+ IBridge(resolve("bridge", false)).sendMessage{ value: msg.value }(message);
// Emit TokenSent event
emit TokenSent({
msgHash: msgHash,
- from: message.user,
- to: opt.to,
- destChainId: message.destChainId,
+ from: _message.owner,
+ to: op.to,
+ destChainId: _message.destChainId,
token: _token,
tokenIds: _tokenIds,
amounts: _amounts
@@ -118,11 +106,12 @@ contract ERC1155Vault is BaseNFTVault, ERC1155ReceiverUpgradeable {
external
payable
nonReentrant
- onlyFromNamed("bridge")
+ whenNotPaused
{
// Check context validity
- IBridge.Context memory ctx =
- LibVaultUtils.checkValidContext("erc1155_vault", address(this));
+ IBridge.Context memory ctx = checkProcessMessageContext();
+
+ address _to = to == address(0) || to == address(this) ? from : to;
address token;
unchecked {
@@ -130,9 +119,9 @@ contract ERC1155Vault is BaseNFTVault, ERC1155ReceiverUpgradeable {
// Token lives on this chain
token = ctoken.addr;
for (uint256 i; i < tokenIds.length; ++i) {
- ERC1155Upgradeable(token).safeTransferFrom({
+ ERC1155(token).safeTransferFrom({
from: address(this),
- to: to,
+ to: _to,
id: tokenIds[i],
amount: amounts[i],
data: ""
@@ -142,14 +131,12 @@ contract ERC1155Vault is BaseNFTVault, ERC1155ReceiverUpgradeable {
// Token does not live on this chain
token = _getOrDeployBridgedToken(ctoken);
for (uint256 i; i < tokenIds.length; ++i) {
- ProxiedBridgedERC1155(token).mint(
- to, tokenIds[i], amounts[i]
- );
+ BridgedERC1155(token).mint(_to, tokenIds[i], amounts[i]);
}
}
}
- to.sendEther(msg.value);
+ _to.sendEther(msg.value);
emit TokenReceived({
msgHash: ctx.msgHash,
@@ -162,45 +149,34 @@ contract ERC1155Vault is BaseNFTVault, ERC1155ReceiverUpgradeable {
});
}
- /// @notice Releases deposited ERC1155 token(s) back to the user on the
- /// source chain with a proof that the message processing on the destination
- /// Bridge has failed.
- /// @param message The message that corresponds to the ERC1155 deposit on
- /// the source chain.
- function onMessageRecalled(IBridge.Message calldata message)
+ /// @inheritdoc IRecallableSender
+ function onMessageRecalled(
+ IBridge.Message calldata message,
+ bytes32 msgHash
+ )
external
payable
override
nonReentrant
- onlyFromNamed("bridge")
+ whenNotPaused
{
- (
- CanonicalNFT memory nft,
- ,
- ,
- uint256[] memory tokenIds,
- uint256[] memory amounts
- ) = abi.decode(
- message.data[4:],
- (CanonicalNFT, address, address, uint256[], uint256[])
- );
+ checkRecallMessageContext();
- bytes32 msgHash = LibVaultUtils.hashAndCheckToken(
- message, resolve("bridge", false), nft.addr
- );
+ (CanonicalNFT memory nft,,, uint256[] memory tokenIds, uint256[] memory amounts) =
+ abi.decode(message.data[4:], (CanonicalNFT, address, address, uint256[], uint256[]));
+
+ if (nft.addr == address(0)) revert VAULT_INVALID_TOKEN();
unchecked {
- if (isBridgedToken[nft.addr]) {
+ if (bridgedToCanonical[nft.addr].addr != address(0)) {
for (uint256 i; i < tokenIds.length; ++i) {
- ProxiedBridgedERC1155(nft.addr).mint(
- message.user, tokenIds[i], amounts[i]
- );
+ BridgedERC1155(nft.addr).mint(message.owner, tokenIds[i], amounts[i]);
}
} else {
for (uint256 i; i < tokenIds.length; ++i) {
- IERC1155Upgradeable(nft.addr).safeTransferFrom({
+ ERC1155(nft.addr).safeTransferFrom({
from: address(this),
- to: message.user,
+ to: message.owner,
id: tokenIds[i],
amount: amounts[i],
data: ""
@@ -209,11 +185,12 @@ contract ERC1155Vault is BaseNFTVault, ERC1155ReceiverUpgradeable {
}
}
// Send back Ether
- message.user.sendEther(message.value);
+ message.owner.sendEther(message.value);
+
// Emit TokenReleased event
emit TokenReleased({
msgHash: msgHash,
- from: message.user,
+ from: message.owner,
token: nft.addr,
tokenIds: tokenIds,
amounts: amounts
@@ -231,7 +208,7 @@ contract ERC1155Vault is BaseNFTVault, ERC1155ReceiverUpgradeable {
pure
returns (bytes4)
{
- return IERC1155Receiver.onERC1155BatchReceived.selector;
+ return IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector;
}
function onERC1155Received(
@@ -245,7 +222,7 @@ contract ERC1155Vault is BaseNFTVault, ERC1155ReceiverUpgradeable {
pure
returns (bytes4)
{
- return IERC1155Receiver.onERC1155Received.selector;
+ return IERC1155ReceiverUpgradeable.onERC1155Received.selector;
}
/// @dev See {IERC165-supportsInterface}.
@@ -253,21 +230,25 @@ contract ERC1155Vault is BaseNFTVault, ERC1155ReceiverUpgradeable {
public
view
virtual
- override(ERC1155ReceiverUpgradeable)
+ override(BaseVault, ERC1155ReceiverUpgradeable)
returns (bool)
{
return interfaceId == type(ERC1155ReceiverUpgradeable).interfaceId
- || interfaceId == type(IRecallableMessageSender).interfaceId
- || super.supportsInterface(interfaceId);
+ || BaseVault.supportsInterface(interfaceId);
+ }
+
+ function name() public pure override returns (bytes32) {
+ return "erc1155_vault";
}
- /// @dev Encodes sending bridged or canonical ERC1155 tokens to the user.
+ /// @dev Handles the message on the source chain and returns the encoded
+ /// call on the destination call.
/// @param user The user's address.
- /// @param opt BridgeTransferOp data.
+ /// @param op BridgeTransferOp data.
/// @return msgData Encoded message data.
- function _encodeDestinationCall(
+ function _handleMessage(
address user,
- BridgeTransferOp memory opt
+ BridgeTransferOp memory op
)
private
returns (bytes memory msgData)
@@ -275,46 +256,39 @@ contract ERC1155Vault is BaseNFTVault, ERC1155ReceiverUpgradeable {
CanonicalNFT memory nft;
unchecked {
// is a btoken, meaning, it does not live on this chain
- if (isBridgedToken[opt.token]) {
- nft = bridgedToCanonical[opt.token];
- for (uint256 i; i < opt.tokenIds.length; ++i) {
- ProxiedBridgedERC1155(opt.token).burn(
- user, opt.tokenIds[i], opt.amounts[i]
- );
+ if (bridgedToCanonical[op.token].addr != address(0)) {
+ nft = bridgedToCanonical[op.token];
+ for (uint256 i; i < op.tokenIds.length; ++i) {
+ BridgedERC1155(op.token).burn(user, op.tokenIds[i], op.amounts[i]);
}
} else {
// is a ctoken token, meaning, it lives on this chain
nft = CanonicalNFT({
- chainId: block.chainid,
- addr: opt.token,
+ chainId: uint64(block.chainid),
+ addr: op.token,
symbol: "",
name: ""
});
- ERC1155NameAndSymbol t = ERC1155NameAndSymbol(opt.token);
+ ERC1155NameAndSymbol t = ERC1155NameAndSymbol(op.token);
try t.name() returns (string memory _name) {
nft.name = _name;
} catch { }
try t.symbol() returns (string memory _symbol) {
nft.symbol = _symbol;
} catch { }
- for (uint256 i; i < opt.tokenIds.length; ++i) {
- ERC1155Upgradeable(opt.token).safeTransferFrom({
+ for (uint256 i; i < op.tokenIds.length; ++i) {
+ ERC1155(op.token).safeTransferFrom({
from: msg.sender,
to: address(this),
- id: opt.tokenIds[i],
- amount: opt.amounts[i],
+ id: op.tokenIds[i],
+ amount: op.amounts[i],
data: ""
});
}
}
}
msgData = abi.encodeWithSelector(
- ERC1155Vault.receiveToken.selector,
- nft,
- user,
- opt.to,
- opt.tokenIds,
- opt.amounts
+ this.receiveToken.selector, nft, user, op.to, op.tokenIds, op.amounts
);
}
@@ -336,33 +310,17 @@ contract ERC1155Vault is BaseNFTVault, ERC1155ReceiverUpgradeable {
/// this chain.
/// @param ctoken CanonicalNFT data.
/// @return btoken Address of the deployed bridged token contract.
- function _deployBridgedToken(CanonicalNFT memory ctoken)
- private
- returns (address btoken)
- {
- address bridgedToken = Create2Upgradeable.deploy({
- amount: 0, // amount of Ether to send
- salt: keccak256(abi.encode(ctoken)),
- bytecode: type(ProxiedBridgedERC1155).creationCode
- });
-
- btoken = LibVaultUtils.deployProxy(
- address(bridgedToken),
- owner(),
- bytes.concat(
- ProxiedBridgedERC1155(bridgedToken).init.selector,
- abi.encode(
- address(_addressManager),
- ctoken.addr,
- ctoken.chainId,
- ctoken.symbol,
- ctoken.name
- )
- )
+ function _deployBridgedToken(CanonicalNFT memory ctoken) private returns (address btoken) {
+ bytes memory data = bytes.concat(
+ BridgedERC1155.init.selector,
+ abi.encode(addressManager, ctoken.addr, ctoken.chainId, ctoken.symbol, ctoken.name)
);
- isBridgedToken[btoken] = true;
+
+ btoken = LibDeploy.deployERC1967Proxy(resolve("bridged_erc1155", false), owner(), data);
+
bridgedToCanonical[btoken] = ctoken;
canonicalToBridged[ctoken.chainId][ctoken.addr] = btoken;
+
emit BridgedTokenDeployed({
chainId: ctoken.chainId,
ctoken: ctoken.addr,
@@ -372,7 +330,3 @@ contract ERC1155Vault is BaseNFTVault, ERC1155ReceiverUpgradeable {
});
}
}
-
-/// @title ProxiedERC1155Vault
-/// @notice Proxied version of the parent contract.
-contract ProxiedERC1155Vault is Proxied, ERC1155Vault { }
diff --git a/packages/protocol/contracts/tokenvault/ERC20Vault.sol b/packages/protocol/contracts/tokenvault/ERC20Vault.sol
index 93b718f9f26..636f7d10944 100644
--- a/packages/protocol/contracts/tokenvault/ERC20Vault.sol
+++ b/packages/protocol/contracts/tokenvault/ERC20Vault.sol
@@ -6,40 +6,24 @@
pragma solidity ^0.8.20;
-import { BridgedERC20, ProxiedBridgedERC20 } from "./BridgedERC20.sol";
-import { Create2Upgradeable } from
- "@openzeppelin/contracts-upgradeable/utils/Create2Upgradeable.sol";
-import {
- ERC20Upgradeable,
- IERC20Upgradeable
-} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
-import { EssentialContract } from "../common/EssentialContract.sol";
-import { IERC165Upgradeable } from
- "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol";
-import { IRecallableMessageSender, IBridge } from "../bridge/IBridge.sol";
-import { IMintableERC20 } from "../common/IMintableERC20.sol";
-import { LibAddress } from "../libs/LibAddress.sol";
-import { LibVaultUtils } from "./libs/LibVaultUtils.sol";
-import { Proxied } from "../common/Proxied.sol";
-import { SafeERC20Upgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
-import { TaikoToken } from "../L1/TaikoToken.sol";
+import "lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol";
+import "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
+import "../bridge/IBridge.sol";
+import "./BridgedERC20.sol";
+import "./BaseVault.sol";
/// @title ERC20Vault
+/// @dev Labeled in AddressResolver as "erc20_vault"
/// @notice This vault holds all ERC20 tokens (excluding Ether) that users have
/// deposited. It also manages the mapping between canonical ERC20 tokens and
/// their bridged tokens.
-contract ERC20Vault is
- EssentialContract,
- IERC165Upgradeable,
- IRecallableMessageSender
-{
+contract ERC20Vault is BaseVault {
using LibAddress for address;
- using SafeERC20Upgradeable for ERC20Upgradeable;
+ using SafeERC20 for ERC20;
// Structs for canonical ERC20 tokens and transfer operations
struct CanonicalERC20 {
- uint256 chainId;
+ uint64 chainId;
address addr;
uint8 decimals;
string symbol;
@@ -47,7 +31,7 @@ contract ERC20Vault is
}
struct BridgeTransferOp {
- uint256 destChainId;
+ uint64 destChainId;
address to;
address token;
uint256 amount;
@@ -57,9 +41,6 @@ contract ERC20Vault is
string memo;
}
- // Tracks if a token on the current chain is a canonical or btoken.
- mapping(address => bool) public isBridgedToken;
-
// Mappings from btokens to their canonical tokens.
mapping(address => CanonicalERC20) public bridgedToCanonical;
@@ -67,7 +48,9 @@ contract ERC20Vault is
// tokens across other chains aside from Ethereum.
mapping(uint256 => mapping(address => address)) public canonicalToBridged;
- uint256[47] private __gap;
+ mapping(address btoken => bool blacklisted) public btokenBlacklist;
+
+ uint256[46] private __gap;
event BridgedTokenDeployed(
uint256 indexed srcChainId,
@@ -77,98 +60,140 @@ contract ERC20Vault is
string ctokenName,
uint8 ctokenDecimal
);
+
+ event BridgedTokenChanged(
+ uint256 indexed srcChainId,
+ address indexed ctoken,
+ address btokenOld,
+ address btokenNew,
+ string ctokenSymbol,
+ string ctokenName,
+ uint8 ctokenDecimal
+ );
+
event TokenSent(
bytes32 indexed msgHash,
address indexed from,
address indexed to,
- uint256 destChainId,
+ uint64 destChainId,
address token,
uint256 amount
);
event TokenReleased(
- bytes32 indexed msgHash,
- address indexed from,
- address token,
- uint256 amount
+ bytes32 indexed msgHash, address indexed from, address token, uint256 amount
);
event TokenReceived(
bytes32 indexed msgHash,
address indexed from,
address indexed to,
- uint256 srcChainId,
+ uint64 srcChainId,
address token,
uint256 amount
);
- error VAULT_INVALID_TO();
+ error VAULT_BTOKEN_BLACKLISTED();
+ error VAULT_CTOKEN_MISMATCH();
error VAULT_INVALID_TOKEN();
error VAULT_INVALID_AMOUNT();
- error VAULT_INVALID_USER();
- error VAULT_INVALID_FROM();
- error VAULT_INVALID_SRC_CHAIN_ID();
- error VAULT_MESSAGE_NOT_FAILED();
- error VAULT_MESSAGE_RELEASED_ALREADY();
-
- modifier onlyValidAddresses(
- uint256 chainId,
- bytes32 name,
- address to,
- address token
- ) {
- if (to == address(0) || to == resolve(chainId, name, false)) {
- revert VAULT_INVALID_TO();
+ error VAULT_INVALID_NEW_BTOKEN();
+ error VAULT_NOT_SAME_OWNER();
+
+ function changeBridgedToken(
+ CanonicalERC20 calldata ctoken,
+ address btokenNew
+ )
+ external
+ nonReentrant
+ whenNotPaused
+ onlyOwner
+ returns (address btokenOld)
+ {
+ if (btokenNew == address(0) || bridgedToCanonical[btokenNew].addr != address(0)) {
+ revert VAULT_INVALID_NEW_BTOKEN();
}
- if (token == address(0)) revert VAULT_INVALID_TOKEN();
- _;
- }
- /// @notice Initializes the contract with the address manager.
- /// @param addressManager Address manager contract address.
- function init(address addressManager) external initializer {
- EssentialContract._init(addressManager);
+ if (btokenBlacklist[btokenNew]) revert VAULT_BTOKEN_BLACKLISTED();
+
+ if (IBridgedERC20(btokenNew).owner() != owner()) {
+ revert VAULT_NOT_SAME_OWNER();
+ }
+
+ btokenOld = canonicalToBridged[ctoken.chainId][ctoken.addr];
+
+ if (btokenOld != address(0)) {
+ CanonicalERC20 memory _ctoken = bridgedToCanonical[btokenOld];
+
+ // Check that the ctoken must match the saved one.
+ if (
+ _ctoken.decimals != ctoken.decimals
+ || keccak256(bytes(_ctoken.symbol)) != keccak256(bytes(ctoken.symbol))
+ || keccak256(bytes(_ctoken.name)) != keccak256(bytes(ctoken.name))
+ ) revert VAULT_CTOKEN_MISMATCH();
+
+ delete bridgedToCanonical[btokenOld];
+ btokenBlacklist[btokenOld] = true;
+
+ // Start the migration
+ IBridgedERC20(btokenOld).changeMigrationStatus(btokenNew, false);
+ IBridgedERC20(btokenNew).changeMigrationStatus(btokenOld, true);
+ } else {
+ IBridgedERC20(btokenNew).changeMigrationStatus(address(0), false);
+ }
+
+ bridgedToCanonical[btokenNew] = ctoken;
+ canonicalToBridged[ctoken.chainId][ctoken.addr] = btokenNew;
+
+ emit BridgedTokenChanged({
+ srcChainId: ctoken.chainId,
+ ctoken: ctoken.addr,
+ btokenOld: btokenOld,
+ btokenNew: btokenNew,
+ ctokenSymbol: ctoken.symbol,
+ ctokenName: ctoken.name,
+ ctokenDecimal: ctoken.decimals
+ });
}
/// @notice Transfers ERC20 tokens to this vault and sends a message to the
/// destination chain so the user can receive the same amount of tokens by
/// invoking the message call.
- /// @param opt Option for sending ERC20 tokens.
- function sendToken(BridgeTransferOp calldata opt)
+ /// @param op Option for sending ERC20 tokens.
+ function sendToken(BridgeTransferOp calldata op)
external
payable
nonReentrant
- onlyValidAddresses(opt.destChainId, "erc20_vault", opt.to, opt.token)
+ whenNotPaused
+ returns (IBridge.Message memory _message)
{
- if (opt.amount == 0) revert VAULT_INVALID_AMOUNT();
+ if (op.amount == 0) revert VAULT_INVALID_AMOUNT();
+ if (op.token == address(0)) revert VAULT_INVALID_TOKEN();
+ if (btokenBlacklist[op.token]) revert VAULT_BTOKEN_BLACKLISTED();
uint256 _amount;
IBridge.Message memory message;
- (message.data, _amount) = _encodeDestinationCall({
- user: msg.sender,
- token: opt.token,
- amount: opt.amount,
- to: opt.to
- });
+ (message.data, _amount) =
+ _handleMessage({ user: msg.sender, token: op.token, amount: op.amount, to: op.to });
- message.destChainId = opt.destChainId;
- message.user = msg.sender;
- message.to = resolve(opt.destChainId, "erc20_vault", false);
- message.gasLimit = opt.gasLimit;
- message.value = msg.value - opt.fee;
- message.fee = opt.fee;
- message.refundTo = opt.refundTo;
- message.memo = opt.memo;
+ message.destChainId = op.destChainId;
+ message.owner = msg.sender;
+ message.to = resolve(op.destChainId, name(), false);
+ message.gasLimit = op.gasLimit;
+ message.value = msg.value - op.fee;
+ message.fee = op.fee;
+ message.refundTo = op.refundTo;
+ message.memo = op.memo;
- bytes32 msgHash = IBridge(resolve("bridge", false)).sendMessage{
- value: msg.value
- }(message);
+ bytes32 msgHash;
+ (msgHash, _message) =
+ IBridge(resolve("bridge", false)).sendMessage{ value: msg.value }(message);
emit TokenSent({
msgHash: msgHash,
- from: message.user,
- to: opt.to,
- destChainId: opt.destChainId,
- token: opt.token,
+ from: _message.owner,
+ to: op.to,
+ destChainId: op.destChainId,
+ token: op.token,
amount: _amount
});
}
@@ -187,25 +212,21 @@ contract ERC20Vault is
external
payable
nonReentrant
- onlyFromNamed("bridge")
+ whenNotPaused
{
- IBridge.Context memory ctx =
- LibVaultUtils.checkValidContext("erc20_vault", address(this));
-
+ IBridge.Context memory ctx = checkProcessMessageContext();
+ address _to = to == address(0) || to == address(this) ? from : to;
address token;
+
if (ctoken.chainId == block.chainid) {
token = ctoken.addr;
- if (token == resolve("taiko_token", true)) {
- IMintableERC20(token).mint(to, amount);
- } else {
- ERC20Upgradeable(token).safeTransfer(to, amount);
- }
+ ERC20(token).safeTransfer(_to, amount);
} else {
token = _getOrDeployBridgedToken(ctoken);
- IMintableERC20(token).mint(to, amount);
+ IBridgedERC20(token).mint(_to, amount);
}
- to.sendEther(msg.value);
+ _to.sendEther(msg.value);
emit TokenReceived({
msgHash: ctx.msgHash,
@@ -217,58 +238,42 @@ contract ERC20Vault is
});
}
- /// @notice Releases deposited ERC20 tokens back to the user on the source
- /// ERC20Vault with a proof that the message processing on the destination
- /// Bridge has failed.
- /// @param message The message that corresponds to the ERC20 deposit on the
- /// source chain.
- function onMessageRecalled(IBridge.Message calldata message)
+ function onMessageRecalled(
+ IBridge.Message calldata message,
+ bytes32 msgHash
+ )
external
payable
override
nonReentrant
- onlyFromNamed("bridge")
+ whenNotPaused
{
- IBridge bridge = IBridge(resolve("bridge", false));
- bytes32 msgHash = bridge.hashMessage(message);
+ checkRecallMessageContext();
- (, address token,, uint256 amount) = abi.decode(
- message.data[4:], (CanonicalERC20, address, address, uint256)
- );
+ (, address token,, uint256 amount) =
+ abi.decode(message.data[4:], (CanonicalERC20, address, address, uint256));
if (token == address(0)) revert VAULT_INVALID_TOKEN();
if (amount > 0) {
- if (isBridgedToken[token] || token == resolve("taiko_token", true))
- {
- IMintableERC20(token).burn(address(this), amount);
+ if (bridgedToCanonical[token].addr != address(0)) {
+ IBridgedERC20(token).mint(message.owner, amount);
} else {
- ERC20Upgradeable(token).safeTransfer(message.user, amount);
+ ERC20(token).safeTransfer(message.owner, amount);
}
}
- emit TokenReleased({
- msgHash: msgHash,
- from: message.user,
- token: token,
- amount: amount
- });
+ message.owner.sendEther(message.value);
+
+ emit TokenReleased({ msgHash: msgHash, from: message.owner, token: token, amount: amount });
}
- /// @notice Checks if the contract supports the given interface.
- /// @param interfaceId The interface identifier.
- /// @return true if the contract supports the interface, false otherwise.
- function supportsInterface(bytes4 interfaceId)
- public
- view
- virtual
- override
- returns (bool)
- {
- return interfaceId == type(IRecallableMessageSender).interfaceId;
+ function name() public pure override returns (bytes32) {
+ return "erc20_vault";
}
- /// @dev Encodes sending bridged or canonical ERC20 tokens to the user.
+ /// @dev Handles the message on the source chain and returns the encoded
+ /// call on the destination call.
/// @param user The user's address.
/// @param token The token address.
/// @param to To address.
@@ -276,8 +281,8 @@ contract ERC20Vault is
/// @return msgData Encoded message data.
/// @return _balanceChange User token balance actual change after the token
/// transfer. This value is calculated so we do not assume token balance
- /// change is the amount of token transferred away.
- function _encodeDestinationCall(
+ /// change is the amount of token transfered away.
+ function _handleMessage(
address user,
address token,
address to,
@@ -289,39 +294,32 @@ contract ERC20Vault is
CanonicalERC20 memory ctoken;
// If it's a bridged token
- if (isBridgedToken[token]) {
+ if (bridgedToCanonical[token].addr != address(0)) {
ctoken = bridgedToCanonical[token];
- assert(ctoken.addr != address(0));
- IMintableERC20(token).burn(msg.sender, amount);
+ IBridgedERC20(token).burn(msg.sender, amount);
_balanceChange = amount;
} else {
// If it's a canonical token
- ERC20Upgradeable t = ERC20Upgradeable(token);
+ ERC20 t = ERC20(token);
ctoken = CanonicalERC20({
- chainId: block.chainid,
+ chainId: uint64(block.chainid),
addr: token,
decimals: t.decimals(),
symbol: t.symbol(),
name: t.name()
});
- if (token == resolve("taiko_token", true)) {
- IMintableERC20(token).burn(msg.sender, amount);
- _balanceChange = amount;
- } else {
- uint256 _balance = t.balanceOf(address(this));
- t.transferFrom({
- from: msg.sender,
- to: address(this),
- amount: amount
- });
- _balanceChange = t.balanceOf(address(this)) - _balance;
- }
+ // Query the balance then query it again to get the actual amount of
+ // token transferred into this address, this is more accurate than
+ // simply using `amount` -- some contract may deduct a fee from the
+ // transferred amount.
+ uint256 _balance = t.balanceOf(address(this));
+ t.transferFrom({ from: msg.sender, to: address(this), amount: amount });
+ _balanceChange = t.balanceOf(address(this)) - _balance;
}
- msgData = abi.encodeWithSelector(
- ERC20Vault.receiveToken.selector, ctoken, user, to, _balanceChange
- );
+ msgData =
+ abi.encodeWithSelector(this.receiveToken.selector, ctoken, user, to, _balanceChange);
}
/// @dev Retrieve or deploy a bridged ERC20 token contract.
@@ -343,33 +341,21 @@ contract ERC20Vault is
/// this chain.
/// @param ctoken CanonicalERC20 data.
/// @return btoken Address of the deployed bridged token contract.
- function _deployBridgedToken(CanonicalERC20 calldata ctoken)
- private
- returns (address btoken)
- {
- address bridgedToken = Create2Upgradeable.deploy({
- amount: 0, // amount of Ether to send
- salt: keccak256(abi.encode(ctoken)),
- bytecode: type(ProxiedBridgedERC20).creationCode
- });
-
- btoken = LibVaultUtils.deployProxy(
- address(bridgedToken),
- owner(),
- bytes.concat(
- ProxiedBridgedERC20(bridgedToken).init.selector,
- abi.encode(
- address(_addressManager),
- ctoken.addr,
- ctoken.chainId,
- ctoken.decimals,
- ctoken.symbol,
- ctoken.name
- )
+ function _deployBridgedToken(CanonicalERC20 calldata ctoken) private returns (address btoken) {
+ bytes memory data = bytes.concat(
+ BridgedERC20.init.selector,
+ abi.encode(
+ addressManager,
+ ctoken.addr,
+ ctoken.chainId,
+ ctoken.decimals,
+ ctoken.symbol,
+ ctoken.name
)
);
- isBridgedToken[btoken] = true;
+ btoken = LibDeploy.deployERC1967Proxy(resolve("bridged_erc20", false), owner(), data);
+
bridgedToCanonical[btoken] = ctoken;
canonicalToBridged[ctoken.chainId][ctoken.addr] = btoken;
@@ -383,7 +369,3 @@ contract ERC20Vault is
});
}
}
-
-/// @title ProxiedERC20Vault
-/// @notice Proxied version of the parent contract.
-contract ProxiedERC20Vault is Proxied, ERC20Vault { }
diff --git a/packages/protocol/contracts/tokenvault/ERC721Vault.sol b/packages/protocol/contracts/tokenvault/ERC721Vault.sol
index 70b2fa029e5..2b952e7903c 100644
--- a/packages/protocol/contracts/tokenvault/ERC721Vault.sol
+++ b/packages/protocol/contracts/tokenvault/ERC721Vault.sol
@@ -6,28 +6,19 @@
pragma solidity ^0.8.20;
-import { BaseNFTVault } from "./BaseNFTVault.sol";
-import { Create2Upgradeable } from
- "@openzeppelin/contracts-upgradeable/utils/Create2Upgradeable.sol";
-import { ERC721Upgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
-import { IERC165Upgradeable } from
- "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol";
-import { IERC721Receiver } from
- "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
-import { IERC721Upgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";
-import { IBridge, IRecallableMessageSender } from "../bridge/IBridge.sol";
-import { LibAddress } from "../libs/LibAddress.sol";
-import { LibVaultUtils } from "./libs/LibVaultUtils.sol";
-import { Proxied } from "../common/Proxied.sol";
-import { ProxiedBridgedERC721 } from "./BridgedERC721.sol";
+import "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol";
+import
+ "lib/openzeppelin-contracts-upgradeable/contracts/token/ERC721/IERC721ReceiverUpgradeable.sol";
+import "../bridge/IBridge.sol";
+import "./BaseNFTVault.sol";
+import "./BridgedERC721.sol";
/// @title ERC721Vault
+/// @dev Labeled in AddressResolver as "erc721_vault"
/// @notice This vault holds all ERC721 tokens that users have deposited.
/// It also manages the mapping between canonical tokens and their bridged
/// tokens.
-contract ERC721Vault is BaseNFTVault, IERC721Receiver, IERC165Upgradeable {
+contract ERC721Vault is BaseNFTVault, IERC721ReceiverUpgradeable {
using LibAddress for address;
uint256[50] private __gap;
@@ -35,47 +26,49 @@ contract ERC721Vault is BaseNFTVault, IERC721Receiver, IERC165Upgradeable {
/// @notice Transfers ERC721 tokens to this vault and sends a message to the
/// destination chain so the user can receive the same (bridged) tokens
/// by invoking the message call.
- /// @param opt Option for sending the ERC721 token.
- function sendToken(BridgeTransferOp calldata opt)
+ /// @param op Option for sending the ERC721 token.
+ function sendToken(BridgeTransferOp calldata op)
external
payable
nonReentrant
+ whenNotPaused
+ withValidOperation(op)
+ returns (IBridge.Message memory _message)
{
- LibVaultUtils.checkIfValidAmounts(opt.amounts, opt.tokenIds, true);
- LibVaultUtils.checkIfValidAddresses(
- resolve(opt.destChainId, "erc721_vault", false), opt.to, opt.token
- );
+ for (uint256 i; i < op.tokenIds.length; ++i) {
+ if (op.amounts[i] != 0) revert VAULT_INVALID_AMOUNT();
+ }
- if (!opt.token.supportsInterface(ERC721_INTERFACE_ID)) {
+ if (!op.token.supportsInterface(ERC721_INTERFACE_ID)) {
revert VAULT_INTERFACE_NOT_SUPPORTED();
}
// We need to save them into memory - because structs containing
// dynamic arrays will cause stack-too-deep error when passed
- uint256[] memory _amounts = opt.amounts;
- address _token = opt.token;
- uint256[] memory _tokenIds = opt.tokenIds;
+ uint256[] memory _amounts = op.amounts;
+ address _token = op.token;
+ uint256[] memory _tokenIds = op.tokenIds;
IBridge.Message memory message;
- message.destChainId = opt.destChainId;
- message.data = _encodeDestinationCall(msg.sender, opt);
- message.user = msg.sender;
- message.to = resolve(message.destChainId, "erc721_vault", false);
- message.gasLimit = opt.gasLimit;
- message.value = msg.value - opt.fee;
- message.fee = opt.fee;
- message.refundTo = opt.refundTo;
- message.memo = opt.memo;
-
- bytes32 msgHash = IBridge(resolve("bridge", false)).sendMessage{
- value: msg.value
- }(message);
+ message.destChainId = op.destChainId;
+ message.data = _handleMessage(msg.sender, op);
+ message.owner = msg.sender;
+ message.to = resolve(message.destChainId, name(), false);
+ message.gasLimit = op.gasLimit;
+ message.value = msg.value - op.fee;
+ message.fee = op.fee;
+ message.refundTo = op.refundTo;
+ message.memo = op.memo;
+
+ bytes32 msgHash;
+ (msgHash, _message) =
+ IBridge(resolve("bridge", false)).sendMessage{ value: msg.value }(message);
emit TokenSent({
msgHash: msgHash,
- from: message.user,
- to: opt.to,
- destChainId: message.destChainId,
+ from: _message.owner,
+ to: op.to,
+ destChainId: _message.destChainId,
token: _token,
tokenIds: _tokenIds,
amounts: _amounts
@@ -96,10 +89,11 @@ contract ERC721Vault is BaseNFTVault, IERC721Receiver, IERC165Upgradeable {
external
payable
nonReentrant
- onlyFromNamed("bridge")
+ whenNotPaused
{
- IBridge.Context memory ctx =
- LibVaultUtils.checkValidContext("erc721_vault", address(this));
+ IBridge.Context memory ctx = checkProcessMessageContext();
+
+ address _to = to == address(0) || to == address(this) ? from : to;
address token;
unchecked {
@@ -108,19 +102,19 @@ contract ERC721Vault is BaseNFTVault, IERC721Receiver, IERC165Upgradeable {
for (uint256 i; i < tokenIds.length; ++i) {
ERC721Upgradeable(token).transferFrom({
from: address(this),
- to: to,
+ to: _to,
tokenId: tokenIds[i]
});
}
} else {
token = _getOrDeployBridgedToken(ctoken);
for (uint256 i; i < tokenIds.length; ++i) {
- ProxiedBridgedERC721(token).mint(to, tokenIds[i]);
+ BridgedERC721(token).mint(_to, tokenIds[i]);
}
}
}
- to.sendEther(msg.value);
+ _to.sendEther(msg.value);
emit TokenReceived({
msgHash: ctx.msgHash,
@@ -133,48 +127,38 @@ contract ERC721Vault is BaseNFTVault, IERC721Receiver, IERC165Upgradeable {
});
}
- /// @notice Release deposited ERC721 token(s) back to the user on the source
- /// chain with a proof that the message processing on the destination Bridge
- /// has failed.
- /// @param message The message that corresponds to the ERC721 deposit on the
- /// source chain.
- function onMessageRecalled(IBridge.Message calldata message)
+ function onMessageRecalled(
+ IBridge.Message calldata message,
+ bytes32 msgHash
+ )
external
payable
override
nonReentrant
- onlyFromNamed("bridge")
+ whenNotPaused
{
- if (message.user == address(0)) revert VAULT_INVALID_USER();
+ checkRecallMessageContext();
+
+ if (message.owner == address(0)) revert VAULT_INVALID_USER();
if (message.srcChainId != block.chainid) {
revert VAULT_INVALID_SRC_CHAIN_ID();
}
- (
- CanonicalNFT memory nft, //
- ,
- ,
- uint256[] memory tokenIds
- ) = abi.decode(
- message.data[4:], (CanonicalNFT, address, address, uint256[])
- );
+ (CanonicalNFT memory nft,,, uint256[] memory tokenIds) =
+ abi.decode(message.data[4:], (CanonicalNFT, address, address, uint256[]));
- bytes32 msgHash = LibVaultUtils.hashAndCheckToken(
- message, resolve("bridge", false), nft.addr
- );
+ if (nft.addr == address(0)) revert VAULT_INVALID_TOKEN();
unchecked {
- if (isBridgedToken[nft.addr]) {
+ if (bridgedToCanonical[nft.addr].addr != address(0)) {
for (uint256 i; i < tokenIds.length; ++i) {
- ProxiedBridgedERC721(nft.addr).mint(
- message.user, tokenIds[i]
- );
+ BridgedERC721(nft.addr).mint(message.owner, tokenIds[i]);
}
} else {
for (uint256 i; i < tokenIds.length; ++i) {
- IERC721Upgradeable(nft.addr).safeTransferFrom({
+ ERC721Upgradeable(nft.addr).safeTransferFrom({
from: address(this),
- to: message.user,
+ to: message.owner,
tokenId: tokenIds[i]
});
}
@@ -182,18 +166,18 @@ contract ERC721Vault is BaseNFTVault, IERC721Receiver, IERC165Upgradeable {
}
// send back Ether
- message.user.sendEther(message.value);
+ message.owner.sendEther(message.value);
emit TokenReleased({
msgHash: msgHash,
- from: message.user,
+ from: message.owner,
token: nft.addr,
tokenIds: tokenIds,
amounts: new uint256[](0)
});
}
- /// @inheritdoc IERC721Receiver
+ /// @inheritdoc IERC721ReceiverUpgradeable
function onERC721Received(
address,
address,
@@ -204,27 +188,21 @@ contract ERC721Vault is BaseNFTVault, IERC721Receiver, IERC165Upgradeable {
pure
returns (bytes4)
{
- return IERC721Receiver.onERC721Received.selector;
+ return IERC721ReceiverUpgradeable.onERC721Received.selector;
}
- /// @inheritdoc IERC165Upgradeable
- function supportsInterface(bytes4 interfaceId)
- public
- view
- virtual
- override
- returns (bool)
- {
- return interfaceId == type(IRecallableMessageSender).interfaceId;
+ function name() public pure override returns (bytes32) {
+ return "erc721_vault";
}
- /// @dev Encodes sending bridged or canonical ERC721 tokens to the user.
+ /// @dev Handles the message on the source chain and returns the encoded
+ /// call on the destination call.
/// @param user The user's address.
- /// @param opt BridgeTransferOp data.
+ /// @param op BridgeTransferOp data.
/// @return msgData Encoded message data.
- function _encodeDestinationCall(
+ function _handleMessage(
address user,
- BridgeTransferOp calldata opt
+ BridgeTransferOp calldata op
)
private
returns (bytes memory msgData)
@@ -232,30 +210,28 @@ contract ERC721Vault is BaseNFTVault, IERC721Receiver, IERC165Upgradeable {
CanonicalNFT memory nft;
unchecked {
- if (isBridgedToken[opt.token]) {
- nft = bridgedToCanonical[opt.token];
- for (uint256 i; i < opt.tokenIds.length; ++i) {
- ProxiedBridgedERC721(opt.token).burn(user, opt.tokenIds[i]);
+ if (bridgedToCanonical[op.token].addr != address(0)) {
+ nft = bridgedToCanonical[op.token];
+ for (uint256 i; i < op.tokenIds.length; ++i) {
+ BridgedERC721(op.token).burn(user, op.tokenIds[i]);
}
} else {
- ERC721Upgradeable t = ERC721Upgradeable(opt.token);
+ ERC721Upgradeable t = ERC721Upgradeable(op.token);
nft = CanonicalNFT({
- chainId: block.chainid,
- addr: opt.token,
+ chainId: uint64(block.chainid),
+ addr: op.token,
symbol: t.symbol(),
name: t.name()
});
- for (uint256 i; i < opt.tokenIds.length; ++i) {
- t.transferFrom(user, address(this), opt.tokenIds[i]);
+ for (uint256 i; i < op.tokenIds.length; ++i) {
+ t.transferFrom(user, address(this), op.tokenIds[i]);
}
}
}
- msgData = abi.encodeWithSelector(
- ERC721Vault.receiveToken.selector, nft, user, opt.to, opt.tokenIds
- );
+ msgData = abi.encodeWithSelector(this.receiveToken.selector, nft, user, op.to, op.tokenIds);
}
/// @dev Retrieve or deploy a bridged ERC721 token contract.
@@ -277,32 +253,14 @@ contract ERC721Vault is BaseNFTVault, IERC721Receiver, IERC165Upgradeable {
/// this chain.
/// @param ctoken CanonicalNFT data.
/// @return btoken Address of the deployed bridged token contract.
- function _deployBridgedToken(CanonicalNFT memory ctoken)
- private
- returns (address btoken)
- {
- address bridgedToken = Create2Upgradeable.deploy({
- amount: 0, // amount of Ether to send
- salt: keccak256(abi.encode(ctoken)),
- bytecode: type(ProxiedBridgedERC721).creationCode
- });
-
- btoken = LibVaultUtils.deployProxy(
- address(bridgedToken),
- owner(),
- bytes.concat(
- ProxiedBridgedERC721(bridgedToken).init.selector,
- abi.encode(
- address(_addressManager),
- ctoken.addr,
- ctoken.chainId,
- ctoken.symbol,
- ctoken.name
- )
- )
+ function _deployBridgedToken(CanonicalNFT memory ctoken) private returns (address btoken) {
+ bytes memory data = bytes.concat(
+ BridgedERC721.init.selector,
+ abi.encode(addressManager, ctoken.addr, ctoken.chainId, ctoken.symbol, ctoken.name)
);
- isBridgedToken[btoken] = true;
+ btoken = LibDeploy.deployERC1967Proxy(resolve("bridged_erc721", false), owner(), data);
+
bridgedToCanonical[btoken] = ctoken;
canonicalToBridged[ctoken.chainId][ctoken.addr] = btoken;
@@ -315,7 +273,3 @@ contract ERC721Vault is BaseNFTVault, IERC721Receiver, IERC165Upgradeable {
});
}
}
-
-/// @title ProxiedERC721Vault
-/// @notice Proxied version of the parent contract.
-contract ProxiedERC721Vault is Proxied, ERC721Vault { }
diff --git a/packages/protocol/contracts/common/IMintableERC20.sol b/packages/protocol/contracts/tokenvault/IBridgedERC20.sol
similarity index 55%
rename from packages/protocol/contracts/common/IMintableERC20.sol
rename to packages/protocol/contracts/tokenvault/IBridgedERC20.sol
index f3c8dc4c2b0..aec9cd02d06 100644
--- a/packages/protocol/contracts/common/IMintableERC20.sol
+++ b/packages/protocol/contracts/tokenvault/IBridgedERC20.sol
@@ -6,12 +6,12 @@
pragma solidity ^0.8.20;
-import { IERC20Upgradeable } from
- "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
-
-/// @title IMintableERC20
-/// @notice Interface for ERC20 tokens with mint and burn functionality.
-interface IMintableERC20 is IERC20Upgradeable {
+/// @title IBridgedERC20
+/// @notice Interface for all bridged tokens.
+/// @dev To facilitate compatibility with third-party bridged tokens, such as USDC's native
+/// standard, it's necessary to implement an intermediary adapter contract which should conform to
+/// this interface, enabling effective interaction with third-party contracts.
+interface IBridgedERC20 {
/// @notice Mints `amount` tokens and assigns them to the `account` address.
/// @param account The account to receive the minted tokens.
/// @param amount The amount of tokens to mint.
@@ -21,4 +21,10 @@ interface IMintableERC20 is IERC20Upgradeable {
/// @param from The account from which the tokens will be burned.
/// @param amount The amount of tokens to burn.
function burn(address from, uint256 amount) external;
+
+ /// @notice Start or stop migration to/from a specified contract.
+ function changeMigrationStatus(address addr, bool inbound) external;
+
+ /// @notice Returns the owner
+ function owner() external view returns (address);
}
diff --git a/packages/protocol/contracts/tokenvault/LibBridgedToken.sol b/packages/protocol/contracts/tokenvault/LibBridgedToken.sol
new file mode 100644
index 00000000000..3ca96871ae3
--- /dev/null
+++ b/packages/protocol/contracts/tokenvault/LibBridgedToken.sol
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "lib/openzeppelin-contracts/contracts/utils/Strings.sol";
+
+/// @title LibBridgedToken
+library LibBridgedToken {
+ function buildName(
+ string memory name,
+ uint256 srcChainId
+ )
+ internal
+ pure
+ returns (string memory)
+ {
+ return string.concat("Bridged ", name, unicode" (â€", Strings.toString(srcChainId), ")");
+ }
+
+ function buildSymbol(string memory symbol) internal pure returns (string memory) {
+ return string.concat(symbol, ".t");
+ }
+}
diff --git a/packages/protocol/contracts/tokenvault/adaptors/USDCAdaptor.sol b/packages/protocol/contracts/tokenvault/adaptors/USDCAdaptor.sol
new file mode 100644
index 00000000000..9476286ffff
--- /dev/null
+++ b/packages/protocol/contracts/tokenvault/adaptors/USDCAdaptor.sol
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "../BridgedERC20Base.sol";
+
+interface IUSDC {
+ function burn(uint256 amount) external;
+ function mint(address to, uint256 amount) external;
+ function transferFrom(address from, address to, uint256 amount) external;
+}
+
+/// @title USDCAdaptor
+contract USDCAdaptor is BridgedERC20Base {
+ IUSDC public usdc; // slot 1
+ uint256[49] private __gap;
+
+ function init(address _adressManager, IUSDC _usdc) external initializer {
+ __Essential_init(_adressManager);
+ usdc = _usdc;
+ }
+
+ function _mintToken(address account, uint256 amount) internal override {
+ usdc.mint(account, amount);
+ }
+
+ function _burnToken(address from, uint256 amount) internal override {
+ usdc.transferFrom(from, address(this), amount);
+ usdc.burn(amount);
+ }
+}
diff --git a/packages/protocol/contracts/tokenvault/libs/LibVaultUtils.sol b/packages/protocol/contracts/tokenvault/libs/LibVaultUtils.sol
deleted file mode 100644
index 6815caed6de..00000000000
--- a/packages/protocol/contracts/tokenvault/libs/LibVaultUtils.sol
+++ /dev/null
@@ -1,128 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import { AddressResolver } from "../../common/AddressResolver.sol";
-import { IBridge } from "../../bridge/IBridge.sol";
-import { TransparentUpgradeableProxy } from
- "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
-
-library LibVaultUtils {
- uint256 public constant MAX_TOKEN_PER_TXN = 10;
-
- error VAULT_INVALID_FROM();
- error VAULT_INVALID_TOKEN();
- error VAULT_INVALID_TO();
- error VAULT_TOKEN_ARRAY_MISMATCH();
- error VAULT_MAX_TOKEN_PER_TXN_EXCEEDED();
- error VAULT_INVALID_AMOUNT();
-
- /// @dev Deploys a contract (via proxy)
- /// @param implementation The new implementation address
- /// @param owner The owner of the proxy admin contract
- /// @param initializationData Data for the initialization
- function deployProxy(
- address implementation,
- address owner,
- bytes memory initializationData
- )
- external
- returns (address proxy)
- {
- assert(implementation != address(0));
- proxy = address(
- new TransparentUpgradeableProxy(implementation, owner, initializationData)
- );
- }
-
- /// @dev Checks if context is valid
- /// @param validSender The valid sender to be allowed
- /// @param resolver The address of the resolver
- function checkValidContext(
- bytes32 validSender,
- address resolver
- )
- external
- view
- returns (IBridge.Context memory ctx)
- {
- ctx = IBridge(msg.sender).context();
- if (
- ctx.from
- != AddressResolver(resolver).resolve(
- ctx.srcChainId, validSender, false
- )
- ) {
- revert VAULT_INVALID_FROM();
- }
- }
-
- /// @dev Checks if token is invalid and returns the message hash
- /// @param message The bridged message struct data
- /// @param bridgeAddress The bridge contract
- /// @param tokenAddress The token address to be checked
- function hashAndCheckToken(
- IBridge.Message calldata message,
- address bridgeAddress,
- address tokenAddress
- )
- external
- pure
- returns (bytes32 msgHash)
- {
- IBridge bridge = IBridge(bridgeAddress);
- msgHash = bridge.hashMessage(message);
-
- if (tokenAddress == address(0)) revert VAULT_INVALID_TOKEN();
- }
-
- function checkIfValidAddresses(
- address vault,
- address to,
- address token
- )
- external
- pure
- {
- if (to == address(0) || to == vault) {
- revert VAULT_INVALID_TO();
- }
-
- if (token == address(0)) revert VAULT_INVALID_TOKEN();
- }
-
- function checkIfValidAmounts(
- uint256[] memory amounts,
- uint256[] memory tokenIds,
- bool isERC721
- )
- external
- pure
- {
- if (tokenIds.length != amounts.length) {
- revert VAULT_TOKEN_ARRAY_MISMATCH();
- }
-
- if (tokenIds.length > MAX_TOKEN_PER_TXN) {
- revert VAULT_MAX_TOKEN_PER_TXN_EXCEEDED();
- }
-
- if (isERC721) {
- for (uint256 i; i < tokenIds.length; i++) {
- if (amounts[i] != 0) {
- revert VAULT_INVALID_AMOUNT();
- }
- }
- } else {
- for (uint256 i; i < amounts.length; i++) {
- if (amounts[i] == 0) {
- revert VAULT_INVALID_AMOUNT();
- }
- }
- }
- }
-}
diff --git a/packages/protocol/docs/DESIGN.md b/packages/protocol/docs/DESIGN.md
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/packages/protocol/contracts/actors_privileges_deployments.md b/packages/protocol/docs/actors_privileges_deployments.md
similarity index 97%
rename from packages/protocol/contracts/actors_privileges_deployments.md
rename to packages/protocol/docs/actors_privileges_deployments.md
index aa53569a0a7..a4952927bd6 100644
--- a/packages/protocol/contracts/actors_privileges_deployments.md
+++ b/packages/protocol/docs/actors_privileges_deployments.md
@@ -37,12 +37,11 @@ Beside the `onlyFromNamed` or `onlyFromNamed2` modifiers, we have others such as
### 2.1 onlyOwner
- **Description**: Only owner can be granted access.
-- **Associated contracts**: TaikoToken, AddressManager, EtherVault
+- **Associated contracts**: TaikoToken, AddressManager
### 2.2 onlyAuthorized
- **Description**: Only authorized (by owner) can be granted access - the address shall be a smart contract. (`Bridge` in our case)
-- **Associated Actors**: EtherVault
## 3. Upgradeable Procedures
diff --git a/packages/protocol/docs/contestable_validity_rollup.md b/packages/protocol/docs/contestable_validity_rollup.md
new file mode 100644
index 00000000000..f48e89d8c89
--- /dev/null
+++ b/packages/protocol/docs/contestable_validity_rollup.md
@@ -0,0 +1,95 @@
+# About Contestable Validity Rollup
+
+For a given block, a transition can be uniquely identified by its _parent hash_. The transition's _block hash_ (and _signal root_) may change over time by new proofs, but the transition is always referred to as the same transition in this document.
+
+## Terminology
+
+- **The First Transition**: Refers to the transition with ID = 1.
+
+- **Liveness Bond**: The bond provided by a block's assigned prover, serving as a commitment to initially prove the first transition and to provide post-contest proofs within the corresponding proving window.
+
+- **Validity Bond**: The bond provided by the actual prover of a proof, signifying their commitment that the proof is indeed correct and that they are ready to withstand a contest.
+
+- **Contest Bond**: The bond provided by the contester.
+
+## The First Transition
+
+The _first transition_ of a block is reserved for the block's assigned prover. However, this exclusivity is contingent upon the assigned prover successfully proving the block within the stipulated proving window of the tier. If the assigned prover fails to meet this deadline, the transition is considered _open_. Upon its opening, the assigned prover is no longer allowed to prove the first transition.
+
+For all other transitions, the proving window doesn't apply. Here, the principle is straightforward: the quickest prover takes the lead. Importantly, the assigned prover is not allowed to prove transtions other than the first one.
+
+## Proof Tier Selection
+
+After a block is contested, it's eligible to be re-proven using a higher-tier proof. The onus of selecting the tier — whether it's one level higher or more — rests entirely with the new prover stepping in to prove the block.
+
+Each tier is associated with a distinct proving window. Generally, it's advisable for provers to opt for a lower-tier proof when feasible, as choosing a higher-tier proof, despite its acceptability, might not be the most efficient or profitable choice.
+
+## Validity Bonds and Contest Bonds
+
+Each tier mandates two values: a _validity bond_ and a _contest bond_.
+
+Submitting a tier-N proof necessitates depositing a tier-N validity bond into the transition. If a subsequent higher-tier proof invalidates this transition, the bond is burned. Conversely, contesting a tier-N transition requires a contester to deposit the respective contest bond, which is forfeited if the contest is wrong.
+
+### Contest Bond Configuration
+
+To determine the size of the contest bond in relation to the validity bond, a few considerations come into play:
+
+1. **Tier Differences:** As we move up the tiers, the assumed trustworthiness of proofs increases. Given this, contests against higher tiers should necessitate larger bonds, reflecting the increased certainty and reliability of these tiers. A contest against a high-tier transition asserts that a major flaw exists in a supposedly secure tier, and so the bond should match this gravity.
+
+2. **Optimistic (tier-1):** Given that tier-1 is an optimistic assertion without a proof, it's logical for its contest bond to be equal to its validity bond. This recognizes the provisional nature of such transitions and ensures that contests are neither discouraged nor incentivized excessively.
+
+In essence, the size of the contest bond should mirror the risk and certainty levels associated with the proofs and contests in each tier.
+
+## Re-proving a Transition
+
+Consider Alice proves a transition with a $10,000 bond, and Bob contests it with a bond of $20,000. Now, Cindy can prove this transition with a validity bond of $5,000.
+
+**If Cindy's proof upholds Alice:**
+
+- Alice receives $15,000 (= $10,000 + $20,000/4);
+- Bob loses all his bond $20,000;
+- Cindy's total bond in the transition is $10,000 (= $5,000 + $20,000/4).
+
+**If Bob's contest stands:**
+
+- Alice loses all her bond $10,000;
+- Bob receives $22,500 (= $20,000 + $10,000/4);
+- Cindy's total bond in the transition is $7,500 (= $5,000 + $10,000/4).
+
+In either scenario, Cindy becomes the new prover for this transition, staking a bond in the transition together with rewards from either Alice or Bob. This bond is retrievable only when the transition is used for block verification.
+
+The protocol ensures a segment of either the prover's or contester's bond undergoes burning. This safeguards against collusion between the three participants by enforcing a significant cost. Also, retaining the new prover's rewards within the transition and their fresh bond is crucial. The bond and past reward are lost if this prover is later refuted.
+
+## Erasing Proving History
+
+Given two transitions, A and B:
+
+Transition A undergoes a two-tier proving process. Initially, it's validated with a tier-2 proof. Subsequently, after being contested, it's validated by a tier-4 proof. In contrast, Transition B is directly verified with a tier-4 proof.
+
+Considering the bonds of transitions A and B, should there be any disparity?
+
+The logical proposition here is that both transitions should bear identical bonds. There's no intrinsic attribute in either transition A or B to denote one as being inherently riskier or more trustworthy than the other. If this rationale is embraced, then it implies that the validation by a superior-tier proof should effectively "reset" or erase the history of the transition.
+
+To exemplify, given the accepted rationale, the bond distribution dynamics would be as follows:
+
+**If Cindy's proof upholds Alice:**
+
+- Alice receives $15,000 (= $10,000 + $20,000/4);
+- Bob loses all his bond $20,000;
+- Cindy receives $5,000 (= $20,000/4) and deposits a bond of $5,000.
+
+**If Bob's contest stands:**
+
+- Alice loses all her bond $10,000;
+- Bob receives $22,500 (= $20,000 + $10,000/4);
+- Cindy receives $2,500 (= $10,000/4) and deposits a bond of $5,000.
+
+From an engineering standpoint, this approach of erasing prior proving impacts streamlines the implementation and reduces code complexity.
+
+Indeed, allowing a new prover to deposit a validity bond that's smaller than the potential reward from either the original prover or the contester is not viewed as a system flaw or bug. The rationale behind this is that the new proof is expected to be more trustworthy than the previous one.
+
+## Prover Fees
+
+The prover assignment serves as a social contract between a proposer and a prover. It's crucial that this assignment explicitly defines the fee amount for each acceptable tier.
+
+Specifically, the assignment details the payment terms **only for the first proof of the first transition**. However, it's important to note that for all other transitions, the initial proof does not receive direct payment. Instead, if the transition is used in the verification of a block, the prover is compensated from a portion of the block's assigned prover's prover bond, which should be much larger in value than the prover fee for the first transition.
diff --git a/packages/protocol/docs/L2EIP1559.md b/packages/protocol/docs/eip1559_on_l2.md
similarity index 100%
rename from packages/protocol/docs/L2EIP1559.md
rename to packages/protocol/docs/eip1559_on_l2.md
diff --git a/packages/protocol/docs/how_taiko_proves_blocks.md b/packages/protocol/docs/how_taiko_proves_blocks.md
index 4ebdce3e375..12c6e468fa9 100644
--- a/packages/protocol/docs/how_taiko_proves_blocks.md
+++ b/packages/protocol/docs/how_taiko_proves_blocks.md
@@ -81,7 +81,7 @@ struct BlockMetadata {
uint64 l1Height;
bytes32 l1Hash;
bytes32 mixHash;
- bytes32 txListHash;
+ bytes32 blobHash;
uint24 txListByteStart;
uint24 txListByteEnd;
uint32 gasLimit;
@@ -96,7 +96,7 @@ struct BlockMetadata {
- `l1Height`: The actual block height in L1.
- `l1Hash`: The actual block hash in L1.
- `mixHash`: Salted random number to accommodate multiple L2 blocks fitting into one L1 block.
-- `txListHash`: Hash of the transaction list in L2.
+- `blobHash`: Hash of the transaction list in L2.
- `txListByteStart`: Byte start of the transaction list in L2.
- `txListByteEnd`: Byte end of the transaction list in L2.
- `gasLimit`: Gas limit for the L2 block.
@@ -257,7 +257,7 @@ m_timestamp(timestamp)
m_h1_height(h1Height)
m_h1_hash(h1Hash)
m_mix_hash(mixHash)
-m_txlist_hash(txListHash)
+m_txlist_hash(blobHash)
m_txlist_first(txListByteStart)
m_txlist_last(txListByteEnd)
m_treasury(treasury)
diff --git a/packages/protocol/docs/iprover.md b/packages/protocol/docs/iprover.md
deleted file mode 100644
index a78067dea2d..00000000000
--- a/packages/protocol/docs/iprover.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# Implementing arbitrary token payments with IProver interface
-
-In this guide, we will outline the steps to implement a solution that enables prover pools to accept arbitrary ERC-20 tokens as payments for providing with proofs. This solution allows proposers to interact with pools (implementing `IProver`), agree on a price for proving a block, and make payments using ERC-20 tokens.
-
-NOTE: This works also with NFTs (ERC-721/ERC-1155) as well (applying the proper `approval`/`approvalForAll`), just because it might be less likely those will be used as payment methods, we highlighted the ERC-20.
-
-## Prerequisites
-
-Before implementing this solution, make sure you have an existing ERC-20 token contract that you want to accept as payment in your ProverPool.
-
-## Implementation Steps
-
-### Step 1: An example ProverPool Contract
-
-Start by creating a ProverPool contract that implements the `IProver` interface. This interface should include the `onBlockAssigned` function, which will be called during `proposeBlock()`.
-A boilerplate (non-comprehensive) example:
-
-```solidity
-// Import necessary libraries and interfaces
-import "./IProver.sol";
-
-// Define the ProverPool contract
-contract ProverPool is IProver {
-
- // ERC-20 address of the payment token
- address ERC20TokenAddress;
-
- // Implement the onBlockAssigned function
- function onBlockAssigned(
- uint64 blockId,
- TaikoData.BlockMetadataInput calldata input,
- TaikoData.ProverAssignment calldata assignment
- ) external {
- // Decode the assignment data to retrieve signatures and other information
- (bytes memory proverSignature, uint256 tokenAmount) = decodeAssignmentData(assignment);
-
- // 1. Verify the prover signature is valid (off-chain verification)
- require(isValidSignature(proverSignature, input), "Invalid prover signature");
-
- // 2. Execute the transfer transaction
- ERC20(ERC20TokenAddress).transferFrom(tx.origin, address(this), tokenAmount);
-
- // Additional logic goes here
- }
-
- // Implement functions to decode assignment data, verify signature, etc.
-}
-```
-
-### Step 2: Proposer-prover off-chain interaction
-
-The proposer and prover interact off-chain to agree on the price and perform the ERC-20 token approval. Here's an example of how this interaction might work:
-
-1. Proposer asks the ProverPool for the cost of proving a block and receives a price (e.g., `10 DAI` tokens). If price is acceptable, prover provides proposer with a valid ECDSA signature which signs the commitment (e.g.: transaction list hash), expiration and price.
-
-2. Proposer executes the following transaction: `ERC-20(DAI_ADDRESS).approve(proverPool, 10)` (or if he/she thinks this pool will be a long-term solution the approval amount can be bigger).
-
-3. Proposer creates the `ProverAssignment` struct data (obviously together with the `input` and `txList`) and submits the `proposeBlock()` with the necessary parameters.
-
-During `proposeBlock()` transaction, the `onBlockAssigned()` hook which will evaluate the validity of the prover signature, and if that one is correct then execute he transfer of `10 DAI`.
diff --git a/packages/protocol/docs/multihop/L1_to_L2.png b/packages/protocol/docs/multihop/L1_to_L2.png
new file mode 100644
index 00000000000..3d913e36d97
Binary files /dev/null and b/packages/protocol/docs/multihop/L1_to_L2.png differ
diff --git a/packages/protocol/docs/multihop/L2A_to_L3.png b/packages/protocol/docs/multihop/L2A_to_L3.png
new file mode 100644
index 00000000000..4b1f4580f99
Binary files /dev/null and b/packages/protocol/docs/multihop/L2A_to_L3.png differ
diff --git a/packages/protocol/docs/multihop/L2_to_L1.png b/packages/protocol/docs/multihop/L2_to_L1.png
new file mode 100644
index 00000000000..3e8a8c6c0ed
Binary files /dev/null and b/packages/protocol/docs/multihop/L2_to_L1.png differ
diff --git a/packages/protocol/docs/multihop/L2_to_L2.png b/packages/protocol/docs/multihop/L2_to_L2.png
new file mode 100644
index 00000000000..f204ec135f3
Binary files /dev/null and b/packages/protocol/docs/multihop/L2_to_L2.png differ
diff --git a/packages/protocol/docs/multihop_bridging_deployment.md b/packages/protocol/docs/multihop_bridging_deployment.md
new file mode 100644
index 00000000000..be2832d8cff
--- /dev/null
+++ b/packages/protocol/docs/multihop_bridging_deployment.md
@@ -0,0 +1,99 @@
+# Deployment for Multi-Hop Briding
+
+We expect that bridging acorss multiple layers are supported natively by Taiko. I'd like to explain how this is done.
+
+First of all, we need to ensures some contracts are shared by multiple Taiko deployments. For example, if we deploy two layer 2s, L2A and L2B, if we would like users to deposit Ether to L2A, then bridge Ether from L2A directly to L2B, then withdraw the Ether on L1, then the contract that holds Ether must be shared by L2A and L2B.
+
+## Shared contracts
+
+On L2 or any laer, then following contracts shall be deployed as sigletonsshared by multiple TaikoL1 deployments.
+
+- SignalService
+- Bridge
+- and all token vaults e.g., ERC20Vault
+- An AddressManager used by the above contracts.
+
+There are some inter-dependency among these shared contracts. Specificly
+
+- Bridge.sol depends on SignalService;
+- Token vaults depend on Bridge.sol;
+
+These 1-to-1 dependency relations are acheived by AddressResolver with a name-based address resolution (lookup).
+
+### SignalService
+
+SignalService also uses AuthorizableContract to authorize multiple TaikoL1 and TaikoL2 contracts deployed **on each chain** that is part of the path of multi-hop bridging.
+
+For each TaikoL1/TaikoL2 contractswe need to perform:
+
+```solidity
+// 1 is Ethereum's chainID
+SignalService(ss).authorize(address(TaikoL1A), 1);
+SignalService(ss).authorize(address(TaikoL1B), 1);
+
+// 10001 is the L2A's chainId
+SignalService(ss).authorize(address(TaikoL2A, 10001);
+
+// 10002 is the L2B's chainId
+SignalService(ss).authorize(address(TaikoL2B, 10002);
+...
+```
+
+The label **must be** the id of the chain where the smart contract has been deployed to.
+
+To guarantee this design works, each pre-deployed contract must have a unique address on L2 and L3 chains, incorporating the chain ID into the address (as a prefix).
+
+### Bridge
+
+Bridge depends on a local SignalService .Therefore, we need to registered the service as:
+
+```solidity
+addManager.setAddress(block.chainId, "signal_service", localSignalService);
+```
+
+Bridge also need to know each and every conterparty bridge deployed **on each chain** that is part of the path of multi-hop bridging.
+
+```solidity
+addManager.setAddress(remoteChainId1, "bridge", remoteBridge1);
+addManager.setAddress(remoteChainId2, "bridge", remoteBridge2);
+...
+```
+
+### ERC20Vault
+
+ERC20Vault (and other token vaults) depends on a local Bridge, you must have:
+
+```solidity
+addressManager.setAddress(block.chainId, "bridge", localBridge)
+```
+
+Similiar with Bridge, ERC20Vault also needs to know their conterpart vaults **on each chain** that is part of the path of multi-hop bridging. Therefore, we must perform:
+
+```solidity
+addressManager.setAddress(remoteChainId1, "erc20_vault", remoteERC20Vault1);
+addressManager.setAddress(remoteChainId2, "erc20_vault", remoteERC20Vault2);
+...
+
+```
+
+### Dedicated AddressManager
+
+A dedicated AddressManager should be deployed on each chain to support only these shared contracts. This AddressManager shall not be used by the TaikoL1 deployments.
+
+## Bridging
+
+### L1 to L2
+
+
+
+### L2 to L1
+
+
+
+### L2 to L2
+
+
+
+### L2 to L3 on another L2
+
+
diff --git a/packages/protocol/docs/tokenomics_batch_auction.md b/packages/protocol/docs/tokenomics_batch_auction.md
deleted file mode 100644
index 74b39595dc7..00000000000
--- a/packages/protocol/docs/tokenomics_batch_auction.md
+++ /dev/null
@@ -1,88 +0,0 @@
-# Batch Auction-Based Tokenomics
-
-## Objectives and Key Metrics
-Please read our [objective and metrics in tokenomics design](./tokenomics_objective_metrics.md).
-\\,.
-## The Proposal
-An auction mechanism is suggested to realign provers' incentives towards cost-effectiveness. This mechanism allows provers to bid for block rewards, thereby establishing a transparent fee market. Furthermore, this model promotes resource conservation by enabling provers to commit to resource-intensive Zero-Knowledge Proof (ZKP) computations only after they have definitively won a block.
-
-
-### Batch-Based Approach
-In light of the high gas fees associated with Ethereum, a batch-based strategy for conducting auctions is recommended. This strategy grants the winning bidder the right to verify a batch of blocks, thus reducing per-block gas costs. During the testnet phases, we plan to begin with a smaller batch size, eventually scaling up to 256 blocks by the mainnet launch.
-
-### Provisions for Upcoming Blocks and Gas Costs
-To offset potential delays in ZKP, it's recommended to conduct auctions for forthcoming blocks even before they are proposed. This introduces a certain level of uncertainty for provers due to the unknown block gas used and data size at the beginning of the auction. To counter this, an auction pricing model based on the gas/data usage of the auctioned block is proposed. Here, the block reward would be calculated as `b*g`, where `b` is the winning bid in TKO tokens per gas and `g` is the actual gas used (or gas limit) by the block. In this context, `b` will be referred to as the *bid per gas*, or simply the *bid*.
-
-### Bidding Procedures and Deposit Requirements
-
-The auction mechanism employed will follow the traditional English auction model, where all bids are publicly visible throughout the auction period. This choice makes the secretive, second-price auction model unsuitable for our context. Additionally, the initial implementation of our tokenomics design (in alpha-1) adopts elements of a Dutch auction, characterized by escalating rewards over time.
-
-For each new auction, the initial bidding price will be set at `s=2*p`, where `p` represents the moving average bid for all verified blocks. Subsequent bids should be at least 10% lower than the current bid. To participate in the auction, bidders will be required to deposit `s * max_block_gas_limit * num_blocks * 1.5` Taiko tokens as the minimum amount for the batch. If the auction winner fails to submit a valid proof within the designated timeframe, the deposit for the corresponding block will be burnt. On the other hand, successful completion of the proof submission will result in a refund of the deposit.
-
-To maintain stability, the initial bidding price will not undergo drastic changes, such as exceeding a 50% decrease or 100% increase within a 24-hour period.
-
-#### Scoring Bids
-A key concern is the risk of a monopolistic scenario, where one highly efficient prover continuously wins auctions, particularly if they're prepared to operate with a slim profit margin. This could marginalize other provers, even those with slightly higher costs, leaving them devoid of work and potentially leading them to exit the system. To encourage diverse participation and avert single-prover dominance, we may need to refine our bid scoring methodology. Rather than focusing solely on the bid price, we could factor in other parameters such as the deposit amount, the prover's average proof delay, and the ratio of their proof submissions to the number of verified blocks they've won. This multi-dimensional evaluation would promote a more equitable competition, ensuring the system's sustainability.
-
-Bid increments in English auctions serve as an effective strategy to encourage serious bidding, ensure fair competition, reduce on-chain transaction costs, and minimize proof rewards. By requiring new bids to exceed the current winning bid by a specified percentage in score (e.g., 10% higher), trivial bids are filtered out, enabling the auction to quickly reach the lowest bid per gas.
-#### Internal metrics
-It is essential to maintain various internal metrics to effectively score bids and facilitate off-chain analysis:
-
-1. **Average proof window**: This metric represents the moving average of proof window. The average proof window provides insights into the efficiency of the proof submission process, enabling optimization and monitoring of the overall system performance. Alternatively, we can keep track of *average proof delay* if the auction can incentivize provers to submit proofs immediately after proofs become available. The actual proof delay is not factored into adjusting *average proof window* to avoid reducing the proof window due to early submissions. This approach ensures that slower provers, who require more time to generate proofs, are not discouraged from promptly submitting their proofs.
-
-2. **Average bid per gas for verified blocks**: This metric quantifies the average bid per unit of gas for blocks that have successfully passed the verification process. It provides valuable information about bidding behavior and the value assigned to gas consumption in successful blocks.
-
-3. **Average bid per gas for all blocks**: This optional metric calculates the average bid per unit of gas for all blocks, including those that are currently undergoing the auction process. By considering all blocks, this metric offers a comprehensive view of the average bidding behavior and expenditure on gas across the entire system.
-
-4. **Per bidder proof submission success rate**: This optional metric measures the success rate of proof submissions by individual bidders. Specifically, it evaluates the ratio of proofs submitted by a bidder that were subsequently used for block verification compared to the total number of blocks won through auctions. Proofs submitted to other blocks that the bidder did not win are excluded from this calculation. This metric allows for the assessment of bidder reliability and the effectiveness of their proof submission process.
-
-
-### Bid Period, Proofing Window, and Managing Multiple Auctions
-The bid period for an auction begins with the first bid and lasts for 5 minutes. Blocks can only be proven after the auction has ended entirely. To ensure fairness, particularly for late participants, it is crucial not to end auctions prematurely. It is recommended that an auction concludes when the following conditions are met:
-
-1. The 5-minute bid period has elapsed.
-2. The most recent proposed block is within `min_blocks_to_end_auctions` blocks of the first block in the batch.
-
-Auctions are conducted in increasing order of block batches, and the next batch's auction can start as soon as the previous batch's auction has started.
-
-The winning bidder is required to submit the proof for the block within the proof window, typically `proof_window` seconds after either the block proposal or the end of the auction, whichever occurs last. Other participants can only submit proofs after the proof window expires.
-
-### Reward and Penalty Mechanisms
-If the chosen fork for the verified block originates from the auction winner's proof, the winner's deposit is refunded, and the reward is minted. If the selected fork comes from another prover's proof, the latter receives half the deposit, with the remaining half being burnt. This mechanism ensures fair competition and discourages manipulation, such as winners submitting correct proofs via different addresses.
-
-### Absence of Fallback Mode
-There is no secondary fee/reward model for blocks that aren't auctioned. This simplifies the auction design and eliminates the need for dual tokenomics systems, namely, an auction-based primary system and an alternate fallback system.
-
-### Block Fees
-A fee in Taiko tokens should be levied from the block proposer, calculated as `p * gas_limit`, where `p` is the moving average bid for all verified blocks.
-
-## Best Strategy for a Prover
-
-### Bidding
-A prover should consistently monitor recent winning bid scores to gauge the current market status. From there, they can calculate an appropriate bidding price that aligns with their proof generation costs. Optionally, to enhance their score, they could deposit additional Taiko tokens as auction collateral.
-
-### Proof Submission
-They should submit proofs at the earliest opportunity.
-
-### Optimization
-The prover's optimization should be conducted in a hierarchical manner, with cost reduction as the primary focus. After reducing proof costs, the next step would be to minimize proof delay, followed by improving the rate of proof submissions. An additional optional strategy could be to acquire more Taiko tokens to perpetually boost their score.
-
-### Pool Participation
-A prover may opt to join a prover pool to engage in off-chain auctions managed by the pool itself. Subsequently, the pool participates in the on-chain auction on behalf of its members and manages the deposits of Taiko tokens, thereby enhancing the bid scores for all participants within the pool. This strategy allows for pooled resources and risk, potentially offering an advantage in the competitive bidding process.
-
-## Challenges
-
-### Lack of Competition
-The proposed auction framework's success heavily depends on the active participation of numerous independent entities. In the event of collusion or alliances among provers to boost their profits, they could strategically place a single bid at the initial/highest price `s`, leading to a continual increase in rewards. This goes against the system's intention of promoting cost-efficient competition.
-
-However, such behavior might inadvertently stimulate competition. As the reward for verifying considerably increases, it's likely to pique the interest of other provers, thus promoting their participation. This market self-regulation could restore equilibrium and maintain the auction process's competitive integrity.
-
-
-### Low Bid Attacks
-
-A malicious prover may strategize to win numerous batches by placing extremely low bids, aiming to manipulate the starting price of future auctions. This could potentially discourage other provers from participating in subsequent auctions. To safeguard against such manipulation, it's imperative to establish a mechanism that ensures the starting price for future auctions changes incrementally and consistently, thereby maintaining a fair and competitive bidding environment.
-
-### Added Verification Delay
-Introducing an auction window inevitably introduces an additional delay to the verification time. This delay might not be noticeable when the average verification time is relatively long (over 30 minutes). However, it could become significant in future scenarios where proof generation takes just a few minutes.
-
-Despite this, as stressed at the beginning of the proposal, our goal is to optimize for cost, not speed. While this additional delay is a vital consideration, it's unlikely to pose a significant obstacle to our primary objective of cost-effectiveness.
diff --git a/packages/protocol/docs/tokenomics_staking.md b/packages/protocol/docs/tokenomics_staking.md
deleted file mode 100644
index 29ec66e874c..00000000000
--- a/packages/protocol/docs/tokenomics_staking.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# Staking-Based Tokenomics
-
-## Objectives and Key Metrics
-
-Please read our [objective and metrics in tokenomics design](./tokenomics_objective_metrics.md).
-
-## Understanding Prover Staking Mechanisms
-
-In the previous two tokenomics iterations, including the one used by the ongoing alpha-3 testnet, we incorporated a dynamic fee-reward adjustment system, drawing data from in-protocol stats. However, a key flaw surfaced in this design: it instigated numerous provers to generate Zero-Knowledge Proofs (ZKPs) for the same block, unbeknownst to each other. This redundancy leads to a scenario where only one prover is rewarded, while the remaining provers, having worked on the same task, incur a loss. This issue, henceforth referred to as 'Prover Redundancy', escalates the overall proving costs for the Layer 2 (L2) network, making it unnecessarily expensive. Consequently, users have to bear inflated transaction costs on L2. To alleviate this, we need to develop an effective solution to reduce the per-block proving cost, which would in turn decrease the user's transaction cost on L2.
-
-A proposed solution was an auction-based mechanism, enabling provers to bid for exclusive rights to prove blocks. While this approach effectively tackles the 'Prover Redundancy' issue, it also presents new challenges. Provers would have to engage in a significant number of Layer 1 (L1) transactions to participate in these auctions. This not only raises their costs but also necessitates the development of a separate auction participation system alongside their proving system. This complexity could potentially discourage provers from entering our ecosystem.
-
-To address these concerns, we've implemented a staking-based prover pool, which essentially simulates a perpetual auction bidding process. This system allows a prover to bid once and remain eligible for proving blocks indefinitely.
-
-Within the prover pool, when an address wishes to stake, it must provide three parameters:
-
-1. The number of Taiko Tokens to stake (`A`),
-2. The expected reward per gas (`R`), and
-3. Its maximum capacity (`C`).
-
-These inputs contribute to the calculation of a score (`S`). The top 32 stakes with the highest scores are chosen to constitute the list of active provers.
-
-When a block is proposed, each prover in the list is assigned a weight (`W`), calculated as a function of `A`, `R`, `C`, and the current fee per gas (`F`):
-
-```solidity
-W = 0, if A = 0 or C = 0
-W = (A * F^2) / R^2, otherwise
-```
-
-Notably, a prover's weight depends on the number of tokens staked, the current fee per gas supplied by the core protocol, and the expected reward per gas:
-
-- The more tokens staked, the higher the weight of the prover. This is a linear relationship.
-- The less reward expected, the higher the weight of the prover. This is an inverse square relationship.
-
-The protocol then uses a deterministic pseudo-random number and each prover's weight to select a prover to be assigned to a given block. If all provers' weights are zero, address(0) is returned, indicating that any prover can prove the block - we'll refer to this as an 'open block'.
-
-If a block is proven by the assigned prover within a set proving window (3 times the average proof delay), we reward the prover with `R * gasUsed`. However, to prevent excessive fluctuations in `R`, we cap the actual reward per gas (`R'`) at (95%-105%) \* `F`. This implies that if a prover's expected reward per gas is exceedingly high, their weight will be minimal. Even if such a prover is selected, their reward won't exceed 5% more than the current fee per gas.
-
-For instances where the block is an open block or proven outside the set proving window, the actual prover is rewarded with `1.5 * R'`. If the assigned prover fails to prove the block within the proving window, we slash a certain percentage from their total staked amount, which consequently reduces the prover's weight.
-
-In order to ensure automatic adjustment of the fee-reward ratio, we modify the fee per gas (`F`) every time a block is verified by its assigned prover within the proving window:
-
-```solidity
-F = (F*1023 + R')/1024
-```
-
-In this system, we can ensure efficient proof generation, provide provers with a fair reward mechanism, and maintain an economically viable environment for both users and provers alike in the Layer 2 network.
-
-Additionally, when a prover is assigned to a block, its capacity (`C`) is decreased by 1, and when the block is proven by the assigned prover or is verified, the assigned prover's capacity is increased by 1. However, the current capacity always remains capped at its initial value.
diff --git a/packages/protocol/foundry.toml b/packages/protocol/foundry.toml
index 7086d8e260e..e168a2a152a 100644
--- a/packages/protocol/foundry.toml
+++ b/packages/protocol/foundry.toml
@@ -13,10 +13,9 @@ gas_limit = '18446744073709551615'
memory_limit = 2073741824
# Do not change the block_gas_limit value, TaikoL2.t.sol depends on it.
-block_gas_limit = 30000000 #30M
+block_gas_limit = 80000000 #80M
# For mainnet_mock tokenomics test we need a huge value to run lots of iterations.
# Use the above 30M for TaikoL2.t.sol related tests, only use this number with mainnet simulation.
-#block_gas_limit = 3000000000 #3000M
fs_permissions = [
@@ -28,9 +27,14 @@ fs_permissions = [
fuzz = { runs = 256 }
+# Workaround as a fixed fuzz seed.
+# Bug is confirmed, will be fixed soon:
+# https://github.com/foundry-rs/foundry/issues/5913
+seed = 13623721389213
+
[fmt]
bracket_spacing = true
-line_length = 80
+line_length = 100
multiline_func_header = 'all'
number_underscore = 'thousands'
wrap_comments = true
diff --git a/packages/protocol/genesis/GenerateGenesis.g.sol b/packages/protocol/genesis/GenerateGenesis.g.sol
index a17802ed409..efb5740eb99 100644
--- a/packages/protocol/genesis/GenerateGenesis.g.sol
+++ b/packages/protocol/genesis/GenerateGenesis.g.sol
@@ -1,155 +1,167 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
-import { AddressManager } from "../contracts/common/AddressManager.sol";
-import { AddressResolver } from "../contracts/common/AddressResolver.sol";
-import { Bridge } from "../contracts/bridge/Bridge.sol";
-import { BridgeErrors } from "../contracts/bridge/BridgeErrors.sol";
-import { ERC1155Vault } from "../contracts/tokenvault/ERC1155Vault.sol";
-import { ERC20Vault } from "../contracts/tokenvault/ERC20Vault.sol";
-import { ERC721Vault } from "../contracts/tokenvault/ERC721Vault.sol";
-import { EtherVault } from "../contracts/bridge/EtherVault.sol";
-import { IBridge } from "../contracts/bridge/IBridge.sol";
-import { LibBridgeStatus } from "../contracts/bridge/libs/LibBridgeStatus.sol";
-import { RegularERC20 } from "../contracts/test/erc20/RegularERC20.sol";
-import { SignalService } from "../contracts/signal/SignalService.sol";
-import { TaikoL2 } from "../contracts/L2/TaikoL2.sol";
-import { Test } from "forge-std/Test.sol";
-import { TransparentUpgradeableProxy } from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
-import { console2 } from "forge-std/console2.sol";
-import { stdJson } from "forge-std/StdJson.sol";
+import "forge-std/console2.sol";
+import "forge-std/StdJson.sol";
+import "forge-std/Test.sol";
+import "../contracts/common/EssentialContract.sol";
+import "../contracts/bridge/Bridge.sol";
+import "../contracts/tokenvault/ERC1155Vault.sol";
+import "../contracts/tokenvault/ERC20Vault.sol";
+import "../contracts/tokenvault/ERC721Vault.sol";
+import "../contracts/test/erc20/RegularERC20.sol";
+import "../contracts/signal/SignalService.sol";
+import "../contracts/L2/TaikoL2.sol";
contract TestGenerateGenesis is Test, AddressResolver {
using stdJson for string;
- string private configJSON = vm.readFile(
- string.concat(vm.projectRoot(), "/genesis/test_config.json")
- );
- string private genesisAllocJSON = vm.readFile(
- string.concat(vm.projectRoot(), "/deployments/genesis_alloc.json")
- );
+ string private configJSON =
+ vm.readFile(string.concat(vm.projectRoot(), "/deployments/genesis_config.json"));
+ string private genesisAllocJSON =
+ vm.readFile(string.concat(vm.projectRoot(), "/deployments/genesis_alloc.json"));
address private owner = configJSON.readAddress(".contractOwner");
- address private admin = configJSON.readAddress(".contractAdmin");
- // uint32 public constant BLOCK_GAS_LIMIT = 30_000_000;
-
- function testContractDeployment() public {
+ function testSharedContractsDeployment() public {
assertEq(block.chainid, 167);
- checkDeployedCode("ProxiedTaikoL2");
- checkDeployedCode("ProxiedERC20Vault");
- checkDeployedCode("ProxiedERC721Vault");
- checkDeployedCode("ProxiedERC1155Vault");
- checkDeployedCode("ProxiedEtherVault");
- checkDeployedCode("ProxiedBridge");
- checkDeployedCode("RegularERC20");
- checkDeployedCode("ProxiedAddressManager");
- checkDeployedCode("ProxiedSignalService");
+ // check bytecode
+ checkDeployedCode("ERC20Vault");
+ checkDeployedCode("ERC721Vault");
+ checkDeployedCode("ERC1155Vault");
+ checkDeployedCode("Bridge");
+ checkDeployedCode("SignalService");
+ checkDeployedCode("SharedAddressManager");
+ checkDeployedCode("BridgedERC20Impl");
+ checkDeployedCode("BridgedERC721Impl");
+ checkDeployedCode("BridgedERC1155Impl");
+
+ // check proxy implementations
+ checkProxyImplementation("ERC20Vault", "ERC20VaultImpl");
+ checkProxyImplementation("ERC721Vault", "ERC721VaultImpl");
+ checkProxyImplementation("ERC1155Vault", "ERC1155VaultImpl");
+ checkProxyImplementation("Bridge", "BridgeImpl");
+ checkProxyImplementation("SignalService", "SignalServiceImpl");
+ checkProxyImplementation("SharedAddressManager", "SharedAddressManagerImpl");
+
+ // // check proxies
+ checkDeployedCode("ERC20Vault");
+ checkDeployedCode("ERC721Vault");
+ checkDeployedCode("ERC1155Vault");
+ checkDeployedCode("Bridge");
+ checkDeployedCode("SignalService");
+ checkDeployedCode("SharedAddressManager");
+ }
+
+ function testRollupContractsDeployment() public {
+ // check bytecode
+ checkDeployedCode("TaikoL2");
+ checkDeployedCode("RollupAddressManager");
// check proxy implementations
- checkProxyImplementation("TaikoL2Proxy", "ProxiedTaikoL2");
- checkProxyImplementation("ERC20VaultProxy", "ProxiedERC20Vault");
- checkProxyImplementation("ERC721VaultProxy", "ProxiedERC721Vault");
- checkProxyImplementation("ERC1155VaultProxy", "ProxiedERC1155Vault");
- checkProxyImplementation("EtherVaultProxy", "ProxiedEtherVault");
- checkProxyImplementation("BridgeProxy", "ProxiedBridge");
- checkProxyImplementation("AddressManagerProxy", "ProxiedAddressManager");
- checkProxyImplementation("SignalServiceProxy", "ProxiedSignalService");
+ checkProxyImplementation("TaikoL2", "TaikoL2Impl");
+ checkProxyImplementation("RollupAddressManager", "RollupAddressManagerImpl");
// check proxies
- checkDeployedCode("TaikoL2Proxy");
- checkDeployedCode("ERC20VaultProxy");
- checkDeployedCode("ERC721VaultProxy");
- checkDeployedCode("ERC1155VaultProxy");
- checkDeployedCode("EtherVaultProxy");
- checkDeployedCode("BridgeProxy");
- checkDeployedCode("AddressManagerProxy");
- checkDeployedCode("SignalServiceProxy");
+ checkDeployedCode("TaikoL2");
+ checkDeployedCode("RollupAddressManager");
}
- function testAddressManager() public {
+ function testSharedAddressManager() public {
+ AddressManager addressManagerProxy =
+ AddressManager(getPredeployedContractAddress("SharedAddressManager"));
+
+ assertEq(owner, addressManagerProxy.owner());
+
+ checkSavedAddress(addressManagerProxy, "Bridge", "bridge");
+ checkSavedAddress(addressManagerProxy, "ERC20Vault", "erc20_vault");
+ checkSavedAddress(addressManagerProxy, "ERC721Vault", "erc721_vault");
+ checkSavedAddress(addressManagerProxy, "ERC1155Vault", "erc1155_vault");
+ checkSavedAddress(addressManagerProxy, "SignalService", "signal_service");
+
+ AddressManager newAddressManager = new AddressManager();
+
AddressManager addressManager =
- AddressManager(getPredeployedContractAddress("AddressManagerProxy"));
-
- assertEq(owner, addressManager.owner());
-
- checkSavedAddress(addressManager, "BridgeProxy", "bridge");
- checkSavedAddress(addressManager, "ERC20VaultProxy", "erc20_vault");
- checkSavedAddress(addressManager, "ERC721VaultProxy", "erc721_vault");
- checkSavedAddress(addressManager, "ERC1155VaultProxy", "erc1155_vault");
- checkSavedAddress(addressManager, "EtherVaultProxy", "ether_vault");
- checkSavedAddress(addressManager, "TaikoL2Proxy", "taiko");
- checkSavedAddress(
- addressManager, "SignalServiceProxy", "signal_service"
- );
+ AddressManager(getPredeployedContractAddress("SharedAddressManagerImpl"));
- TransparentUpgradeableProxy proxy = TransparentUpgradeableProxy(
- payable(getPredeployedContractAddress("AddressManagerProxy"))
- );
+ vm.startPrank(addressManager.owner());
+
+ addressManager.upgradeTo(address(newAddressManager));
+
+ vm.stopPrank();
+ }
+
+ function testRollupAddressManager() public {
+ AddressManager addressManagerProxy =
+ AddressManager(getPredeployedContractAddress("RollupAddressManager"));
+
+ assertEq(owner, addressManagerProxy.owner());
+
+ checkSavedAddress(addressManagerProxy, "TaikoL2", "taiko");
+ checkSavedAddress(addressManagerProxy, "SignalService", "signal_service");
+
+ AddressManager addressManager =
+ AddressManager(getPredeployedContractAddress("RollupAddressManagerImpl"));
AddressManager newAddressManager = new AddressManager();
- vm.startPrank(admin);
+ vm.startPrank(addressManager.owner());
- proxy.upgradeTo(address(newAddressManager));
+ addressManager.upgradeTo(address(newAddressManager));
- assertEq(proxy.implementation(), address(newAddressManager));
vm.stopPrank();
}
function testTaikoL2() public {
- TaikoL2 taikoL2 = TaikoL2(getPredeployedContractAddress("TaikoL2Proxy"));
+ TaikoL2 taikoL2Proxy = TaikoL2(getPredeployedContractAddress("TaikoL2"));
- vm.startPrank(taikoL2.GOLDEN_TOUCH_ADDRESS());
- for (uint32 i = 0; i < 300; i++) {
+ vm.startPrank(taikoL2Proxy.GOLDEN_TOUCH_ADDRESS());
+ for (uint32 i = 0; i < 300; ++i) {
vm.roll(block.number + 1);
- vm.warp(taikoL2.parentTimestamp() + 12);
- vm.fee(taikoL2.getBasefee(12, i));
+ vm.warp(block.number + 12);
+ vm.fee(taikoL2Proxy.getBasefee(12, i));
uint256 gasLeftBefore = gasleft();
- taikoL2.anchor(
- bytes32(block.prevrandao), bytes32(block.prevrandao), i, i
+ taikoL2Proxy.anchor(
+ keccak256(abi.encodePacked(block.timestamp, i)),
+ keccak256(abi.encodePacked(block.timestamp, i)),
+ i + 1,
+ i + 1
);
if (i == 299) {
console2.log(
- "TaikoL2.anchor gas cost after 256 L2 blocks:",
- gasLeftBefore - gasleft()
+ "TaikoL2.anchor gas cost after 256 L2 blocks:", gasLeftBefore - gasleft()
);
}
}
vm.stopPrank();
- vm.startPrank(admin);
+ TaikoL2 taikoL2 = TaikoL2(getPredeployedContractAddress("TaikoL2Impl"));
- TransparentUpgradeableProxy proxy = TransparentUpgradeableProxy(
- payable(getPredeployedContractAddress("TaikoL2Proxy"))
- );
+ vm.startPrank(taikoL2.owner());
TaikoL2 newTaikoL2 = new TaikoL2();
- proxy.upgradeTo(address(newTaikoL2));
+ taikoL2.upgradeTo(address(newTaikoL2));
- assertEq(proxy.implementation(), address(newTaikoL2));
vm.stopPrank();
}
- function testBridge() public {
- address payable bridgeAddress =
- payable(getPredeployedContractAddress("BridgeProxy"));
- Bridge bridge = Bridge(bridgeAddress);
+ function testSingletonBridge() public {
+ Bridge bridgeProxy = Bridge(payable(getPredeployedContractAddress("Bridge")));
- assertEq(owner, bridge.owner());
+ assertEq(owner, bridgeProxy.owner());
- vm.expectRevert(BridgeErrors.B_FORBIDDEN.selector);
- bridge.processMessage(
+ vm.expectRevert(Bridge.B_PERMISSION_DENIED.selector);
+ bridgeProxy.processMessage(
IBridge.Message({
id: 0,
from: address(0),
srcChainId: 1,
destChainId: 167,
- user: address(0),
+ owner: address(0),
to: address(0),
refundTo: address(0),
value: 0,
@@ -161,183 +173,164 @@ contract TestGenerateGenesis is Test, AddressResolver {
""
);
- vm.startPrank(admin);
-
- TransparentUpgradeableProxy proxy = TransparentUpgradeableProxy(
- payable(getPredeployedContractAddress("BridgeProxy"))
- );
+ assertEq(bridgeProxy.paused(), false);
- Bridge newBridge = new Bridge();
+ vm.startPrank(owner);
+ bridgeProxy.pause();
+ assertEq(bridgeProxy.paused(), true);
- proxy.upgradeTo(address(newBridge));
-
- assertEq(proxy.implementation(), address(newBridge));
- vm.stopPrank();
- }
-
- function testEtherVault() public {
- address payable etherVaultAddress =
- payable(getPredeployedContractAddress("EtherVaultProxy"));
- EtherVault etherVault = EtherVault(etherVaultAddress);
-
- assertEq(owner, etherVault.owner());
-
- assertEq(
- etherVault.isAuthorized(
- getPredeployedContractAddress("BridgeProxy")
- ),
- true
+ vm.expectRevert(OwnerUUPSUpgradable.INVALID_PAUSE_STATUS.selector);
+ bridgeProxy.processMessage(
+ IBridge.Message({
+ id: 0,
+ from: address(0),
+ srcChainId: 1,
+ destChainId: 167,
+ owner: address(0),
+ to: address(0),
+ refundTo: address(0),
+ value: 0,
+ fee: 0,
+ gasLimit: 0,
+ data: "",
+ memo: ""
+ }),
+ ""
);
- assertEq(etherVault.isAuthorized(etherVault.owner()), false);
- vm.startPrank(admin);
+ bridgeProxy.unpause();
+ assertEq(bridgeProxy.paused(), false);
- TransparentUpgradeableProxy proxy = TransparentUpgradeableProxy(
- payable(getPredeployedContractAddress("EtherVaultProxy"))
- );
+ Bridge bridge = Bridge(payable(getPredeployedContractAddress("BridgeImpl")));
- EtherVault newEtherVault = new EtherVault();
+ Bridge newBridge = new Bridge();
- proxy.upgradeTo(address(newEtherVault));
+ bridge.upgradeTo(address(newBridge));
- assertEq(proxy.implementation(), address(newEtherVault));
vm.stopPrank();
}
- function testERC20Vault() public {
- address erc20VaultAddress =
- getPredeployedContractAddress("ERC20VaultProxy");
- address bridgeAddress = getPredeployedContractAddress("BridgeProxy");
+ function testSingletonERC20Vault() public {
+ address erc20VaultAddress = getPredeployedContractAddress("ERC20Vault");
+ address bridgeAddress = getPredeployedContractAddress("Bridge");
- ERC20Vault erc20Vault = ERC20Vault(erc20VaultAddress);
+ ERC20Vault erc20VaultProxy = ERC20Vault(erc20VaultAddress);
AddressManager addressManager =
- AddressManager(getPredeployedContractAddress("AddressManagerProxy"));
+ AddressManager(getPredeployedContractAddress("SharedAddressManager"));
- assertEq(owner, erc20Vault.owner());
+ assertEq(owner, erc20VaultProxy.owner());
vm.startPrank(addressManager.owner());
addressManager.setAddress(1, "bridge", bridgeAddress);
addressManager.setAddress(1, "erc20_vault", erc20VaultAddress);
vm.stopPrank();
- vm.startPrank(admin);
+ ERC20Vault erc20Vault = ERC20Vault(getPredeployedContractAddress("ERC20VaultImpl"));
- TransparentUpgradeableProxy proxy = TransparentUpgradeableProxy(
- payable(getPredeployedContractAddress("ERC20VaultProxy"))
- );
+ vm.startPrank(erc20Vault.owner());
ERC20Vault newERC20Vault = new ERC20Vault();
- proxy.upgradeTo(address(newERC20Vault));
+ erc20Vault.upgradeTo(address(newERC20Vault));
- assertEq(proxy.implementation(), address(newERC20Vault));
vm.stopPrank();
}
- function testERC721Vault() public {
- address erc721VaultAddress =
- getPredeployedContractAddress("ERC721VaultProxy");
- address bridgeAddress = getPredeployedContractAddress("BridgeProxy");
+ function testSingletonERC721Vault() public {
+ address erc721VaultAddress = getPredeployedContractAddress("ERC721Vault");
+ address bridgeAddress = getPredeployedContractAddress("Bridge");
- ERC721Vault erc721Vault = ERC721Vault(erc721VaultAddress);
+ OwnerUUPSUpgradable erc721VaultProxy = OwnerUUPSUpgradable(erc721VaultAddress);
AddressManager addressManager =
- AddressManager(getPredeployedContractAddress("AddressManagerProxy"));
+ AddressManager(getPredeployedContractAddress("SharedAddressManager"));
- assertEq(owner, erc721Vault.owner());
+ assertEq(owner, erc721VaultProxy.owner());
vm.startPrank(addressManager.owner());
addressManager.setAddress(1, "bridge", bridgeAddress);
addressManager.setAddress(1, "erc721_vault", erc721VaultAddress);
vm.stopPrank();
- vm.startPrank(admin);
-
- TransparentUpgradeableProxy proxy = TransparentUpgradeableProxy(
- payable(getPredeployedContractAddress("ERC721VaultProxy"))
- );
+ ERC721Vault erc721Vault = ERC721Vault(getPredeployedContractAddress("ERC721VaultImpl"));
+ vm.startPrank(erc721Vault.owner());
ERC721Vault newERC721Vault = new ERC721Vault();
- proxy.upgradeTo(address(newERC721Vault));
+ erc721Vault.upgradeTo(address(newERC721Vault));
- assertEq(proxy.implementation(), address(newERC721Vault));
vm.stopPrank();
}
- function testERC1155Vault() public {
- address erc1155VaultAddress =
- getPredeployedContractAddress("ERC1155VaultProxy");
- address bridgeAddress = getPredeployedContractAddress("BridgeProxy");
+ function testSingletonERC1155Vault() public {
+ address erc1155VaultProxyAddress = getPredeployedContractAddress("ERC1155Vault");
+ address bridgeProxyAddress = getPredeployedContractAddress("Bridge");
- ERC1155Vault erc1155Vault = ERC1155Vault(erc1155VaultAddress);
+ OwnerUUPSUpgradable erc1155VaultProxy = OwnerUUPSUpgradable(erc1155VaultProxyAddress);
AddressManager addressManager =
- AddressManager(getPredeployedContractAddress("AddressManagerProxy"));
+ AddressManager(getPredeployedContractAddress("SharedAddressManager"));
- assertEq(owner, erc1155Vault.owner());
+ assertEq(owner, erc1155VaultProxy.owner());
vm.startPrank(addressManager.owner());
- addressManager.setAddress(1, "bridge", bridgeAddress);
- addressManager.setAddress(1, "erc1155_vault", erc1155VaultAddress);
+ addressManager.setAddress(1, "bridge", bridgeProxyAddress);
+ addressManager.setAddress(1, "erc1155_vault", erc1155VaultProxyAddress);
vm.stopPrank();
- vm.startPrank(admin);
+ address erc1155VaultAddress = getPredeployedContractAddress("ERC1155VaultImpl");
- TransparentUpgradeableProxy proxy = TransparentUpgradeableProxy(
- payable(getPredeployedContractAddress("ERC1155VaultProxy"))
- );
+ ERC1155Vault erc1155Vault = ERC1155Vault(erc1155VaultAddress);
+
+ vm.startPrank(erc1155Vault.owner());
ERC1155Vault newERC1155Vault = new ERC1155Vault();
- proxy.upgradeTo(address(newERC1155Vault));
+ erc1155Vault.upgradeTo(address(newERC1155Vault));
- assertEq(proxy.implementation(), address(newERC1155Vault));
vm.stopPrank();
}
- function testSignalService() public {
- SignalService signalService =
- SignalService(getPredeployedContractAddress("SignalServiceProxy"));
-
- assertEq(owner, signalService.owner());
+ function testSingletonSignalService() public {
+ SignalService signalServiceProxy =
+ SignalService(getPredeployedContractAddress("SignalService"));
- signalService.sendSignal(keccak256(abi.encodePacked(block.prevrandao)));
+ assertEq(owner, signalServiceProxy.owner());
- vm.startPrank(admin);
+ signalServiceProxy.sendSignal(keccak256(abi.encodePacked(block.prevrandao)));
- TransparentUpgradeableProxy proxy = TransparentUpgradeableProxy(
- payable(getPredeployedContractAddress("SignalServiceProxy"))
+ assertEq(
+ true,
+ signalServiceProxy.isAuthorizedAs(
+ getPredeployedContractAddress("TaikoL2"), bytes32((block.chainid))
+ )
);
+ vm.startPrank(owner);
+
+ SignalService signalService =
+ SignalService(payable(getPredeployedContractAddress("SignalServiceImpl")));
+
SignalService newSignalService = new SignalService();
- proxy.upgradeTo(address(newSignalService));
+ signalService.upgradeTo(address(newSignalService));
- assertEq(proxy.implementation(), address(newSignalService));
vm.stopPrank();
}
function testERC20() public {
- RegularERC20 regularERC20 =
- RegularERC20(getPredeployedContractAddress("RegularERC20"));
+ RegularERC20 regularERC20 = RegularERC20(getPredeployedContractAddress("RegularERC20"));
assertEq(regularERC20.name(), "RegularERC20");
assertEq(regularERC20.symbol(), "RGL");
}
- function getPredeployedContractAddress(string memory contractName)
- private
- returns (address)
- {
- return configJSON.readAddress(
- string.concat(".contractAddresses.", contractName)
- );
+ function getPredeployedContractAddress(string memory contractName) private returns (address) {
+ return configJSON.readAddress(string.concat(".contractAddresses.", contractName));
}
function checkDeployedCode(string memory contractName) private {
address contractAddress = getPredeployedContractAddress(contractName);
- string memory deployedCode = genesisAllocJSON.readString(
- string.concat(".", vm.toString(contractAddress), ".code")
- );
+ string memory deployedCode =
+ genesisAllocJSON.readString(string.concat(".", vm.toString(contractAddress), ".code"));
assertEq(address(contractAddress).code, vm.parseBytes(deployedCode));
}
@@ -348,16 +341,13 @@ contract TestGenerateGenesis is Test, AddressResolver {
)
private
{
- vm.startPrank(admin);
+ vm.startPrank(owner);
address contractAddress = getPredeployedContractAddress(contractName);
address proxyAddress = getPredeployedContractAddress(proxyName);
- TransparentUpgradeableProxy proxy =
- TransparentUpgradeableProxy(payable(proxyAddress));
-
- assertEq(proxy.implementation(), address(contractAddress));
+ OwnerUUPSUpgradable proxy = OwnerUUPSUpgradable(payable(proxyAddress));
- assertEq(proxy.admin(), admin);
+ assertEq(proxy.owner(), owner);
vm.stopPrank();
}
@@ -371,7 +361,7 @@ contract TestGenerateGenesis is Test, AddressResolver {
{
assertEq(
getPredeployedContractAddress(contractName),
- addressManager.getAddress(block.chainid, name)
+ addressManager.getAddress(uint64(block.chainid), name)
);
}
}
diff --git a/packages/protocol/genesis/generate_genesis.test.sh b/packages/protocol/genesis/generate_genesis.test.sh
index 67af651e90c..7a239d55696 100755
--- a/packages/protocol/genesis/generate_genesis.test.sh
+++ b/packages/protocol/genesis/generate_genesis.test.sh
@@ -51,7 +51,7 @@ echo "Starting generate_genesis tests..."
rm -rf out && pnpm compile
# run the task
-pnpm run generate:genesis $DIR/test_config.json
+pnpm run generate:genesis $DIR/test_config.js
# generate complete genesis json
cat $DIR/../deployments/genesis_alloc.json >> $GENESIS_JSON
diff --git a/packages/protocol/genesis/test_config.js b/packages/protocol/genesis/test_config.js
new file mode 100644
index 00000000000..abb25629703
--- /dev/null
+++ b/packages/protocol/genesis/test_config.js
@@ -0,0 +1,121 @@
+"use strict";
+const ADDRESS_LENGTH = 40;
+
+module.exports = {
+ contractOwner: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
+ chainId: 167,
+ seedAccounts: [
+ {
+ "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266": 1024,
+ },
+ {
+ "0x70997970C51812dc3A010C7d01b50e0d17dc79C8": 1024,
+ },
+ {
+ "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC": 1024,
+ },
+ {
+ "0x90F79bf6EB2c4f870365E785982E1f101E93b906": 1024,
+ },
+ {
+ "0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65": 1024,
+ },
+ {
+ "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc": 1024,
+ },
+ {
+ "0x976EA74026E726554dB657fA54763abd0C3a0aa9": 1024,
+ },
+ {
+ "0x14dC79964da2C08b23698B3D3cc7Ca32193d9955": 1024,
+ },
+ {
+ "0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f": 1024,
+ },
+ {
+ "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720": 1024,
+ },
+ {
+ "0xBcd4042DE499D14e55001CcbB24a551F3b954096": 1024,
+ },
+ {
+ "0x71bE63f3384f5fb98995898A86B02Fb2426c5788": 1024,
+ },
+ {
+ "0xFABB0ac9d68B0B445fB7357272Ff202C5651694a": 1024,
+ },
+ {
+ "0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec": 1024,
+ },
+ {
+ "0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097": 1024,
+ },
+ {
+ "0xcd3B766CCDd6AE721141F452C550Ca635964ce71": 1024,
+ },
+ {
+ "0x2546BcD3c84621e976D8185a91A922aE77ECEc30": 1024,
+ },
+ {
+ "0xbDA5747bFD65F08deb54cb465eB87D40e51B197E": 1024,
+ },
+ {
+ "0xdD2FD4581271e230360230F9337D5c0430Bf44C0": 1024,
+ },
+ {
+ "0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199": 1024,
+ },
+ {
+ "0x7D86687F980A56b832e9378952B738b614A99dc6": 1024,
+ },
+ {
+ "0x11e8F3eA3C6FcF12EcfF2722d75CEFC539c51a1C": 1024,
+ },
+ {
+ "0x9eAF5590f2c84912A08de97FA28d0529361Deb9E": 1024,
+ },
+ {
+ "0x1003ff39d25F2Ab16dBCc18EcE05a9B6154f65F4": 1024,
+ },
+ ],
+ get contractAddresses() {
+ return {
+ // ============ Implementations ============
+ // Shared Contracts
+ BridgeImpl: getConstantAddress(`0${this.chainId}`, 1),
+ ERC20VaultImpl: getConstantAddress(`0${this.chainId}`, 2),
+ ERC721VaultImpl: getConstantAddress(`0${this.chainId}`, 3),
+ ERC1155VaultImpl: getConstantAddress(`0${this.chainId}`, 4),
+ SignalServiceImpl: getConstantAddress(`0${this.chainId}`, 5),
+ SharedAddressManagerImpl: getConstantAddress(`0${this.chainId}`, 6),
+ BridgedERC20Impl: getConstantAddress(`0${this.chainId}`, 10096),
+ BridgedERC721Impl: getConstantAddress(`0${this.chainId}`, 10097),
+ BridgedERC1155Impl: getConstantAddress(`0${this.chainId}`, 10098),
+ RegularERC20: getConstantAddress(`0${this.chainId}`, 10099),
+ // Rollup Contracts
+ TaikoL2Impl: getConstantAddress(`0${this.chainId}`, 10001),
+ RollupAddressManagerImpl: getConstantAddress(`0${this.chainId}`, 10002),
+ // ============ Proxies ============
+ // Shared Contracts
+ Bridge: getConstantAddress(this.chainId, 1),
+ ERC20Vault: getConstantAddress(this.chainId, 2),
+ ERC721Vault: getConstantAddress(this.chainId, 3),
+ ERC1155Vault: getConstantAddress(this.chainId, 4),
+ SignalService: getConstantAddress(this.chainId, 5),
+ SharedAddressManager: getConstantAddress(this.chainId, 6),
+ // Rollup Contracts
+ TaikoL2: getConstantAddress(this.chainId, 10001),
+ RollupAddressManager: getConstantAddress(this.chainId, 10002),
+ };
+ },
+ param1559: {
+ gasExcess: 1,
+ },
+ predeployERC20: true,
+};
+
+function getConstantAddress(prefix, suffix) {
+ return `0x${prefix}${"0".repeat(
+ ADDRESS_LENGTH - String(prefix).length - String(suffix).length,
+ )}${suffix}`;
+}
diff --git a/packages/protocol/genesis/test_config.json b/packages/protocol/genesis/test_config.json
deleted file mode 100644
index c747215a270..00000000000
--- a/packages/protocol/genesis/test_config.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "contractOwner": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
- "contractAdmin": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
- "chainId": 167,
- "seedAccounts": [
- {
- "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266": 1024
- },
- {
- "0x70997970C51812dc3A010C7d01b50e0d17dc79C8": 1024
- },
- {
- "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC": 1024
- },
- {
- "0x90F79bf6EB2c4f870365E785982E1f101E93b906": 1024
- },
- {
- "0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65": 1024
- },
- {
- "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc": 1024
- },
- {
- "0x976EA74026E726554dB657fA54763abd0C3a0aa9": 1024
- },
- {
- "0x14dC79964da2C08b23698B3D3cc7Ca32193d9955": 1024
- },
- {
- "0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f": 1024
- },
- {
- "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720": 1024
- },
- {
- "0xBcd4042DE499D14e55001CcbB24a551F3b954096": 1024
- },
- {
- "0x71bE63f3384f5fb98995898A86B02Fb2426c5788": 1024
- },
- {
- "0xFABB0ac9d68B0B445fB7357272Ff202C5651694a": 1024
- },
- {
- "0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec": 1024
- },
- {
- "0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097": 1024
- },
- {
- "0xcd3B766CCDd6AE721141F452C550Ca635964ce71": 1024
- },
- {
- "0x2546BcD3c84621e976D8185a91A922aE77ECEc30": 1024
- },
- {
- "0xbDA5747bFD65F08deb54cb465eB87D40e51B197E": 1024
- },
- {
- "0xdD2FD4581271e230360230F9337D5c0430Bf44C0": 1024
- },
- {
- "0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199": 1024
- }
- ],
- "contractAddresses": {
- "ProxiedTaikoL2": "0x0000777700000000000000000000000000000001",
- "ProxiedERC20Vault": "0x0000777700000000000000000000000000000002",
- "ProxiedEtherVault": "0x0000777700000000000000000000000000000003",
- "ProxiedBridge": "0x0000777700000000000000000000000000000004",
- "RegularERC20": "0x0000777700000000000000000000000000000005",
- "ProxiedAddressManager": "0x0000777700000000000000000000000000000006",
- "ProxiedSignalService": "0x0000777700000000000000000000000000000007",
- "ProxiedERC721Vault": "0x0000777700000000000000000000000000000008",
- "ProxiedERC1155Vault": "0x0000777700000000000000000000000000000009",
- "TaikoL2Proxy": "0x1000777700000000000000000000000000000001",
- "ERC20VaultProxy": "0x1000777700000000000000000000000000000002",
- "EtherVaultProxy": "0x1000777700000000000000000000000000000003",
- "BridgeProxy": "0x1000777700000000000000000000000000000004",
- "AddressManagerProxy": "0x1000777700000000000000000000000000000006",
- "SignalServiceProxy": "0x1000777700000000000000000000000000000007",
- "ERC721VaultProxy": "0x1000777700000000000000000000000000000008",
- "ERC1155VaultProxy": "0x1000777700000000000000000000000000000009"
- },
- "param1559": {
- "yscale": "1679526101464767541687441923934",
- "xscale": "6977415078",
- "gasIssuedPerSecond": "2666666",
- "gasExcess": "9695997576"
- },
- "predeployERC20": true
-}
diff --git a/packages/protocol/package.json b/packages/protocol/package.json
index 66c916ff047..44937a7e150 100644
--- a/packages/protocol/package.json
+++ b/packages/protocol/package.json
@@ -3,6 +3,7 @@
"version": "0.15.3",
"private": true,
"scripts": {
+ "buildMerkle": "ts-node ./utils/airdrop/buildMerkleTree.ts ./utils/airdrop/airdrop_db/example_claimList.json",
"clean": "rm -rf abis cache && forge clean",
"compile": "forge build",
"compile:hardhat": "pnpm hardhat compile",
@@ -15,10 +16,10 @@
"lint:sol": "forge fmt && pnpm solhint 'contracts/**/*.sol' --fix",
"sizer": "pnpm hardhat size-contracts",
"snapshot": "forge snapshot --match-path 'test/**/*.t.sol'",
- "test": "forge test -vvv --gas-report --fuzz-seed $(date +%s) --nmp test/L1/TaikoL1.sim.sol",
- "test:coverage": "forge coverage --report lcov",
- "test:genesis": "FOUNDRY_PROFILE=genesis ./genesis/generate_genesis.test.sh",
- "upgrade": "./script/upgrade_to.sh"
+ "test": "forge test -vvv --match-path test/*.t.sol",
+ "test:coverage": "mkdir -p coverage && forge coverage --report lcov && lcov --remove ./lcov.info -o ./coverage/lcov.info 'test/' 'script/' 'contracts/thirdparty/' && genhtml coverage/lcov.info --branch-coverage --output-dir coverage --ignore-errors category && open coverage/index.html",
+ "test:genesis": "pnpm compile && pnpm compile:hardhat && FOUNDRY_PROFILE=genesis ./genesis/generate_genesis.test.sh",
+ "export:simconf": "forge test --match-test 'test_simulation' -vv > simulation/out/simconf_$(date +%s).txt"
},
"keywords": [
"ZKP",
@@ -36,46 +37,49 @@
"devDependencies": {
"@defi-wonderland/smock": "^2.3.4",
"@foundry-rs/hardhat-forge": "^0.1.17",
- "@nomicfoundation/hardhat-foundry": "^1.0.1",
- "@nomicfoundation/hardhat-network-helpers": "^1.0.8",
+ "@nomicfoundation/hardhat-foundry": "^1.1.1",
+ "@nomicfoundation/hardhat-network-helpers": "^1.0.9",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
- "@nomiclabs/hardhat-waffle": "^2.0.5",
- "@openzeppelin/hardhat-upgrades": "^1.22.1",
- "@typechain/ethers-v5": "^7.2.0",
- "@typechain/hardhat": "^2.3.1",
- "@types/chai": "^4.3.4",
+ "@nomiclabs/hardhat-waffle": "^2.0.6",
+ "@openzeppelin/hardhat-upgrades": "^2.3.3",
+ "@typechain/ethers-v5": "^11.1.2",
+ "@typechain/hardhat": "^9.1.0",
+ "@types/chai": "^4.3.8",
"@types/glob": "^8.1.0",
- "@types/mocha": "^9.1.1",
- "@types/node": "^12.20.55",
- "@typescript-eslint/eslint-plugin": "^6.6.0",
- "@typescript-eslint/parser": "^4.33.0",
- "chai": "^4.3.7",
- "chalk": "4.1.2",
- "dotenv": "^10.0.0",
- "eslint": "^7.32.0",
- "eslint-config-prettier": "^8.8.0",
- "eslint-config-standard": "^16.0.3",
- "eslint-plugin-import": "^2.27.5",
+ "@types/mocha": "^10.0.2",
+ "@types/node": "^20.8.6",
+ "@typescript-eslint/eslint-plugin": "^6.7.5",
+ "@typescript-eslint/parser": "^6.7.5",
+ "chai": "^4.3.10",
+ "chalk": "5.3.0",
+ "dotenv": "^16.3.1",
+ "eslint": "^8.51.0",
+ "eslint-config-prettier": "^9.0.0",
+ "eslint-config-standard": "^17.1.0",
+ "eslint-plugin-import": "^2.28.1",
"eslint-plugin-node": "^11.1.0",
- "eslint-plugin-prettier": "^3.4.1",
+ "eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-promise": "^6.1.1",
"ethers": "^5.7.2",
- "glob": "^8.1.0",
- "hardhat": "^2.14.0",
+ "glob": "^10.3.10",
+ "hardhat": "^2.18.1",
"hardhat-abi-exporter": "^2.10.1",
- "hardhat-contract-sizer": "^2.8.0",
+ "hardhat-contract-sizer": "^2.10.0",
"hardhat-docgen": "^1.3.0",
"hardhat-gas-reporter": "^1.0.9",
"hardhat-preprocessor": "^0.1.5",
"merkle-patricia-tree": "^4.2.4",
- "prettier": "^2.8.8",
+ "prettier": "^3.0.3",
"rlp": "^3.0.0",
- "solhint": "^3.4.1",
+ "solhint": "^3.6.2",
"solidity-coverage": "github:taikoxyz/solidity-coverage",
- "solidity-docgen": "0.6.0-beta.35",
+ "solidity-docgen": "0.6.0-beta.36",
"ts-node": "^10.9.1",
- "typechain": "^5.2.0",
- "typescript": "^4.9.5"
+ "typechain": "^8.3.2",
+ "typescript": "^5.2.2"
+ },
+ "dependencies": {
+ "merkletreejs": "^0.3.11"
}
}
diff --git a/packages/protocol/remappings.txt b/packages/protocol/remappings.txt
index 271c7272700..882d4bda9b3 100644
--- a/packages/protocol/remappings.txt
+++ b/packages/protocol/remappings.txt
@@ -1,5 +1,3 @@
forge-std/=lib/forge-std/src/
solmate/=lib/solmate/src/
-ds-test/=lib/forge-std/lib/ds-test/src/
-@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
-@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/
\ No newline at end of file
+ds-test/=lib/forge-std/lib/ds-test/src/
\ No newline at end of file
diff --git a/packages/protocol/script/AuthorizeRemoteTaikoProtocols.s.sol b/packages/protocol/script/AuthorizeRemoteTaikoProtocols.s.sol
new file mode 100644
index 00000000000..60969210076
--- /dev/null
+++ b/packages/protocol/script/AuthorizeRemoteTaikoProtocols.s.sol
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "forge-std/Script.sol";
+import "forge-std/console2.sol";
+import "../contracts/signal/SignalService.sol";
+
+contract AuthorizeRemoteTaikoProtocols is Script {
+ uint256 public privateKey = vm.envUint("PRIVATE_KEY");
+ address public signalServiceAddress = vm.envAddress("SIGNAL_SERVICE_ADDRESS");
+ uint256[] public remoteChainIDs = vm.envUint("REMOTE_CHAIN_IDS", ",");
+ address[] public remoteTaikoProtocols = vm.envAddress("REMOTE_TAIKO_PROTOCOLS", ",");
+
+ function run() external {
+ require(
+ remoteChainIDs.length == remoteTaikoProtocols.length,
+ "invalid remote taiko protocol addresses length"
+ );
+
+ vm.startBroadcast(privateKey);
+
+ SignalService signalService = SignalService(payable(signalServiceAddress));
+ for (uint256 i; i < remoteChainIDs.length; ++i) {
+ console2.log(remoteTaikoProtocols[i], "--->", remoteChainIDs[i]);
+ if (!signalService.isAuthorizedAs(remoteTaikoProtocols[i], bytes32(remoteChainIDs[i])))
+ {
+ signalService.authorize(remoteTaikoProtocols[i], bytes32(remoteChainIDs[i]));
+ }
+ }
+
+ vm.stopBroadcast();
+ }
+}
diff --git a/packages/protocol/script/DeployOnL1.s.sol b/packages/protocol/script/DeployOnL1.s.sol
index 7bca8531798..78deb5c54a1 100644
--- a/packages/protocol/script/DeployOnL1.s.sol
+++ b/packages/protocol/script/DeployOnL1.s.sol
@@ -6,207 +6,375 @@
pragma solidity ^0.8.20;
-import "forge-std/Script.sol";
-import "forge-std/console2.sol";
-import
- "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
+import "lib/openzeppelin-contracts/contracts/utils/Strings.sol";
+
import "../contracts/L1/TaikoToken.sol";
import "../contracts/L1/TaikoL1.sol";
-import "../contracts/L1/ProofVerifier.sol";
+import "../contracts/L1/hooks/AssignmentHook.sol";
+import "../contracts/L1/provers/GuardianProver.sol";
+import "../contracts/L1/verifiers/PseZkVerifier.sol";
+import "../contracts/L1/verifiers/SgxVerifier.sol";
+import "../contracts/L1/verifiers/SgxAndZkVerifier.sol";
+import "../contracts/L1/verifiers/GuardianVerifier.sol";
+import "../contracts/L1/tiers/TaikoA6TierProvider.sol";
+import "../contracts/L1/hooks/AssignmentHook.sol";
+import "../contracts/L1/gov/TaikoTimelockController.sol";
+import "../contracts/L1/gov/TaikoGovernor.sol";
import "../contracts/bridge/Bridge.sol";
import "../contracts/tokenvault/ERC20Vault.sol";
import "../contracts/tokenvault/ERC1155Vault.sol";
import "../contracts/tokenvault/ERC721Vault.sol";
import "../contracts/signal/SignalService.sol";
-import "../contracts/common/AddressManager.sol";
import "../contracts/test/erc20/FreeMintERC20.sol";
import "../contracts/test/erc20/MayFailFreeMintERC20.sol";
+import "../test/DeployCapability.sol";
/// @title DeployOnL1
/// @notice This script deploys the core Taiko protocol smart contract on L1,
/// initializing the rollup.
-contract DeployOnL1 is Script {
- bytes32 public genesisHash = vm.envBytes32("L2_GENESIS_HASH");
-
- uint256 public deployerPrivateKey = vm.envUint("PRIVATE_KEY");
+contract DeployOnL1 is DeployCapability {
+ uint256 public constant NUM_GUARDIANS = 5;
- address public taikoL2Address = vm.envAddress("TAIKO_L2_ADDRESS");
+ address public constant MAINNET_SECURITY_COUNCIL = 0x7C50d60743D3FCe5a39FdbF687AFbAe5acFF49Fd;
- address public l2SignalService = vm.envAddress("L2_SIGNAL_SERVICE");
+ address securityCouncil =
+ block.chainid == 1 ? MAINNET_SECURITY_COUNCIL : vm.envAddress("SECURITY_COUNCIL");
- address public owner = vm.envAddress("OWNER");
-
- address public oracleProver = vm.envAddress("ORACLE_PROVER");
+ modifier broadcast() {
+ uint256 privateKey = vm.envUint("PRIVATE_KEY");
+ require(privateKey != 0, "invalid priv key");
+ vm.startBroadcast();
+ _;
+ vm.stopBroadcast();
+ }
- address public sharedSignalService = vm.envAddress("SHARED_SIGNAL_SERVICE");
+ function run() external broadcast {
+ addressNotNull(vm.envAddress("TAIKO_L2_ADDRESS"), "TAIKO_L2_ADDRESS");
+ addressNotNull(vm.envAddress("L2_SIGNAL_SERVICE"), "L2_SIGNAL_SERVICE");
+ require(vm.envBytes32("L2_GENESIS_HASH") != 0, "L2_GENESIS_HASH");
+
+ // ---------------------------------------------------------------
+ // Deploy shared contracts
+ (address sharedAddressManager, address timelock) = deploySharedContracts();
+ console2.log("sharedAddressManager: ", sharedAddressManager);
+ console2.log("timelock: ", timelock);
+ // ---------------------------------------------------------------
+ // Deploy rollup contracts
+ address rollupAddressManager = deployRollupContracts(sharedAddressManager, timelock);
+
+ // ---------------------------------------------------------------
+ // Signal service need to authorize the new rollup
+ address signalServiceAddr =
+ AddressManager(sharedAddressManager).getAddress(uint64(block.chainid), "signal_service");
+ addressNotNull(signalServiceAddr, "signalServiceAddr");
+ SignalService signalService = SignalService(signalServiceAddr);
+
+ address taikoL1Addr =
+ AddressManager(rollupAddressManager).getAddress(uint64(block.chainid), "taiko");
+ addressNotNull(taikoL1Addr, "taikoL1Addr");
+ TaikoL1 taikoL1 = TaikoL1(payable(taikoL1Addr));
+
+ uint64 l2ChainId = taikoL1.getConfig().chainId;
+ require(l2ChainId != block.chainid, "same chainid");
- address[] public taikoTokenPremintRecipients =
- vm.envAddress("TAIKO_TOKEN_PREMINT_RECIPIENTS", ",");
+ console2.log("------------------------------------------");
+ console2.log("msg.sender: ", msg.sender);
+ console2.log("address(this): ", address(this));
+ console2.log("signalService.owner(): ", signalService.owner());
+ console2.log("------------------------------------------");
- uint256[] public taikoTokenPremintAmounts =
- vm.envUint("TAIKO_TOKEN_PREMINT_AMOUNTS", ",");
+ if (signalService.owner() == address(this)) {
+ signalService.authorize(taikoL1Addr, bytes32(block.chainid));
+ signalService.authorize(vm.envAddress("TAIKO_L2_ADDRESS"), bytes32(uint256(l2ChainId)));
+ signalService.transferOwnership(timelock);
+ } else {
+ console2.log("------------------------------------------");
+ console2.log("Warning - you need to transact manually:");
+ console2.log("signalService.authorize(taikoL1Addr, bytes32(block.chainid))");
+ console2.log("- signalService : ", signalServiceAddr);
+ console2.log("- taikoL1Addr : ", taikoL1Addr);
+ console2.log("- chainId : ", block.chainid);
+ }
- TaikoL1 taikoL1;
- address public addressManagerProxy;
+ // ---------------------------------------------------------------
+ // Register shared contracts in the new rollup
+ copyRegister(rollupAddressManager, sharedAddressManager, "taiko_token");
+ copyRegister(rollupAddressManager, sharedAddressManager, "signal_service");
+ copyRegister(rollupAddressManager, sharedAddressManager, "bridge");
- error FAILED_TO_DEPLOY_PLONK_VERIFIER(string contractPath);
+ address proposer = vm.envAddress("PROPOSER");
+ if (proposer != address(0)) {
+ register(rollupAddressManager, "proposer", proposer);
+ }
- function run() external {
- require(owner != address(0), "owner is zero");
- require(taikoL2Address != address(0), "taikoL2Address is zero");
- require(l2SignalService != address(0), "l2SignalService is zero");
- require(
- taikoTokenPremintRecipients.length != 0,
- "taikoTokenPremintRecipients length is zero"
- );
+ address proposerOne = vm.envAddress("PROPOSER_ONE");
+ if (proposerOne != address(0)) {
+ register(rollupAddressManager, "proposer_one", proposerOne);
+ }
- require(
- taikoTokenPremintRecipients.length
- == taikoTokenPremintAmounts.length,
- "taikoTokenPremintRecipients and taikoTokenPremintAmounts must be same length"
+ // ---------------------------------------------------------------
+ // Register L2 addresses
+ register(rollupAddressManager, "taiko", vm.envAddress("TAIKO_L2_ADDRESS"), l2ChainId);
+ register(
+ rollupAddressManager, "signal_service", vm.envAddress("L2_SIGNAL_SERVICE"), l2ChainId
);
- vm.startBroadcast(deployerPrivateKey);
-
- // AddressManager
- AddressManager addressManager = new ProxiedAddressManager();
- addressManagerProxy = deployProxy(
- "address_manager",
- address(addressManager),
- bytes.concat(addressManager.init.selector)
- );
+ // ---------------------------------------------------------------
+ // Deploy other contracts
+ deployAuxContracts();
- // TaikoL1
- taikoL1 = new ProxiedTaikoL1();
- uint256 l2ChainId = taikoL1.getConfig().chainId;
- require(l2ChainId != block.chainid, "same chainid");
+ if (AddressManager(sharedAddressManager).owner() == msg.sender) {
+ AddressManager(sharedAddressManager).transferOwnership(timelock);
+ console2.log("** sharedAddressManager ownership transferred to timelock:", timelock);
+ }
- setAddress(l2ChainId, "taiko", taikoL2Address);
- setAddress(l2ChainId, "signal_service", l2SignalService);
- setAddress("oracle_prover", oracleProver);
+ AddressManager(rollupAddressManager).transferOwnership(timelock);
+ console2.log("** rollupAddressManager ownership transferred to timelock:", timelock);
+ }
- // TaikoToken
- TaikoToken taikoToken = new ProxiedTaikoToken();
+ function deploySharedContracts()
+ internal
+ returns (address sharedAddressManager, address timelock)
+ {
+ sharedAddressManager = vm.envAddress("SHARED_ADDRESS_MANAGER");
+ if (sharedAddressManager != address(0)) {
+ return (sharedAddressManager, vm.envAddress("TIMELOCK_CONTROLLER"));
+ }
- deployProxy(
- "taiko_token",
- address(taikoToken),
- bytes.concat(
- taikoToken.init.selector,
+ // Deploy the timelock
+ timelock = deployProxy({
+ name: "timelock_controller",
+ impl: address(new TaikoTimelockController()),
+ data: bytes.concat(TaikoTimelockController.init.selector, abi.encode(7 days))
+ });
+
+ sharedAddressManager = deployProxy({
+ name: "shared_address_manager",
+ impl: address(new AddressManager()),
+ data: bytes.concat(AddressManager.init.selector)
+ });
+
+ address taikoToken = deployProxy({
+ name: "taiko_token",
+ impl: address(new TaikoToken()),
+ data: bytes.concat(
+ TaikoToken.init.selector,
abi.encode(
- addressManagerProxy,
- "Taiko Token Eldfell",
- "TTKOe",
- taikoTokenPremintRecipients,
- taikoTokenPremintAmounts
+ vm.envString("TAIKO_TOKEN_NAME"),
+ vm.envString("TAIKO_TOKEN_SYMBOL"),
+ vm.envAddress("TAIKO_TOKEN_PREMINT_RECIPIENT")
)
- )
+ ),
+ registerTo: sharedAddressManager,
+ owner: timelock
+ });
+
+ address governor = deployProxy({
+ name: "taiko_governor",
+ impl: address(new TaikoGovernor()),
+ data: bytes.concat(TaikoGovernor.init.selector, abi.encode(taikoToken, timelock)),
+ registerTo: address(0),
+ owner: timelock
+ });
+
+ // Setup time lock roles
+ TaikoTimelockController _timelock = TaikoTimelockController(payable(timelock));
+ _timelock.grantRole(_timelock.PROPOSER_ROLE(), governor);
+ _timelock.grantRole(_timelock.PROPOSER_ROLE(), securityCouncil);
+
+ _timelock.grantRole(_timelock.EXECUTOR_ROLE(), governor);
+ _timelock.grantRole(_timelock.EXECUTOR_ROLE(), securityCouncil);
+
+ _timelock.grantRole(_timelock.CANCELLER_ROLE(), governor);
+ _timelock.grantRole(_timelock.CANCELLER_ROLE(), securityCouncil);
+
+ _timelock.grantRole(_timelock.TIMELOCK_ADMIN_ROLE(), securityCouncil);
+ _timelock.revokeRole(_timelock.TIMELOCK_ADMIN_ROLE(), address(this));
+ _timelock.revokeRole(_timelock.TIMELOCK_ADMIN_ROLE(), msg.sender);
+
+ _timelock.transferOwnership(securityCouncil);
+
+ // Deploy Bridging contracts
+ deployProxy({
+ name: "signal_service",
+ impl: address(new SignalService()),
+ data: bytes.concat(SignalService.init.selector),
+ registerTo: sharedAddressManager,
+ owner: address(0)
+ });
+
+ deployProxy({
+ name: "bridge",
+ impl: address(new Bridge()),
+ data: bytes.concat(Bridge.init.selector, abi.encode(sharedAddressManager)),
+ registerTo: sharedAddressManager,
+ owner: timelock
+ });
+
+ console2.log("------------------------------------------");
+ console2.log(
+ "Warning - you need to register *all* counterparty bridges to enable multi-hop bridging:"
);
-
- // HorseToken
- address horseToken = address(new FreeMintERC20("Horse Token", "HORSE"));
- console2.log("HorseToken", horseToken);
-
- uint64 feePerGas = 10;
- uint64 proofWindow = 60 minutes;
-
- address taikoL1Proxy = deployProxy(
- "taiko",
- address(taikoL1),
- bytes.concat(
- taikoL1.init.selector,
- abi.encode(
- addressManagerProxy, genesisHash, feePerGas, proofWindow
- )
- )
+ console2.log(
+ "sharedAddressManager.setAddress(remoteChainId, \"bridge\", address(remoteBridge))"
);
- setAddress("taiko", taikoL1Proxy);
-
- // Bridge
- Bridge bridge = new ProxiedBridge();
- deployProxy(
- "bridge",
- address(bridge),
- bytes.concat(bridge.init.selector, abi.encode(addressManagerProxy))
+ console2.log("- sharedAddressManager : ", sharedAddressManager);
+
+ // Deploy Vaults
+ deployProxy({
+ name: "erc20_vault",
+ impl: address(new ERC20Vault()),
+ data: bytes.concat(BaseVault.init.selector, abi.encode(sharedAddressManager)),
+ registerTo: sharedAddressManager,
+ owner: timelock
+ });
+
+ deployProxy({
+ name: "erc721_vault",
+ impl: address(new ERC721Vault()),
+ data: bytes.concat(BaseVault.init.selector, abi.encode(sharedAddressManager)),
+ registerTo: sharedAddressManager,
+ owner: timelock
+ });
+
+ deployProxy({
+ name: "erc1155_vault",
+ impl: address(new ERC1155Vault()),
+ data: bytes.concat(BaseVault.init.selector, abi.encode(sharedAddressManager)),
+ registerTo: sharedAddressManager,
+ owner: timelock
+ });
+
+ console2.log("------------------------------------------");
+ console2.log(
+ "Warning - you need to register *all* counterparty vaults to enable multi-hop bridging:"
);
-
- // ERC20Vault
- ERC20Vault erc20Vault = new ProxiedERC20Vault();
- deployProxy(
- "erc20_vault",
- address(erc20Vault),
- bytes.concat(
- erc20Vault.init.selector, abi.encode(addressManagerProxy)
- )
+ console2.log(
+ "sharedAddressManager.setAddress(remoteChainId, \"erc20_vault\", address(remoteERC20Vault))"
);
-
- // ERC721Vault
- ERC721Vault erc721Vault = new ProxiedERC721Vault();
- deployProxy(
- "erc721_vault",
- address(erc721Vault),
- bytes.concat(
- erc721Vault.init.selector, abi.encode(addressManagerProxy)
- )
+ console2.log(
+ "sharedAddressManager.setAddress(remoteChainId, \"erc721_vault\", address(remoteERC721Vault))"
);
-
- // ERC1155Vault
- ERC1155Vault erc1155Vault = new ProxiedERC1155Vault();
- deployProxy(
- "erc1155_vault",
- address(erc1155Vault),
- bytes.concat(
- erc1155Vault.init.selector, abi.encode(addressManagerProxy)
- )
+ console2.log(
+ "sharedAddressManager.setAddress(remoteChainId, \"erc1155_vault\", address(remoteERC1155Vault))"
);
+ console2.log("- sharedAddressManager : ", sharedAddressManager);
- // ProofVerifier
- ProofVerifier proofVerifier = new ProxiedProofVerifier();
- deployProxy(
- "proof_verifier",
- address(proofVerifier),
- bytes.concat(
- proofVerifier.init.selector, abi.encode(addressManagerProxy)
- )
- );
+ // Deploy Bridged token implementations
+ register(sharedAddressManager, "bridged_erc20", address(new BridgedERC20()));
+ register(sharedAddressManager, "bridged_erc721", address(new BridgedERC721()));
+ register(sharedAddressManager, "bridged_erc1155", address(new BridgedERC1155()));
+ }
- // SignalService
- if (sharedSignalService == address(0)) {
- SignalService signalService = new ProxiedSignalService();
- deployProxy(
- "signal_service",
- address(signalService),
- bytes.concat(
- signalService.init.selector, abi.encode(addressManagerProxy)
- )
- );
- } else {
- console2.log(
- "Warning: using shared signal service: ", sharedSignalService
+ function deployRollupContracts(
+ address _sharedAddressManager,
+ address timelock
+ )
+ internal
+ returns (address rollupAddressManager)
+ {
+ addressNotNull(_sharedAddressManager, "sharedAddressManager");
+ addressNotNull(timelock, "timelock");
+
+ rollupAddressManager = deployProxy({
+ name: "rollup_address_manager",
+ impl: address(new AddressManager()),
+ data: bytes.concat(AddressManager.init.selector)
+ });
+
+ deployProxy({
+ name: "taiko",
+ impl: address(new TaikoL1()),
+ data: bytes.concat(
+ TaikoL1.init.selector,
+ abi.encode(rollupAddressManager, vm.envBytes32("L2_GENESIS_HASH"))
+ ),
+ registerTo: rollupAddressManager,
+ owner: timelock
+ });
+
+ deployProxy({
+ name: "assignment_hook",
+ impl: address(new AssignmentHook()),
+ data: bytes.concat(AssignmentHook.init.selector, abi.encode(rollupAddressManager)),
+ registerTo: address(0),
+ owner: timelock
+ });
+
+ deployProxy({
+ name: "tier_provider",
+ impl: address(new TaikoA6TierProvider()),
+ data: bytes.concat(TaikoA6TierProvider.init.selector),
+ registerTo: rollupAddressManager,
+ owner: timelock
+ });
+
+ deployProxy({
+ name: "tier_guardian",
+ impl: address(new GuardianVerifier()),
+ data: bytes.concat(GuardianVerifier.init.selector, abi.encode(rollupAddressManager)),
+ registerTo: rollupAddressManager,
+ owner: timelock
+ });
+
+ deployProxy({
+ name: "tier_sgx",
+ impl: address(new SgxVerifier()),
+ data: bytes.concat(SgxVerifier.init.selector, abi.encode(rollupAddressManager)),
+ registerTo: rollupAddressManager,
+ owner: timelock
+ });
+
+ deployProxy({
+ name: "tier_sgx_and_pse_zkevm",
+ impl: address(new SgxAndZkVerifier()),
+ data: bytes.concat(SgxAndZkVerifier.init.selector, abi.encode(rollupAddressManager)),
+ registerTo: rollupAddressManager,
+ owner: timelock
+ });
+
+ address pseZkVerifier = deployProxy({
+ name: "tier_pse_zkevm",
+ impl: address(new PseZkVerifier()),
+ data: bytes.concat(PseZkVerifier.init.selector, abi.encode(rollupAddressManager)),
+ registerTo: rollupAddressManager,
+ owner: timelock
+ });
+
+ address[] memory plonkVerifiers = new address[](1);
+ plonkVerifiers[0] = deployYulContract("contracts/L1/verifiers/PlonkVerifier.yulp");
+
+ for (uint16 i = 0; i < plonkVerifiers.length; ++i) {
+ register(
+ rollupAddressManager,
+ string(abi.encodePacked(PseZkVerifier(pseZkVerifier).getVerifierName(i))),
+ plonkVerifiers[i]
);
- setAddress("signal_service", sharedSignalService);
}
- // PlonkVerifier
- deployPlonkVerifiers();
-
- vm.stopBroadcast();
+ address guardianProver = deployProxy({
+ name: "guardian_prover",
+ impl: address(new GuardianProver()),
+ data: bytes.concat(GuardianProver.init.selector, abi.encode(rollupAddressManager)),
+ registerTo: rollupAddressManager,
+ owner: address(0)
+ });
+
+ address[] memory guardians = vm.envAddress("GUARDIAN_PROVERS", ",");
+ uint8 minGuardians = uint8(vm.envUint("MIN_GUARDIANS"));
+ GuardianProver(guardianProver).setGuardians(guardians, minGuardians);
+ GuardianProver(guardianProver).transferOwnership(timelock);
}
- function deployPlonkVerifiers() private {
- address[] memory plonkVerifiers = new address[](1);
- plonkVerifiers[0] =
- deployYulContract("contracts/libs/yul/PlonkVerifier.yulp");
+ function deployAuxContracts() private {
+ address horseToken = address(new FreeMintERC20("Horse Token", "HORSE"));
+ console2.log("HorseToken", horseToken);
- for (uint16 i = 0; i < plonkVerifiers.length; ++i) {
- setAddress(taikoL1.getVerifierName(i), plonkVerifiers[i]);
- }
+ address bullToken = address(new MayFailFreeMintERC20("Bull Token", "BULL"));
+ console2.log("BullToken", bullToken);
}
- function deployYulContract(string memory contractPath)
- private
- returns (address)
- {
+ function deployYulContract(string memory contractPath) private returns (address addr) {
string[] memory cmds = new string[](3);
cmds[0] = "bash";
cmds[1] = "-c";
@@ -218,54 +386,15 @@ contract DeployOnL1 is Script {
);
bytes memory bytecode = vm.ffi(cmds);
-
- address deployedAddress;
assembly {
- deployedAddress := create(0, add(bytecode, 0x20), mload(bytecode))
+ addr := create(0, add(bytecode, 0x20), mload(bytecode))
}
- if (deployedAddress == address(0)) {
- revert FAILED_TO_DEPLOY_PLONK_VERIFIER(contractPath);
- }
-
- console2.log(contractPath, deployedAddress);
-
- return deployedAddress;
- }
-
- function deployProxy(
- string memory name,
- address implementation,
- bytes memory data
- )
- private
- returns (address proxy)
- {
- proxy = address(
- new TransparentUpgradeableProxy(implementation, owner, data)
- );
-
- console2.log(name, "(impl) ->", implementation);
- console2.log(name, "(proxy) ->", proxy);
-
- if (addressManagerProxy != address(0)) {
- setAddress(block.chainid, bytes32(bytes(name)), proxy);
- }
-
- vm.writeJson(
- vm.serializeAddress("deployment", name, proxy),
- string.concat(vm.projectRoot(), "/deployments/deploy_l1.json")
- );
- }
-
- function setAddress(bytes32 name, address addr) private {
- setAddress(block.chainid, name, addr);
+ addressNotNull(addr, "failed yul deployment");
+ console2.log(contractPath, addr);
}
- function setAddress(uint256 chainId, bytes32 name, address addr) private {
- console2.log(chainId, uint256(name), "--->", addr);
- if (addr != address(0)) {
- AddressManager(addressManagerProxy).setAddress(chainId, name, addr);
- }
+ function addressNotNull(address addr, string memory err) private pure {
+ require(addr != address(0), err);
}
}
diff --git a/packages/protocol/script/SetAddress.s.sol b/packages/protocol/script/SetAddress.s.sol
new file mode 100644
index 00000000000..d16a533461e
--- /dev/null
+++ b/packages/protocol/script/SetAddress.s.sol
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "forge-std/Script.sol";
+import "forge-std/console2.sol";
+
+import "../contracts/common/AddressManager.sol";
+
+contract SetAddress is Script {
+ uint256 public adminPrivateKey = vm.envUint("PRIVATE_KEY");
+
+ address public proxyAddress = vm.envAddress("PROXY_ADDRESS");
+
+ uint64 public domain = uint64(vm.envUint("DOMAIN"));
+
+ bytes32 public name = vm.envBytes32("NAME");
+
+ address public addr = vm.envAddress("ADDRESS");
+
+ AddressManager proxy;
+
+ function run() external {
+ require(adminPrivateKey != 0, "PRIVATE_KEY not set");
+ require(proxyAddress != address(0), "PROXY_ADDRESS not set");
+ require(domain != 0, "DOMAIN NOT SET");
+ require(name != bytes32(0), "NAME NOT SET");
+ require(addr != address(0), "ADDR NOT SET");
+
+ vm.startBroadcast(adminPrivateKey);
+
+ proxy = AddressManager(payable(proxyAddress));
+
+ proxy.setAddress(domain, name, addr);
+
+ vm.stopBroadcast();
+ }
+}
diff --git a/packages/protocol/script/SetRemoteBridgeSuites.s.sol b/packages/protocol/script/SetRemoteBridgeSuites.s.sol
new file mode 100644
index 00000000000..b1bc030b42c
--- /dev/null
+++ b/packages/protocol/script/SetRemoteBridgeSuites.s.sol
@@ -0,0 +1,92 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "../test/DeployCapability.sol";
+import "../contracts/L1/gov/TaikoTimelockController.sol";
+
+contract SetRemoteBridgeSuites is DeployCapability {
+ uint256 public privateKey = vm.envUint("PRIVATE_KEY");
+ uint256 public securityCouncilPrivateKey = vm.envUint("SECURITY_COUNCIL_PRIVATE_KEY");
+ address public timelockAddress = vm.envAddress("TIMELOCK_ADDRESS");
+ address public addressManagerAddress = vm.envAddress("ADDRESS_MANAGER_ADDRESS");
+ uint256[] public remoteChainIDs = vm.envUint("REMOTE_CHAIN_IDS", ",");
+ address[] public remoteBridges = vm.envAddress("REMOTE_BRIDGES", ",");
+ address[] public remoteERC20Vaults = vm.envAddress("REMOTE_ERC20_VAULTS", ",");
+ address[] public remoteERC721Vaults = vm.envAddress("REMOTE_ERC721_VAULTS", ",");
+ address[] public remoteERC1155Vaults = vm.envAddress("REMOTE_ERC1155_VAULTS", ",");
+
+ function run() external {
+ require(
+ remoteChainIDs.length == remoteBridges.length, "invalid remote bridge addresses length"
+ );
+ require(
+ remoteChainIDs.length == remoteERC20Vaults.length,
+ "invalid remote ERC20Vault addresses length"
+ );
+ require(
+ remoteChainIDs.length == remoteERC721Vaults.length,
+ "invalid remote ERC721Vault addresses length"
+ );
+ require(
+ remoteChainIDs.length == remoteERC1155Vaults.length,
+ "invalid remote ERC1155Vault addresses length"
+ );
+
+ vm.startBroadcast(privateKey);
+
+ for (uint256 i; i < remoteChainIDs.length; ++i) {
+ uint64 chainid = uint64(remoteChainIDs[i]);
+
+ if (securityCouncilPrivateKey == 0) {
+ register(addressManagerAddress, "bridge", remoteBridges[i], chainid);
+ register(addressManagerAddress, "erc20_vault", remoteERC20Vaults[i], chainid);
+ register(addressManagerAddress, "erc721_vault", remoteERC721Vaults[i], chainid);
+ register(addressManagerAddress, "erc1155_vault", remoteERC1155Vaults[i], chainid);
+ continue;
+ }
+
+ registerByTimelock(addressManagerAddress, "bridge", remoteBridges[i], chainid);
+ registerByTimelock(addressManagerAddress, "erc20_vault", remoteERC20Vaults[i], chainid);
+ registerByTimelock(
+ addressManagerAddress, "erc721_vault", remoteERC721Vaults[i], chainid
+ );
+ registerByTimelock(
+ addressManagerAddress, "erc1155_vault", remoteERC1155Vaults[i], chainid
+ );
+ }
+
+ vm.stopBroadcast();
+ }
+
+ function registerByTimelock(
+ address registerTo,
+ string memory name,
+ address addr,
+ uint64 chainId
+ )
+ internal
+ {
+ bytes32 salt = bytes32(block.timestamp);
+
+ bytes memory payload = abi.encodeWithSelector(
+ bytes4(keccak256("setAddress(uint64,bytes32,address)")),
+ chainId,
+ bytes32(bytes(name)),
+ addr
+ );
+
+ TaikoTimelockController timelock = TaikoTimelockController(payable(timelockAddress));
+
+ timelock.schedule(registerTo, 0, payload, bytes32(0), salt, 0);
+
+ timelock.execute(registerTo, 0, payload, bytes32(0), salt);
+
+ console2.log("> ", name, "@", registerTo);
+ console2.log("\t addr : ", addr);
+ }
+}
diff --git a/packages/protocol/script/merge_contracts.py b/packages/protocol/script/merge_contracts.py
new file mode 100644
index 00000000000..7722d5d5ebd
--- /dev/null
+++ b/packages/protocol/script/merge_contracts.py
@@ -0,0 +1,27 @@
+import os
+import argparse
+
+def merge_solidity_files(root_dir, output_file='../out/taiko_protocol.md'):
+ with open(output_file, 'w') as outfile:
+ for subdir, dirs, files in os.walk(root_dir):
+ for file in files:
+ if file.endswith('.sol') and not file.endswith('.t.sol'):
+ file_path = os.path.join(subdir, file)
+ if "/test/" in file_path:
+ continue
+ print("merging ", file_path)
+ relative_path = os.path.relpath(file_path, root_dir)
+ outfile.write(f"## {relative_path}\n")
+ outfile.write("```solidity\n")
+ with open(file_path, 'r') as infile:
+ outfile.write(infile.read())
+ outfile.write("\n```\n\n")
+
+
+if __name__ == "__main__":
+ # parser = argparse.ArgumentParser(description="Merge Solidity files into a Markdown file.")
+ # parser.add_argument("root_dir", type=str, help="Root directory containing Solidity files")
+ # args = parser.parse_args()
+ # merge_solidity_files(args.root_dir)
+ merge_solidity_files("../contracts")
+ print("merged into ../out/taiko_protocol.md")
diff --git a/packages/protocol/script/test_deploy_on_l1.sh b/packages/protocol/script/test_deploy_on_l1.sh
index 7a1c1446ee2..9591cc4ded8 100755
--- a/packages/protocol/script/test_deploy_on_l1.sh
+++ b/packages/protocol/script/test_deploy_on_l1.sh
@@ -3,20 +3,23 @@
# This script is only used by `pnpm deploy:foundry`.
set -e
-PRIVATE_KEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
-SHARED_SIGNAL_SERVICE=0x0000000000000000000000000000000000000000 \
-ORACLE_PROVER=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 \
-SYSTEM_PROVER=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 \
-OWNER=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 \
-TAIKO_L2_ADDRESS=0x0000777700000000000000000000000000000001 \
-L2_SIGNAL_SERVICE=0x0000777700000000000000000000000000000007 \
-TAIKO_TOKEN_PREMINT_RECIPIENTS=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 \
-TAIKO_TOKEN_PREMINT_AMOUNTS=0xffff \
-TREASURY=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 \
+PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
+PROPOSER=0x0000000000000000000000000000000000000000 \
+PROPOSER_ONE=0x0000000000000000000000000000000000000000 \
+GUARDIAN_PROVERS="0x1000777700000000000000000000000000000001,0x1000777700000000000000000000000000000002,0x1000777700000000000000000000000000000003,0x1000777700000000000000000000000000000004,0x1000777700000000000000000000000000000005" \
+MIN_GUARDIANS=3 \
+TAIKO_L2_ADDRESS=0x1000777700000000000000000000000000000001 \
+L2_SIGNAL_SERVICE=0x1000777700000000000000000000000000000007 \
+SECURITY_COUNCIL=0x60997970C51812dc3A010C7d01b50e0d17dc79C8 \
+TAIKO_TOKEN_PREMINT_RECIPIENT=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 \
+TAIKO_TOKEN_NAME="Taiko Token Katla" \
+TAIKO_TOKEN_SYMBOL=TTKOk \
+SHARED_ADDRESS_MANAGER=0x0000000000000000000000000000000000000000 \
L2_GENESIS_HASH=0xee1950562d42f0da28bd4550d88886bc90894c77c9c9eaefef775d4c8223f259 \
forge script script/DeployOnL1.s.sol:DeployOnL1 \
--fork-url http://localhost:8545 \
--broadcast \
--ffi \
-vvvv \
+ --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
--block-gas-limit 100000000
diff --git a/packages/protocol/script/upgrade/SetAddressManager.s.sol b/packages/protocol/script/upgrade/SetAddressManager.s.sol
deleted file mode 100644
index 1c0fa7c0730..00000000000
--- a/packages/protocol/script/upgrade/SetAddressManager.s.sol
+++ /dev/null
@@ -1,41 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import "forge-std/Script.sol";
-import "forge-std/console2.sol";
-import "./UpgradeScript.s.sol";
-
-interface IEssentialContract {
- function setAddressManager(address newAddressManager) external;
-}
-/// @notice Each contract (which inherits EssentialContract) is having a
-/// setAddressManager() setter. In such case AddressManager needs to get
-/// changed, we need a quick way to update it.
-///
-/// Invokaction example:
-/// forge script SetAddressManager --sig "run(address,address)"
-///
-
-contract SetAddressManager is UpgradeScript {
- function run(
- address essentialContract,
- address newAddressManager
- )
- external
- setUp
- {
- IEssentialContract(essentialContract).setAddressManager(
- newAddressManager
- );
- console2.log(
- essentialContract,
- " contract set a new AddressManagerAddress:",
- address(newAddressManager)
- );
- }
-}
diff --git a/packages/protocol/script/upgrade/TransferOwnership.s.sol b/packages/protocol/script/upgrade/TransferOwnership.s.sol
deleted file mode 100644
index e3e14c5e60a..00000000000
--- a/packages/protocol/script/upgrade/TransferOwnership.s.sol
+++ /dev/null
@@ -1,44 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import "forge-std/Script.sol";
-import "forge-std/console2.sol";
-import "./UpgradeScript.s.sol";
-
-interface IOwnable {
- function transferOwnership(address newOwner) external;
-}
-/// @notice As "single" owner is not desirable for protocols we need to
-/// transfer ownership. BUT! Transferring ownership to a multisig also
-/// does not help too much if the protocol wants to give some time for
-/// the users to exit before an upgrade is effective. So implementing a
-/// delay (L2Beat prefers 7 days) is essential.
-/// So the usual approach is the following:
-/// 1. Transfer ownership to TimeLockController contract which enforces the
-/// delay
-/// 2. The ownership of the TimeLockController contract shall be a multisig/DAO
-
-/// Invokaction example:
-/// forge script TransferOwnership --sig "run(address,address)"
-///
-contract TransferOwnership is UpgradeScript {
- function run(
- address contractAddr,
- address timeLockContract
- )
- external
- setUp
- {
- IOwnable(contractAddr).transferOwnership(timeLockContract);
- console2.log(
- contractAddr,
- " contract has a new owner:",
- address(timeLockContract)
- );
- }
-}
diff --git a/packages/protocol/script/upgrade/UpgradeAddressManager.s.sol b/packages/protocol/script/upgrade/UpgradeAddressManager.s.sol
deleted file mode 100644
index d68bc7f555f..00000000000
--- a/packages/protocol/script/upgrade/UpgradeAddressManager.s.sol
+++ /dev/null
@@ -1,23 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import "forge-std/Script.sol";
-import "forge-std/console2.sol";
-import "../../contracts/common/AddressManager.sol";
-import "./UpgradeScript.s.sol";
-
-contract UpgradeAddressManager is UpgradeScript {
- function run() external setUp {
- AddressManager newAddressManager = new ProxiedAddressManager();
- proxy.upgradeTo(address(newAddressManager));
- console2.log(
- "proxy upgraded AddressManager implementation to",
- address(newAddressManager)
- );
- }
-}
diff --git a/packages/protocol/script/upgrade/UpgradeBridge.s.sol b/packages/protocol/script/upgrade/UpgradeBridge.s.sol
deleted file mode 100644
index c85feace55c..00000000000
--- a/packages/protocol/script/upgrade/UpgradeBridge.s.sol
+++ /dev/null
@@ -1,22 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import "forge-std/Script.sol";
-import "forge-std/console2.sol";
-import "../../contracts/bridge/Bridge.sol";
-import "./UpgradeScript.s.sol";
-
-contract UpgradeBridge is UpgradeScript {
- function run() external setUp {
- Bridge newBridge = new ProxiedBridge();
- proxy.upgradeTo(address(newBridge));
- console2.log(
- "proxy upgraded Bridge implementation to", address(newBridge)
- );
- }
-}
diff --git a/packages/protocol/script/upgrade/UpgradeERC1155Vault.s.sol b/packages/protocol/script/upgrade/UpgradeERC1155Vault.s.sol
deleted file mode 100644
index 7373ca202cf..00000000000
--- a/packages/protocol/script/upgrade/UpgradeERC1155Vault.s.sol
+++ /dev/null
@@ -1,23 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import "forge-std/Script.sol";
-import "forge-std/console2.sol";
-import "../../contracts/tokenvault/ERC1155Vault.sol";
-import "./UpgradeScript.s.sol";
-
-contract UpgradeERC1155Vault is UpgradeScript {
- function run() external setUp {
- ERC1155Vault newERC1155Vault = new ProxiedERC1155Vault();
- proxy.upgradeTo(address(newERC1155Vault));
- console2.log(
- "proxy upgraded ERC1155Vault implementation to",
- address(newERC1155Vault)
- );
- }
-}
diff --git a/packages/protocol/script/upgrade/UpgradeERC20Vault.s.sol b/packages/protocol/script/upgrade/UpgradeERC20Vault.s.sol
deleted file mode 100644
index 5184a56edf0..00000000000
--- a/packages/protocol/script/upgrade/UpgradeERC20Vault.s.sol
+++ /dev/null
@@ -1,23 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import "forge-std/Script.sol";
-import "forge-std/console2.sol";
-import "../../contracts/tokenvault/ERC20Vault.sol";
-import "./UpgradeScript.s.sol";
-
-contract UpgradeERC20Vault is UpgradeScript {
- function run() external setUp {
- ERC20Vault newERC20Vault = new ProxiedERC20Vault();
- proxy.upgradeTo(address(newERC20Vault));
- console2.log(
- "proxy upgraded ERC20Vault implementation to",
- address(newERC20Vault)
- );
- }
-}
diff --git a/packages/protocol/script/upgrade/UpgradeERC721Vault.s.sol b/packages/protocol/script/upgrade/UpgradeERC721Vault.s.sol
deleted file mode 100644
index 270aba5ba0d..00000000000
--- a/packages/protocol/script/upgrade/UpgradeERC721Vault.s.sol
+++ /dev/null
@@ -1,23 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import "forge-std/Script.sol";
-import "forge-std/console2.sol";
-import "../../contracts/tokenvault/ERC721Vault.sol";
-import "./UpgradeScript.s.sol";
-
-contract UpgradeERC721Vault is UpgradeScript {
- function run() external setUp {
- ERC721Vault newERC721Vault = new ProxiedERC721Vault();
- proxy.upgradeTo(address(newERC721Vault));
- console2.log(
- "proxy upgraded ERC721Vault implementation to",
- address(newERC721Vault)
- );
- }
-}
diff --git a/packages/protocol/script/upgrade/UpgradeScript.s.sol b/packages/protocol/script/upgrade/UpgradeScript.s.sol
deleted file mode 100644
index 31aece2a5dd..00000000000
--- a/packages/protocol/script/upgrade/UpgradeScript.s.sol
+++ /dev/null
@@ -1,32 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import "forge-std/Script.sol";
-import "forge-std/console2.sol";
-import
- "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
-
-contract UpgradeScript is Script {
- uint256 public deployerPrivateKey = vm.envUint("PRIVATE_KEY");
-
- address public proxyAddress = vm.envAddress("PROXY_ADDRESS");
-
- TransparentUpgradeableProxy proxy;
-
- modifier setUp() {
- require(deployerPrivateKey != 0, "PRIVATE_KEY not set");
- require(proxyAddress != address(0), "PROXY_ADDRESS not set");
-
- vm.startBroadcast(deployerPrivateKey);
-
- proxy = TransparentUpgradeableProxy(payable(proxyAddress));
- _;
-
- vm.stopBroadcast();
- }
-}
diff --git a/packages/protocol/script/upgrade/UpgradeSignalService.sol b/packages/protocol/script/upgrade/UpgradeSignalService.sol
deleted file mode 100644
index aa2e8873190..00000000000
--- a/packages/protocol/script/upgrade/UpgradeSignalService.sol
+++ /dev/null
@@ -1,23 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import "forge-std/Script.sol";
-import "forge-std/console2.sol";
-import "../../contracts/signal/SignalService.sol";
-import "./UpgradeScript.s.sol";
-
-contract UpgradeSignalService is UpgradeScript {
- function run() external setUp {
- SignalService newSignalService = new ProxiedSignalService();
- proxy.upgradeTo(address(newSignalService));
- console2.log(
- "proxy upgraded SignalService implementation to",
- address(newSignalService)
- );
- }
-}
diff --git a/packages/protocol/script/upgrade/UpgradeTaikoL1.s.sol b/packages/protocol/script/upgrade/UpgradeTaikoL1.s.sol
deleted file mode 100644
index 7eccfcea3d7..00000000000
--- a/packages/protocol/script/upgrade/UpgradeTaikoL1.s.sol
+++ /dev/null
@@ -1,22 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import "forge-std/Script.sol";
-import "forge-std/console2.sol";
-import "../../contracts/L1/TaikoL1.sol";
-import "./UpgradeScript.s.sol";
-
-contract UpgradeTaikoL1 is UpgradeScript {
- function run() external setUp {
- TaikoL1 newTaikoL1 = new ProxiedTaikoL1();
- proxy.upgradeTo(address(newTaikoL1));
- console2.log(
- "proxy upgraded taiko L1 implementation to", address(newTaikoL1)
- );
- }
-}
diff --git a/packages/protocol/script/upgrade/UpgradeTaikoL2.s.sol b/packages/protocol/script/upgrade/UpgradeTaikoL2.s.sol
deleted file mode 100644
index 0d4887a1dc6..00000000000
--- a/packages/protocol/script/upgrade/UpgradeTaikoL2.s.sol
+++ /dev/null
@@ -1,22 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import "forge-std/Script.sol";
-import "forge-std/console2.sol";
-import "../../contracts/L2/TaikoL2.sol";
-import "./UpgradeScript.s.sol";
-
-contract UpgradeTaikoL2 is UpgradeScript {
- function run() external setUp {
- TaikoL2 newTaikoL2 = new ProxiedTaikoL2();
- proxy.upgradeTo(address(newTaikoL2));
- console2.log(
- "proxy upgraded TaikoL2 implementation to", address(newTaikoL2)
- );
- }
-}
diff --git a/packages/protocol/script/upgrade/UpgradeTaikoToken.s.sol b/packages/protocol/script/upgrade/UpgradeTaikoToken.s.sol
deleted file mode 100644
index e901190abbe..00000000000
--- a/packages/protocol/script/upgrade/UpgradeTaikoToken.s.sol
+++ /dev/null
@@ -1,23 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.20;
-
-import "forge-std/Script.sol";
-import "forge-std/console2.sol";
-import "../../contracts/L1/TaikoToken.sol";
-import "./UpgradeScript.s.sol";
-
-contract UpgradeTaikoToken is UpgradeScript {
- function run() external setUp {
- TaikoToken newTaikoToken = new ProxiedTaikoToken();
- proxy.upgradeTo(address(newTaikoToken));
- console2.log(
- "proxy upgraded TaikoToken implementation to",
- address(newTaikoToken)
- );
- }
-}
diff --git a/packages/protocol/simulation/README.md b/packages/protocol/simulation/README.md
new file mode 100644
index 00000000000..ad01e2f587f
--- /dev/null
+++ b/packages/protocol/simulation/README.md
@@ -0,0 +1,15 @@
+# Simulation and Exported Data Parser and Visualization
+
+## How to use
+
+Assuming you are in this directory.
+
+1. Install required packages: `python3 -m pip install -r requirements.txt`
+
+1. Make the output directory: `mkdir -p out`
+
+1. Run `pnpm run export:simconf` to export a new the config used in test `test_eip1559_math` to a file in `out/`, the file name will be automatically generated, for example `simconf_1697809145.txt`
+
+1. Run `python3 simulate.py out/simconf_1697809145.txt`
+
+Currently, every parameter set in the `test_eip1559_math` is an approximation of a possible mainnet scenario (like 10x the ethereum gas target), so you can just run the commands below to get familiar with the outcome and plots.
diff --git a/packages/protocol/simulation/requirements.txt b/packages/protocol/simulation/requirements.txt
new file mode 100644
index 00000000000..10cbcded97c
--- /dev/null
+++ b/packages/protocol/simulation/requirements.txt
@@ -0,0 +1,15 @@
+contourpy==1.0.7
+cycler==0.11.0
+docutils==0.19
+fonttools==4.39.3
+kiwisolver==1.4.4
+matplotlib==3.7.1
+numpy==1.24.3
+packaging==23.1
+Pillow==9.5.0
+py-solc==3.2.0
+pycparser==2.21
+pyparsing==3.0.9
+python-dateutil==2.8.2
+semantic-version==2.10.0
+six==1.16.0
diff --git a/packages/protocol/simulation/simulate.py b/packages/protocol/simulation/simulate.py
new file mode 100644
index 00000000000..4b8ebf48373
--- /dev/null
+++ b/packages/protocol/simulation/simulate.py
@@ -0,0 +1,179 @@
+import argparse
+import matplotlib.pyplot as plt
+import numpy as np
+from pathlib import Path
+
+HIGH_TRAFFIC_STARTS = "HIGH TRAFFIC STARTS"
+HIGH_TRAFFIC_ENDS = "HIGH TRAFFIC ENDS"
+LOW_TRAFFIC_STARTS = "LOW TRAFFIC STARTS"
+LOW_TRAFFIC_ENDS = "LOW TRAFFIC ENDS"
+TARGET_TRAFFIC_STARTS = "TARGET TRAFFIC STARTS"
+TARGET_TRAFFIC_ENDS = "TARGET TRAFFIC ENDS"
+INFO = "L2block to baseFee is"
+AVERAGE_GAS_USED_PER_L1 = "Average gasUsed per L1 block"
+AVERAGE_GAS_PRICE_IN_L2 = "Average wei gas price per L2 block is"
+# 0: no parsing ATM
+# 1: HIGH
+# 2: LOW
+# 3: TARGET
+PARSER_MODE = 1
+
+# Average propsal time
+AVG_BASEFEE_PER_L2_BLOCK = 0
+# Average proof time
+AVG_GAS_USED_PER_L1_BLOCK = 0
+
+
+def percentage_deviation(initial, final):
+ deviation = final - initial
+ percentage_deviation = (deviation / initial) * 100
+ return round(percentage_deviation, 1)
+
+
+def label_text():
+ global AVG_BASEFEE_PER_L2_BLOCK, AVG_GAS_USED_PER_L1_BLOCK
+ return "Avg basefee / L2 block:{:.2f} gwei Avg. gas per L1 block (12s):{:.2f} million".format(
+ AVG_BASEFEE_PER_L2_BLOCK, AVG_GAS_USED_PER_L1_BLOCK
+ )
+
+
+def save_plots(
+ x_axis,
+ y_axis,
+ filename,
+ title,
+ x_label,
+ y_label,
+ y_signal_label,
+ y2_signal_label=None,
+ y2_axis=None,
+):
+ fig = plt.figure(figsize=(10, 6))
+ fig.text(
+ 0.1,
+ 0.96,
+ label_text(),
+ fontsize=10,
+ style="italic",
+ bbox={"facecolor": "green", "alpha": 0.4, "pad": 1},
+ )
+ xpoints = np.array(x_axis)
+ ypoints = np.array(y_axis)
+
+ plt.title(title)
+ plt.xlabel(x_label)
+ plt.ylabel(y_label)
+
+ plt.plot(xpoints, ypoints, "r", label=y_signal_label)
+ if y2_axis is not None:
+ y2points = np.array(y2_axis)
+ plt.plot(xpoints, y2points, "b", label=y2_signal_label)
+ plt.legend()
+ plt.savefig(filename)
+
+
+def parse_and_plot(filename):
+ global PARSER_MODE, AVG_BASEFEE_PER_L2_BLOCK, AVG_GAS_USED_PER_L1_BLOCK, AVERAGE_GAS_USED_PER_L1, AVERAGE_GAS_PRICE_IN_L2
+
+ only_stem = Path(filename).stem
+ timestamp = only_stem.split("_")[1]
+ # First part
+ x_ax_block_nr = []
+ y_ax_base_fee = []
+ with open(filename) as file:
+ for line in file:
+
+ if HIGH_TRAFFIC_STARTS in line:
+ PARSER_MODE = 1
+ continue
+
+ if HIGH_TRAFFIC_ENDS in line:
+ # Saving the first plot
+ x_axis = x_ax_block_nr
+ y_axis = y_ax_base_fee
+ filename = "out/{}_above_average_traffic.png".format(timestamp)
+ title = "Basefee chart per L2 block (if gas used above target)"
+ y_label = "baseFee"
+ x_label = "L2 block count"
+ y_signal_label = "basefee in gwei"
+ save_plots(
+ x_axis, y_axis, filename, title, x_label, y_label, y_signal_label
+ )
+ x_ax_block_nr = []
+ y_ax_base_fee = []
+ PARSER_MODE = 0
+ continue
+
+ if LOW_TRAFFIC_STARTS in line:
+ PARSER_MODE = 2
+ continue
+
+ if LOW_TRAFFIC_ENDS in line:
+ # Saving the first plot
+ x_axis = x_ax_block_nr
+ y_axis = y_ax_base_fee
+ filename = "out/{}_below_average_traffic.png".format(timestamp)
+ title = "Basefee chart per L2 block (if gas used below target)"
+ y_label = "baseFee"
+ x_label = "L2 block count"
+ y_signal_label = "basefee in gwei"
+ save_plots(
+ x_axis, y_axis, filename, title, x_label, y_label, y_signal_label
+ )
+ x_ax_block_nr = []
+ y_ax_base_fee = []
+ PARSER_MODE = 0
+ continue
+
+ if TARGET_TRAFFIC_STARTS in line:
+ PARSER_MODE = 3
+ continue
+
+ if TARGET_TRAFFIC_ENDS in line:
+ # Saving the first plot
+ x_axis = x_ax_block_nr
+ y_axis = y_ax_base_fee
+ filename = "out/{}_target_traffic.png".format(timestamp)
+ title = "Basefee chart per L2 block (if gas used around target)"
+ y_label = "baseFee"
+ x_label = "L2 block count"
+ y_signal_label = "basefee in gwei"
+ save_plots(
+ x_axis, y_axis, filename, title, x_label, y_label, y_signal_label
+ )
+ x_ax_block_nr = []
+ y_ax_base_fee = []
+ PARSER_MODE = 0
+ continue
+
+ if INFO in line and PARSER_MODE != 0:
+ data = line.rstrip().split(":")
+ x_ax_block_nr.append(float(data[1]))
+ y_ax_base_fee.append(float(data[2]) / 1000000000)
+ continue
+
+ if AVERAGE_GAS_USED_PER_L1 in line:
+ data = line.rstrip().split(":")
+ AVG_GAS_USED_PER_L1_BLOCK = float(data[1]) / 1000000
+ continue
+
+ if AVERAGE_GAS_PRICE_IN_L2 in line:
+ data = line.rstrip().split(":")
+ AVG_BASEFEE_PER_L2_BLOCK = float(data[1]) / 1000000000
+ continue
+
+
+def parse_args():
+ parser = argparse.ArgumentParser(description="Parsed filename")
+ parser.add_argument("file", type=str)
+ args = parser.parse_args()
+ return args
+
+
+def main():
+ inputs = parse_args()
+ parse_and_plot(inputs.file)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/packages/protocol/test/DeployCapability.sol b/packages/protocol/test/DeployCapability.sol
new file mode 100644
index 00000000000..74584e95bf3
--- /dev/null
+++ b/packages/protocol/test/DeployCapability.sol
@@ -0,0 +1,94 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.20;
+
+import "lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol";
+import "lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol";
+
+import "forge-std/console2.sol";
+import "forge-std/Script.sol";
+
+import "../contracts/common/AddressManager.sol";
+import "../contracts/libs/LibDeploy.sol";
+
+/// @title DeployCapability
+abstract contract DeployCapability is Script {
+ error ADDRESS_NULL();
+
+ function deployProxy(
+ string memory name,
+ address impl,
+ bytes memory data,
+ address registerTo,
+ address owner
+ )
+ internal
+ returns (address proxy)
+ {
+ proxy = LibDeploy.deployERC1967Proxy(impl, owner, data);
+
+ if (registerTo != address(0)) {
+ AddressManager(registerTo).setAddress(
+ uint64(block.chainid), bytes32(bytes(name)), proxy
+ );
+ }
+
+ console2.log(">", name, "@", registerTo);
+ console2.log(" proxy :", proxy);
+ console2.log(" impl :", impl);
+ console2.log(" owner :", OwnableUpgradeable(proxy).owner());
+ console2.log(" msg.sender :", msg.sender);
+ console2.log(" this :", address(this));
+
+ vm.writeJson(
+ vm.serializeAddress("deployment", name, proxy),
+ string.concat(vm.projectRoot(), "/deployments/deploy_l1.json")
+ );
+ }
+
+ function deployProxy(
+ string memory name,
+ address impl,
+ bytes memory data
+ )
+ internal
+ returns (address proxy)
+ {
+ return deployProxy(name, impl, data, address(0), address(0));
+ }
+
+ function register(address registerTo, string memory name, address addr) internal {
+ register(registerTo, name, addr, uint64(block.chainid));
+ }
+
+ function register(
+ address registerTo,
+ string memory name,
+ address addr,
+ uint64 chainId
+ )
+ internal
+ {
+ if (registerTo == address(0)) revert ADDRESS_NULL();
+ if (addr == address(0)) revert ADDRESS_NULL();
+ AddressManager(registerTo).setAddress(chainId, bytes32(bytes(name)), addr);
+ console2.log("> ", name, "@", registerTo);
+ console2.log("\t addr : ", addr);
+ }
+
+ function copyRegister(address registerTo, address readFrom, string memory name) internal {
+ if (registerTo == address(0)) revert ADDRESS_NULL();
+ if (readFrom == address(0)) revert ADDRESS_NULL();
+
+ register({
+ registerTo: registerTo,
+ name: name,
+ addr: AddressManager(readFrom).getAddress(uint64(block.chainid), bytes32(bytes(name))),
+ chainId: uint64(block.chainid)
+ });
+ }
+}
diff --git a/packages/protocol/test/HelperContracts.sol b/packages/protocol/test/HelperContracts.sol
new file mode 100644
index 00000000000..abd7c7a7a87
--- /dev/null
+++ b/packages/protocol/test/HelperContracts.sol
@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.20;
+
+import "../contracts/bridge/Bridge.sol";
+import "../contracts/signal/SignalService.sol";
+import "../contracts/common/ICrossChainSync.sol";
+
+contract BadReceiver {
+ receive() external payable {
+ revert("can not send to this contract");
+ }
+
+ fallback() external payable {
+ revert("can not send to this contract");
+ }
+
+ function transfer() public pure {
+ revert("this fails");
+ }
+}
+
+contract GoodReceiver {
+ receive() external payable { }
+
+ function forward(address addr) public payable {
+ payable(addr).transfer(address(this).balance / 2);
+ }
+}
+
+// NonNftContract
+contract NonNftContract {
+ uint256 dummyData;
+
+ constructor(uint256 _dummyData) {
+ dummyData = _dummyData;
+ }
+}
+
+contract SkipProofCheckSignal is SignalService {
+ function skipProofCheck() public pure override returns (bool) {
+ return true;
+ }
+}
+
+contract DummyCrossChainSync is EssentialContract, ICrossChainSync {
+ Snippet private _snippet;
+
+ function setSyncedData(bytes32 blockHash, bytes32 signalRoot) external {
+ _snippet.blockHash = blockHash;
+ _snippet.signalRoot = signalRoot;
+ }
+
+ function getSyncedSnippet(uint64) external view returns (Snippet memory) {
+ return _snippet;
+ }
+}
diff --git a/packages/protocol/test/L1/Guardians.t.sol b/packages/protocol/test/L1/Guardians.t.sol
new file mode 100644
index 00000000000..e6ccb09c3a9
--- /dev/null
+++ b/packages/protocol/test/L1/Guardians.t.sol
@@ -0,0 +1,87 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.20;
+
+import "../TaikoTest.sol";
+
+contract DummyGuardians is Guardians {
+ uint256 public operationId;
+
+ function init() external initializer {
+ __Essential_init();
+ }
+
+ function approve(bytes32 hash) public returns (bool) {
+ return super.approve(operationId++, hash);
+ }
+}
+
+contract TestSignalService is TaikoTest {
+ DummyGuardians target;
+
+ function getSigners(uint256 numGuardians) internal returns (address[] memory signers) {
+ signers = new address[](numGuardians);
+ for (uint256 i = 0; i < numGuardians; ++i) {
+ signers[i] = randAddress();
+ vm.deal(signers[i], 1 ether);
+ }
+ }
+
+ function setUp() public {
+ target = DummyGuardians(
+ deployProxy({
+ name: "guardians",
+ impl: address(new DummyGuardians()),
+ data: bytes.concat(DummyGuardians.init.selector)
+ })
+ );
+ }
+
+ function test_guardians_set_guardians() public {
+ vm.expectRevert(Guardians.INVALID_GUARDIAN_SET.selector);
+ target.setGuardians(getSigners(0), 0);
+
+ vm.expectRevert(Guardians.INVALID_MIN_GUARDIANS.selector);
+ target.setGuardians(getSigners(5), 0);
+
+ vm.expectRevert(Guardians.INVALID_MIN_GUARDIANS.selector);
+ target.setGuardians(getSigners(5), 6);
+ }
+
+ function test_guardians_set_guardians2() public {
+ address[] memory signers = getSigners(5);
+ signers[0] = address(0);
+ vm.expectRevert(Guardians.INVALID_GUARDIAN.selector);
+ target.setGuardians(signers, 4);
+
+ signers[0] = signers[1];
+ vm.expectRevert(Guardians.INVALID_GUARDIAN_SET.selector);
+ target.setGuardians(signers, 4);
+ }
+
+ function test_guardians_approve() public {
+ address[] memory signers = getSigners(5);
+ target.setGuardians(signers, 3);
+
+ bytes32 hash = keccak256("paris");
+ for (uint256 i; i < 5; ++i) {
+ vm.prank(signers[0]);
+ assertEq(target.approve(hash), false);
+ assertEq(target.isApproved(hash), false);
+ }
+
+ hash = keccak256("singapore");
+ for (uint256 i; i < 5; ++i) {
+ vm.startPrank(signers[i]);
+ target.approve(hash);
+
+ assertEq(target.approve(hash), i >= 2);
+ assertEq(target.isApproved(hash), i >= 2);
+ vm.stopPrank();
+ }
+
+ // changing the settings will invalid all approval history
+ target.setGuardians(signers, 2);
+ assertEq(target.version(), 2);
+ assertEq(target.isApproved(hash), false);
+ }
+}
diff --git a/packages/protocol/test/L1/SgxVerifier.t.sol b/packages/protocol/test/L1/SgxVerifier.t.sol
new file mode 100644
index 00000000000..3b086adaf06
--- /dev/null
+++ b/packages/protocol/test/L1/SgxVerifier.t.sol
@@ -0,0 +1,54 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.20;
+
+import "./TaikoL1TestBase.sol";
+
+contract TestSgxVerifier is TaikoL1TestBase {
+ function deployTaikoL1() internal override returns (TaikoL1) {
+ return
+ TaikoL1(payable(deployProxy({ name: "taiko", impl: address(new TaikoL1()), data: "" })));
+ }
+
+ function test_addInstancesByOwner() external {
+ address[] memory _instances = new address[](3);
+ _instances[0] = SGX_X_1;
+ _instances[1] = SGX_Y;
+ _instances[2] = SGX_Z;
+ sv.addInstances(_instances);
+ }
+
+ function test_addInstancesByOwner_WithoutOwnerRole() external {
+ address[] memory _instances = new address[](3);
+ _instances[0] = SGX_X_0;
+ _instances[1] = SGX_Y;
+ _instances[2] = SGX_Z;
+
+ vm.expectRevert();
+ vm.prank(Bob, Bob);
+ sv.addInstances(_instances);
+ }
+
+ function test_addInstancesBySgxInstance() external {
+ address[] memory _instances = new address[](2);
+ _instances[0] = SGX_Y;
+ _instances[1] = SGX_Z;
+
+ bytes memory signature = _getSignature(_instances, 0x4);
+
+ vm.prank(Bob, Bob);
+ sv.addInstances(0, SGX_X_1, _instances, signature);
+ }
+
+ function _getSignature(
+ address[] memory _instances,
+ uint256 privKey
+ )
+ private
+ pure
+ returns (bytes memory signature)
+ {
+ bytes32 digest = keccak256(abi.encode("ADD_INSTANCES", _instances));
+ (uint8 v, bytes32 r, bytes32 s) = vm.sign(privKey, digest);
+ signature = abi.encodePacked(r, s, v);
+ }
+}
diff --git a/packages/protocol/test/L1/TaikoL1.t.sol b/packages/protocol/test/L1/TaikoL1.t.sol
index c79c58c443f..52178454ddd 100644
--- a/packages/protocol/test/L1/TaikoL1.t.sol
+++ b/packages/protocol/test/L1/TaikoL1.t.sol
@@ -1,34 +1,16 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
-import { Test } from "forge-std/Test.sol";
-import { console2 } from "forge-std/console2.sol";
-import { AddressManager } from "../../contracts/common/AddressManager.sol";
-import { LibDepositing } from "../../contracts/L1/libs/LibDepositing.sol";
-import { TaikoData } from "../../contracts/L1/TaikoData.sol";
-import { TaikoL1 } from "../../contracts/L1/TaikoL1.sol";
-import { TaikoToken } from "../../contracts/L1/TaikoToken.sol";
-import { SignalService } from "../../contracts/signal/SignalService.sol";
-import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
-import { TaikoL1TestBase } from "./TaikoL1TestBase.sol";
+import "./TaikoL1TestBase.sol";
contract TaikoL1_NoCooldown is TaikoL1 {
- function getConfig()
- public
- pure
- override
- returns (TaikoData.Config memory config)
- {
+ function getConfig() public view override returns (TaikoData.Config memory config) {
config = TaikoL1.getConfig();
-
- config.blockTxListExpiry = 5 minutes;
- config.blockMaxVerificationsPerTx = 0;
+ // over-write the following
+ config.maxBlocksToVerifyPerProposal = 0;
config.blockMaxProposals = 10;
config.blockRingBufferSize = 12;
- config.proofRegularCooldown = 15 minutes;
- config.skipProverAssignmentVerificaiton = true;
- config.proofBond = 1e18; // 1 Taiko token
- config.proposerRewardPerSecond = 1e15; // 0.001 Taiko token
+ config.livenessBond = 1e18; // 1 Taiko token
}
}
@@ -39,14 +21,12 @@ contract Verifier {
}
contract TaikoL1Test is TaikoL1TestBase {
- function deployTaikoL1() internal override returns (TaikoL1 taikoL1) {
- taikoL1 = new TaikoL1_NoCooldown();
- }
-
- function setUp() public override {
- TaikoL1TestBase.setUp();
-
- registerAddress(L1.getVerifierName(100), address(new Verifier()));
+ function deployTaikoL1() internal override returns (TaikoL1) {
+ return TaikoL1(
+ payable(
+ deployProxy({ name: "taiko", impl: address(new TaikoL1_NoCooldown()), data: "" })
+ )
+ );
}
/// @dev Test we can propose, prove, then verify more blocks than
@@ -65,20 +45,20 @@ contract TaikoL1Test is TaikoL1TestBase {
bytes32 parentHash = GENESIS_BLOCK_HASH;
- for (
- uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++
- ) {
+ for (uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++) {
//printVariables("before propose");
- TaikoData.BlockMetadata memory meta =
- proposeBlock(Alice, Bob, 1_000_000, 1024);
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
//printVariables("after propose");
mine(1);
bytes32 blockHash = bytes32(1e10 + blockId);
bytes32 signalRoot = bytes32(1e9 + blockId);
- proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot);
+ proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot, meta.minTier, "");
vm.roll(block.number + 15 * 12);
- vm.warp(block.timestamp + conf.proofRegularCooldown + 1);
+
+ uint16 minTier = meta.minTier;
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
+
verifyBlock(Carol, 1);
parentHash = blockHash;
}
@@ -98,18 +78,19 @@ contract TaikoL1Test is TaikoL1TestBase {
bytes32 parentHash = GENESIS_BLOCK_HASH;
- for (uint256 blockId = 1; blockId <= 2; blockId++) {
+ for (uint256 blockId = 1; blockId <= 20; ++blockId) {
printVariables("before propose");
- TaikoData.BlockMetadata memory meta =
- proposeBlock(Alice, Bob, 1_000_000, 1024);
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
printVariables("after propose");
bytes32 blockHash = bytes32(1e10 + blockId);
bytes32 signalRoot = bytes32(1e9 + blockId);
- proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot);
+ proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot, meta.minTier, "");
vm.roll(block.number + 15 * 12);
- vm.warp(block.timestamp + conf.proofRegularCooldown + 1);
+ uint16 minTier = meta.minTier;
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
+
verifyBlock(Alice, 2);
parentHash = blockHash;
}
@@ -128,22 +109,19 @@ contract TaikoL1Test is TaikoL1TestBase {
bytes32 parentHash = GENESIS_BLOCK_HASH;
- for (uint256 blockId = 1; blockId <= conf.blockMaxProposals; blockId++)
- {
+ for (uint256 blockId = 1; blockId <= conf.blockMaxProposals; blockId++) {
printVariables("before propose");
- TaikoData.BlockMetadata memory meta =
- proposeBlock(Alice, Bob, 1_000_000, 1024);
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
printVariables("after propose");
bytes32 blockHash = bytes32(1e10 + blockId);
bytes32 signalRoot = bytes32(1e9 + blockId);
- proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot);
+ proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot, meta.minTier, "");
parentHash = blockHash;
}
vm.roll(block.number + 15 * 12);
- vm.warp(block.timestamp + conf.proofRegularCooldown + 1);
verifyBlock(Alice, conf.blockMaxProposals - 1);
printVariables("after verify");
verifyBlock(Alice, conf.blockMaxProposals);
@@ -163,8 +141,10 @@ contract TaikoL1Test is TaikoL1TestBase {
vm.expectRevert();
L1.depositEtherToL2{ value: maxAmount + 1 }(address(0));
- assertEq(L1.getStateVariables().nextEthDepositToProcess, 0);
- assertEq(L1.getStateVariables().numEthDeposits, 0);
+ (TaikoData.SlotA memory a,) = L1.getStateVariables();
+
+ assertEq(a.nextEthDepositToProcess, 0);
+ assertEq(a.numEthDeposits, 0);
}
function test_L1_EthDepositsToL2Gas() external {
@@ -176,9 +156,9 @@ contract TaikoL1Test is TaikoL1TestBase {
giveEthAndTko(Bob, 1e6 ether, 0);
proposeBlock(Alice, Bob, 1_000_000, 1024);
- TaikoData.BlockMetadata memory meta =
+ (, TaikoData.EthDeposit[] memory depositsProcessed) =
proposeBlock(Alice, Bob, 1_000_000, 1024);
- assertEq(meta.depositsProcessed.length, 0);
+ assertEq(depositsProcessed.length, 0);
uint256 count = conf.ethDepositMaxCountPerBlock;
@@ -190,25 +170,22 @@ contract TaikoL1Test is TaikoL1TestBase {
printVariables("after sending ethers");
uint256 gas = gasleft();
- meta = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ TaikoData.BlockMetadata memory meta;
+ (meta, depositsProcessed) = proposeBlock(Alice, Bob, 1_000_000, 1024);
uint256 gasUsedWithDeposits = gas - gasleft();
console2.log("gas used with eth deposits:", gasUsedWithDeposits);
printVariables("after processing send-ethers");
- assertTrue(
- LibDepositing.hashEthDeposits(meta.depositsProcessed)
- != emptyDepositsRoot
- );
- assertEq(meta.depositsProcessed.length, count);
+ assertTrue(keccak256(abi.encode(depositsProcessed)) != emptyDepositsRoot);
+ assertEq(depositsProcessed.length, count);
gas = gasleft();
- meta = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ (meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
uint256 gasUsedWithoutDeposits = gas - gasleft();
console2.log("gas used without eth deposits:", gasUsedWithoutDeposits);
- uint256 gasPerEthDeposit =
- (gasUsedWithDeposits - gasUsedWithoutDeposits) / count;
+ uint256 gasPerEthDeposit = (gasUsedWithDeposits - gasUsedWithoutDeposits) / count;
console2.log("gas per eth deposit:", gasPerEthDeposit);
console2.log("ethDepositMaxCountPerBlock:", count);
@@ -216,15 +193,16 @@ contract TaikoL1Test is TaikoL1TestBase {
/// @dev getCrossChainBlockHash tests
function test_L1_getCrossChainBlockHash0() external {
- bytes32 genHash = L1.getCrossChainBlockHash(0);
+ bytes32 genHash = L1.getSyncedSnippet(0).blockHash;
assertEq(GENESIS_BLOCK_HASH, genHash);
- // Not yet avail.
- assertEq(L1.getCrossChainBlockHash(1), bytes32(0));
+ // Reverts if block is not yet verified!
+ vm.expectRevert(TaikoErrors.L1_BLOCK_MISMATCH.selector);
+ L1.getSyncedSnippet(1);
}
- /// @dev getCrossChainSignalRoot tests
- function test_L1_getCrossChainSignalRoot() external {
+ /// @dev getSyncedSnippet tests
+ function test_L1_getSyncedSnippet() external {
uint64 count = 10;
// Declare here so that block prop/prove/verif. can be used in 1 place
TaikoData.BlockMetadata memory meta;
@@ -238,29 +216,27 @@ contract TaikoL1Test is TaikoL1TestBase {
giveEthAndTko(Bob, 1e7 ether, 100_000 ether);
console2.log("Bob balance:", tko.balanceOf(Bob));
- // Bob is the staker / prover
- vm.prank(Bob, Bob);
-
// Propose blocks
- for (uint64 blockId = 1; blockId < count; blockId++) {
+ for (uint64 blockId = 1; blockId < count; ++blockId) {
printVariables("before propose");
- meta = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ (meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
mine(5);
blockHash = bytes32(1e10 + uint256(blockId));
signalRoot = bytes32(1e9 + uint256(blockId));
proveBlock(
- Bob, Bob, meta, parentHashes[blockId - 1], blockHash, signalRoot
+ Bob, Bob, meta, parentHashes[blockId - 1], blockHash, signalRoot, meta.minTier, ""
);
vm.roll(block.number + 15 * 12);
- vm.warp(block.timestamp + conf.proofRegularCooldown + 1);
+ uint16 minTier = meta.minTier;
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
verifyBlock(Carol, 1);
// Querying written blockhash
- assertEq(L1.getCrossChainBlockHash(blockId), blockHash);
+ assertEq(L1.getSyncedSnippet(blockId).blockHash, blockHash);
mine(5);
parentHashes[blockId] = blockHash;
@@ -269,25 +245,27 @@ contract TaikoL1Test is TaikoL1TestBase {
uint64 queriedBlockId = 1;
bytes32 expectedSR = bytes32(1e9 + uint256(queriedBlockId));
- assertEq(expectedSR, L1.getCrossChainSignalRoot(queriedBlockId));
+ assertEq(expectedSR, L1.getSyncedSnippet(queriedBlockId).signalRoot);
// 2nd
queriedBlockId = 2;
expectedSR = bytes32(1e9 + uint256(queriedBlockId));
- assertEq(expectedSR, L1.getCrossChainSignalRoot(queriedBlockId));
+ assertEq(expectedSR, L1.getSyncedSnippet(queriedBlockId).signalRoot);
- // Not found
- assertEq(bytes32(0), L1.getCrossChainSignalRoot((count + 1)));
+ // Not found -> reverts
+ vm.expectRevert(TaikoErrors.L1_BLOCK_MISMATCH.selector);
+ L1.getSyncedSnippet((count + 1));
}
function test_L1_deposit_hash_creation() external {
+ giveEthAndTko(Bob, 1e6 ether, 100 ether);
giveEthAndTko(Zachary, 1e6 ether, 0);
// uint96 minAmount = conf.ethDepositMinAmount;
uint96 maxAmount = conf.ethDepositMaxAmount;
// We need 8 deposits otherwise we are not processing them !
giveEthAndTko(Alice, 1e6 ether, maxAmount + 1 ether);
- giveEthAndTko(Bob, 0, maxAmount + 1 ether);
+ giveEthAndTko(Bob, 1e6 ether, maxAmount + 1 ether);
giveEthAndTko(Carol, 0, maxAmount + 1 ether);
giveEthAndTko(David, 0, maxAmount + 1 ether);
giveEthAndTko(Emma, 0, maxAmount + 1 ether);
@@ -313,23 +291,25 @@ contract TaikoL1Test is TaikoL1TestBase {
vm.prank(Henry, Henry);
L1.depositEtherToL2{ value: 8 ether }(address(0));
- assertEq(L1.getStateVariables().numEthDeposits, 8); // The number of
- // deposits
- assertEq(L1.getStateVariables().nextEthDepositToProcess, 0); // The
- // index / cursos of the next deposit
+ (TaikoData.SlotA memory a,) = L1.getStateVariables();
+
+ // The number of deposits
+ assertEq(a.numEthDeposits, 8);
+ // The index / cursos of the next deposit
+ assertEq(a.nextEthDepositToProcess, 0);
// We shall invoke proposeBlock() because this is what will call the
// processDeposits()
- TaikoData.BlockMetadata memory meta =
- proposeBlock(Alice, Zachary, 1_000_000, 1024);
-
+ (, TaikoData.EthDeposit[] memory depositsProcessed) =
+ proposeBlock(Alice, Bob, 1_000_000, 1024);
// Expected:
- // 0x41c71a2af0eaa668a1241d7e1b09ac30d0e9ea6b6eb4a5a151029e87158d46f3 (pre
+ // 0x3b61cf81fd007398a8efd07a055ac8fb542bcfa62d76cf6dc28a889371afb21e (pre
// calculated with these values)
//console2.logBytes32(meta.depositsRoot);
+
assertEq(
- LibDepositing.hashEthDeposits(meta.depositsProcessed),
- 0x41c71a2af0eaa668a1241d7e1b09ac30d0e9ea6b6eb4a5a151029e87158d46f3
+ keccak256(abi.encode(depositsProcessed)),
+ 0x3b61cf81fd007398a8efd07a055ac8fb542bcfa62d76cf6dc28a889371afb21e
);
}
}
diff --git a/packages/protocol/test/L1/TaikoL1LibProvingWithTiers.t.sol b/packages/protocol/test/L1/TaikoL1LibProvingWithTiers.t.sol
new file mode 100644
index 00000000000..eb548bc946c
--- /dev/null
+++ b/packages/protocol/test/L1/TaikoL1LibProvingWithTiers.t.sol
@@ -0,0 +1,819 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.20;
+
+import "./TaikoL1TestBase.sol";
+
+contract TaikoL1Tiers is TaikoL1 {
+ function getConfig() public view override returns (TaikoData.Config memory config) {
+ config = TaikoL1.getConfig();
+
+ config.maxBlocksToVerifyPerProposal = 0;
+ config.blockMaxProposals = 10;
+ config.blockRingBufferSize = 12;
+ config.livenessBond = 1e18; // 1 Taiko token
+ }
+}
+
+contract Verifier {
+ fallback(bytes calldata) external returns (bytes memory) {
+ return bytes.concat(keccak256("taiko"));
+ }
+}
+
+contract TaikoL1LibProvingWithTiers is TaikoL1TestBase {
+ function deployTaikoL1() internal override returns (TaikoL1 taikoL1) {
+ taikoL1 = TaikoL1(
+ payable(deployProxy({ name: "taiko", impl: address(new TaikoL1Tiers()), data: "" }))
+ );
+ }
+
+ function proveHigherTierProof(
+ TaikoData.BlockMetadata memory meta,
+ bytes32 parentHash,
+ bytes32 signalRoot,
+ bytes32 blockHash,
+ uint16 minTier
+ )
+ internal
+ {
+ uint16 tierToProveWith;
+ if (minTier == LibTiers.TIER_OPTIMISTIC) {
+ tierToProveWith = LibTiers.TIER_SGX;
+ } else if (minTier == LibTiers.TIER_SGX) {
+ tierToProveWith = LibTiers.TIER_SGX_AND_PSE_ZKEVM;
+ } else if (minTier == LibTiers.TIER_SGX_AND_PSE_ZKEVM) {
+ tierToProveWith = LibTiers.TIER_GUARDIAN;
+ }
+ proveBlock(Carol, Carol, meta, parentHash, blockHash, signalRoot, tierToProveWith, "");
+ }
+
+ function test_L1_ContestingWithSameProof() external {
+ giveEthAndTko(Alice, 1e7 ether, 1000 ether);
+ giveEthAndTko(Carol, 1e7 ether, 1000 ether);
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ // This is a very weird test (code?) issue here.
+ // If this line is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ // Current investigations are ongoing with foundry team
+ giveEthAndTko(Bob, 1e6 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ for (uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++) {
+ printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+ // This proof cannot be verified obviously because of
+ // blockhash:blockId
+ proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot, meta.minTier, "");
+
+ // Try to contest - but should revert with L1_ALREADY_PROVED
+ proveBlock(
+ Carol,
+ Carol,
+ meta,
+ parentHash,
+ blockHash,
+ signalRoot,
+ meta.minTier,
+ TaikoErrors.L1_ALREADY_PROVED.selector
+ );
+
+ vm.roll(block.number + 15 * 12);
+
+ uint16 minTier = meta.minTier;
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
+
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+
+ function test_L1_ContestingWithDifferentButCorrectProof() external {
+ giveEthAndTko(Alice, 1e8 ether, 1000 ether);
+ giveEthAndTko(Carol, 1e8 ether, 1000 ether);
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ // This is a very weird test (code?) issue here.
+ // If this line is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ // Current investigations are ongoing with foundry team
+ giveEthAndTko(Bob, 1e8 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ for (uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++) {
+ printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+ // This proof cannot be verified obviously because of
+ // signalRoot instead of blockHash
+ uint16 minTier = meta.minTier;
+
+ proveBlock(Bob, Bob, meta, parentHash, signalRoot, signalRoot, minTier, "");
+
+ // Try to contest
+ proveBlock(Carol, Carol, meta, parentHash, blockHash, signalRoot, minTier, "");
+
+ vm.roll(block.number + 15 * 12);
+
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
+
+ // Cannot verify block because it is contested..
+ verifyBlock(Carol, 1);
+
+ proveHigherTierProof(meta, parentHash, signalRoot, blockHash, minTier);
+
+ vm.warp(block.timestamp + L1.getTier(LibTiers.TIER_GUARDIAN).cooldownWindow + 1);
+ // Now can verify
+ console2.log("Probalom verify-olni");
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+
+ function test_L1_ContestingWithSgxProof() external {
+ giveEthAndTko(Alice, 1e8 ether, 1000 ether);
+ giveEthAndTko(Carol, 1e8 ether, 1000 ether);
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ // This is a very weird test (code?) issue here.
+ // If this line is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ // Current investigations are ongoing with foundry team
+ giveEthAndTko(Bob, 1e8 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ for (uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++) {
+ printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+ // This proof cannot be verified obviously because of
+ // signalRoot instead of blockHash
+ uint16 minTier = meta.minTier;
+ proveBlock(Bob, Bob, meta, parentHash, signalRoot, signalRoot, minTier, "");
+
+ // Try to contest
+ proveBlock(Carol, Carol, meta, parentHash, blockHash, signalRoot, minTier, "");
+
+ vm.roll(block.number + 15 * 12);
+
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
+
+ // Cannot verify block because it is contested..
+ verifyBlock(Carol, 1);
+
+ proveHigherTierProof(meta, parentHash, signalRoot, blockHash, minTier);
+
+ // Otherwise just not contest
+ vm.warp(block.timestamp + L1.getTier(LibTiers.TIER_GUARDIAN).cooldownWindow + 1);
+ // Now can verify
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+
+ function test_L1_ContestingWithDifferentButInCorrectProof() external {
+ giveEthAndTko(Alice, 1e8 ether, 1000 ether);
+ giveEthAndTko(Carol, 1e8 ether, 1000 ether);
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ // This is a very weird test (code?) issue here.
+ // If this line is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ // Current investigations are ongoing with foundry team
+ giveEthAndTko(Bob, 1e8 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ for (uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++) {
+ printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+ // This proof cannot be verified obviously because of
+ // signalRoot instead of blockHash
+ uint16 minTier = meta.minTier;
+
+ proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot, minTier, "");
+
+ if (minTier == LibTiers.TIER_OPTIMISTIC) {
+ // Try to contest
+ proveBlock(Carol, Carol, meta, parentHash, signalRoot, signalRoot, minTier, "");
+
+ vm.roll(block.number + 15 * 12);
+
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
+
+ // Cannot verify block because it is contested..
+ verifyBlock(Carol, 1);
+
+ proveBlock(
+ Carol,
+ Carol,
+ meta,
+ parentHash,
+ blockHash,
+ signalRoot,
+ LibTiers.TIER_SGX_AND_PSE_ZKEVM,
+ ""
+ );
+ }
+
+ // Otherwise just not contest
+ vm.warp(block.timestamp + L1.getTier(LibTiers.TIER_GUARDIAN).cooldownWindow + 1);
+ // Now can verify
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+
+ function test_L1_ContestingWithInvalidBlockHash() external {
+ giveEthAndTko(Alice, 1e8 ether, 1000 ether);
+ giveEthAndTko(Carol, 1e8 ether, 1000 ether);
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ // This is a very weird test (code?) issue here.
+ // If this line is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ // Current investigations are ongoing with foundry team
+ giveEthAndTko(Bob, 1e8 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+ // This proof cannot be verified obviously because of
+ // signalRoot instead of blockHash
+ uint16 minTier = meta.minTier;
+ proveBlock(Bob, Bob, meta, parentHash, signalRoot, signalRoot, minTier, "");
+
+ if (minTier == LibTiers.TIER_OPTIMISTIC) {
+ // Try to contest
+ proveBlock(Carol, Carol, meta, parentHash, blockHash, signalRoot, minTier, "");
+
+ vm.roll(block.number + 15 * 12);
+
+ vm.warp(block.timestamp + L1.getTier(LibTiers.TIER_GUARDIAN).cooldownWindow + 1);
+
+ // Cannot verify block because it is contested..
+ verifyBlock(Carol, 1);
+
+ proveBlock(
+ Carol,
+ Carol,
+ meta,
+ parentHash,
+ 0,
+ signalRoot,
+ LibTiers.TIER_SGX_AND_PSE_ZKEVM,
+ TaikoErrors.L1_INVALID_TRANSITION.selector
+ );
+ }
+
+ // Otherwise just not contest
+ vm.warp(block.timestamp + L1.getTier(LibTiers.TIER_GUARDIAN).cooldownWindow + 1);
+ // Now can verify
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+
+ function test_L1_NonAsignedProverCannotBeFirstInProofWindowTime() external {
+ giveEthAndTko(Alice, 1e8 ether, 100 ether);
+ // This is a very weird test (code?) issue here.
+ // If this line (or Bob's query balance) is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ giveEthAndTko(Bob, 1e8 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ giveEthAndTko(Carol, 1e8 ether, 100 ether);
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ //printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+ proveBlock(
+ Carol,
+ Carol,
+ meta,
+ parentHash,
+ blockHash,
+ signalRoot,
+ meta.minTier,
+ TaikoErrors.L1_NOT_ASSIGNED_PROVER.selector
+ );
+ vm.roll(block.number + 15 * 12);
+
+ uint16 minTier = meta.minTier;
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
+
+ verifyBlock(Carol, 1);
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+
+ function test_L1_asignedProverCannotProveAfterHisWindowElapsed() external {
+ giveEthAndTko(Alice, 1e8 ether, 100 ether);
+ // This is a very weird test (code?) issue here.
+ // If this line (or Bob's query balance) is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ giveEthAndTko(Bob, 1e8 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ giveEthAndTko(Carol, 1e8 ether, 100 ether);
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ //printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+
+ vm.roll(block.number + 15 * 12);
+
+ uint16 minTier = meta.minTier;
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
+
+ proveBlock(
+ Bob,
+ Bob,
+ meta,
+ parentHash,
+ blockHash,
+ signalRoot,
+ meta.minTier,
+ TaikoErrors.L1_ASSIGNED_PROVER_NOT_ALLOWED.selector
+ );
+
+ verifyBlock(Carol, 1);
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+
+ function test_L1_GuardianProverCannotOverwriteIfSameProof() external {
+ giveEthAndTko(Alice, 1e7 ether, 1000 ether);
+ giveEthAndTko(Carol, 1e7 ether, 1000 ether);
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ // This is a very weird test (code?) issue here.
+ // If this line is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ // Current investigations are ongoing with foundry team
+ giveEthAndTko(Bob, 1e6 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ for (uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++) {
+ printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+ // This proof cannot be verified obviously because of
+ // blockhash:blockId
+ proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot, meta.minTier, "");
+
+ // Try to contest - but should revert with L1_ALREADY_PROVED
+ proveBlock(
+ Carol,
+ Carol,
+ meta,
+ parentHash,
+ blockHash,
+ signalRoot,
+ LibTiers.TIER_GUARDIAN,
+ TaikoErrors.L1_ALREADY_PROVED.selector
+ );
+
+ vm.roll(block.number + 15 * 12);
+
+ uint16 minTier = meta.minTier;
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
+
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+
+ function test_L1_GuardianProverFailsWithInvalidBlockHash() external {
+ giveEthAndTko(Alice, 1e7 ether, 1000 ether);
+ giveEthAndTko(Carol, 1e7 ether, 1000 ether);
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ // This is a very weird test (code?) issue here.
+ // If this line is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ // Current investigations are ongoing with foundry team
+ giveEthAndTko(Bob, 1e6 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ for (uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++) {
+ printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+ // This proof cannot be verified obviously because of
+ // blockhash:blockId
+ proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot, meta.minTier, "");
+
+ // Try to contest - but should revert with L1_ALREADY_PROVED
+ proveBlock(
+ Carol,
+ Carol,
+ meta,
+ parentHash,
+ 0,
+ signalRoot,
+ LibTiers.TIER_GUARDIAN,
+ TaikoErrors.L1_INVALID_TRANSITION.selector
+ );
+
+ vm.roll(block.number + 15 * 12);
+
+ uint16 minTier = meta.minTier;
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
+
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+
+ function test_L1_GuardianProverCanOverwriteIfNotSameProof() external {
+ giveEthAndTko(Alice, 1e7 ether, 1000 ether);
+ giveEthAndTko(Carol, 1e7 ether, 1000 ether);
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ // This is a very weird test (code?) issue here.
+ // If this line is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ // Current investigations are ongoing with foundry team
+ giveEthAndTko(Bob, 1e7 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ for (uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++) {
+ printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+ // This proof cannot be verified obviously because of
+ // blockhash:blockId
+ proveBlock(Bob, Bob, meta, parentHash, signalRoot, signalRoot, meta.minTier, "");
+
+ // Prove as guardian
+ proveBlock(
+ Carol, Carol, meta, parentHash, blockHash, signalRoot, LibTiers.TIER_GUARDIAN, ""
+ );
+
+ vm.roll(block.number + 15 * 12);
+
+ uint16 minTier = meta.minTier;
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
+
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+
+ function test_L1_IfGuardianRoleIsNotGrantedToProver() external {
+ registerAddress("guardian_prover", Alice);
+
+ giveEthAndTko(Alice, 1e8 ether, 1000 ether);
+ giveEthAndTko(Carol, 1e8 ether, 1000 ether);
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ // This is a very weird test (code?) issue here.
+ // If this line is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ // Current investigations are ongoing with foundry team
+ giveEthAndTko(Bob, 1e8 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+ // This proof cannot be verified obviously because of
+ // blockhash:blockId
+ proveBlock(Bob, Bob, meta, parentHash, signalRoot, signalRoot, meta.minTier, "");
+
+ // Prove as guardian but in reality not a guardian
+ proveBlock(
+ Carol,
+ Carol,
+ meta,
+ parentHash,
+ blockHash,
+ signalRoot,
+ LibTiers.TIER_GUARDIAN,
+ GuardianVerifier.PERMISSION_DENIED.selector
+ );
+
+ vm.roll(block.number + 15 * 12);
+
+ uint16 minTier = meta.minTier;
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
+
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+
+ function test_L1_ProveWithInvalidBlockId() external {
+ registerAddress("guardian_prover", Alice);
+
+ giveEthAndTko(Alice, 1e8 ether, 1000 ether);
+ giveEthAndTko(Carol, 1e8 ether, 1000 ether);
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ // This is a very weird test (code?) issue here.
+ // If this line is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ // Current investigations are ongoing with foundry team
+ giveEthAndTko(Bob, 1e8 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+
+ meta.id = 100;
+ proveBlock(
+ Carol,
+ Carol,
+ meta,
+ parentHash,
+ blockHash,
+ signalRoot,
+ LibTiers.TIER_PSE_ZKEVM,
+ TaikoErrors.L1_INVALID_BLOCK_ID.selector
+ );
+
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+
+ function test_L1_ProveWithInvalidMetahash() external {
+ registerAddress("guardian_prover", Alice);
+
+ giveEthAndTko(Alice, 1e8 ether, 1000 ether);
+ giveEthAndTko(Carol, 1e8 ether, 1000 ether);
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ // This is a very weird test (code?) issue here.
+ // If this line is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ // Current investigations are ongoing with foundry team
+ giveEthAndTko(Bob, 1e8 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+
+ // Mess up metahash
+ meta.l1Height = 200;
+ proveBlock(
+ Bob,
+ Bob,
+ meta,
+ parentHash,
+ blockHash,
+ signalRoot,
+ LibTiers.TIER_PSE_ZKEVM,
+ TaikoErrors.L1_BLOCK_MISMATCH.selector
+ );
+
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+
+ function test_L1_GuardianProofCannotBeOverwrittenByLowerTier() external {
+ giveEthAndTko(Alice, 1e7 ether, 1000 ether);
+ giveEthAndTko(Carol, 1e7 ether, 1000 ether);
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ // This is a very weird test (code?) issue here.
+ // If this line is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ // Current investigations are onsgoing with foundry team
+ giveEthAndTko(Bob, 1e7 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ for (uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++) {
+ printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+ // This proof cannot be verified obviously because of blockhash is
+ // exchanged with signalRoot
+ proveBlock(Bob, Bob, meta, parentHash, signalRoot, signalRoot, meta.minTier, "");
+
+ // Prove as guardian
+ proveBlock(
+ Carol, Carol, meta, parentHash, blockHash, signalRoot, LibTiers.TIER_GUARDIAN, ""
+ );
+
+ // Try to re-prove but reverts
+ proveBlock(
+ Bob,
+ Bob,
+ meta,
+ parentHash,
+ signalRoot,
+ signalRoot,
+ LibTiers.TIER_PSE_ZKEVM,
+ TaikoErrors.L1_INVALID_TIER.selector
+ );
+
+ vm.roll(block.number + 15 * 12);
+
+ uint16 minTier = meta.minTier;
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
+
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+
+ function test_L1_GuardianCanReturnBondIfBlockUnprovable() external {
+ giveEthAndTko(Alice, 1e7 ether, 1000 ether);
+ giveEthAndTko(Carol, 1e7 ether, 1000 ether);
+ console2.log("Alice balance:", tko.balanceOf(Alice));
+ // This is a very weird test (code?) issue here.
+ // If this line is uncommented,
+ // Alice/Bob has no balance.. (Causing reverts !!!)
+ // Current investigations are ongoing with foundry team
+ giveEthAndTko(Bob, 1e7 ether, 100 ether);
+ console2.log("Bob balance:", tko.balanceOf(Bob));
+ // Bob
+ vm.prank(Bob, Bob);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ for (uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++) {
+ printVariables("before propose");
+ (TaikoData.BlockMetadata memory meta,) = proposeBlock(Alice, Bob, 1_000_000, 1024);
+ //printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1e10 + blockId);
+ bytes32 signalRoot = bytes32(1e9 + blockId);
+ // This proof cannot be verified obviously because of blockhash is
+ // exchanged with signalRoot
+ proveBlock(Bob, Bob, meta, parentHash, signalRoot, signalRoot, meta.minTier, "");
+
+ // Let's say the 10th block is unprovable so prove accordingly
+ if (blockId == 10) {
+ TaikoData.Transition memory tran = TaikoData.Transition({
+ parentHash: parentHash,
+ blockHash: blockHash,
+ signalRoot: signalRoot,
+ graffiti: 0x0
+ });
+
+ TaikoData.TierProof memory proof;
+ proof.tier = LibTiers.TIER_GUARDIAN;
+ proof.data = bytes.concat(keccak256("RETURN_LIVENESS_BOND"));
+
+ uint256 balanceBeforeReimbursement = tko.balanceOf(Bob);
+
+ vm.prank(David, David);
+ gp.approve(meta, tran, proof);
+ vm.prank(Emma, Emma);
+ gp.approve(meta, tran, proof);
+ vm.prank(Frank, Frank);
+ gp.approve(meta, tran, proof);
+
+ // // Credited back the bond (not transferred to the user
+ // wallet,
+ // // but in-contract account credited only.)
+ assertEq(tko.balanceOf(Bob) - balanceBeforeReimbursement, 1 ether);
+ } else {
+ // Prove as guardian
+ proveBlock(
+ Carol,
+ Carol,
+ meta,
+ parentHash,
+ blockHash,
+ signalRoot,
+ LibTiers.TIER_GUARDIAN,
+ ""
+ );
+ }
+ vm.roll(block.number + 15 * 12);
+
+ uint16 minTier = meta.minTier;
+ vm.warp(block.timestamp + L1.getTier(minTier).cooldownWindow + 1);
+
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+ printVariables("");
+ }
+}
diff --git a/packages/protocol/test/L1/TaikoL1Oracle.t.sol b/packages/protocol/test/L1/TaikoL1Oracle.t.sol
deleted file mode 100644
index 6de96fc1469..00000000000
--- a/packages/protocol/test/L1/TaikoL1Oracle.t.sol
+++ /dev/null
@@ -1,404 +0,0 @@
-// SPDX-License-Identifier: MIT
-pragma solidity ^0.8.20;
-
-import { Test } from "forge-std/Test.sol";
-import { console2 } from "forge-std/console2.sol";
-import { AddressManager } from "../../contracts/common/AddressManager.sol";
-import { LibUtils } from "../../contracts/L1/libs/LibUtils.sol";
-import { TaikoData } from "../../contracts/L1/TaikoData.sol";
-import { TaikoErrors } from "../../contracts/L1/TaikoErrors.sol";
-import { TaikoL1 } from "../../contracts/L1/TaikoL1.sol";
-import { TaikoToken } from "../../contracts/L1/TaikoToken.sol";
-import { SignalService } from "../../contracts/signal/SignalService.sol";
-import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
-import { TaikoL1TestBase } from "./TaikoL1TestBase.sol";
-
-contract TaikoL1Oracle is TaikoL1 {
- function getConfig()
- public
- pure
- override
- returns (TaikoData.Config memory config)
- {
- config = TaikoL1.getConfig();
-
- config.blockTxListExpiry = 5 minutes;
- config.blockMaxVerificationsPerTx = 0;
- config.blockMaxProposals = 10;
- config.blockRingBufferSize = 12;
- config.proofRegularCooldown = 15 minutes;
- config.skipProverAssignmentVerificaiton = true;
- config.proofBond = 1e18; // 1 Taiko token
- config.proposerRewardPerSecond = 1e15; // 0.001 Taiko token
- }
-}
-
-contract Verifier {
- fallback(bytes calldata) external returns (bytes memory) {
- return bytes.concat(keccak256("taiko"));
- }
-}
-
-contract TaikoL1OracleTest is TaikoL1TestBase {
- function deployTaikoL1() internal override returns (TaikoL1 taikoL1) {
- taikoL1 = new TaikoL1Oracle();
- }
-
- function setUp() public override {
- TaikoL1TestBase.setUp();
- registerAddress(L1.getVerifierName(100), address(new Verifier()));
- registerAddress("oracle_prover", Alice);
- }
-
- function test_L1_OracleProverCanAlwaysOverwriteIfNotSameProof() external {
- // Carol is the oracle prover
- registerAddress("oracle_prover", Carol);
-
- giveEthAndTko(Alice, 1000 ether, 1000 ether);
- console2.log("Alice balance:", tko.balanceOf(Alice));
- // This is a very weird test (code?) issue here.
- // If this line is uncommented,
- // Alice/Bob has no balance.. (Causing reverts !!!)
- // Current investigations are ongoing with foundry team
- giveEthAndTko(Bob, 1e6 ether, 100 ether);
- console2.log("Bob balance:", tko.balanceOf(Bob));
- // Bob
- vm.prank(Bob, Bob);
-
- bytes32 parentHash = GENESIS_BLOCK_HASH;
- for (
- uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++
- ) {
- printVariables("before propose");
- TaikoData.BlockMetadata memory meta =
- proposeBlock(Alice, Bob, 1_000_000, 1024);
- //printVariables("after propose");
- mine(1);
-
- bytes32 blockHash = bytes32(1e10 + blockId);
- bytes32 signalRoot = bytes32(1e9 + blockId);
- // This proof cannot be verified obviously because of
- // blockhash:blockId
- proveBlock(Bob, Bob, meta, parentHash, bytes32(blockId), signalRoot);
-
- proveBlock(
- Carol,
- LibUtils.ORACLE_PROVER,
- meta,
- parentHash,
- blockHash,
- signalRoot
- );
-
- vm.warp(block.timestamp + conf.proofRegularCooldown + 1);
-
- verifyBlock(Carol, 1);
-
- // This is verified, user cannot re-verify it
- vm.expectRevert(TaikoErrors.L1_INVALID_BLOCK_ID.selector);
- proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot);
-
- parentHash = blockHash;
- }
- printVariables("");
- }
-
- function test_L1_OracleProverCannotOverwriteIfSameProof() external {
- // Carol is the oracle prover
- registerAddress("oracle_prover", Carol);
-
- giveEthAndTko(Alice, 1000 ether, 1000 ether);
- console2.log("Alice balance:", tko.balanceOf(Alice));
- // This is a very weird test (code?) issue here.
- // If this line is uncommented,
- // Alice/Bob has no balance.. (Causing reverts !!!)
- // Current investigations are ongoing with foundry team
- giveEthAndTko(Bob, 1e6 ether, 100 ether);
- console2.log("Bob balance:", tko.balanceOf(Bob));
- // Bob
- vm.prank(Bob, Bob);
-
- bytes32 parentHash = GENESIS_BLOCK_HASH;
- for (
- uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++
- ) {
- printVariables("before propose");
- TaikoData.BlockMetadata memory meta =
- proposeBlock(Alice, Bob, 1_000_000, 1024);
- //printVariables("after propose");
- mine(1);
-
- bytes32 blockHash = bytes32(1e10 + blockId);
- bytes32 signalRoot = bytes32(1e9 + blockId);
- // This proof cannot be verified obviously because of
- // blockhash:blockId
- proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot);
-
- vm.expectRevert(TaikoErrors.L1_SAME_PROOF.selector);
- proveBlock(
- Carol,
- LibUtils.ORACLE_PROVER,
- meta,
- parentHash,
- blockHash,
- signalRoot
- );
-
- vm.warp(block.timestamp + conf.proofRegularCooldown + 1);
- uint256 lastVerifiedBlockId =
- L1.getStateVariables().lastVerifiedBlockId;
-
- verifyBlock(Carol, 1);
-
- // Check if shortly after proving (+verify) the last verify is not
- // the same anymore
- // no need to have a cooldown period
- uint256 lastVerifiedBlockIdNow =
- L1.getStateVariables().lastVerifiedBlockId;
-
- assertFalse(lastVerifiedBlockIdNow == lastVerifiedBlockId);
-
- parentHash = blockHash;
- }
- printVariables("");
- }
-
- /// @dev So in case we have regular proving mechanism we shall check if
- /// still a cooldown happens
- /// @dev when proving a block (in a normal way).
- /// @notice In case oracle_prover is disabled, there
- /// is no reason why
- /// @notice cooldowns be above 0 min tho (!).
- function test_L1_if_oracle_is_disabled_cooldown_is_still_as_proofRegularCooldown(
- )
- external
- {
- registerAddress("oracle_prover", address(0));
-
- giveEthAndTko(Alice, 1000 ether, 1000 ether);
- console2.log("Alice balance:", tko.balanceOf(Alice));
- // This is a very weird test (code?) issue here.
- // If this line is uncommented,
- // Alice/Bob has no balance.. (Causing reverts !!!)
- // Current investigations are ongoing with foundry team
- giveEthAndTko(Bob, 1e6 ether, 100 ether);
- console2.log("Bob balance:", tko.balanceOf(Bob));
- // Bob
- vm.prank(Bob, Bob);
-
- bytes32 parentHash = GENESIS_BLOCK_HASH;
-
- for (
- uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++
- ) {
- TaikoData.BlockMetadata memory meta =
- proposeBlock(Alice, Bob, 1_000_000, 1024);
- printVariables("after propose");
- mine(1);
-
- bytes32 blockHash = bytes32(1e10 + blockId);
- bytes32 signalRoot = bytes32(1e9 + blockId);
-
- proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot);
-
- uint256 lastVerifiedBlockId =
- L1.getStateVariables().lastVerifiedBlockId;
-
- vm.warp(block.timestamp + 1 seconds);
- verifyBlock(Carol, 1);
-
- // Check if shortly after proving (+verify) the last verify is not
- // the same anymore
- // no need to have a cooldown period
- uint256 lastVerifiedBlockIdNow =
- L1.getStateVariables().lastVerifiedBlockId;
-
- assertEq(lastVerifiedBlockIdNow, lastVerifiedBlockId);
-
- vm.warp(block.timestamp + conf.proofRegularCooldown + 1);
- verifyBlock(Carol, 1);
-
- lastVerifiedBlockIdNow = L1.getStateVariables().lastVerifiedBlockId;
-
- assertFalse(lastVerifiedBlockIdNow == lastVerifiedBlockId);
-
- parentHash = blockHash;
- }
- printVariables("");
- }
-
- /// @dev Test if oracle proofs can be verified
- function test_L1_if_oracle_proofs_can_be_verified_without_regular_proofs()
- external
- {
- // Bob is the oracle prover
- registerAddress("oracle_prover", Bob);
-
- giveEthAndTko(Alice, 1000 ether, 1000 ether);
- console2.log("Alice balance:", tko.balanceOf(Alice));
- // This is a very weird test (code?) issue here.
- // If this line is uncommented,
- // Alice/Bob has no balance.. (Causing reverts !!!)
- // Current investigations are ongoing with foundry team
- giveEthAndTko(Bob, 1e6 ether, 100 ether);
- console2.log("Bob balance:", tko.balanceOf(Bob));
- // Bob
- vm.prank(Bob, Bob);
-
- bytes32 parentHash = GENESIS_BLOCK_HASH;
-
- for (
- uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++
- ) {
- TaikoData.BlockMetadata memory meta =
- proposeBlock(Alice, Bob, 1_000_000, 1024);
- printVariables("after propose");
- mine(1);
-
- bytes32 blockHash = bytes32(1e10 + blockId);
- bytes32 signalRoot = bytes32(1e9 + blockId);
-
- proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot);
-
- uint256 lastVerifiedBlockId =
- L1.getStateVariables().lastVerifiedBlockId;
-
- vm.warp(block.timestamp + conf.proofRegularCooldown + 1);
- verifyBlock(Carol, 1);
-
- uint256 lastVerifiedBlockIdNow =
- L1.getStateVariables().lastVerifiedBlockId;
-
- assertFalse(lastVerifiedBlockIdNow == lastVerifiedBlockId);
-
- parentHash = blockHash;
- }
- printVariables("");
- }
-
- /// @dev Test if oracle prover cannot be overwritten
- function test_L1_if_oracle_prover_can_prove_but_regular_provers_can_not_overwrite(
- )
- external
- {
- // David is the oracle prover
- registerAddress("oracle_prover", David);
-
- giveEthAndTko(Alice, 1000 ether, 1000 ether);
- console2.log("Alice balance:", tko.balanceOf(Alice));
- // This is a very weird test (code?) issue here.
- // If this line is uncommented,
- // Alice/Bob has no balance.. (Causing reverts !!!)
- // Current investigations are ongoing with foundry team
- giveEthAndTko(Bob, 1e6 ether, 100 ether);
- console2.log("Bob balance:", tko.balanceOf(Bob));
- giveEthAndTko(Carol, 1e6 ether, 100 ether);
- console2.log("Bob balance:", tko.balanceOf(Carol));
-
- // Bob
- vm.prank(Bob, Bob);
-
- bytes32 parentHash = GENESIS_BLOCK_HASH;
-
- for (
- uint64 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++
- ) {
- TaikoData.BlockMetadata memory meta =
- proposeBlock(Alice, Bob, 1_000_000, 1024);
- printVariables("after propose");
- mine(1);
-
- bytes32 blockHash = bytes32(1e10 + uint256(blockId));
- bytes32 signalRoot = bytes32(1e9 + uint256(blockId));
-
- proveBlock(
- David,
- LibUtils.ORACLE_PROVER,
- meta,
- parentHash,
- blockHash,
- signalRoot
- );
-
- uint256 lastVerifiedBlockId =
- L1.getStateVariables().lastVerifiedBlockId;
-
- // Bob cannot overwrite it
- vm.expectRevert(TaikoErrors.L1_ALREADY_PROVEN.selector);
- proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot);
-
- vm.warp(block.timestamp + 1 seconds);
- vm.warp(block.timestamp + conf.proofOracleCooldown);
-
- TaikoData.Transition memory transition =
- L1.getTransition(blockId, parentHash);
-
- assertEq(transition.prover, LibUtils.ORACLE_PROVER);
-
- verifyBlock(Carol, 1);
-
- // Check if shortly after proving (+verify) the last verify is not
- // the same anymore
- // no need to have a cooldown period
- uint256 lastVerifiedBlockIdNow =
- L1.getStateVariables().lastVerifiedBlockId;
-
- assertFalse(lastVerifiedBlockIdNow == lastVerifiedBlockId);
-
- parentHash = blockHash;
- }
- printVariables("");
- }
-
- /// @dev Test if there is no oracle proofs
- function test_L1_if_there_is_no_oracle_prover_there_is_no_overwrite_at_all()
- external
- {
- // Bob is the oracle prover
- registerAddress("oracle_prover", address(0));
-
- giveEthAndTko(Alice, 1000 ether, 1000 ether);
- console2.log("Alice balance:", tko.balanceOf(Alice));
- // This is a very weird test (code?) issue here.
- // If this line is uncommented,
- // Alice/Bob has no balance.. (Causing reverts !!!)
- // Current investigations are ongoing with foundry team
- giveEthAndTko(Bob, 1e6 ether, 100 ether);
- console2.log("Bob balance:", tko.balanceOf(Bob));
- giveEthAndTko(Carol, 1e6 ether, 100 ether);
- console2.log("Bob balance:", tko.balanceOf(Carol));
-
- // Bob
- vm.prank(Bob, Bob);
-
- bytes32 parentHash = GENESIS_BLOCK_HASH;
-
- for (
- uint256 blockId = 1; blockId < conf.blockMaxProposals * 3; blockId++
- ) {
- TaikoData.BlockMetadata memory meta =
- proposeBlock(Alice, Bob, 1_000_000, 1024);
- printVariables("after propose");
- mine(1);
-
- bytes32 blockHash = bytes32(1e10 + blockId);
- bytes32 signalRoot = bytes32(1e9 + blockId);
-
- proveBlock(Bob, Bob, meta, parentHash, blockHash, signalRoot);
-
- // Carol could not overwrite it
- vm.expectRevert(TaikoErrors.L1_ALREADY_PROVEN.selector);
- proveBlock(Carol, Carol, meta, parentHash, blockHash, signalRoot);
-
- /// @notice: Based on the current codebase we still need to wait
- /// even if the system and oracle proofs are disabled, which
- /// @notice: in such case best to set 0 mins (cause noone could
- /// overwrite a valid fk).
- vm.warp(block.timestamp + conf.proofRegularCooldown);
- verifyBlock(Carol, 1);
-
- parentHash = blockHash;
- }
- printVariables("");
- }
-}
diff --git a/packages/protocol/test/L1/TaikoL1TestBase.sol b/packages/protocol/test/L1/TaikoL1TestBase.sol
index ecd81e5bb6d..4e8723876c8 100644
--- a/packages/protocol/test/L1/TaikoL1TestBase.sol
+++ b/packages/protocol/test/L1/TaikoL1TestBase.sol
@@ -1,18 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
-import { TestBase } from "../TestBase.sol";
-import { console2 } from "forge-std/console2.sol";
-import { AddressManager } from "../../contracts/common/AddressManager.sol";
-import { LibProving } from "../../contracts/L1/libs/LibProving.sol";
-import { LibUtils } from "../../contracts/L1/libs/LibUtils.sol";
-import { TaikoData } from "../../contracts/L1/TaikoData.sol";
-import { TaikoL1 } from "../../contracts/L1/TaikoL1.sol";
-import { TaikoToken } from "../../contracts/L1/TaikoToken.sol";
-import { ProofVerifier } from "../../contracts/L1/ProofVerifier.sol";
-import { SignalService } from "../../contracts/signal/SignalService.sol";
-import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
-import { AddressResolver } from "../../contracts/common/AddressResolver.sol";
+import "../TaikoTest.sol";
contract MockVerifier {
fallback(bytes calldata) external returns (bytes memory) {
@@ -20,29 +9,28 @@ contract MockVerifier {
}
}
-abstract contract TaikoL1TestBase is TestBase {
+// TODO (dani): remove some code to sub-contracts, this one shall only contain
+// shared logics and data.
+abstract contract TaikoL1TestBase is TaikoTest {
AddressManager public addressManager;
+ AssignmentHook public assignmentHook;
TaikoToken public tko;
SignalService public ss;
TaikoL1 public L1;
TaikoData.Config conf;
uint256 internal logCount;
- ProofVerifier public pv;
-
- bytes32 public constant GENESIS_BLOCK_HASH = keccak256("GENESIS_BLOCK_HASH");
- // 1 TKO --> it is to huge. It should be in 'wei' (?).
- // Because otherwise first proposal is around: 1TKO * (1_000_000+20_000)
- // required as a deposit.
- // uint32 feePerGas = 10;
- // uint16 proofWindow = 60 minutes;
- uint64 l2GasExcess = 1e18;
-
- address public constant L2Treasury =
- 0x859d74b52762d9ed07D1b2B8d7F93d26B1EA78Bb;
- address public constant L2SS = 0xa008AE5Ba00656a3Cc384de589579e3E52aC030C;
- address public constant TaikoL2 = 0x0082D90249342980d011C58105a03b35cCb4A315;
- address public constant L1EthVault =
- 0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5;
+ PseZkVerifier public pv;
+ SgxVerifier public sv;
+ SgxAndZkVerifier public sgxZkVerifier;
+ GuardianVerifier public gv;
+ GuardianProver public gp;
+ TaikoA6TierProvider public cp;
+ Bridge public bridge;
+
+ bytes32 public GENESIS_BLOCK_HASH = keccak256("GENESIS_BLOCK_HASH");
+
+ address public L2SS = randAddress();
+ address public L2 = randAddress();
function deployTaikoL1() internal virtual returns (TaikoL1 taikoL1);
@@ -50,46 +38,127 @@ abstract contract TaikoL1TestBase is TestBase {
L1 = deployTaikoL1();
conf = L1.getConfig();
- addressManager = new AddressManager();
- addressManager.init();
+ addressManager = AddressManager(
+ deployProxy({
+ name: "address_manager",
+ impl: address(new AddressManager()),
+ data: bytes.concat(AddressManager.init.selector)
+ })
+ );
- ss = new SignalService();
- ss.init(address(addressManager));
+ ss = SignalService(
+ deployProxy({
+ name: "signal_service",
+ impl: address(new SignalService()),
+ data: bytes.concat(SignalService.init.selector)
+ })
+ );
- pv = new ProofVerifier();
- pv.init(address(addressManager));
+ pv = PseZkVerifier(
+ deployProxy({
+ name: "tier_pse_zkevm",
+ impl: address(new PseZkVerifier()),
+ data: bytes.concat(PseZkVerifier.init.selector, abi.encode(address(addressManager)))
+ })
+ );
- registerAddress("proof_verifier", address(pv));
- registerAddress("signal_service", address(ss));
- registerAddress("ether_vault", address(L1EthVault));
- registerL2Address("treasury", L2Treasury);
- registerL2Address("taiko", address(TaikoL2));
- registerL2Address("signal_service", address(L2SS));
- registerL2Address("taiko_l2", address(TaikoL2));
- registerAddress(L1.getVerifierName(100), address(new MockVerifier()));
- registerAddress(L1.getVerifierName(0), address(new MockVerifier()));
-
- tko = new TaikoToken();
- registerAddress("taiko_token", address(tko));
- address[] memory premintRecipients = new address[](1);
- premintRecipients[0] = address(this);
-
- uint256[] memory premintAmounts = new uint256[](1);
- premintAmounts[0] = 1e9 ether;
-
- tko.init(
- address(addressManager),
- "TaikoToken",
- "TKO",
- premintRecipients,
- premintAmounts
+ sv = SgxVerifier(
+ deployProxy({
+ name: "tier_sgx",
+ impl: address(new SgxVerifier()),
+ data: bytes.concat(SgxVerifier.init.selector, abi.encode(address(addressManager)))
+ })
+ );
+
+ address[] memory initSgxInstances = new address[](1);
+ initSgxInstances[0] = SGX_X_0;
+ sv.addInstances(initSgxInstances);
+
+ sgxZkVerifier = SgxAndZkVerifier(
+ deployProxy({
+ name: "tier_sgx_and_pse_zkevm",
+ impl: address(new SgxAndZkVerifier()),
+ data: bytes.concat(SgxAndZkVerifier.init.selector, abi.encode(address(addressManager)))
+ })
+ );
+
+ gv = GuardianVerifier(
+ deployProxy({
+ name: "guardian_verifier",
+ impl: address(new GuardianVerifier()),
+ data: bytes.concat(GuardianVerifier.init.selector, abi.encode(address(addressManager)))
+ })
+ );
+
+ gp = GuardianProver(
+ deployProxy({
+ name: "guardian_prover",
+ impl: address(new GuardianProver()),
+ data: bytes.concat(GuardianProver.init.selector, abi.encode(address(addressManager)))
+ })
);
- // Set protocol broker
- registerAddress("taiko", address(this));
- tko.mint(address(this), 1e9 ether);
+ setupGuardianProverMultisig();
+
+ cp = TaikoA6TierProvider(
+ deployProxy({
+ name: "tier_provider",
+ impl: address(new TaikoA6TierProvider()),
+ data: bytes.concat(TaikoA6TierProvider.init.selector)
+ })
+ );
+
+ bridge = Bridge(
+ payable(
+ deployProxy({
+ name: "bridge",
+ impl: address(new Bridge()),
+ data: bytes.concat(Bridge.init.selector, abi.encode(addressManager)),
+ registerTo: address(addressManager),
+ owner: address(0)
+ })
+ )
+ );
+
+ assignmentHook = AssignmentHook(
+ deployProxy({
+ name: "assignment_hook",
+ impl: address(new AssignmentHook()),
+ data: bytes.concat(AssignmentHook.init.selector, abi.encode(address(addressManager)))
+ })
+ );
registerAddress("taiko", address(L1));
+ registerAddress("tier_pse_zkevm", address(pv));
+ registerAddress("tier_sgx", address(sv));
+ registerAddress("tier_guardian", address(gv));
+ registerAddress("tier_sgx_and_pse_zkevm", address(sgxZkVerifier));
+ registerAddress("tier_provider", address(cp));
+ registerAddress("signal_service", address(ss));
+ registerAddress("guardian_prover", address(gp));
+ registerAddress("bridge", address(bridge));
+ registerL2Address("taiko", address(L2));
+ registerL2Address("signal_service", address(L2SS));
+ registerL2Address("taiko_l2", address(L2));
+
+ registerAddress(pv.getVerifierName(300), address(new MockVerifier()));
+
+ tko = TaikoToken(
+ deployProxy({
+ name: "taiko_token",
+ impl: address(new TaikoToken()),
+ data: bytes.concat(
+ TaikoToken.init.selector,
+ abi.encode(
+ "Taiko Token", //
+ "TTKOk",
+ address(this)
+ )
+ ),
+ registerTo: address(addressManager),
+ owner: address(0)
+ })
+ );
L1.init(address(addressManager), GENESIS_BLOCK_HASH);
printVariables("init ");
@@ -102,45 +171,64 @@ abstract contract TaikoL1TestBase is TestBase {
uint24 txListSize
)
internal
- returns (TaikoData.BlockMetadata memory meta)
+ returns (
+ TaikoData.BlockMetadata memory meta,
+ TaikoData.EthDeposit[] memory depositsProcessed
+ )
{
- TaikoData.ProverAssignment memory assignment = TaikoData
- .ProverAssignment({
- prover: prover,
+ TaikoData.TierFee[] memory tierFees = new TaikoData.TierFee[](5);
+ // Register the tier fees
+ // Based on OPL2ConfigTier we need 3:
+ // - LibTiers.TIER_PSE_ZKEVM;
+ // - LibTiers.TIER_SGX;
+ // - LibTiers.TIER_OPTIMISTIC;
+ // - LibTiers.TIER_GUARDIAN;
+ // - LibTiers.TIER_SGX_AND_PSE_ZKEVM
+ tierFees[0] = TaikoData.TierFee(LibTiers.TIER_OPTIMISTIC, 1 ether);
+ tierFees[1] = TaikoData.TierFee(LibTiers.TIER_SGX, 1 ether);
+ tierFees[2] = TaikoData.TierFee(LibTiers.TIER_PSE_ZKEVM, 2 ether);
+ tierFees[3] = TaikoData.TierFee(LibTiers.TIER_SGX_AND_PSE_ZKEVM, 2 ether);
+ tierFees[4] = TaikoData.TierFee(LibTiers.TIER_GUARDIAN, 0 ether);
+ // For the test not to fail, set the message.value to the highest, the
+ // rest will be returned
+ // anyways
+ uint256 msgValue = 2 ether;
+
+ AssignmentHook.ProverAssignment memory assignment = AssignmentHook.ProverAssignment({
+ feeToken: address(0),
+ tierFees: tierFees,
expiry: uint64(block.timestamp + 60 minutes),
- data: new bytes(0)
+ maxBlockId: 0,
+ maxProposedIn: 0,
+ metaHash: 0,
+ signature: new bytes(0)
});
- bytes memory txList = new bytes(txListSize);
- TaikoData.BlockMetadataInput memory input = TaikoData.BlockMetadataInput({
- proposer: proposer,
- txListHash: keccak256(txList),
- txListByteStart: 0,
- txListByteEnd: txListSize,
- cacheTxListInfo: false
- });
+ assignment.signature =
+ _signAssignment(prover, assignment, address(L1), keccak256(new bytes(txListSize)));
- TaikoData.StateVariables memory variables = L1.getStateVariables();
+ (, TaikoData.SlotB memory b) = L1.getStateVariables();
- uint256 _mixHash;
+ uint256 _difficulty;
unchecked {
- _mixHash = block.prevrandao * variables.numBlocks;
+ _difficulty = block.prevrandao * b.numBlocks;
}
- meta.id = variables.numBlocks;
meta.timestamp = uint64(block.timestamp);
meta.l1Height = uint64(block.number - 1);
meta.l1Hash = blockhash(block.number - 1);
- meta.mixHash = bytes32(_mixHash);
- meta.txListHash = keccak256(txList);
- meta.txListByteStart = 0;
- meta.txListByteEnd = txListSize;
+ meta.difficulty = bytes32(_difficulty);
meta.gasLimit = gasLimit;
- meta.proposer = proposer;
+
+ TaikoData.HookCall[] memory hookcalls = new TaikoData.HookCall[](1);
+
+ hookcalls[0] = TaikoData.HookCall(address(assignmentHook), abi.encode(assignment));
vm.prank(proposer, proposer);
- meta =
- L1.proposeBlock(abi.encode(input), abi.encode(assignment), txList);
+ (meta, depositsProcessed) = L1.proposeBlock{ value: msgValue }(
+ abi.encode(TaikoData.BlockParams(prover, 0, 0, 0, 0, false, 0, hookcalls)),
+ new bytes(txListSize)
+ );
}
function proveBlock(
@@ -149,90 +237,203 @@ abstract contract TaikoL1TestBase is TestBase {
TaikoData.BlockMetadata memory meta,
bytes32 parentHash,
bytes32 blockHash,
- bytes32 signalRoot
+ bytes32 signalRoot,
+ uint16 tier,
+ bytes4 revertReason
)
internal
{
- TaikoData.BlockEvidence memory evidence = TaikoData.BlockEvidence({
- metaHash: LibUtils.hashMetadata(meta),
+ TaikoData.Transition memory tran = TaikoData.Transition({
parentHash: parentHash,
blockHash: blockHash,
signalRoot: signalRoot,
- graffiti: 0x0,
- prover: prover,
- proofs: new bytes(102)
+ graffiti: 0x0
});
- bytes32 instance = LibProving.getInstance(evidence);
- uint16 verifierId = 100;
+ bytes32 instance =
+ pv.calcInstance(tran, prover, keccak256(abi.encode(meta)), meta.blobHash, 0);
+
+ TaikoData.TierProof memory proof;
+ proof.tier = tier;
+ {
+ PseZkVerifier.ZkEvmProof memory zkProof;
+ zkProof.verifierId = 300;
+ zkProof.zkp = bytes.concat(
+ bytes16(0),
+ bytes16(instance),
+ bytes16(0),
+ bytes16(uint128(uint256(instance))),
+ new bytes(100)
+ );
+
+ proof.data = abi.encode(zkProof);
+ }
- evidence.proofs = bytes.concat(
- bytes2(verifierId),
- bytes16(0),
- bytes16(instance),
- bytes16(0),
- bytes16(uint128(uint256(instance))),
- new bytes(100)
- );
+ address newInstance;
+ // Keep changing the pub key associated with an instance to avoid
+ // attacks,
+ // obviously just a mock due to 2 addresses changing all the time.
+ (newInstance,) = sv.instances(0);
+ if (newInstance == SGX_X_0) {
+ newInstance = SGX_X_1;
+ } else {
+ newInstance = SGX_X_0;
+ }
+
+ if (tier == LibTiers.TIER_SGX) {
+ bytes memory signature =
+ createSgxSignatureProof(tran, newInstance, prover, keccak256(abi.encode(meta)));
+
+ proof.data = bytes.concat(bytes4(0), bytes20(newInstance), signature);
+ }
+
+ if (tier == LibTiers.TIER_SGX_AND_PSE_ZKEVM) {
+ bytes memory signature =
+ createSgxSignatureProof(tran, newInstance, prover, keccak256(abi.encode(meta)));
+
+ bytes memory sgxProof = bytes.concat(bytes4(0), bytes20(newInstance), signature);
+ // Concatenate SGX and ZK (in this order)
+ proof.data = bytes.concat(sgxProof, proof.data);
+ }
- vm.prank(msgSender, msgSender);
- L1.proveBlock(meta.id, abi.encode(evidence));
+ if (tier == LibTiers.TIER_GUARDIAN) {
+ proof.data = "";
+
+ // Grant 2 signatures, 3rd might be a revert
+ vm.prank(David, David);
+ gp.approve(meta, tran, proof);
+ vm.prank(Emma, Emma);
+ gp.approve(meta, tran, proof);
+
+ if (revertReason != "") {
+ vm.prank(Frank, Frank);
+ vm.expectRevert(); // Revert reason is 'wrapped' so will not be
+ // identical to the expectedRevert
+ gp.approve(meta, tran, proof);
+ } else {
+ vm.prank(Frank, Frank);
+ gp.approve(meta, tran, proof);
+ }
+ } else {
+ if (revertReason != "") {
+ vm.prank(msgSender, msgSender);
+ vm.expectRevert(revertReason);
+ L1.proveBlock(meta.id, abi.encode(meta, tran, proof));
+ } else {
+ vm.prank(msgSender, msgSender);
+ L1.proveBlock(meta.id, abi.encode(meta, tran, proof));
+ }
+ }
}
- function verifyBlock(address verifier, uint64 count) internal {
- vm.prank(verifier, verifier);
+ function verifyBlock(address, uint64 count) internal {
L1.verifyBlocks(count);
}
+ function setupGuardianProverMultisig() internal {
+ address[] memory initMultiSig = new address[](5);
+ initMultiSig[0] = David;
+ initMultiSig[1] = Emma;
+ initMultiSig[2] = Frank;
+ initMultiSig[3] = Grace;
+ initMultiSig[4] = Henry;
+
+ gp.setGuardians(initMultiSig, 3);
+ }
+
function registerAddress(bytes32 nameHash, address addr) internal {
- addressManager.setAddress(block.chainid, nameHash, addr);
+ addressManager.setAddress(uint64(block.chainid), nameHash, addr);
console2.log(block.chainid, uint256(nameHash), unicode"→", addr);
}
function registerL2Address(bytes32 nameHash, address addr) internal {
addressManager.setAddress(conf.chainId, nameHash, addr);
- console2.log(
- conf.chainId, string(abi.encodePacked(nameHash)), unicode"→", addr
+ console2.log(conf.chainId, string(abi.encodePacked(nameHash)), unicode"→", addr);
+ }
+
+ function _signAssignment(
+ address signer,
+ AssignmentHook.ProverAssignment memory assignment,
+ address taikoAddr,
+ bytes32 blobHash
+ )
+ internal
+ view
+ returns (bytes memory signature)
+ {
+ uint256 signerPrivateKey;
+
+ // In the test suite these are the 3 which acts as provers
+ if (signer == Alice) {
+ signerPrivateKey = 0x1;
+ } else if (signer == Bob) {
+ signerPrivateKey = 0x2;
+ } else if (signer == Carol) {
+ signerPrivateKey = 0x3;
+ }
+
+ (uint8 v, bytes32 r, bytes32 s) = vm.sign(
+ signerPrivateKey, assignmentHook.hashAssignment(assignment, taikoAddr, blobHash)
);
+ signature = abi.encodePacked(r, s, v);
}
- function giveEthAndTko(
- address to,
- uint256 amountTko,
- uint256 amountEth
+ function createSgxSignatureProof(
+ TaikoData.Transition memory tran,
+ address newInstance,
+ address prover,
+ bytes32 metaHash
)
internal
+ view
+ returns (bytes memory signature)
{
+ bytes32 digest = sv.getSignedHash(tran, newInstance, prover, metaHash);
+
+ uint256 signerPrivateKey;
+
+ // In the test suite these are the 3 which acts as provers
+ if (SGX_X_0 == newInstance) {
+ signerPrivateKey = 0x5;
+ } else if (SGX_X_1 == newInstance) {
+ signerPrivateKey = 0x4;
+ }
+
+ (uint8 v, bytes32 r, bytes32 s) = vm.sign(signerPrivateKey, digest);
+ signature = abi.encodePacked(r, s, v);
+ }
+
+ function giveEthAndTko(address to, uint256 amountTko, uint256 amountEth) internal {
vm.deal(to, amountEth);
- console2.log("TKO balance this:", tko.balanceOf(address(this)));
- console2.log(amountTko);
tko.transfer(to, amountTko);
vm.prank(to, to);
tko.approve(address(L1), amountTko);
+ vm.prank(to, to);
+ tko.approve(address(assignmentHook), amountTko);
console2.log("TKO balance:", to, tko.balanceOf(to));
console2.log("ETH balance:", to, to.balance);
}
function printVariables(string memory comment) internal {
- TaikoData.StateVariables memory vars = L1.getStateVariables();
+ (TaikoData.SlotA memory a, TaikoData.SlotB memory b) = L1.getStateVariables();
string memory str = string.concat(
Strings.toString(logCount++),
":[",
- Strings.toString(vars.lastVerifiedBlockId),
+ Strings.toString(b.lastVerifiedBlockId),
unicode"→",
- Strings.toString(vars.numBlocks),
+ Strings.toString(b.numBlocks),
"]"
);
str = string.concat(
str,
" nextEthDepositToProcess:",
- Strings.toString(vars.nextEthDepositToProcess),
+ Strings.toString(a.nextEthDepositToProcess),
" numEthDeposits:",
- Strings.toString(vars.numEthDeposits),
+ Strings.toString(a.numEthDeposits),
" // ",
comment
);
diff --git a/packages/protocol/test/L1/TaikoToken.t.sol b/packages/protocol/test/L1/TaikoToken.t.sol
deleted file mode 100644
index 2af49e681b1..00000000000
--- a/packages/protocol/test/L1/TaikoToken.t.sol
+++ /dev/null
@@ -1,263 +0,0 @@
-// SPDX-License-Identifier: MIT
-pragma solidity ^0.8.20;
-
-import { TestBase } from "../TestBase.sol";
-import { AddressManager } from "../../contracts/common/AddressManager.sol";
-import { AddressResolver } from "../../contracts/common/AddressResolver.sol";
-import { TaikoToken } from "../../contracts/L1/TaikoToken.sol";
-import { TransparentUpgradeableProxy } from
- "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
-
-contract TaikoTokenTest is TestBase {
- bytes32 GENESIS_BLOCK_HASH;
-
- address public tokenOwner;
- address public taikoL1;
-
- AddressManager public addressManager;
- TransparentUpgradeableProxy public tokenProxy;
- TaikoToken public tko;
- TaikoToken public tkoUpgradedImpl;
-
- function setUp() public {
- GENESIS_BLOCK_HASH = getRandomBytes32();
-
- tokenOwner = getRandomAddress();
- taikoL1 = getRandomAddress();
-
- addressManager = new AddressManager();
- addressManager.init();
- _registerAddress("taiko", taikoL1);
-
- tko = new TaikoToken();
-
- address[] memory premintRecipients = new address[](2);
- premintRecipients[0] = Yasmine;
- premintRecipients[1] = Zachary;
-
- uint256[] memory premintAmounts = new uint256[](2);
- premintAmounts[0] = 5 ether;
- premintAmounts[1] = 5 ether;
-
- tokenProxy = _deployViaProxy(
- address(tko),
- bytes.concat(
- tko.init.selector,
- abi.encode(
- address(addressManager),
- "Taiko Token",
- "TKO",
- premintRecipients,
- premintAmounts
- )
- )
- );
-
- tko = TaikoToken(address(tokenProxy));
- }
-
- function test_TaikoToken_proper_premint() public {
- assertEq(tko.balanceOf(Yasmine), 5 ether);
-
- assertEq(tko.balanceOf(Zachary), 5 ether);
- }
-
- function test_TaikoToken_upgrade() public {
- tkoUpgradedImpl = new TaikoToken();
-
- vm.prank(tokenOwner);
- tokenProxy.upgradeTo(address(tkoUpgradedImpl));
-
- // Check if balance is still same
- assertEq(tko.balanceOf(Yasmine), 5 ether);
- assertEq(tko.balanceOf(Zachary), 5 ether);
- }
-
- function test_TaikoToken_upgrade_without_admin_rights() public {
- tkoUpgradedImpl = new TaikoToken();
-
- vm.expectRevert();
- tokenProxy.upgradeTo(address(tkoUpgradedImpl));
- }
-
- function test_TaikoToken_mint() public {
- assertEq(tko.balanceOf(Emma), 0 ether);
-
- uint256 amountToMint = 1 ether;
- vm.prank(taikoL1);
- tko.mint(Emma, amountToMint);
- assertEq(tko.balanceOf(Emma), amountToMint);
- }
-
- function test_TaikoToken_mint_invalid_address() public {
- vm.prank(taikoL1);
- vm.expectRevert("ERC20: mint to the zero address");
- tko.mint(address(0), 1 ether);
- }
-
- function test_TaikoToken_mint_not_taiko_l1() public {
- vm.expectRevert(AddressResolver.RESOLVER_DENIED.selector);
- tko.mint(Emma, 1 ether);
- }
-
- function test_TaikoToken_burn() public {
- uint256 amountToMint = 1 ether;
- vm.prank(taikoL1);
- tko.mint(Emma, amountToMint);
- assertEq(tko.balanceOf(Emma), amountToMint);
-
- vm.prank(taikoL1);
- tko.burn(Emma, amountToMint);
- assertEq(tko.balanceOf(Emma), 0);
- }
-
- function test_TaikoToken_burn_not_taiko_l1() public {
- vm.expectRevert(AddressResolver.RESOLVER_DENIED.selector);
- tko.burn(address(0), 1 ether);
- }
-
- function test_TaikoToken_burn_amount_exceeded() public {
- uint256 amountToMint = 1 ether;
- vm.prank(taikoL1);
- tko.mint(Emma, amountToMint);
- assertEq(tko.balanceOf(Emma), amountToMint);
- }
-
- function test_TaikoToken_transfer() public {
- uint256 amountToMint = 1 ether;
- vm.prank(taikoL1);
- tko.mint(Emma, amountToMint);
- assertEq(tko.balanceOf(Emma), amountToMint);
-
- vm.prank(Emma);
- tko.transfer(David, amountToMint);
-
- assertEq(tko.balanceOf(Emma), 0);
- assertEq(tko.balanceOf(David), amountToMint);
- }
-
- function test_TaikoToken_transfer_invalid_address() public {
- uint256 amountToMint = 1 ether;
- vm.prank(taikoL1);
- tko.mint(Emma, amountToMint);
- assertEq(tko.balanceOf(Emma), amountToMint);
-
- vm.prank(Emma);
- vm.expectRevert("ERC20: transfer to the zero address");
- tko.transfer(address(0), amountToMint);
- }
-
- function test_TaikoToken_transfer_to_contract_address() public {
- uint256 amountToMint = 1 ether;
- vm.prank(taikoL1);
- tko.mint(Emma, amountToMint);
- assertEq(tko.balanceOf(Emma), amountToMint);
-
- vm.prank(Emma);
- vm.expectRevert(TaikoToken.TKO_INVALID_ADDR.selector);
- tko.transfer(address(tko), amountToMint);
- }
-
- function test_TaikoToken_transfer_amount_exceeded() public {
- uint256 amountToMint = 1 ether;
- uint256 amountToTransfer = 2 ether;
- vm.prank(taikoL1);
- tko.mint(Emma, amountToMint);
- assertEq(tko.balanceOf(Emma), amountToMint);
-
- vm.prank(Emma);
- vm.expectRevert();
- tko.transfer(address(tko), amountToTransfer);
- assertEq(tko.balanceOf(Emma), amountToMint);
- }
-
- function test_TaikoToken_transferFrom() public {
- uint256 amountToMint = 1 ether;
- vm.prank(taikoL1);
- tko.mint(Emma, amountToMint);
- assertEq(tko.balanceOf(Emma), amountToMint);
-
- vm.prank(Emma);
- tko.approve(David, 1 ether);
-
- vm.prank(David);
- tko.transferFrom(Emma, David, amountToMint);
-
- assertEq(tko.balanceOf(Emma), 0);
- assertEq(tko.balanceOf(David), amountToMint);
- }
-
- function test_TaikoToken_transferFrom_to_is_invalid() public {
- uint256 amountToMint = 1 ether;
- vm.prank(taikoL1);
- tko.mint(Emma, amountToMint);
- assertEq(tko.balanceOf(Emma), amountToMint);
-
- vm.prank(Emma);
- tko.approve(David, 1 ether);
-
- vm.prank(David);
- vm.expectRevert("ERC20: transfer to the zero address");
- tko.transferFrom(Emma, address(0), amountToMint);
- }
-
- function test_TaikoToken_transferFrom_to_is_the_contract() public {
- uint256 amountToMint = 1 ether;
- vm.prank(taikoL1);
- tko.mint(Emma, amountToMint);
- assertEq(tko.balanceOf(Emma), amountToMint);
-
- vm.prank(Emma);
- tko.approve(David, 1 ether);
-
- vm.prank(David);
- vm.expectRevert(TaikoToken.TKO_INVALID_ADDR.selector);
- tko.transferFrom(Emma, address(tko), amountToMint);
- }
-
- function test_TaikoToken_transferFrom_from_is_invalid() public {
- uint256 amountToMint = 1 ether;
- vm.prank(taikoL1);
- tko.mint(Emma, amountToMint);
- assertEq(tko.balanceOf(Emma), amountToMint);
-
- vm.prank(Emma);
- tko.approve(David, 1 ether);
-
- vm.prank(David);
- // transferFrom(address(0)) will always throw has no allowance
- vm.expectRevert("ERC20: insufficient allowance");
- tko.transferFrom(address(0), David, amountToMint);
- }
-
- function test_TaikoToken_transferFrom_amount_exceeded() public {
- uint256 amountToMint = 1 ether;
- uint256 amountToTransfer = 2 ether;
- vm.prank(taikoL1);
- tko.mint(Emma, amountToMint);
- assertEq(tko.balanceOf(Emma), amountToMint);
-
- vm.prank(Emma);
- vm.expectRevert();
- tko.transfer(address(tko), amountToTransfer);
- assertEq(tko.balanceOf(Emma), amountToMint);
- }
-
- function _registerAddress(bytes32 nameHash, address addr) private {
- addressManager.setAddress(block.chainid, nameHash, addr);
- }
-
- function _deployViaProxy(
- address implementation,
- bytes memory data
- )
- private
- returns (TransparentUpgradeableProxy)
- {
- return new TransparentUpgradeableProxy(
- implementation,
- tokenOwner,
- data
- );
- }
-}
diff --git a/packages/protocol/test/L2/Lib1559Math.t.sol b/packages/protocol/test/L2/Lib1559Math.t.sol
new file mode 100644
index 00000000000..474af869c00
--- /dev/null
+++ b/packages/protocol/test/L2/Lib1559Math.t.sol
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.20;
+
+import "../TaikoTest.sol";
+
+contract TestLib1559Math is TaikoTest {
+ using LibMath for uint256;
+
+ function test_eip1559_math() external {
+ uint256 gasTarget = 15 * 1e6 * 10;
+ uint256 adjustmentQuotient = 8;
+ uint256 adjustmentFactor = gasTarget * adjustmentQuotient;
+ // The expected values are calculated in eip1559_util.py
+ _assertAmostEq(
+ 999_999_916,
+ Lib1559Math.basefee({ gasExcess: 49_954_623_777, adjustmentFactor: adjustmentFactor })
+ );
+
+ _assertAmostEq(
+ 48_246_703_821_869_050_543_408_253_349_256_099_602_613_005_189_120,
+ Lib1559Math.basefee({
+ gasExcess: LibFixedPointMath.MAX_EXP_INPUT * adjustmentFactor
+ / LibFixedPointMath.SCALING_FACTOR,
+ adjustmentFactor: adjustmentFactor
+ })
+ );
+ }
+
+ // Assert the different between two number is smaller than 1/1000000
+ function _assertAmostEq(uint256 a, uint256 b) private {
+ uint256 min = a.min(b);
+ uint256 max = a.max(b);
+ assertTrue(max > 0 && ((max - min) * 1_000_000) / max <= 1);
+ console2.log(a, " <> ", b);
+ }
+}
diff --git a/packages/protocol/test/L2/TaikoL2.t.sol b/packages/protocol/test/L2/TaikoL2.t.sol
index 2be6ed56649..e62b3fe2115 100644
--- a/packages/protocol/test/L2/TaikoL2.t.sol
+++ b/packages/protocol/test/L2/TaikoL2.t.sol
@@ -1,51 +1,78 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
-import { console2 } from "forge-std/console2.sol";
-import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
-import { SafeCastUpgradeable } from
- "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
-import { TestBase } from "../TestBase.sol";
-import { TaikoL2 } from "../../contracts/L2/TaikoL2.sol";
+import "../TaikoTest.sol";
-contract TestTaikoL2 is TestBase {
- using SafeCastUpgradeable for uint256;
+contract SkipBasefeeCheckL2 is TaikoL2EIP1559Configurable {
+ function skipFeeCheck() public pure override returns (bool) {
+ return true;
+ }
+}
+contract TestTaikoL2 is TaikoTest {
+ using SafeCast for uint256;
+
+ // Initial salt for semi-random generation
+ uint256 salt = 2_195_684_615_435_261_315_311;
// same as `block_gas_limit` in foundry.toml
uint32 public constant BLOCK_GAS_LIMIT = 30_000_000;
- TaikoL2 public L2;
- uint256 private logIndex;
+ AddressManager public addressManager;
+ SignalService public ss;
+ TaikoL2EIP1559Configurable public L2;
+ SkipBasefeeCheckL2 public L2skip;
function setUp() public {
- uint16 rand = 2;
- TaikoL2.EIP1559Params memory param1559 = TaikoL2.EIP1559Params({
- basefee: (uint256(BLOCK_GAS_LIMIT * 10) * rand).toUint64(),
- gasIssuedPerSecond: 1_000_000,
- gasExcessMax: (uint256(15_000_000) * 256 * rand).toUint64(),
- gasTarget: (uint256(6_000_000) * rand).toUint64(),
- ratio2x1x: 11_177
- });
-
- L2 = new TaikoL2();
- address dummyAddressManager = getRandomAddress();
- L2.init(dummyAddressManager, param1559);
+ addressManager = AddressManager(
+ deployProxy({
+ name: "address_manager",
+ impl: address(new AddressManager()),
+ data: bytes.concat(AddressManager.init.selector)
+ })
+ );
+
+ ss = SignalService(
+ deployProxy({
+ name: "signal_service",
+ impl: address(new SignalService()),
+ data: bytes.concat(SignalService.init.selector),
+ registerTo: address(addressManager),
+ owner: address(0)
+ })
+ );
+
+ uint64 gasExcess = 0;
+ uint8 quotient = 8;
+ uint32 gasTarget = 60_000_000;
+
+ L2 = TaikoL2EIP1559Configurable(
+ deployProxy({
+ name: "taiko_l2",
+ impl: address(new TaikoL2EIP1559Configurable()),
+ data: bytes.concat(TaikoL2.init.selector, abi.encode(address(ss), gasExcess))
+ })
+ );
+
+ L2.setConfigAndExcess(TaikoL2.Config(gasTarget, quotient), gasExcess);
+
+ gasExcess = 195_420_300_100;
+ L2skip = SkipBasefeeCheckL2(
+ deployProxy({
+ name: "taiko_l2",
+ impl: address(new SkipBasefeeCheckL2()),
+ data: bytes.concat(TaikoL2.init.selector, abi.encode(address(ss), gasExcess))
+ })
+ );
+
+ L2skip.setConfigAndExcess(TaikoL2.Config(gasTarget, quotient), gasExcess);
vm.roll(block.number + 1);
vm.warp(block.timestamp + 30);
}
function test_L2_AnchorTx_with_constant_block_time() external {
- uint256 firstBasefee;
- for (uint256 i = 0; i < 100; i++) {
- uint256 basefee = _getBasefeeAndPrint2(0, BLOCK_GAS_LIMIT);
- vm.fee(basefee);
-
- if (firstBasefee == 0) {
- firstBasefee = basefee;
- } else {
- assertEq(firstBasefee, basefee);
- }
+ for (uint256 i; i < 100; ++i) {
+ vm.fee(1);
vm.prank(L2.GOLDEN_TOUCH_ADDRESS());
_anchor(BLOCK_GAS_LIMIT);
@@ -56,14 +83,8 @@ contract TestTaikoL2 is TestBase {
}
function test_L2_AnchorTx_with_decreasing_block_time() external {
- uint256 prevBasefee;
-
- for (uint256 i = 0; i < 32; i++) {
- uint256 basefee = _getBasefeeAndPrint2(0, BLOCK_GAS_LIMIT);
- vm.fee(basefee);
-
- assertGe(basefee, prevBasefee);
- prevBasefee = basefee;
+ for (uint256 i; i < 32; ++i) {
+ vm.fee(1);
vm.prank(L2.GOLDEN_TOUCH_ADDRESS());
_anchor(BLOCK_GAS_LIMIT);
@@ -74,16 +95,8 @@ contract TestTaikoL2 is TestBase {
}
function test_L2_AnchorTx_with_increasing_block_time() external {
- uint256 prevBasefee;
-
- for (uint256 i = 0; i < 30; i++) {
- uint256 basefee = _getBasefeeAndPrint2(0, BLOCK_GAS_LIMIT);
- vm.fee(basefee);
-
- if (prevBasefee != 0) {
- assertLe(basefee, prevBasefee);
- }
- prevBasefee = basefee;
+ for (uint256 i; i < 30; ++i) {
+ vm.fee(1);
vm.prank(L2.GOLDEN_TOUCH_ADDRESS());
_anchor(BLOCK_GAS_LIMIT);
@@ -94,10 +107,109 @@ contract TestTaikoL2 is TestBase {
}
}
+ function test_simulation_lower_traffic() external {
+ console2.log("LOW TRAFFIC STARTS"); // For parser
+ _simulation(100_000, 10_000_000, 1, 8);
+ console2.log("LOW TRAFFIC ENDS");
+ }
+
+ function test_simulation_higher_traffic() external {
+ console2.log("HIGH TRAFFIC STARTS"); // For parser
+ _simulation(100_000, 120_000_000, 1, 8);
+ console2.log("HIGH TRAFFIC ENDS");
+ }
+
+ function test_simulation_target_traffic() external {
+ console2.log("TARGET TRAFFIC STARTS"); // For parser
+ _simulation(60_000_000, 0, 12, 0);
+ console2.log("TARGET TRAFFIC ENDS");
+ }
+
+ function _simulation(
+ uint256 minGas,
+ uint256 maxDiffToMinGas,
+ uint8 quickest,
+ uint8 maxDiffToQuickest
+ )
+ internal
+ {
+ // We need to randomize the:
+ // - parent gas used (We should sometimes exceed 150.000.000 gas / 12
+ // seconds (to simulate congestion a bit) !!)
+ // - the time we fire away an L2 block (anchor transaction).
+ // The rest is baked in.
+ // initial gas excess issued: 49954623777 (from eip1559_util.py) if we
+ // want to stick to the params of 10x Ethereum gas, etc.
+
+ // This variables counts if we reached the 12seconds (L1) height, if so
+ // then resets the accumulated parent gas used and increments the L1
+ // height number
+ uint8 accumulated_seconds = 0;
+ uint256 accumulated_parent_gas_per_l1_block = 0;
+ uint64 l1Height = uint64(block.number);
+ uint64 l1BlockCounter = 0;
+ uint64 maxL2BlockCount = 180;
+ uint256 allBaseFee = 0;
+ uint256 allGasUsed = 0;
+ uint256 newRandomWithoutSalt;
+ // Simulate 200 L2 blocks
+ for (uint256 i; i < maxL2BlockCount; ++i) {
+ newRandomWithoutSalt = uint256(
+ keccak256(
+ abi.encodePacked(
+ block.prevrandao, msg.sender, block.timestamp, i, newRandomWithoutSalt, salt
+ )
+ )
+ );
+
+ uint32 currentGasUsed;
+ if (maxDiffToMinGas == 0) {
+ currentGasUsed = uint32(minGas);
+ } else {
+ currentGasUsed =
+ uint32(pickRandomNumber(newRandomWithoutSalt, minGas, maxDiffToMinGas));
+ }
+ salt = uint256(keccak256(abi.encodePacked(currentGasUsed, salt)));
+ accumulated_parent_gas_per_l1_block += currentGasUsed;
+ allGasUsed += currentGasUsed;
+
+ uint8 currentTimeAhead;
+ if (maxDiffToQuickest == 0) {
+ currentTimeAhead = uint8(quickest);
+ } else {
+ currentTimeAhead =
+ uint8(pickRandomNumber(newRandomWithoutSalt, quickest, maxDiffToQuickest));
+ }
+ accumulated_seconds += currentTimeAhead;
+
+ if (accumulated_seconds >= 12) {
+ console2.log(
+ "Gas used per L1 block:", l1Height, ":", accumulated_parent_gas_per_l1_block
+ );
+ l1Height++;
+ l1BlockCounter++;
+ accumulated_parent_gas_per_l1_block = 0;
+ accumulated_seconds = 0;
+ }
+
+ vm.prank(L2.GOLDEN_TOUCH_ADDRESS());
+ _anchorSimulation(currentGasUsed, l1Height);
+ uint256 currentBaseFee = L2skip.getBasefee(l1Height, currentGasUsed);
+ allBaseFee += currentBaseFee;
+ console2.log("Actual gas in L2 block is:", currentGasUsed);
+ console2.log("L2block to baseFee is:", i, ":", currentBaseFee);
+ vm.roll(block.number + 1);
+
+ vm.warp(block.timestamp + currentTimeAhead);
+ }
+
+ console2.log("Average wei gas price per L2 block is:", (allBaseFee / maxL2BlockCount));
+ console2.log("Average gasUsed per L1 block:", (allGasUsed / l1BlockCounter));
+ }
+
// calling anchor in the same block more than once should fail
function test_L2_AnchorTx_revert_in_same_block() external {
- uint256 expectedBasefee = _getBasefeeAndPrint2(0, BLOCK_GAS_LIMIT);
- vm.fee(expectedBasefee);
+ vm.fee(1);
vm.prank(L2.GOLDEN_TOUCH_ADDRESS());
_anchor(BLOCK_GAS_LIMIT);
@@ -109,8 +221,7 @@ contract TestTaikoL2 is TestBase {
// calling anchor in the same block more than once should fail
function test_L2_AnchorTx_revert_from_wrong_signer() external {
- uint256 expectedBasefee = _getBasefeeAndPrint2(0, BLOCK_GAS_LIMIT);
- vm.fee(expectedBasefee);
+ vm.fee(1);
vm.expectRevert();
_anchor(BLOCK_GAS_LIMIT);
}
@@ -131,68 +242,34 @@ contract TestTaikoL2 is TestBase {
L2.signAnchor(digest, uint8(3));
}
- function test_L2_getBasefee() external {
- uint64 timeSinceParent = uint64(block.timestamp - L2.parentTimestamp());
- assertEq(_getBasefeeAndPrint(timeSinceParent, 0), 317_609_019);
-
- timeSinceParent += 100;
- assertEq(_getBasefeeAndPrint(timeSinceParent, 0), 54_544_902);
-
- timeSinceParent += 10_000;
- assertEq(_getBasefeeAndPrint(timeSinceParent, 0), 1);
+ function _anchor(uint32 parentGasLimit) private {
+ bytes32 l1Hash = randBytes32();
+ bytes32 l1SignalRoot = randBytes32();
+ L2.anchor(l1Hash, l1SignalRoot, 12_345, parentGasLimit);
}
- function _getBasefeeAndPrint(
- uint64 timeSinceParent,
- uint32 parentGasUsed
- )
- private
- returns (uint256 _basefee)
- {
- uint256 gasIssued =
- L2.getEIP1559Config().gasIssuedPerSecond * timeSinceParent;
- string memory _msg = string.concat(
- "#",
- Strings.toString(logIndex++),
- ": gasExcess=",
- Strings.toString(L2.gasExcess()),
- ", timeSinceParent=",
- Strings.toString(timeSinceParent),
- ", gasIssued=",
- Strings.toString(gasIssued),
- ", parentGasUsed=",
- Strings.toString(parentGasUsed)
- );
- _basefee = L2.getBasefee(timeSinceParent, parentGasUsed);
- assertTrue(_basefee != 0);
-
- _msg = string.concat(
- _msg,
- ", gasExcess(changed)=",
- Strings.toString(L2.gasExcess()),
- ", basefee=",
- Strings.toString(_basefee)
- );
+ function _anchorSimulation(uint32 parentGasLimit, uint64 l1Height) private {
+ bytes32 l1Hash = randBytes32();
+ bytes32 l1SignalRoot = randBytes32();
+ L2skip.anchor(l1Hash, l1SignalRoot, l1Height, parentGasLimit);
+ }
- console2.log(_msg);
+ function registerAddress(bytes32 nameHash, address addr) internal {
+ addressManager.setAddress(uint64(block.chainid), nameHash, addr);
+ console2.log(block.chainid, uint256(nameHash), unicode"→", addr);
}
- function _getBasefeeAndPrint2(
- uint32 timeSinceNow,
- uint32 gasLimit
+ // Semi-random number generator
+ function pickRandomNumber(
+ uint256 randomNum,
+ uint256 lowerLimit,
+ uint256 diffBtwLowerAndUpperLimit
)
- private
- returns (uint256 _basefee)
+ internal
+ view
+ returns (uint256)
{
- return _getBasefeeAndPrint(
- uint32(timeSinceNow + block.timestamp - L2.parentTimestamp()),
- gasLimit
- );
- }
-
- function _anchor(uint32 parentGasLimit) private {
- bytes32 l1Hash = getRandomBytes32();
- bytes32 l1SignalRoot = getRandomBytes32();
- L2.anchor(l1Hash, l1SignalRoot, 12_345, parentGasLimit);
+ randomNum = uint256(keccak256(abi.encodePacked(randomNum, salt)));
+ return (lowerLimit + (randomNum % diffBtwLowerAndUpperLimit));
}
}
diff --git a/packages/protocol/test/L2/TaikoL2_1559.t.sol b/packages/protocol/test/L2/TaikoL2_1559.t.sol
deleted file mode 100644
index fe12a5af86e..00000000000
--- a/packages/protocol/test/L2/TaikoL2_1559.t.sol
+++ /dev/null
@@ -1,57 +0,0 @@
-// SPDX-License-Identifier: MIT
-pragma solidity ^0.8.20;
-
-import { console2 } from "forge-std/console2.sol";
-import { TestBase } from "../TestBase.sol";
-import { TaikoL2 } from "../../contracts/L2/TaikoL2.sol";
-
-contract TestTaikoL2_1559 is TestBase {
- function test_1559ParamCalculation() external {
- // Assume we scale L1 throughput by 10 times.
- uint64 scaleFactor = 10;
-
- // Assume we lower the L1 transaction cost by 25 times.
- uint64 costFactor = 25;
-
- // Calculate gas space issuance per second
- uint64 ethereumBlockGasTarget = 15_000_000;
- uint64 ethereumBlockTime = 12;
-
- // https://ultrasound.money/
- uint64 ethereumBasefeeNow = 28_000_000_000; // 28Gwei
-
- uint32 gasIssuedPerSecond =
- uint32(scaleFactor * ethereumBlockGasTarget / ethereumBlockTime);
-
- // Tune this number manually so ratio2x1x is ~112.5%.
- uint64 maxSeconds = 7272;
-
- uint64 gasExcessMax = gasIssuedPerSecond * maxSeconds;
-
- uint64 initialBasefee = ethereumBasefeeNow / costFactor;
-
- TaikoL2.EIP1559Params memory param1559 = TaikoL2.EIP1559Params({
- basefee: initialBasefee,
- gasIssuedPerSecond: gasIssuedPerSecond,
- gasExcessMax: gasExcessMax,
- gasTarget: gasIssuedPerSecond * ethereumBlockTime,
- ratio2x1x: 11_250 // ~12.5% increase
- });
-
- console2.log("basefee :", param1559.basefee);
- console2.log("gasIssuedPerSecond:", param1559.gasIssuedPerSecond);
- console2.log("gasExcessMax :", param1559.gasExcessMax);
- console2.log("gasTarget :", param1559.gasTarget);
- console2.log("ratio2x1x :", param1559.ratio2x1x);
-
- // basefee : 1120000000
- // gasIssuedPerSecond: 12500000
- // gasExcessMax : 90900000000
- // gasTarget : 150000000
- // ratio2x1x : 11250
-
- TaikoL2 L2 = new TaikoL2();
- address dummyAddressManager = getRandomAddress();
- L2.init(dummyAddressManager, param1559);
- }
-}
diff --git a/packages/protocol/test/TaikoTest.sol b/packages/protocol/test/TaikoTest.sol
new file mode 100644
index 00000000000..78683952499
--- /dev/null
+++ b/packages/protocol/test/TaikoTest.sol
@@ -0,0 +1,86 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.20;
+
+import "forge-std/Test.sol";
+import "forge-std/console2.sol";
+
+import "lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
+
+import "../contracts/thirdparty/LibFixedPointMath.sol";
+
+import "../contracts/bridge/Bridge.sol";
+import "../contracts/signal/SignalService.sol";
+import "../contracts/tokenvault/BridgedERC20.sol";
+import "../contracts/tokenvault/BridgedERC721.sol";
+import "../contracts/tokenvault/BridgedERC1155.sol";
+import "../contracts/tokenvault/ERC20Vault.sol";
+import "../contracts/tokenvault/ERC721Vault.sol";
+import "../contracts/tokenvault/ERC1155Vault.sol";
+
+import "../contracts/L1/TaikoToken.sol";
+import "../contracts/L1/TaikoL1.sol";
+import "../contracts/L1/verifiers/SgxVerifier.sol";
+import "../contracts/L1/verifiers/GuardianVerifier.sol";
+import "../contracts/L1/verifiers/PseZkVerifier.sol";
+import "../contracts/L1/verifiers/SgxAndZkVerifier.sol";
+import "../contracts/L1/tiers/TaikoA6TierProvider.sol";
+import "../contracts/L1/tiers/ITierProvider.sol";
+import "../contracts/L1/tiers/ITierProvider.sol";
+import "../contracts/L1/hooks/AssignmentHook.sol";
+import "../contracts/L1/provers/GuardianProver.sol";
+
+import "../contracts/L2/Lib1559Math.sol";
+import "../contracts/L2/TaikoL2EIP1559Configurable.sol";
+import "../contracts/L2/TaikoL2.sol";
+
+import "../contracts/team/TimelockTokenPool.sol";
+import "../contracts/team/airdrop/ERC20Airdrop.sol";
+import "../contracts/team/airdrop/ERC20Airdrop2.sol";
+
+import "../contracts/test/erc20/FreeMintERC20.sol";
+
+import "./DeployCapability.sol";
+import "./HelperContracts.sol";
+
+abstract contract TaikoTest is Test, DeployCapability {
+ uint256 private _seed = 0x12345678;
+ address internal Alice = vm.addr(0x1);
+ address internal Bob = vm.addr(0x2);
+ address internal Carol = vm.addr(0x3);
+ address internal David = randAddress();
+ address internal Emma = randAddress();
+ address internal Frank = randAddress();
+ address internal Grace = randAddress();
+ address internal Henry = randAddress();
+ address internal Isabella = randAddress();
+ address internal James = randAddress();
+ address internal Katherine = randAddress();
+ address internal Liam = randAddress();
+ address internal Mia = randAddress();
+ address internal Noah = randAddress();
+ address internal Olivia = randAddress();
+ address internal Patrick = randAddress();
+ address internal Quinn = randAddress();
+ address internal Rachel = randAddress();
+ address internal Samuel = randAddress();
+ address internal Taylor = randAddress();
+ address internal Ulysses = randAddress();
+ address internal Victoria = randAddress();
+ address internal William = randAddress();
+ address internal Xavier = randAddress();
+ address internal Yasmine = randAddress();
+ address internal Zachary = randAddress();
+ address internal SGX_X_0 = vm.addr(0x4);
+ address internal SGX_X_1 = vm.addr(0x5);
+ address internal SGX_Y = randAddress();
+ address internal SGX_Z = randAddress();
+
+ function randAddress() internal returns (address) {
+ bytes32 randomHash = keccak256(abi.encodePacked("address", _seed++));
+ return address(bytes20(randomHash));
+ }
+
+ function randBytes32() internal returns (bytes32) {
+ return keccak256(abi.encodePacked("bytes32", _seed++));
+ }
+}
diff --git a/packages/protocol/test/TestBase.sol b/packages/protocol/test/TestBase.sol
deleted file mode 100644
index 6573e297580..00000000000
--- a/packages/protocol/test/TestBase.sol
+++ /dev/null
@@ -1,108 +0,0 @@
-// SPDX-License-Identifier: MIT
-pragma solidity ^0.8.20;
-
-import { Test } from "forge-std/Test.sol";
-import { Bridge } from "../contracts/bridge/Bridge.sol";
-import { ICrossChainSync } from "../contracts/common/ICrossChainSync.sol";
-
-abstract contract TestBase is Test {
- uint256 private _seed = 0x12345678;
-
- function getRandomAddress() internal returns (address) {
- bytes32 randomHash = keccak256(abi.encodePacked("address", _seed++));
- return address(bytes20(randomHash));
- }
-
- function getRandomBytes32() internal returns (bytes32) {
- return keccak256(abi.encodePacked("bytes32", _seed++));
- }
-
- function getRandomUint256() internal returns (uint256) {
- return uint256(keccak256(abi.encodePacked("uint256", _seed++)));
- }
-
- address internal Alice = getRandomAddress();
- address internal Bob = getRandomAddress();
- address internal Carol = getRandomAddress();
- address internal David = getRandomAddress();
- address internal Emma = getRandomAddress();
- address internal Frank = getRandomAddress();
- address internal Grace = getRandomAddress();
- address internal Henry = getRandomAddress();
- address internal Isabella = getRandomAddress();
- address internal James = getRandomAddress();
- address internal Katherine = getRandomAddress();
- address internal Liam = getRandomAddress();
- address internal Mia = getRandomAddress();
- address internal Noah = getRandomAddress();
- address internal Olivia = getRandomAddress();
- address internal Patrick = getRandomAddress();
- address internal Quinn = getRandomAddress();
- address internal Rachel = getRandomAddress();
- address internal Samuel = getRandomAddress();
- address internal Taylor = getRandomAddress();
- address internal Ulysses = getRandomAddress();
- address internal Victoria = getRandomAddress();
- address internal William = getRandomAddress();
- address internal Xavier = getRandomAddress();
- address internal Yasmine = getRandomAddress();
- address internal Zachary = getRandomAddress();
-}
-
-contract BadReceiver {
- receive() external payable {
- revert("can not send to this contract");
- }
-
- fallback() external payable {
- revert("can not send to this contract");
- }
-
- function transfer() public pure {
- revert("this fails");
- }
-}
-
-contract GoodReceiver {
- receive() external payable { }
-
- function forward(address addr) public payable {
- payable(addr).transfer(address(this).balance / 2);
- }
-}
-
-// NonNftContract
-contract NonNftContract {
- uint256 dummyData;
-
- constructor(uint256 _dummyData) {
- dummyData = _dummyData;
- }
-}
-
-contract SkipProofCheckBridge is Bridge {
- function shouldCheckProof() internal pure override returns (bool) {
- return false;
- }
-}
-
-contract DummyCrossChainSync is ICrossChainSync {
- bytes32 private _blockHash;
- bytes32 private _signalRoot;
-
- function setCrossChainBlockHeader(bytes32 blockHash) external {
- _blockHash = blockHash;
- }
-
- function setCrossChainSignalRoot(bytes32 signalRoot) external {
- _signalRoot = signalRoot;
- }
-
- function getCrossChainBlockHash(uint64) external view returns (bytes32) {
- return _blockHash;
- }
-
- function getCrossChainSignalRoot(uint64) external view returns (bytes32) {
- return _signalRoot;
- }
-}
diff --git a/packages/protocol/test/bridge/Bridge.t.sol b/packages/protocol/test/bridge/Bridge.t.sol
index 28cd13a4860..94af9f847b6 100644
--- a/packages/protocol/test/bridge/Bridge.t.sol
+++ b/packages/protocol/test/bridge/Bridge.t.sol
@@ -1,71 +1,101 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
-import { AddressManager } from "../../contracts/common/AddressManager.sol";
-import { IBridge, Bridge } from "../../contracts/bridge/Bridge.sol";
-import { BridgeErrors } from "../../contracts/bridge/BridgeErrors.sol";
-import { EtherVault } from "../../contracts/bridge/EtherVault.sol";
-import { console2 } from "forge-std/console2.sol";
-import { LibBridgeStatus } from
- "../../contracts/bridge/libs/LibBridgeStatus.sol";
-import { SignalService } from "../../contracts/signal/SignalService.sol";
-import {
- TestBase,
- SkipProofCheckBridge,
- DummyCrossChainSync,
- GoodReceiver,
- BadReceiver
-} from "../TestBase.sol";
-
-contract BridgeTest is TestBase {
+import "../TaikoTest.sol";
+
+// A contract which is not our ErcXXXTokenVault
+// Which in such case, the sent funds are still recoverable, but not via the
+// onMessageRecall() but Bridge will send it back
+contract UntrustedSendMessageRelayer {
+ function sendMessage(
+ address bridge,
+ IBridge.Message memory message,
+ uint256 message_value
+ )
+ public
+ {
+ IBridge(bridge).sendMessage{ value: message_value }(message);
+ }
+}
+
+contract BridgeTest is TaikoTest {
AddressManager addressManager;
BadReceiver badReceiver;
GoodReceiver goodReceiver;
Bridge bridge;
Bridge destChainBridge;
- EtherVault etherVault;
SignalService signalService;
DummyCrossChainSync crossChainSync;
- SkipProofCheckBridge mockProofBridge;
- uint256 destChainId = 19_389;
+ SkipProofCheckSignal mockProofSignalService;
+ UntrustedSendMessageRelayer untrustedSenderContract;
+ uint64 destChainId = 19_389;
function setUp() public {
vm.startPrank(Alice);
vm.deal(Alice, 100 ether);
- addressManager = new AddressManager();
- addressManager.init();
-
- bridge = new Bridge();
- bridge.init(address(addressManager));
- destChainBridge = new Bridge();
- destChainBridge.init(address(addressManager));
+ addressManager = AddressManager(
+ deployProxy({
+ name: "address_manager",
+ impl: address(new AddressManager()),
+ data: bytes.concat(AddressManager.init.selector)
+ })
+ );
- vm.deal(address(destChainBridge), 100 ether);
+ bridge = Bridge(
+ payable(
+ deployProxy({
+ name: "bridge",
+ impl: address(new Bridge()),
+ data: bytes.concat(Bridge.init.selector, abi.encode(addressManager)),
+ registerTo: address(addressManager),
+ owner: address(0)
+ })
+ )
+ );
- mockProofBridge = new SkipProofCheckBridge();
- mockProofBridge.init(address(addressManager));
+ destChainBridge = Bridge(
+ payable(
+ deployProxy({
+ name: "bridge",
+ impl: address(new Bridge()),
+ data: bytes.concat(Bridge.init.selector, abi.encode(addressManager))
+ })
+ )
+ );
- vm.deal(address(mockProofBridge), 100 ether);
+ mockProofSignalService = SkipProofCheckSignal(
+ deployProxy({
+ name: "signal_service",
+ impl: address(new SkipProofCheckSignal()),
+ data: bytes.concat(SignalService.init.selector),
+ registerTo: address(addressManager),
+ owner: address(0)
+ })
+ );
- signalService = new SignalService();
- signalService.init(address(addressManager));
+ signalService = SignalService(
+ deployProxy({
+ name: "signal_service",
+ impl: address(new SignalService()),
+ data: bytes.concat(SignalService.init.selector)
+ })
+ );
- etherVault = new EtherVault();
- etherVault.init(address(addressManager));
+ vm.deal(address(destChainBridge), 100 ether);
crossChainSync = new DummyCrossChainSync();
- addressManager.setAddress(
- block.chainid, "signal_service", address(signalService)
- );
+ untrustedSenderContract = new UntrustedSendMessageRelayer();
+ vm.deal(address(untrustedSenderContract), 10 ether);
- addressManager.setAddress(
- destChainId, "bridge", address(destChainBridge)
+ register(
+ address(addressManager), "signal_service", address(mockProofSignalService), destChainId
);
- addressManager.setAddress(block.chainid, "bridge", address(bridge));
+ register(address(addressManager), "bridge", address(destChainBridge), destChainId);
+ register(address(addressManager), "taiko", address(uint160(123)), destChainId);
vm.stopPrank();
}
@@ -73,9 +103,9 @@ contract BridgeTest is TestBase {
IBridge.Message memory message = IBridge.Message({
id: 0,
from: address(bridge),
- srcChainId: block.chainid,
+ srcChainId: uint64(block.chainid),
destChainId: destChainId,
- user: Alice,
+ owner: Alice,
to: Alice,
refundTo: Alice,
value: 1000,
@@ -92,12 +122,11 @@ contract BridgeTest is TestBase {
vm.chainId(destChainId);
vm.prank(Bob, Bob);
- mockProofBridge.processMessage(message, proof);
+ destChainBridge.processMessage(message, proof);
- LibBridgeStatus.MessageStatus status =
- mockProofBridge.getMessageStatus(msgHash);
+ Bridge.Status status = destChainBridge.messageStatus(msgHash);
- assertEq(status == LibBridgeStatus.MessageStatus.DONE, true);
+ assertEq(status == Bridge.Status.DONE, true);
// Alice has 100 ether + 1000 wei balance, because we did not use the
// 'sendMessage'
// since we mocking the proof, so therefore the 1000 wei
@@ -113,9 +142,9 @@ contract BridgeTest is TestBase {
IBridge.Message memory message = IBridge.Message({
id: 0,
from: address(bridge),
- srcChainId: block.chainid,
+ srcChainId: uint64(block.chainid),
destChainId: destChainId,
- user: Alice,
+ owner: Alice,
to: address(goodReceiver),
refundTo: Alice,
value: 1000,
@@ -133,29 +162,26 @@ contract BridgeTest is TestBase {
vm.chainId(destChainId);
vm.prank(Bob, Bob);
- mockProofBridge.processMessage(message, proof);
+ destChainBridge.processMessage(message, proof);
- LibBridgeStatus.MessageStatus status =
- mockProofBridge.getMessageStatus(msgHash);
+ Bridge.Status status = destChainBridge.messageStatus(msgHash);
- assertEq(status == LibBridgeStatus.MessageStatus.DONE, true);
+ assertEq(status == Bridge.Status.DONE, true);
// Bob (relayer) and goodContract has 1000 wei balance
assertEq(address(goodReceiver).balance, 1000);
assertEq(Bob.balance, 1000);
}
- function test_Bridge_send_ether_to_contract_with_value_and_message_data()
- public
- {
+ function test_Bridge_send_ether_to_contract_with_value_and_message_data() public {
goodReceiver = new GoodReceiver();
IBridge.Message memory message = IBridge.Message({
id: 0,
from: address(bridge),
- srcChainId: block.chainid,
+ srcChainId: uint64(block.chainid),
destChainId: destChainId,
- user: Alice,
+ owner: Alice,
to: address(goodReceiver),
refundTo: Alice,
value: 1000,
@@ -173,25 +199,21 @@ contract BridgeTest is TestBase {
vm.chainId(destChainId);
vm.prank(Bob, Bob);
- mockProofBridge.processMessage(message, proof);
+ destChainBridge.processMessage(message, proof);
- LibBridgeStatus.MessageStatus status =
- mockProofBridge.getMessageStatus(msgHash);
+ Bridge.Status status = destChainBridge.messageStatus(msgHash);
- assertEq(status == LibBridgeStatus.MessageStatus.DONE, true);
+ assertEq(status == Bridge.Status.DONE, true);
// Carol and goodContract has 500 wei balance
assertEq(address(goodReceiver).balance, 500);
assertEq(Carol.balance, 500);
}
- function test_Bridge_send_message_ether_reverts_if_value_doesnt_match_expected(
- )
- public
- {
- //uint256 amount = 1 wei;
+ function test_Bridge_send_message_ether_reverts_if_value_doesnt_match_expected() public {
+ // uint256 amount = 1 wei;
IBridge.Message memory message = newMessage({
- user: Alice,
+ owner: Alice,
to: Alice,
value: 0,
gasLimit: 0,
@@ -199,16 +221,14 @@ contract BridgeTest is TestBase {
destChain: destChainId
});
- vm.expectRevert(BridgeErrors.B_INCORRECT_VALUE.selector);
+ vm.expectRevert(Bridge.B_INVALID_VALUE.selector);
bridge.sendMessage(message);
}
- function test_Bridge_send_message_ether_reverts_when_owner_is_zero_address()
- public
- {
+ function test_Bridge_send_message_ether_reverts_when_owner_is_zero_address() public {
uint256 amount = 1 wei;
IBridge.Message memory message = newMessage({
- user: address(0),
+ owner: address(0),
to: Alice,
value: 0,
gasLimit: 0,
@@ -216,17 +236,14 @@ contract BridgeTest is TestBase {
destChain: destChainId
});
- vm.expectRevert(BridgeErrors.B_USER_IS_NULL.selector);
+ vm.expectRevert(Bridge.B_INVALID_USER.selector);
bridge.sendMessage{ value: amount }(message);
}
- function test_Bridge_send_message_ether_reverts_when_dest_chain_is_not_enabled(
- )
- public
- {
+ function test_Bridge_send_message_ether_reverts_when_dest_chain_is_not_enabled() public {
uint256 amount = 1 wei;
IBridge.Message memory message = newMessage({
- user: Alice,
+ owner: Alice,
to: Alice,
value: 0,
gasLimit: 0,
@@ -234,87 +251,117 @@ contract BridgeTest is TestBase {
destChain: destChainId + 1
});
- vm.expectRevert(BridgeErrors.B_WRONG_CHAIN_ID.selector);
+ vm.expectRevert(Bridge.B_INVALID_CHAINID.selector);
bridge.sendMessage{ value: amount }(message);
}
- function test_Bridge_send_message_ether_reverts_when_dest_chain_same_as_block_chainid(
- )
+ function test_Bridge_send_message_ether_reverts_when_dest_chain_same_as_block_chainid()
public
{
uint256 amount = 1 wei;
IBridge.Message memory message = newMessage({
- user: Alice,
+ owner: Alice,
to: Alice,
value: 0,
gasLimit: 0,
fee: 0,
- destChain: block.chainid
+ destChain: uint64(block.chainid)
});
- vm.expectRevert(BridgeErrors.B_WRONG_CHAIN_ID.selector);
+ vm.expectRevert(Bridge.B_INVALID_CHAINID.selector);
bridge.sendMessage{ value: amount }(message);
}
- function test_Bridge_send_message_ether_reverts_when_to_is_zero_address()
- public
- {
- uint256 amount = 1 wei;
+ function test_Bridge_send_message_ether_with_no_processing_fee() public {
+ uint256 amount = 0 wei;
IBridge.Message memory message = newMessage({
- user: Alice,
- to: address(0),
+ owner: Alice,
+ to: Alice,
value: 0,
gasLimit: 0,
fee: 0,
destChain: destChainId
});
- vm.expectRevert(BridgeErrors.B_WRONG_TO_ADDRESS.selector);
- bridge.sendMessage{ value: amount }(message);
+ (, IBridge.Message memory _message) = bridge.sendMessage{ value: amount }(message);
+ assertEq(bridge.isMessageSent(_message), true);
}
- function test_Bridge_send_message_ether_with_no_processing_fee() public {
+ function test_Bridge_send_message_ether_with_processing_fee() public {
uint256 amount = 0 wei;
+ uint256 fee = 1 wei;
IBridge.Message memory message = newMessage({
- user: Alice,
+ owner: Alice,
to: Alice,
value: 0,
gasLimit: 0,
- fee: 0,
+ fee: fee,
destChain: destChainId
});
- bytes32 msgHash = bridge.sendMessage{ value: amount }(message);
+ (, IBridge.Message memory _message) = bridge.sendMessage{ value: amount + fee }(message);
+ assertEq(bridge.isMessageSent(_message), true);
+ }
- bool isMessageSent = bridge.isMessageSent(msgHash);
- assertEq(isMessageSent, true);
+ function test_Bridge_recall_message_ether() public {
+ uint256 amount = 1 ether;
+ uint256 fee = 1 wei;
+ IBridge.Message memory message = newMessage({
+ owner: Alice,
+ to: Alice,
+ value: amount,
+ gasLimit: 0,
+ fee: fee,
+ destChain: destChainId
+ });
+
+ uint256 starterBalanceVault = address(bridge).balance;
+ uint256 starterBalanceAlice = Alice.balance;
+
+ vm.prank(Alice, Alice);
+ (, IBridge.Message memory _message) = bridge.sendMessage{ value: amount + fee }(message);
+ assertEq(bridge.isMessageSent(_message), true);
+
+ assertEq(address(bridge).balance, (starterBalanceVault + amount + fee));
+ assertEq(Alice.balance, (starterBalanceAlice - (amount + fee)));
+ bridge.recallMessage(message, "");
+
+ assertEq(address(bridge).balance, (starterBalanceVault + fee));
+ assertEq(Alice.balance, (starterBalanceAlice - fee));
}
- function test_Bridge_send_message_ether_with_processing_fee() public {
- uint256 amount = 0 wei;
+ function test_Bridge_recall_message_but_not_supports_recall_interface() public {
+ // In this test we expect that the 'message value is still refundable,
+ // just not via
+ // ERCXXTokenVault (message.from) but directly from the Bridge
+
+ uint256 amount = 1 ether;
uint256 fee = 1 wei;
IBridge.Message memory message = newMessage({
- user: Alice,
+ owner: Alice,
to: Alice,
- value: 0,
+ value: amount,
gasLimit: 0,
fee: fee,
destChain: destChainId
});
- bytes32 msgHash = bridge.sendMessage{ value: amount + fee }(message);
+ uint256 starterBalanceVault = address(bridge).balance;
+
+ untrustedSenderContract.sendMessage(address(bridge), message, amount + fee);
+
+ assertEq(address(bridge).balance, (starterBalanceVault + amount + fee));
- bool isMessageSent = bridge.isMessageSent(msgHash);
- assertEq(isMessageSent, true);
+ bridge.recallMessage(message, "");
+
+ assertEq(address(bridge).balance, (starterBalanceVault + fee));
}
- function test_Bridge_send_message_ether_with_processing_fee_invalid_amount()
- public
- {
+ function test_Bridge_send_message_ether_with_processing_fee_invalid_amount() public {
uint256 amount = 0 wei;
uint256 fee = 1 wei;
IBridge.Message memory message = newMessage({
- user: Alice,
+ owner: Alice,
to: Alice,
value: 0,
gasLimit: 0,
@@ -322,7 +369,7 @@ contract BridgeTest is TestBase {
destChain: destChainId
});
- vm.expectRevert(BridgeErrors.B_INCORRECT_VALUE.selector);
+ vm.expectRevert(Bridge.B_INVALID_VALUE.selector);
bridge.sendMessage{ value: amount }(message);
}
@@ -331,7 +378,7 @@ contract BridgeTest is TestBase {
// in foundry
function test_Bridge_process_message() public {
/* DISCALIMER: From now on we do not need to have real
- proofs because we cna bypass with overriding shouldCheckProof()
+ proofs because we can bypass with overriding skipProofCheck()
in a mockBirdge AND proof system already 'battle tested'.*/
// This predefined successful process message call fails now
// since we modified the iBridge.Message struct and cut out
@@ -342,12 +389,11 @@ contract BridgeTest is TestBase {
bytes32 msgHash = destChainBridge.hashMessage(message);
- mockProofBridge.processMessage(message, proof);
+ destChainBridge.processMessage(message, proof);
- LibBridgeStatus.MessageStatus status =
- mockProofBridge.getMessageStatus(msgHash);
+ Bridge.Status status = destChainBridge.messageStatus(msgHash);
- assertEq(status == LibBridgeStatus.MessageStatus.DONE, true);
+ assertEq(status == Bridge.Status.DONE, true);
}
// test with a known good merkle proof / message since we cant generate
@@ -355,7 +401,7 @@ contract BridgeTest is TestBase {
// in foundry
function test_Bridge_retry_message_and_end_up_in_failed_status() public {
/* DISCALIMER: From now on we do not need to have real
- proofs because we cna bypass with overriding shouldCheckProof()
+ proofs because we can bypass with overriding skipProofCheck()
in a mockBirdge AND proof system already 'battle tested'.*/
vm.startPrank(Alice);
(IBridge.Message memory message, bytes memory proof) =
@@ -366,27 +412,25 @@ contract BridgeTest is TestBase {
bytes32 msgHash = destChainBridge.hashMessage(message);
- mockProofBridge.processMessage(message, proof);
+ destChainBridge.processMessage(message, proof);
- LibBridgeStatus.MessageStatus status =
- mockProofBridge.getMessageStatus(msgHash);
+ Bridge.Status status = destChainBridge.messageStatus(msgHash);
- assertEq(status == LibBridgeStatus.MessageStatus.RETRIABLE, true);
+ assertEq(status == Bridge.Status.RETRIABLE, true);
vm.stopPrank();
- vm.prank(message.user);
+ vm.prank(message.owner);
- mockProofBridge.retryMessage(message, true);
+ destChainBridge.retryMessage(message, true);
- LibBridgeStatus.MessageStatus postRetryStatus =
- mockProofBridge.getMessageStatus(msgHash);
+ Bridge.Status postRetryStatus = destChainBridge.messageStatus(msgHash);
- assertEq(postRetryStatus == LibBridgeStatus.MessageStatus.FAILED, true);
+ assertEq(postRetryStatus == Bridge.Status.FAILED, true);
}
function retry_message_reverts_when_status_non_retriable() public {
IBridge.Message memory message = newMessage({
- user: Alice,
+ owner: Alice,
to: Alice,
value: 0,
gasLimit: 10_000,
@@ -394,16 +438,14 @@ contract BridgeTest is TestBase {
destChain: destChainId
});
- vm.expectRevert(BridgeErrors.B_MSG_NON_RETRIABLE.selector);
+ vm.expectRevert(Bridge.B_NON_RETRIABLE.selector);
destChainBridge.retryMessage(message, true);
}
- function retry_message_reverts_when_last_attempt_and_message_is_not_owner()
- public
- {
+ function retry_message_reverts_when_last_attempt_and_message_is_not_owner() public {
vm.startPrank(Alice);
IBridge.Message memory message = newMessage({
- user: Bob,
+ owner: Bob,
to: Alice,
value: 0,
gasLimit: 10_000,
@@ -411,12 +453,12 @@ contract BridgeTest is TestBase {
destChain: destChainId
});
- vm.expectRevert(BridgeErrors.B_DENIED.selector);
+ vm.expectRevert(Bridge.B_PERMISSION_DENIED.selector);
destChainBridge.retryMessage(message, true);
}
/* DISCALIMER: From now on we do not need to have real
- proofs because we cna bypass with overriding shouldCheckProof()
+ proofs because we can bypass with overriding skipProofCheck()
in a mockBirdge AND proof system already 'battle tested'.*/
function setUpPredefinedSuccessfulProcessMessageCall()
internal
@@ -424,31 +466,19 @@ contract BridgeTest is TestBase {
{
badReceiver = new BadReceiver();
- uint256 dest = 1337;
+ uint64 dest = 1337;
addressManager.setAddress(dest, "taiko", address(crossChainSync));
- addressManager.setAddress(
- 1336, "bridge", 0x564540a26Fb667306b3aBdCB4ead35BEb88698ab
- );
+ addressManager.setAddress(1336, "bridge", 0x564540a26Fb667306b3aBdCB4ead35BEb88698ab);
addressManager.setAddress(dest, "bridge", address(destChainBridge));
- addressManager.setAddress(dest, "ether_vault", address(etherVault));
-
- etherVault.authorize(address(destChainBridge), true);
- etherVault.authorize(address(mockProofBridge), true);
+ vm.deal(address(bridge), 100 ether);
- vm.deal(address(etherVault), 100 ether);
-
- addressManager.setAddress(
- dest, "signal_service", address(signalService)
- );
-
- crossChainSync.setCrossChainBlockHeader(
- 0xd5f5d8ac6bc37139c97389b00e9cf53e89c153ad8a5fc765ffe9f44ea9f3d31e
- );
+ addressManager.setAddress(dest, "signal_service", address(mockProofSignalService));
- crossChainSync.setCrossChainSignalRoot(
+ crossChainSync.setSyncedData(
+ 0xd5f5d8ac6bc37139c97389b00e9cf53e89c153ad8a5fc765ffe9f44ea9f3d31e,
0x631b214fb030d82847224f0b3d3b906a6764dded176ad3c7262630204867ba85
);
@@ -462,7 +492,7 @@ contract BridgeTest is TestBase {
from: 0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39,
srcChainId: 1336,
destChainId: dest,
- user: 0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39,
+ owner: 0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39,
to: 0x200708D76eB1B69761c23821809d53F65049939e,
refundTo: 0x10020FCb72e27650651B05eD2CEcA493bC807Ba4,
value: 1000,
@@ -479,27 +509,27 @@ contract BridgeTest is TestBase {
}
function newMessage(
- address user,
+ address owner,
address to,
uint256 value,
uint256 gasLimit,
uint256 fee,
- uint256 destChain
+ uint64 destChain
)
internal
view
returns (IBridge.Message memory)
{
return IBridge.Message({
- user: user,
+ owner: owner,
destChainId: destChain,
to: to,
value: value,
fee: fee,
id: 0, // placeholder, will be overwritten
- from: user, // placeholder, will be overwritten
- srcChainId: block.chainid, // will be overwritten
- refundTo: user,
+ from: owner, // placeholder, will be overwritten
+ srcChainId: uint64(block.chainid), // will be overwritten
+ refundTo: owner,
gasLimit: gasLimit,
data: "",
memo: ""
diff --git a/packages/protocol/test/common/EssentialContract.t.sol b/packages/protocol/test/common/EssentialContract.t.sol
new file mode 100644
index 00000000000..ae8ed54bd7b
--- /dev/null
+++ b/packages/protocol/test/common/EssentialContract.t.sol
@@ -0,0 +1,118 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.20;
+
+import "../TaikoTest.sol";
+
+contract Target1 is EssentialContract {
+ uint256 public count;
+
+ function init() external initializer {
+ __Essential_init();
+ count = 100;
+ }
+
+ function adjust() external virtual onlyOwner {
+ count += 1;
+ }
+}
+
+contract Target2 is Target1 {
+ function update() external onlyOwner {
+ count += 10;
+ }
+
+ function adjust() external override onlyOwner {
+ count -= 1;
+ }
+}
+
+contract TestOwnerUUPSUpgradable is TaikoTest {
+ function test_essential_behind_1967_proxy() external {
+ bytes memory data = bytes.concat(Target1.init.selector);
+ vm.startPrank(Alice);
+ ERC1967Proxy proxy = new ERC1967Proxy(address(new Target1()), data);
+ Target1 target = Target1(address(proxy));
+ vm.stopPrank();
+
+ // Owner is Alice
+ vm.prank(Carol);
+ assertEq(target.owner(), Alice);
+
+ // Alice can adjust();
+ vm.prank(Alice);
+ target.adjust();
+ assertEq(target.count(), 101);
+
+ // Bob cannot adjust()
+ vm.prank(Bob);
+ vm.expectRevert();
+ target.adjust();
+
+ address v2 = address(new Target2());
+ data = bytes.concat(Target2.update.selector);
+
+ vm.prank(Bob);
+ vm.expectRevert();
+ target.upgradeToAndCall(v2, data);
+
+ vm.prank(Alice);
+ target.upgradeToAndCall(v2, data);
+ assertEq(target.count(), 111);
+
+ vm.prank(Alice);
+ target.adjust();
+ assertEq(target.count(), 110);
+ }
+
+ // This tests shows that the admin() and owner() cannot be the same, otherwise,
+ // the owner cannot transact delegated functions on implementation.
+ function test_essential_behind_transparent_proxy() external {
+ bytes memory data = bytes.concat(Target1.init.selector);
+ vm.startPrank(Alice);
+ TransparentUpgradeableProxy proxy =
+ new TransparentUpgradeableProxy(address(new Target1()), Bob, data);
+ Target1 target = Target1(address(proxy));
+ vm.stopPrank();
+
+ // Owner is Alice
+ // Admin is Bob
+
+ vm.prank(Carol);
+ assertEq(target.owner(), Alice);
+
+ // Only Bob can call admin()
+ vm.prank(Bob);
+ assertEq(proxy.admin(), Bob);
+
+ // Other people, including Alice, cannot call admin()
+ vm.prank(Alice);
+ vm.expectRevert();
+ proxy.admin();
+
+ vm.prank(Carol);
+ vm.expectRevert();
+ proxy.admin();
+
+ // Alice can adjust();
+ vm.prank(Alice);
+ target.adjust();
+ assertEq(target.count(), 101);
+
+ // Bob cannot adjust()
+ vm.prank(Bob);
+ vm.expectRevert();
+ target.adjust();
+
+ // Transfer Owner to Bob, so Bob is both admin and owner
+ vm.prank(Alice);
+ target.transferOwnership(Bob);
+
+ vm.prank(Carol);
+ assertEq(target.owner(), Bob);
+
+ // Now Bob cannot call adjust()
+ vm.prank(Bob);
+ vm.expectRevert();
+ target.adjust();
+ }
+}
diff --git a/packages/protocol/test/libs/Lib1559Math.t.sol b/packages/protocol/test/libs/Lib1559Math.t.sol
deleted file mode 100644
index a628b3cf3fc..00000000000
--- a/packages/protocol/test/libs/Lib1559Math.t.sol
+++ /dev/null
@@ -1,86 +0,0 @@
-// SPDX-License-Identifier: MIT
-pragma solidity ^0.8.20;
-
-import { Test } from "forge-std/Test.sol";
-import { console2 } from "forge-std/console2.sol";
-import { Lib1559Math as T } from "../../contracts/libs/Lib1559Math.sol";
-import { SafeCastUpgradeable } from
- "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
-
-contract TestLib1559Math is Test {
- using SafeCastUpgradeable for uint256;
-
- function test1559_2X1XRatio(uint16 rand) public {
- vm.assume(rand != 0);
-
- uint64 xExcessMax = (uint256(15_000_000) * 256 * rand).toUint64();
- uint64 xTarget = (uint256(6_000_000) * rand).toUint64();
- uint64 price0 = (uint256(5_000_000_000) * rand).toUint64();
- uint64 ratio2x1x = 11_177;
- (uint128 xscale, uint128 yscale) = T.calculateScales({
- xExcessMax: xExcessMax,
- price: price0,
- target: xTarget,
- ratio2x1x: ratio2x1x
- });
-
- // basefee should be 0 when xExcess is 0
- assertEq(T.calculatePrice(xscale, yscale, 0, xTarget), 0);
-
- uint64 N = 50;
- // In the [xExcessMax/2 - 50 * xTarget, xExcessMax/2 + 50 * xTarget]
- // x range, the ratio2x1x holds, and the price is still smaller
- // than uint64.max
- for (
- uint64 xExcess = xExcessMax / 2 - N * xTarget;
- xExcess <= xExcessMax / 2 + N * xTarget;
- xExcess += xTarget
- ) {
- uint256 basefee1 =
- T.calculatePrice(xscale, yscale, xExcess, xTarget);
- assertLt(basefee1, type(uint64).max);
-
- uint256 basefee2 =
- T.calculatePrice(xscale, yscale, xExcess, 2 * xTarget);
-
- assertLt(basefee2, type(uint64).max);
-
- if (basefee1 != 0) {
- assertEq((basefee2 * 10_000) / basefee1, ratio2x1x);
- }
- }
- }
-
- function test1559_SpecalCases(uint16 rand) public {
- vm.assume(rand != 0);
-
- uint64 xExcessMax = (uint256(15_000_000) * 256 * rand).toUint64();
- uint64 xTarget = (uint256(6_000_000) * rand).toUint64();
- uint64 price0 = (uint256(5_000_000_000) * rand).toUint64();
- uint64 ratio2x1x = 11_177;
-
- (uint128 xscale, uint128 yscale) = T.calculateScales({
- xExcessMax: xExcessMax,
- price: price0,
- target: xTarget,
- ratio2x1x: ratio2x1x
- });
-
- assertEq(T.calculatePrice(xscale, yscale, 0, 0), 0);
- assertEq(T.calculatePrice(xscale, yscale, 0, 1), 0);
-
- assertGt(
- T.calculatePrice(xscale, yscale, xExcessMax - xTarget, xTarget),
- type(uint64).max
- );
-
- assertGt(
- T.calculatePrice(xscale, yscale, 0, xExcessMax), type(uint64).max
- );
-
- assertGt(
- T.calculatePrice(xscale, yscale, xExcessMax / 2, xExcessMax / 2),
- type(uint64).max
- );
- }
-}
diff --git a/packages/protocol/test/libs/LibFixedPointMath.t.sol b/packages/protocol/test/libs/LibFixedPointMath.t.sol
index 94892c68ed3..aecedeb027a 100644
--- a/packages/protocol/test/libs/LibFixedPointMath.t.sol
+++ b/packages/protocol/test/libs/LibFixedPointMath.t.sol
@@ -3,11 +3,9 @@
// https://github.com/recmo/experiment-solexp/blob/main/src/test/FixedPointMathLib.t.sol
pragma solidity 0.8.20;
-import { Test } from "forge-std/Test.sol";
-import { console2 } from "forge-std/console2.sol";
-import "../../contracts/thirdparty/LibFixedPointMath.sol";
+import "../TaikoTest.sol";
-contract LibFixedPointMathTest is Test {
+contract LibFixedPointMathTest is TaikoTest {
function testExp1() public {
assertEq(LibFixedPointMath.exp(-1e18), 367_879_441_171_442_321);
}
@@ -15,18 +13,12 @@ contract LibFixedPointMathTest is Test {
function testExpSmallest() public view {
int256 y = LibFixedPointMath.exp(-42_139_678_854_452_767_550);
- console2.log(
- "LibFixedPointMath.exp(-42139678854452767550)=", uint256(y)
- );
+ console2.log("LibFixedPointMath.exp(-42139678854452767550)=", uint256(y));
}
function testExpLargest() public view {
- int256 y = LibFixedPointMath.exp(
- int256(uint256(LibFixedPointMath.MAX_EXP_INPUT))
- );
- console2.log(
- "LibFixedPointMath.exp(135305999368893231588)=", uint256(y)
- );
+ int256 y = LibFixedPointMath.exp(int256(uint256(LibFixedPointMath.MAX_EXP_INPUT)));
+ console2.log("LibFixedPointMath.exp(135305999368893231588)=", uint256(y));
}
function testExpSome() public view {
diff --git a/packages/protocol/test/misc/GasComparison.t.sol b/packages/protocol/test/misc/GasComparison.t.sol
deleted file mode 100644
index f6a8d455986..00000000000
--- a/packages/protocol/test/misc/GasComparison.t.sol
+++ /dev/null
@@ -1,320 +0,0 @@
-// SPDX-License-Identifier: MIT
-pragma solidity ^0.8.20;
-
-import "forge-std/Test.sol";
-import "forge-std/console2.sol";
-import "../../contracts/L1/TaikoData.sol";
-import "../../contracts/libs/LibAddress.sol";
-import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";
-
-library LibAddress2 {
- function sendEther(address to, uint256 amount) internal {
- (bool success,) = payable(to).call{ value: amount }("");
- require(success, "ETH transfer failed");
- }
-}
-
-struct MyStruct {
- uint256 id;
- uint256 l1Height;
- bytes32 l1Hash;
- uint64 gasLimit;
- uint64 timestamp;
-}
-
-contract FooBar {
- function loadBlockMetadata_1(bytes memory data) public pure {
- abi.decode(data, (MyStruct));
- }
-
- function loadBlockMetadata_2(bytes calldata data) public pure {
- abi.decode(data, (MyStruct));
- }
-
- function loadBlockMetadata_3(MyStruct memory data) public pure { }
-
- function loadBlockMetadata_4(MyStruct calldata data) public pure { }
-
- function loadBlockMetadata_5(bytes calldata data) public pure {
- MyStruct memory meta;
- meta.id = uint256(bytes32(data[0:32]));
- meta.l1Height = uint256(bytes32(data[32:64]));
- meta.l1Hash = bytes32(data[64:96]);
- meta.gasLimit = uint64(bytes8(data[96:104]));
- meta.timestamp = uint64(bytes8(data[104:112]));
- }
-
- function loadBlockMetadata_6() public pure {
- MyStruct memory meta;
- uint256 a;
- assembly {
- a := calldatasize()
- }
- require(a == 84 + 32, "aaa");
-
- assembly {
- a := calldataload(4)
- }
- meta.id = a;
- assembly {
- a := calldataload(36)
- }
- meta.l1Height = a;
- assembly {
- a := calldataload(68)
- }
- meta.l1Hash = bytes32(a);
- assembly {
- a := calldataload(84)
- }
- meta.gasLimit = uint64(uint256((a << 128) >> (128 + 64)));
- meta.timestamp = uint64(uint256((a << (128 + 64)) >> (128 + 64)));
- }
-
- function return_1()
- public
- view
- returns (TaikoData.BlockMetadata memory meta)
- {
- meta = TaikoData.BlockMetadata({
- id: 1,
- l1Height: 1,
- l1Hash: bytes32(uint256(1)),
- proposer: address(this),
- txListHash: bytes32(uint256(1)),
- txListByteStart: 0,
- txListByteEnd: 1000,
- gasLimit: 1,
- mixHash: bytes32(uint256(1)),
- timestamp: 1,
- depositsProcessed: new TaikoData.EthDeposit[](0)
- });
- }
-
- function return_2() public view {
- TaikoData.BlockMetadata({
- id: 1,
- l1Height: 1,
- l1Hash: bytes32(uint256(1)),
- proposer: address(this),
- txListHash: bytes32(uint256(1)),
- txListByteStart: 0,
- txListByteEnd: 1000,
- gasLimit: 1,
- mixHash: bytes32(uint256(1)),
- timestamp: 1,
- depositsProcessed: new TaikoData.EthDeposit[](0)
- });
- }
-
- //------
- function hashString_1(string memory str)
- public
- pure
- returns (bytes32 hash)
- {
- assembly {
- hash := keccak256(add(str, 32), mload(str))
- }
- }
-
- function hashString_2(string memory str)
- public
- pure
- returns (bytes32 hash)
- {
- hash = keccak256(bytes(str));
- }
-
- //------
-
- function hashTwo_1(
- address a,
- bytes32 b
- )
- public
- pure
- returns (bytes32 hash)
- {
- assembly {
- // Load the free memory pointer and allocate memory for the
- // concatenated arguments
- let input := mload(64)
-
- // Store the app address and signal bytes32 value in the allocated
- // memory
- mstore(input, a)
- mstore(add(input, 32), b)
-
- hash := keccak256(add(input, 12), 52)
-
- // Free the memory allocated for the input
- mstore(0x40, add(input, 64))
- }
- }
-
- function hashTwo_2(
- address a,
- bytes32 b
- )
- public
- pure
- returns (bytes32 hash)
- {
- hash = keccak256(bytes.concat(bytes20(uint160(a)), b));
- // the following will work too.
- // hash = keccak256(abi.encodePacked(a, b));
- }
-
- //------
-
- function increment_1(uint256 count) public pure {
- uint256 a;
- for (uint256 i = 0; i < count; i++) {
- a += i;
- }
- }
-
- function increment_2(uint256 count) public pure {
- uint256 a;
- for (uint256 i = 0; i < count; ++i) {
- a += i;
- }
- }
-
- function increment_3(uint256 count) public pure {
- uint256 a;
- for (uint256 i = 0; i < count;) {
- a += i;
- unchecked {
- i++;
- }
- }
- }
-
- function increment_4(uint256 count) public pure {
- uint256 a;
- for (uint256 i = 0; i < count;) {
- a += i;
- unchecked {
- ++i;
- }
- }
- }
-
- // ------
- function hashKey_1(
- uint256 chainId,
- string memory name
- )
- public
- pure
- returns (bytes32)
- {
- return keccak256(bytes(string.concat(Strings.toString(chainId), name)));
- }
-
- function hashKey_2(
- uint256 chainId,
- string memory name
- )
- public
- pure
- returns (bytes32)
- {
- return keccak256(abi.encodePacked(chainId, name));
- }
-
- // ------
- function send0Ether_CheckOutside(address to, uint256 amount) public {
- if (amount == 0 || to == address(0)) return;
- LibAddress2.sendEther(to, amount);
- }
-
- function send0Ether_CheckInside(address to, uint256 amount) public {
- LibAddress.sendEther(to, amount);
- }
-}
-
-contract GasComparisonTest is Test {
- FooBar foobar;
-
- function setUp() public {
- foobar = new FooBar();
- }
-
- function testCompare_hashString(uint256 count) public {
- vm.assume(count > 10 && count < 1000);
-
- string memory str = string(new bytes(count));
- assertEq(
- foobar.hashString_1(str),
- foobar.hashString_2(str) //best
- );
- }
-
- function testCompare_increment(uint256 count) public view {
- vm.assume(count > 10 && count < 1000);
- foobar.increment_1(count);
- foobar.increment_2(count);
- foobar.increment_3(count); // best
- foobar.increment_4(count);
- }
-
- function testCompare_hashTwo() public {
- address a = address(this);
- bytes32 b = blockhash(block.number - 1);
- assertEq(
- foobar.hashTwo_1(a, b), //best
- foobar.hashTwo_2(a, b)
- );
- }
-
- function testCompare_hashKey() public view {
- foobar.hashKey_1(123, "abc");
- foobar.hashKey_2(123, "abc");
- }
-
- function testCompare_return() public view {
- foobar.return_1();
- foobar.return_2(); // cheaper
- }
-
- function testCompare_loadBlockMetadata() public {
- MyStruct memory meta = MyStruct({
- id: 123,
- l1Height: 456,
- l1Hash: blockhash(block.number - 1),
- gasLimit: 333,
- timestamp: 999
- });
-
- bytes memory b;
-
- b = abi.encode(meta);
- foobar.loadBlockMetadata_1(b);
- foobar.loadBlockMetadata_2(b);
- foobar.loadBlockMetadata_3(meta);
- foobar.loadBlockMetadata_4(meta); // best
-
- b = bytes.concat(
- bytes32(meta.id),
- bytes32(meta.l1Height),
- meta.l1Hash,
- bytes8(meta.gasLimit),
- bytes8(meta.timestamp)
- );
-
- foobar.loadBlockMetadata_5(b);
-
- bytes memory c = bytes.concat(FooBar.loadBlockMetadata_6.selector, b);
-
- address(foobar).call(c);
- }
-
- function testCompare_send0Ether() public {
- address to = 0x50081b12838240B1bA02b3177153Bca678a86078;
- foobar.send0Ether_CheckInside(to, 0);
- foobar.send0Ether_CheckOutside(to, 0);
- }
-}
diff --git a/packages/protocol/test/signal/SignalService.t.sol b/packages/protocol/test/signal/SignalService.t.sol
index 5be86126d94..40c62f1b52c 100644
--- a/packages/protocol/test/signal/SignalService.t.sol
+++ b/packages/protocol/test/signal/SignalService.t.sol
@@ -1,65 +1,73 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
-import { AddressManager } from "../../contracts/common/AddressManager.sol";
-import { AddressResolver } from "../../contracts/common/AddressResolver.sol";
-import { Bridge } from "../../contracts/bridge/Bridge.sol";
-import { BridgedERC20 } from "../../contracts/tokenvault/BridgedERC20.sol";
-import { BridgeErrors } from "../../contracts/bridge/BridgeErrors.sol";
-import { console2 } from "forge-std/console2.sol";
-import { FreeMintERC20 } from "../../contracts/test/erc20/FreeMintERC20.sol";
-import { SignalService } from "../../contracts/signal/SignalService.sol";
-import { TestBase, DummyCrossChainSync } from "../TestBase.sol";
-
-contract TestSignalService is TestBase {
- AddressManager addressManager;
+import "../TaikoTest.sol";
+contract TestSignalService is TaikoTest {
+ AddressManager addressManager;
SignalService signalService;
SignalService destSignalService;
DummyCrossChainSync crossChainSync;
- uint256 destChainId = 7;
+ uint64 public destChainId = 7;
function setUp() public {
vm.startPrank(Alice);
vm.deal(Alice, 1 ether);
vm.deal(Bob, 1 ether);
- addressManager = new AddressManager();
- addressManager.init();
-
- signalService = new SignalService();
- signalService.init(address(addressManager));
-
- destSignalService = new SignalService();
- destSignalService.init(address(addressManager));
+ addressManager = AddressManager(
+ deployProxy({
+ name: "address_manager",
+ impl: address(new AddressManager()),
+ data: bytes.concat(AddressManager.init.selector),
+ registerTo: address(addressManager),
+ owner: address(0)
+ })
+ );
- crossChainSync = new DummyCrossChainSync();
+ signalService = SignalService(
+ deployProxy({
+ name: "signal_service",
+ impl: address(new SignalService()),
+ data: bytes.concat(SignalService.init.selector)
+ })
+ );
- addressManager.setAddress(
- block.chainid, "signal_service", address(signalService)
+ destSignalService = SignalService(
+ deployProxy({
+ name: "signal_service",
+ impl: address(new SignalService()),
+ data: bytes.concat(SignalService.init.selector)
+ })
);
- addressManager.setAddress(
- destChainId, "signal_service", address(destSignalService)
+ crossChainSync = DummyCrossChainSync(
+ deployProxy({
+ name: "dummy_cross_chain_sync",
+ impl: address(new DummyCrossChainSync()),
+ data: ""
+ })
);
- addressManager.setAddress(destChainId, "taiko", address(crossChainSync));
+ register(address(addressManager), "signal_service", address(destSignalService), destChainId);
+
+ register(address(addressManager), "taiko", address(crossChainSync), destChainId);
vm.stopPrank();
}
function test_SignalService_sendSignal_revert() public {
- vm.expectRevert(SignalService.B_ZERO_SIGNAL.selector);
+ vm.expectRevert(SignalService.SS_INVALID_SIGNAL.selector);
signalService.sendSignal(0);
}
function test_SignalService_isSignalSent_revert() public {
bytes32 signal = bytes32(uint256(1));
- vm.expectRevert(SignalService.B_NULL_APP_ADDR.selector);
+ vm.expectRevert(SignalService.SS_INVALID_APP.selector);
signalService.isSignalSent(address(0), signal);
signal = bytes32(uint256(0));
- vm.expectRevert(SignalService.B_ZERO_SIGNAL.selector);
+ vm.expectRevert(SignalService.SS_INVALID_SIGNAL.selector);
signalService.isSignalSent(Alice, signal);
}
@@ -73,67 +81,99 @@ contract TestSignalService is TestBase {
function test_SignalService_getSignalSlot() public {
vm.startPrank(Alice);
- for (uint8 i = 1; i < 100; i++) {
+ for (uint8 i = 1; i < 100; ++i) {
bytes32 signal = bytes32(block.prevrandao + i);
signalService.sendSignal(signal);
assertTrue(signalService.isSignalSent(Alice, signal));
-
- // confirm our assembly gives same output as expected native
- // solidity hash/packing
- assertEq(
- signalService.getSignalSlot(Alice, signal),
- keccak256(abi.encodePacked(Alice, signal))
- );
}
}
- function test_SignalService_isSignalReceived_revert() public {
- bytes32 signal = bytes32(uint256(1));
- bytes memory proof = new bytes(1);
- vm.expectRevert(SignalService.B_WRONG_CHAIN_ID.selector);
- signalService.isSignalReceived(block.chainid, Alice, signal, proof);
-
- signal = bytes32(uint256(1));
- proof = new bytes(1);
- vm.expectRevert(SignalService.B_NULL_APP_ADDR.selector);
- signalService.isSignalReceived(destChainId, address(0), signal, proof);
+ function test_SignalService_proveSignalReceived_L1_L2() public {
+ uint64 chainId = 11_155_111; // Created the proofs on a deployed Sepolia
+ // contract, this is why this chainId.
+ address app = 0x927a146e18294efb36edCacC99D9aCEA6aB16b95; // Mock app,
+ // actually it is an EOA, but it is ok for tests!
+ bytes32 signal = 0x21761f7cd1af3972774272b39a0f4602dbcd418325cddb14e156b4bb073d52a8;
+ bytes memory inclusionProof =
+ hex"e5a4e3a1209749684f52b5c0717a7ca78127fb56043d637d81763c04e9d30ba4d4746d56e901"; //eth_getProof's
+ // result RLP encoded storage proof
+ bytes32 signalRoot = 0xf7916f389ccda56e3831e115238b7389b30750886785a3c21265601572698f0f; //eth_getProof
+ // result's storage hash
- signal = bytes32(uint256(0));
- proof = new bytes(1);
- vm.expectRevert(SignalService.B_ZERO_SIGNAL.selector);
- signalService.isSignalReceived(destChainId, Alice, signal, proof);
-
- signal = bytes32(uint256(1));
- proof = new bytes(1);
- vm.expectRevert();
- signalService.isSignalReceived(destChainId, Alice, signal, proof);
- }
+ vm.startPrank(Alice);
+ signalService.authorize(address(crossChainSync), bytes32(uint256(block.chainid)));
- function test_SignalService_isSignalReceived() public {
- // This specific value is used, do not change it.
- address Brecht = 0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39;
+ crossChainSync.setSyncedData("", signalRoot);
- // known signal with known proof for known block header/signalRoot from
- // a known chain ID of 1336, since we cant generate merkle proofs with
- // foundry.
- bytes32 signal = bytes32(
- 0xa99d658793daba4d352c77378e2d0f3b12ff47503518b3ec9ad61bb33ee7031d
- );
- bytes memory proof =
- hex"0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003e0d5c45a5c0fabac05a887ad983965a225214df2cecd77adc216d3b1172866b1e91dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493470000000000000000000000000000000000000000000000000000000000000000cba38a70215ae3eeba2e97f9b6c3c804541484202953760c1cfe734df6dfce7cf7f7ed1e57a053e1c79765d6b76305193cae04261538400724837787437e621c9e6a8ea258a11278cf2e54d0e4845843837a1da42483ebe1dddf3eed1d33088b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000099c8ac000000000000000000000000000000000000000000000000000000000000ac7500000000000000000000000000000000000000000000000000000000644311c100000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000164c61e700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061d883010a1a846765746888676f312e31382e38856c696e757800000000000000def5020e30ddc20e32151adb608a5d8367d817a707ae8d520c98ac13de04bce35f95ef795a9c4fd13d3e5daf713525521043125bde66aa71eed7ca715f05c720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dbf8d9b8b3f8b18080a04fc5f13ab2f9ba0c2da88b0151ab0e7cf4d85d08cca45ccd923c6ab76323eb28a02b70a98baa2507beffe8c266006cae52064dccf4fd1998af774ab3399029b38380808080a07394a09684ef3b2c87e9e2a753eb4ac78e2047b980e16d2e2133aee78946370d8080a0f4984a11f61a2921456141df88de6e1a710d28681b91af794c5a721e47839cd7a00f6329feca1549bd3bf7ab9a2e474bde37cb4f81366fca1dfdd9257c7305b5b880808080a3e2a037a8317247f2d3e645fa68570a9ae97a73b5568fe0578b90197316c654138997010000000000";
+ SignalService.Proof memory p;
+ SignalService.Hop[] memory h;
+ p.crossChainSync = address(crossChainSync);
+ p.height = 10;
+ p.storageProof = inclusionProof;
+ p.hops = h;
- crossChainSync.setCrossChainBlockHeader(
- 0x986278442ae7469dbd55f478348b4547c399004c93325b18ed995d2bc008f98d
- );
- crossChainSync.setCrossChainSignalRoot(
- 0x58900f5366437923bb250887d359d828a1a89e1837f9369f75c3e1bb238b854f
- );
+ bool isSignalReceived =
+ signalService.proveSignalReceived(chainId, app, signal, abi.encode(p));
+ assertEq(isSignalReceived, true);
+ }
- vm.chainId(destChainId);
+ function test_SignalService_proveSignalReceived_L2_L2() public {
+ uint64 chainId = 11_155_111; // Created the proofs on a deployed
+ // Sepolia contract, this is why this chainId. This works as a
+ // static 'chainId' becuase i imitated 2 contracts (L2A and L1
+ // Signal Service contracts) on Sepolia.
+ address app = 0x927a146e18294efb36edCacC99D9aCEA6aB16b95; // Mock app,
+ // actually it is an EOA, but it is ok for tests! Same applies here,
+ // i imitated everything with one 'app' (Bridge) with my same EOA
+ // wallet.
+ bytes32 signal_of_L2A_msgHash =
+ 0x21761f7cd1af3972774272b39a0f4602dbcd418325cddb14e156b4bb073d52a8;
+ bytes memory inclusionProof_of_L2A_msgHash =
+ hex"e5a4e3a1209749684f52b5c0717a7ca78127fb56043d637d81763c04e9d30ba4d4746d56e901"; //eth_getProof's
+ // result RLP encoded storage proof
+ bytes32 signalRoot_of_L2 =
+ 0xf7916f389ccda56e3831e115238b7389b30750886785a3c21265601572698f0f; //eth_getProof
+ // result's storage hash
+ bytes memory hop_inclusionProof_from_L1_SignalService =
+ hex"e5a4e3a120bade38703a7b19341b10a4dd482698dc8ffdd861e83ce41de2980bed39b6a02501"; //eth_getProof's
+ // result RLP encoded storage proof
+ bytes32 l1_common_signalService_root =
+ 0x5c5fd43df8bcd7ad44cfcae86ed73a11e0baa9a751f0b520d029358ea284833b; //eth_getProof
+ // result's storage hash
+
+ // Important to note, we need to have authorized the "relayers'
+ // addresses" on the source chain we are claiming.
+ // (TaikoL1 or TaikoL2 depending on where we are)
+ vm.startPrank(Alice);
+ signalService.authorize(address(crossChainSync), bytes32(block.chainid));
+ signalService.authorize(address(app), bytes32(uint256(chainId)));
- assertTrue(
- destSignalService.isSignalReceived(1336, Brecht, signal, proof)
- );
+ vm.startPrank(Alice);
+ addressManager.setAddress(chainId, "taiko", app);
+
+ crossChainSync.setSyncedData("", l1_common_signalService_root);
+
+ SignalService.Proof memory p;
+ p.crossChainSync = address(crossChainSync);
+ p.height = 10;
+ p.storageProof = inclusionProof_of_L2A_msgHash;
+
+ // Imagine this scenario: L2A to L2B bridging.
+ // The 'hop' proof is the one that proves to L2B, that L1 Signal service
+ // contains the signalRoot (as storage slot / leaf) with value 0x1.
+ // The 'normal' proof is the one which proves that the resolving
+ // hop.signalRoot is the one which belongs to L2A, and the proof is
+ // accordingly.
+ SignalService.Hop[] memory h = new SignalService.Hop[](1);
+ h[0].signalRootRelay = app;
+ h[0].signalRoot = signalRoot_of_L2;
+ h[0].storageProof = hop_inclusionProof_from_L1_SignalService;
+
+ p.hops = h;
+
+ bool isSignalReceived =
+ signalService.proveSignalReceived(chainId, app, signal_of_L2A_msgHash, abi.encode(p));
+ assertEq(isSignalReceived, true);
}
}
diff --git a/packages/protocol/test/team/TimelockTokenPool.t.sol b/packages/protocol/test/team/TimelockTokenPool.t.sol
new file mode 100644
index 00000000000..1ba0300ff5f
--- /dev/null
+++ b/packages/protocol/test/team/TimelockTokenPool.t.sol
@@ -0,0 +1,418 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.20;
+
+import "../TaikoTest.sol";
+
+contract MyERC20 is ERC20 {
+ constructor(address owner) ERC20("Taiko Token", "TKO") {
+ _mint(owner, 1_000_000_000e18);
+ }
+}
+
+contract TestTimelockTokenPool is TaikoTest {
+ address internal Vault = randAddress();
+
+ ERC20 tko = new MyERC20(Vault);
+ TimelockTokenPool pool;
+
+ function setUp() public {
+ pool = TimelockTokenPool(
+ deployProxy({
+ name: "time_lock_token_pool",
+ impl: address(new TimelockTokenPool()),
+ data: bytes.concat(TimelockTokenPool.init.selector, abi.encode(address(tko), Vault))
+ })
+ );
+ }
+
+ function test_invalid_granting() public {
+ vm.expectRevert(TimelockTokenPool.INVALID_GRANT.selector);
+ pool.grant(Alice, TimelockTokenPool.Grant(0, 0, 0, 0, 0, 0, 0));
+
+ vm.expectRevert(TimelockTokenPool.INVALID_PARAM.selector);
+ pool.grant(address(0), TimelockTokenPool.Grant(100e18, 0, 0, 0, 0, 0, 0));
+ }
+
+ function test_single_grant_zero_grant_period_zero_unlock_period() public {
+ pool.grant(Alice, TimelockTokenPool.Grant(10_000e18, 0, 0, 0, 0, 0, 0));
+ vm.prank(Vault);
+ tko.approve(address(pool), 10_000e18);
+
+ (
+ uint128 amountOwned,
+ uint128 amountUnlocked,
+ uint128 amountWithdrawn,
+ uint128 amountWithdrawable
+ ) = pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 10_000e18);
+ assertEq(amountUnlocked, 10_000e18);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 10_000e18);
+
+ // Try to void the grant
+ vm.expectRevert(TimelockTokenPool.NOTHING_TO_VOID.selector);
+ pool.void(Alice);
+
+ vm.prank(Alice);
+ pool.withdraw();
+ assertEq(tko.balanceOf(Alice), 10_000e18);
+
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 10_000e18);
+ assertEq(amountUnlocked, 10_000e18);
+ assertEq(amountWithdrawn, 10_000e18);
+ assertEq(amountWithdrawable, 0);
+ }
+
+ function test_single_grant_zero_grant_period_1year_unlock_period() public {
+ uint64 unlockStart = uint64(block.timestamp);
+ uint32 unlockPeriod = 365 days;
+ uint64 unlockCliff = unlockStart + unlockPeriod / 2;
+
+ pool.grant(
+ Alice,
+ TimelockTokenPool.Grant(10_000e18, 0, 0, 0, unlockStart, unlockCliff, unlockPeriod)
+ );
+ vm.prank(Vault);
+ tko.approve(address(pool), 10_000e18);
+
+ (
+ uint128 amountOwned,
+ uint128 amountUnlocked,
+ uint128 amountWithdrawn,
+ uint128 amountWithdrawable
+ ) = pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 10_000e18);
+ assertEq(amountUnlocked, 0);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 0);
+
+ vm.warp(unlockCliff);
+
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 10_000e18);
+ assertEq(amountUnlocked, 0);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 0);
+
+ vm.warp(unlockCliff + 1);
+
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ uint256 amount1 = 5_000_000_317_097_919_837_645;
+ assertEq(amountOwned, 10_000e18);
+ assertEq(amountUnlocked, amount1);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, amount1);
+
+ vm.prank(Alice);
+ pool.withdraw();
+
+ vm.warp(unlockStart + unlockPeriod + 365 days);
+
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 10_000e18);
+ assertEq(amountUnlocked, 10_000e18);
+ assertEq(amountWithdrawn, amount1);
+ assertEq(amountWithdrawable, 10_000e18 - amount1);
+
+ vm.prank(Alice);
+ pool.withdraw();
+
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 10_000e18);
+ assertEq(amountUnlocked, 10_000e18);
+ assertEq(amountWithdrawn, 10_000e18);
+ assertEq(amountWithdrawable, 0);
+ }
+
+ function test_single_grant_1year_grant_period_zero_unlock_period() public {
+ uint64 grantStart = uint64(block.timestamp);
+ uint32 grantPeriod = 365 days;
+ uint64 grantCliff = grantStart + grantPeriod / 2;
+
+ pool.grant(
+ Alice, TimelockTokenPool.Grant(10_000e18, grantStart, grantCliff, grantPeriod, 0, 0, 0)
+ );
+ vm.prank(Vault);
+ tko.approve(address(pool), 10_000e18);
+
+ (
+ uint128 amountOwned,
+ uint128 amountUnlocked,
+ uint128 amountWithdrawn,
+ uint128 amountWithdrawable
+ ) = pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 0);
+ assertEq(amountUnlocked, 0);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 0);
+
+ vm.warp(grantCliff);
+
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 0);
+ assertEq(amountUnlocked, 0);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 0);
+
+ vm.warp(grantCliff + 1);
+
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ uint256 amount1 = 5_000_000_317_097_919_837_645;
+ assertEq(amountOwned, amount1);
+ assertEq(amountUnlocked, amount1);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, amount1);
+
+ vm.prank(Alice);
+ pool.withdraw();
+
+ vm.warp(grantStart + grantPeriod + 365 days);
+
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 10_000e18);
+ assertEq(amountUnlocked, 10_000e18);
+ assertEq(amountWithdrawn, amount1);
+ assertEq(amountWithdrawable, 10_000e18 - amount1);
+
+ vm.prank(Alice);
+ pool.withdraw();
+
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 10_000e18);
+ assertEq(amountUnlocked, 10_000e18);
+ assertEq(amountWithdrawn, 10_000e18);
+ assertEq(amountWithdrawable, 0);
+ }
+
+ function test_single_grant_4year_grant_period_4year_unlock_period() public {
+ uint64 grantStart = uint64(block.timestamp);
+ uint32 grantPeriod = 4 * 365 days;
+ uint64 grantCliff = grantStart + 90 days;
+
+ uint64 unlockStart = grantStart + 365 days;
+ uint32 unlockPeriod = 4 * 365 days;
+ uint64 unlockCliff = unlockStart + 365 days;
+
+ pool.grant(
+ Alice,
+ TimelockTokenPool.Grant(
+ 10_000e18,
+ grantStart,
+ grantCliff,
+ grantPeriod,
+ unlockStart,
+ unlockCliff,
+ unlockPeriod
+ )
+ );
+ vm.prank(Vault);
+ tko.approve(address(pool), 10_000e18);
+
+ (
+ uint128 amountOwned,
+ uint128 amountUnlocked,
+ uint128 amountWithdrawn,
+ uint128 amountWithdrawable
+ ) = pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 0);
+ assertEq(amountUnlocked, 0);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 0);
+
+ // 90 days later
+ vm.warp(grantStart + 90 days);
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 0);
+ assertEq(amountUnlocked, 0);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 0);
+
+ // 1 year later
+ vm.warp(grantStart + 365 days);
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 2500e18);
+ assertEq(amountUnlocked, 0);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 0);
+
+ // 2 year later
+ vm.warp(grantStart + 2 * 365 days);
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 5000e18);
+ assertEq(amountUnlocked, 0);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 0);
+
+ // 3 year later
+ vm.warp(grantStart + 3 * 365 days);
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 7500e18);
+ assertEq(amountUnlocked, 3750e18);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 3750e18);
+
+ // 4 year later
+ vm.warp(grantStart + 4 * 365 days);
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 10_000e18);
+ assertEq(amountUnlocked, 7500e18);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 7500e18);
+
+ // 5 year later
+ vm.warp(grantStart + 5 * 365 days);
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 10_000e18);
+ assertEq(amountUnlocked, 10_000e18);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 10_000e18);
+
+ // 6 year later
+ vm.warp(grantStart + 6 * 365 days);
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 10_000e18);
+ assertEq(amountUnlocked, 10_000e18);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 10_000e18);
+ }
+
+ function test_multiple_grants() public {
+ pool.grant(Alice, TimelockTokenPool.Grant(10_000e18, 0, 0, 0, 0, 0, 0));
+ pool.grant(Alice, TimelockTokenPool.Grant(20_000e18, 0, 0, 0, 0, 0, 0));
+
+ vm.prank(Vault);
+ tko.approve(address(pool), 30_000e18);
+
+ (
+ uint128 amountOwned,
+ uint128 amountUnlocked,
+ uint128 amountWithdrawn,
+ uint128 amountWithdrawable
+ ) = pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 30_000e18);
+ assertEq(amountUnlocked, 30_000e18);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 30_000e18);
+ }
+
+ function test_void_multiple_grants_before_granted() public {
+ uint64 grantStart = uint64(block.timestamp) + 30 days;
+ pool.grant(Alice, TimelockTokenPool.Grant(10_000e18, grantStart, 0, 0, 0, 0, 0));
+ pool.grant(Alice, TimelockTokenPool.Grant(20_000e18, grantStart, 0, 0, 0, 0, 0));
+
+ vm.prank(Vault);
+ tko.approve(address(pool), 30_000e18);
+
+ (
+ uint128 amountOwned,
+ uint128 amountUnlocked,
+ uint128 amountWithdrawn,
+ uint128 amountWithdrawable
+ ) = pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 0);
+ assertEq(amountUnlocked, 0);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 0);
+
+ // Try to void the grant
+ pool.void(Alice);
+
+ TimelockTokenPool.Grant[] memory grants = pool.getMyGrants(Alice);
+ for (uint256 i; i < grants.length; ++i) {
+ assertEq(grants[i].grantStart, 0);
+ assertEq(grants[i].grantPeriod, 0);
+ assertEq(grants[i].grantCliff, 0);
+
+ assertEq(grants[i].unlockStart, 0);
+ assertEq(grants[i].unlockPeriod, 0);
+ assertEq(grants[i].unlockCliff, 0);
+
+ assertEq(grants[i].amount, 0);
+ }
+ }
+
+ function test_void_multiple_grants_after_granted() public {
+ uint64 grantStart = uint64(block.timestamp) + 30 days;
+ pool.grant(Alice, TimelockTokenPool.Grant(10_000e18, grantStart, 0, 0, 0, 0, 0));
+ pool.grant(Alice, TimelockTokenPool.Grant(20_000e18, grantStart, 0, 0, 0, 0, 0));
+
+ vm.prank(Vault);
+ tko.approve(address(pool), 30_000e18);
+
+ (
+ uint128 amountOwned,
+ uint128 amountUnlocked,
+ uint128 amountWithdrawn,
+ uint128 amountWithdrawable
+ ) = pool.getMyGrantSummary(Alice);
+
+ assertEq(amountOwned, 0);
+ assertEq(amountUnlocked, 0);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 0);
+
+ vm.warp(grantStart + 1);
+
+ // Try to void the grant
+ // Try to void the grant
+ vm.expectRevert(TimelockTokenPool.NOTHING_TO_VOID.selector);
+ pool.void(Alice);
+ }
+
+ function test_void_multiple_grants_in_the_middle() public {
+ uint64 grantStart = uint64(block.timestamp);
+ uint32 grantPeriod = 100 days;
+ pool.grant(Alice, TimelockTokenPool.Grant(10_000e18, grantStart, 0, grantPeriod, 0, 0, 0));
+ pool.grant(Alice, TimelockTokenPool.Grant(20_000e18, grantStart, 0, grantPeriod, 0, 0, 0));
+
+ vm.prank(Vault);
+ tko.approve(address(pool), 30_000e18);
+
+ vm.warp(grantStart + 50 days);
+ (
+ uint128 amountOwned,
+ uint128 amountUnlocked,
+ uint128 amountWithdrawn,
+ uint128 amountWithdrawable
+ ) = pool.getMyGrantSummary(Alice);
+
+ assertEq(amountOwned, 15_000e18);
+ assertEq(amountUnlocked, 15_000e18);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 15_000e18);
+
+ pool.void(Alice);
+
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 15_000e18);
+ assertEq(amountUnlocked, 15_000e18);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 15_000e18);
+
+ vm.warp(grantStart + 100 days);
+ (amountOwned, amountUnlocked, amountWithdrawn, amountWithdrawable) =
+ pool.getMyGrantSummary(Alice);
+ assertEq(amountOwned, 15_000e18);
+ assertEq(amountUnlocked, 15_000e18);
+ assertEq(amountWithdrawn, 0);
+ assertEq(amountWithdrawable, 15_000e18);
+ }
+}
diff --git a/packages/protocol/test/team/airdrop/MerkleClaimable.t.sol b/packages/protocol/test/team/airdrop/MerkleClaimable.t.sol
new file mode 100644
index 00000000000..44fba698018
--- /dev/null
+++ b/packages/protocol/test/team/airdrop/MerkleClaimable.t.sol
@@ -0,0 +1,248 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.20;
+
+import "../../TaikoTest.sol";
+
+contract MyERC20 is ERC20 {
+ constructor(address owner) ERC20("Taiko Token", "TKO") {
+ _mint(owner, 1_000_000_000e18);
+ }
+}
+
+contract TestERC20Airdrop is TaikoTest {
+ uint64 claimStart;
+ uint64 claimEnd;
+ address internal owner = randAddress();
+
+ bytes32 merkleRoot = 0x73a7330a8657ad864b954215a8f636bb3709d2edea60bcd4fcb8a448dbc6d70f;
+
+ ERC20Airdrop airdrop;
+ ERC20Airdrop2 airdrop2;
+ ERC20 token;
+
+ function setUp() public {
+ token = new MyERC20(address(owner));
+ // 1st 'genesis' airdrop
+ airdrop = ERC20Airdrop(
+ deployProxy({
+ name: "airdrop",
+ impl: address(new ERC20Airdrop()),
+ data: bytes.concat(
+ ERC20Airdrop.init.selector, abi.encode(0, 0, merkleRoot, address(token), owner)
+ )
+ })
+ );
+
+ // 2nd airdrop subject to unlocking (e.g. 10 days after starting after
+ // claim window)
+ airdrop2 = ERC20Airdrop2(
+ deployProxy({
+ name: "airdrop",
+ impl: address(new ERC20Airdrop2()),
+ data: bytes.concat(
+ ERC20Airdrop2.init.selector,
+ abi.encode(0, 0, merkleRoot, address(token), owner, 10 days)
+ )
+ })
+ );
+
+ claimStart = uint64(block.timestamp + 10);
+ claimEnd = uint64(block.timestamp + 10_000);
+
+ airdrop.setConfig(claimStart, claimEnd, merkleRoot);
+
+ airdrop2.setConfig(claimStart, claimEnd, merkleRoot);
+
+ vm.roll(block.number + 1);
+ vm.warp(block.timestamp + 12);
+
+ vm.prank(owner, owner);
+ MyERC20(address(token)).approve(address(airdrop), 1_000_000_000e18);
+
+ vm.prank(owner, owner);
+ MyERC20(address(token)).approve(address(airdrop2), 1_000_000_000e18);
+ }
+
+ function test_claim_but_claim_not_ongoing_yet() public {
+ vm.warp(1);
+ bytes32[] memory merkleProof = new bytes32[](3);
+ merkleProof[0] = 0x4014b456db813d18e801fe3b30bbe14542c9c84caa9a92b643f7f46849283077;
+ merkleProof[1] = 0xfc2f09b34fb9437f9bde16049237a2ab3caa6d772bd794da57a8c314aea22b3f;
+ merkleProof[2] = 0xc13844b93533d8aec9c7c86a3d9399efb4e834f4069b9fd8a88e7290be612d05;
+
+ vm.expectRevert(MerkleClaimable.CLAIM_NOT_ONGOING.selector);
+ vm.prank(Alice, Alice);
+ airdrop.claim(abi.encode(Alice, 100), merkleProof);
+ }
+
+ function test_claim_but_claim_not_ongoing_anymore() public {
+ vm.warp(uint64(block.timestamp + 11_000));
+
+ bytes32[] memory merkleProof = new bytes32[](3);
+ merkleProof[0] = 0x4014b456db813d18e801fe3b30bbe14542c9c84caa9a92b643f7f46849283077;
+ merkleProof[1] = 0xfc2f09b34fb9437f9bde16049237a2ab3caa6d772bd794da57a8c314aea22b3f;
+ merkleProof[2] = 0xc13844b93533d8aec9c7c86a3d9399efb4e834f4069b9fd8a88e7290be612d05;
+
+ vm.expectRevert(MerkleClaimable.CLAIM_NOT_ONGOING.selector);
+ vm.prank(Alice, Alice);
+ airdrop.claim(abi.encode(Alice, 100), merkleProof);
+ }
+
+ function test_claim_but_with_invalid_allowance() public {
+ vm.warp(uint64(block.timestamp + 11));
+ // These proofs are coming from 'pnpm run buildMerkle'
+ bytes32[] memory merkleProof = new bytes32[](3);
+ merkleProof[0] = 0x4014b456db813d18e801fe3b30bbe14542c9c84caa9a92b643f7f46849283077;
+ merkleProof[1] = 0xfc2f09b34fb9437f9bde16049237a2ab3caa6d772bd794da57a8c314aea22b3f;
+ merkleProof[2] = 0xc13844b93533d8aec9c7c86a3d9399efb4e834f4069b9fd8a88e7290be612d05;
+
+ vm.expectRevert(MerkleClaimable.INVALID_PROOF.selector);
+ vm.prank(Alice, Alice);
+ airdrop.claim(abi.encode(Alice, 200), merkleProof);
+ }
+
+ function test_claim() public {
+ vm.warp(uint64(block.timestamp + 11));
+ // These proofs are coming from 'pnpm run buildMerkle'
+ bytes32[] memory merkleProof = new bytes32[](3);
+ merkleProof[0] = 0x4014b456db813d18e801fe3b30bbe14542c9c84caa9a92b643f7f46849283077;
+ merkleProof[1] = 0xfc2f09b34fb9437f9bde16049237a2ab3caa6d772bd794da57a8c314aea22b3f;
+ merkleProof[2] = 0xc13844b93533d8aec9c7c86a3d9399efb4e834f4069b9fd8a88e7290be612d05;
+
+ vm.prank(Alice, Alice);
+ airdrop.claim(abi.encode(Alice, 100), merkleProof);
+
+ // Check Alice balance
+ assertEq(token.balanceOf(Alice), 100);
+ }
+
+ function test_claim_with_same_proofs_twice() public {
+ vm.warp(uint64(block.timestamp + 11));
+ // These proofs are coming from 'pnpm run buildMerkle'
+ bytes32[] memory merkleProof = new bytes32[](3);
+ merkleProof[0] = 0x4014b456db813d18e801fe3b30bbe14542c9c84caa9a92b643f7f46849283077;
+ merkleProof[1] = 0xfc2f09b34fb9437f9bde16049237a2ab3caa6d772bd794da57a8c314aea22b3f;
+ merkleProof[2] = 0xc13844b93533d8aec9c7c86a3d9399efb4e834f4069b9fd8a88e7290be612d05;
+
+ vm.prank(Alice, Alice);
+ airdrop.claim(abi.encode(Alice, 100), merkleProof);
+
+ // Check Alice balance
+ assertEq(token.balanceOf(Alice), 100);
+
+ vm.expectRevert(MerkleClaimable.CLAIMED_ALREADY.selector);
+ vm.prank(Alice, Alice);
+ airdrop.claim(abi.encode(Alice, 100), merkleProof);
+ }
+
+ function test_withdraw_for_airdrop2_withdraw_daily() public {
+ vm.warp(uint64(block.timestamp + 11));
+ // These proofs are coming from 'pnpm run buildMerkle'
+ bytes32[] memory merkleProof = new bytes32[](3);
+ merkleProof[0] = 0x4014b456db813d18e801fe3b30bbe14542c9c84caa9a92b643f7f46849283077;
+ merkleProof[1] = 0xfc2f09b34fb9437f9bde16049237a2ab3caa6d772bd794da57a8c314aea22b3f;
+ merkleProof[2] = 0xc13844b93533d8aec9c7c86a3d9399efb4e834f4069b9fd8a88e7290be612d05;
+
+ vm.prank(Alice, Alice);
+ airdrop2.claim(abi.encode(Alice, 100), merkleProof);
+
+ // Try withdraw but not started yet
+ vm.expectRevert(ERC20Airdrop2.WITHDRAWALS_NOT_ONGOING.selector);
+ airdrop2.withdraw(Alice);
+
+ // Roll one day after another, for 10 days and see the 100 allowance be withdrawn all and no
+ // more left for the 11th day
+ uint256 i = 1;
+ uint256 balance;
+ uint256 withdrawable;
+ for (i = 1; i < 11; i++) {
+ vm.roll(block.number + 200);
+ vm.warp(claimEnd + (i * 1 days));
+
+ (balance, withdrawable) = airdrop2.getBalance(Alice);
+
+ assertEq(balance, 100);
+ assertEq(withdrawable, 10);
+
+ airdrop2.withdraw(Alice);
+ // Check Alice balance
+ assertEq(token.balanceOf(Alice), (i * 10));
+ }
+
+ // On the 10th day (midnight), Alice has no claims left
+ vm.roll(block.number + 200);
+ vm.warp(claimEnd + (10 days));
+
+ (balance, withdrawable) = airdrop2.getBalance(Alice);
+
+ assertEq(balance, 100);
+ assertEq(withdrawable, 0);
+
+ // No effect
+ airdrop2.withdraw(Alice);
+ // Check Alice balance
+ assertEq(token.balanceOf(Alice), 100);
+ }
+
+ function test_withdraw_for_airdrop2_withdraw_at_the_end() public {
+ vm.warp(uint64(block.timestamp + 11));
+ // These proofs are coming from 'pnpm run buildMerkle'
+ bytes32[] memory merkleProof = new bytes32[](3);
+ merkleProof[0] = 0x4014b456db813d18e801fe3b30bbe14542c9c84caa9a92b643f7f46849283077;
+ merkleProof[1] = 0xfc2f09b34fb9437f9bde16049237a2ab3caa6d772bd794da57a8c314aea22b3f;
+ merkleProof[2] = 0xc13844b93533d8aec9c7c86a3d9399efb4e834f4069b9fd8a88e7290be612d05;
+
+ vm.prank(Alice, Alice);
+ airdrop2.claim(abi.encode(Alice, 100), merkleProof);
+
+ // Try withdraw but not started yet
+ vm.expectRevert(ERC20Airdrop2.WITHDRAWALS_NOT_ONGOING.selector);
+ airdrop2.withdraw(Alice);
+
+ // Roll 10 day after
+ vm.roll(block.number + 200);
+ vm.warp(claimEnd + 10 days);
+
+ (uint256 balance, uint256 withdrawable) = airdrop2.getBalance(Alice);
+
+ assertEq(balance, 100);
+ assertEq(withdrawable, 100);
+
+ airdrop2.withdraw(Alice);
+
+ // Check Alice balance
+ assertEq(token.balanceOf(Alice), 100);
+ }
+
+ function test_withdraw_for_airdrop2_but_out_of_withdrawal_window() public {
+ vm.warp(uint64(block.timestamp + 11));
+ // These proofs are coming from 'pnpm run buildMerkle'
+ bytes32[] memory merkleProof = new bytes32[](3);
+ merkleProof[0] = 0x4014b456db813d18e801fe3b30bbe14542c9c84caa9a92b643f7f46849283077;
+ merkleProof[1] = 0xfc2f09b34fb9437f9bde16049237a2ab3caa6d772bd794da57a8c314aea22b3f;
+ merkleProof[2] = 0xc13844b93533d8aec9c7c86a3d9399efb4e834f4069b9fd8a88e7290be612d05;
+
+ vm.prank(Alice, Alice);
+ airdrop2.claim(abi.encode(Alice, 100), merkleProof);
+
+ // Try withdraw but not started yet
+ vm.expectRevert(ERC20Airdrop2.WITHDRAWALS_NOT_ONGOING.selector);
+ airdrop2.withdraw(Alice);
+
+ // Roll 11 day after
+ vm.roll(block.number + 200);
+ vm.warp(claimEnd + 11 days);
+
+ (uint256 balance, uint256 withdrawable) = airdrop2.getBalance(Alice);
+
+ // Balance and withdrawable is 100,100 --> bc. it is out of withdrawal window
+ assertEq(balance, 100);
+ assertEq(withdrawable, 100);
+
+ vm.expectRevert(ERC20Airdrop2.WITHDRAWALS_NOT_ONGOING.selector);
+ airdrop2.withdraw(Alice);
+
+ // Check Alice balance
+ assertEq(token.balanceOf(Alice), 0);
+ }
+}
diff --git a/packages/protocol/test/tokenvault/BridgedERC20.t.sol b/packages/protocol/test/tokenvault/BridgedERC20.t.sol
new file mode 100644
index 00000000000..2999a88806b
--- /dev/null
+++ b/packages/protocol/test/tokenvault/BridgedERC20.t.sol
@@ -0,0 +1,142 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.20;
+
+import "../TaikoTest.sol";
+
+contract TestBridgedERC20 is TaikoTest {
+ address manager;
+ address vault = randAddress();
+ address owner = randAddress();
+
+ function setUp() public {
+ manager = deployProxy({
+ name: "address_manager",
+ impl: address(new AddressManager()),
+ data: bytes.concat(AddressManager.init.selector)
+ });
+
+ register(manager, "erc20_vault", vault);
+ }
+
+ function test_20Vault_migration__change_migration_status() public {
+ BridgedERC20 btoken = deployBridgedToken("FOO");
+
+ vm.expectRevert();
+ btoken.changeMigrationStatus(Emma, false);
+
+ vm.startPrank(owner);
+ btoken.changeMigrationStatus(Emma, false);
+ btoken.changeMigrationStatus(address(0), false);
+ btoken.changeMigrationStatus(address(0), true);
+ btoken.changeMigrationStatus(Emma, true);
+ vm.expectRevert();
+ btoken.changeMigrationStatus(Emma, true);
+ vm.stopPrank();
+
+ vm.startPrank(vault);
+ btoken.changeMigrationStatus(Frank, false);
+ btoken.changeMigrationStatus(address(0), false);
+ btoken.changeMigrationStatus(address(0), true);
+ btoken.changeMigrationStatus(Frank, true);
+ vm.expectRevert();
+ btoken.changeMigrationStatus(Frank, true);
+
+ vm.stopPrank();
+ }
+
+ function test_20Vault_migration___only_vault_can_min_burn_when_migration_off() public {
+ BridgedERC20 btoken = deployBridgedToken("BAR");
+ // only erc20_vault can brun and mint
+ vm.startPrank(vault);
+ btoken.mint(Bob, 1000);
+ btoken.burn(Bob, 600);
+ assertEq(btoken.balanceOf(Bob), 400);
+ vm.stopPrank();
+
+ // Owner cannot burn/mint
+ vm.startPrank(owner);
+ vm.expectRevert();
+ btoken.mint(Bob, 1000);
+ vm.expectRevert();
+ btoken.burn(Bob, 100);
+ vm.stopPrank();
+ }
+
+ function test_20Vault_migration__old_to_new() public {
+ BridgedERC20 oldToken = deployBridgedToken("OLD");
+ BridgedERC20 newToken = deployBridgedToken("NEW");
+
+ vm.startPrank(vault);
+ oldToken.mint(Bob, 100);
+ newToken.mint(Bob, 200);
+
+ oldToken.changeMigrationStatus(address(newToken), false);
+ newToken.changeMigrationStatus(address(oldToken), true);
+ vm.stopPrank();
+
+ // Testing oldToken
+ // 1. minting is not possible for Bob, owner, or vault
+ vm.prank(Bob);
+ vm.expectRevert();
+ oldToken.mint(Bob, 10);
+
+ vm.prank(owner);
+ vm.expectRevert();
+ oldToken.mint(Bob, 10);
+
+ vm.prank(vault);
+ vm.expectRevert();
+ oldToken.mint(Bob, 10);
+
+ // 2. burning can be done by anyone
+ vm.prank(randAddress());
+ oldToken.burn(Bob, 10);
+ assertEq(oldToken.balanceOf(Bob), 90);
+ assertEq(newToken.balanceOf(Bob), 210);
+
+ // Testing newToken
+ // 1. Nobody can mint except the vault
+ vm.prank(Bob);
+ vm.expectRevert();
+ newToken.mint(Bob, 10);
+
+ vm.prank(owner);
+ vm.expectRevert();
+ newToken.mint(Bob, 10);
+
+ vm.prank(vault);
+ newToken.mint(Bob, 15);
+ assertEq(newToken.balanceOf(Bob), 225);
+
+ // 2. Nobody can burn except the vault
+ vm.prank(Bob);
+ vm.expectRevert();
+ newToken.burn(Bob, 10);
+
+ vm.prank(owner);
+ vm.expectRevert();
+ newToken.burn(Bob, 10);
+
+ vm.prank(vault);
+ newToken.burn(Bob, 25);
+ assertEq(newToken.balanceOf(Bob), 200);
+ }
+
+ function deployBridgedToken(string memory name) internal returns (BridgedERC20) {
+ address srcToken = randAddress();
+ uint256 srcChainId = 1000;
+ uint8 srcDecimals = 11;
+ return BridgedERC20(
+ deployProxy({
+ name: "bridged_token1",
+ impl: address(new BridgedERC20()),
+ data: bytes.concat(
+ BridgedERC20.init.selector,
+ abi.encode(address(manager), srcToken, srcChainId, srcDecimals, name, name)
+ ),
+ registerTo: manager,
+ owner: owner
+ })
+ );
+ }
+}
diff --git a/packages/protocol/test/tokenvault/ERC1155Vault.t.sol b/packages/protocol/test/tokenvault/ERC1155Vault.t.sol
index 0937bbaa8ae..33513d1a4c1 100644
--- a/packages/protocol/test/tokenvault/ERC1155Vault.t.sol
+++ b/packages/protocol/test/tokenvault/ERC1155Vault.t.sol
@@ -1,30 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
-import { console2 } from "forge-std/console2.sol";
-import {
- TestBase,
- SkipProofCheckBridge,
- DummyCrossChainSync,
- NonNftContract,
- BadReceiver
-} from "../TestBase.sol";
-import { AddressResolver } from "../../contracts/common/AddressResolver.sol";
-import { AddressManager } from "../../contracts/common/AddressManager.sol";
-import { IBridge, Bridge } from "../../contracts/bridge/Bridge.sol";
-import { LibBridgeData } from "../../contracts/bridge/libs/LibBridgeData.sol";
-import { BridgeErrors } from "../../contracts/bridge/BridgeErrors.sol";
-import { BaseNFTVault } from "../../contracts/tokenvault/BaseNFTVault.sol";
-import { ERC1155Vault } from "../../contracts/tokenvault/ERC1155Vault.sol";
-import { BridgedERC1155 } from "../../contracts/tokenvault/BridgedERC1155.sol";
-import { EtherVault } from "../../contracts/bridge/EtherVault.sol";
-import { LibBridgeStatus } from
- "../../contracts/bridge/libs/LibBridgeStatus.sol";
-import { SignalService } from "../../contracts/signal/SignalService.sol";
-import { ICrossChainSync } from "../../contracts/common/ICrossChainSync.sol";
-import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
-import
- "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
+import "lib/openzeppelin-contracts/contracts/token/ERC1155/ERC1155.sol";
+import "../TaikoTest.sol";
contract TestTokenERC1155 is ERC1155 {
constructor(string memory baseURI) ERC1155(baseURI) { }
@@ -43,7 +21,7 @@ contract PrankDestBridge {
struct BridgeContext {
bytes32 msgHash;
address sender;
- uint256 srcChainId;
+ uint64 srcChainId;
}
BridgeContext ctx;
@@ -59,10 +37,10 @@ contract PrankDestBridge {
function sendMessage(IBridge.Message memory message)
external
payable
- returns (bytes32 msgHash)
+ returns (bytes32 msgHash, IBridge.Message memory _message)
{
// Dummy return value
- return keccak256(abi.encode(message.id));
+ return (keccak256(abi.encode(message.id)), _message);
}
function context() public view returns (BridgeContext memory) {
@@ -77,7 +55,7 @@ contract PrankDestBridge {
uint256[] memory amounts,
bytes32 msgHash,
address srcChainERC1155Vault,
- uint256 srcChainId,
+ uint64 srcChainId,
uint256 mockLibInvokeMsgValue
)
public
@@ -104,115 +82,132 @@ contract PrankDestBridge {
}
}
-// PrankSrcBridge lets us mock Bridge/SignalService to return true when called
-// isMessageFailed()
-contract PrankSrcBridge is SkipProofCheckBridge {
- function getPreDeterminedDataBytes() external pure returns (bytes memory) {
- return
- hex"20b8155900000000000000000000000000000000000000000000000000000000000000a000000000000000000000000010020fcb72e27650651b05ed2ceca493bc807ba400000000000000000000000010020fcb72e27650651b05ed2ceca493bc807ba4000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000007a69000000000000000000000000a64f94242628683ea967cd7dd6a10b5ed0400662000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002";
- }
-}
-
contract UpdatedBridgedERC1155 is BridgedERC1155 {
function helloWorld() public pure returns (string memory) {
return "helloworld";
}
}
-contract ERC1155VaultTest is TestBase {
+contract ERC1155VaultTest is TaikoTest {
AddressManager addressManager;
BadReceiver badReceiver;
Bridge bridge;
Bridge destChainBridge;
PrankDestBridge destChainIdBridge;
- PrankSrcBridge srcPrankBridge;
+ SkipProofCheckSignal mockProofSignalService;
ERC1155Vault erc1155Vault;
ERC1155Vault destChainErc1155Vault;
TestTokenERC1155 ctoken1155;
- EtherVault etherVault;
SignalService signalService;
DummyCrossChainSync crossChainSync;
- uint256 destChainId = 19_389;
-
- // TODO(dani): why chaning Amilia's address will fail the test?
- //Need +1 bc. and Amelia is the proxied bridge contracts owner
- address public Amelia = 0x60081B12838240B1BA02b3177153BCa678A86080;
+ uint64 destChainId = 19_389;
function setUp() public {
- vm.startPrank(Amelia);
+ vm.startPrank(Carol);
vm.deal(Alice, 100 ether);
- vm.deal(Amelia, 100 ether);
+ vm.deal(Carol, 100 ether);
vm.deal(Bob, 100 ether);
- addressManager = new AddressManager();
- addressManager.init();
-
- bridge = new Bridge();
- bridge.init(address(addressManager));
-
- destChainBridge = new Bridge();
- destChainBridge.init(address(addressManager));
-
- signalService = new SignalService();
- signalService.init(address(addressManager));
-
- etherVault = new EtherVault();
- etherVault.init(address(addressManager));
-
- erc1155Vault = new ERC1155Vault();
- erc1155Vault.init(address(addressManager));
-
- destChainErc1155Vault = new ERC1155Vault();
- destChainErc1155Vault.init(address(addressManager));
+ addressManager = AddressManager(
+ deployProxy({
+ name: "address_manager",
+ impl: address(new AddressManager()),
+ data: bytes.concat(AddressManager.init.selector)
+ })
+ );
+
+ bridge = Bridge(
+ payable(
+ deployProxy({
+ name: "bridge",
+ impl: address(new Bridge()),
+ data: bytes.concat(Bridge.init.selector, abi.encode(addressManager)),
+ registerTo: address(addressManager),
+ owner: address(0)
+ })
+ )
+ );
+
+ destChainBridge = Bridge(
+ payable(
+ deployProxy({
+ name: "bridge",
+ impl: address(new Bridge()),
+ data: bytes.concat(Bridge.init.selector, abi.encode(addressManager)),
+ registerTo: address(addressManager),
+ owner: address(0)
+ })
+ )
+ );
+
+ signalService = SignalService(
+ deployProxy({
+ name: "signal_service",
+ impl: address(new SignalService()),
+ data: bytes.concat(SignalService.init.selector)
+ })
+ );
+
+ erc1155Vault = ERC1155Vault(
+ deployProxy({
+ name: "erc1155_vault",
+ impl: address(new ERC1155Vault()),
+ data: bytes.concat(BaseVault.init.selector, abi.encode(address(addressManager)))
+ })
+ );
+
+ destChainErc1155Vault = ERC1155Vault(
+ deployProxy({
+ name: "erc1155_vault",
+ impl: address(new ERC1155Vault()),
+ data: bytes.concat(BaseVault.init.selector, abi.encode(address(addressManager)))
+ })
+ );
destChainIdBridge = new PrankDestBridge(destChainErc1155Vault);
vm.deal(address(destChainIdBridge), 100 ether);
- srcPrankBridge = new PrankSrcBridge();
- srcPrankBridge.init(address(addressManager));
+ mockProofSignalService = SkipProofCheckSignal(
+ deployProxy({
+ name: "signal_service",
+ impl: address(new SkipProofCheckSignal()),
+ data: bytes.concat(SignalService.init.selector)
+ })
+ );
crossChainSync = new DummyCrossChainSync();
addressManager.setAddress(
- block.chainid, "signal_service", address(signalService)
+ uint64(block.chainid), "signal_service", address(mockProofSignalService)
);
- addressManager.setAddress(block.chainid, "bridge", address(bridge));
+ addressManager.setAddress(destChainId, "signal_service", address(mockProofSignalService));
- addressManager.setAddress(
- destChainId, "bridge", address(destChainIdBridge)
- );
+ addressManager.setAddress(uint64(block.chainid), "bridge", address(bridge));
- addressManager.setAddress(
- block.chainid, "erc1155_vault", address(erc1155Vault)
- );
+ addressManager.setAddress(destChainId, "bridge", address(destChainIdBridge));
- addressManager.setAddress(
- destChainId, "erc1155_vault", address(destChainErc1155Vault)
- );
+ addressManager.setAddress(uint64(block.chainid), "erc1155_vault", address(erc1155Vault));
+
+ addressManager.setAddress(destChainId, "erc1155_vault", address(destChainErc1155Vault));
// Below 2-2 registrations (mock) are needed bc of
// LibBridgeRecall.sol's
// resolve address
+ addressManager.setAddress(destChainId, "erc721_vault", address(mockProofSignalService));
+ addressManager.setAddress(destChainId, "erc20_vault", address(mockProofSignalService));
addressManager.setAddress(
- destChainId, "erc721_vault", address(srcPrankBridge)
- );
- addressManager.setAddress(
- destChainId, "erc20_vault", address(srcPrankBridge)
- );
- addressManager.setAddress(
- block.chainid, "erc721_vault", address(srcPrankBridge)
- );
- addressManager.setAddress(
- block.chainid, "erc20_vault", address(srcPrankBridge)
+ uint64(block.chainid), "erc721_vault", address(mockProofSignalService)
);
addressManager.setAddress(
- block.chainid, "ether_vault", address(etherVault)
+ uint64(block.chainid), "erc20_vault", address(mockProofSignalService)
);
- // Authorize
- etherVault.authorize(address(srcPrankBridge), true);
- etherVault.authorize(address(bridge), true);
- vm.deal(address(etherVault), 100 ether);
+ vm.deal(address(bridge), 100 ether);
+
+ address bridgedERC1155 = address(new BridgedERC1155());
+
+ addressManager.setAddress(destChainId, "bridged_erc1155", bridgedERC1155);
+ addressManager.setAddress(uint64(block.chainid), "bridged_erc1155", bridgedERC1155);
ctoken1155 = new TestTokenERC1155("http://example.host.com/");
vm.stopPrank();
@@ -223,6 +218,11 @@ contract ERC1155VaultTest is TestBase {
vm.stopPrank();
}
+ function getPreDeterminedDataBytes() internal pure returns (bytes memory) {
+ return
+ hex"20b8155900000000000000000000000000000000000000000000000000000000000000a00000000000000000000000007e5f4552091a69125d5dfcb7b8c2659029395bdf0000000000000000000000007e5f4552091a69125d5dfcb7b8c2659029395bdf000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000007a690000000000000000000000007935de70183a080242a58f64637a8e7f15349b63000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002";
+ }
+
function test_1155Vault_sendToken_1155() public {
vm.prank(Alice, Alice);
ctoken1155.setApprovalForAll(address(erc1155Vault), true);
@@ -236,17 +236,8 @@ contract ERC1155VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 2;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
- destChainId,
- Alice,
- address(ctoken1155),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
+ destChainId, Alice, address(ctoken1155), tokenIds, amounts, 140_000, 140_000, Alice, ""
);
vm.prank(Alice, Alice);
erc1155Vault.sendToken{ value: 140_000 }(sendOpts);
@@ -255,7 +246,7 @@ contract ERC1155VaultTest is TestBase {
assertEq(ctoken1155.balanceOf(address(erc1155Vault), 1), 2);
}
- function test_1155Vault_sendToken_with_invalid_to_address_1155() public {
+ function test_1155Vault_sendToken_with_invalid_token_address_1155() public {
vm.prank(Alice, Alice);
ctoken1155.setApprovalForAll(address(erc1155Vault), true);
@@ -268,49 +259,8 @@ contract ERC1155VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 2;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
- destChainId,
- address(0),
- address(ctoken1155),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
- );
- vm.prank(Alice, Alice);
- vm.expectRevert(BaseNFTVault.VAULT_INVALID_TO.selector);
- erc1155Vault.sendToken{ value: 140_000 }(sendOpts);
- }
-
- function test_1155Vault_sendToken_with_invalid_token_address_1155()
- public
- {
- vm.prank(Alice, Alice);
- ctoken1155.setApprovalForAll(address(erc1155Vault), true);
-
- assertEq(ctoken1155.balanceOf(Alice, 1), 10);
- assertEq(ctoken1155.balanceOf(address(erc1155Vault), 1), 0);
-
- uint256[] memory tokenIds = new uint256[](1);
- tokenIds[0] = 1;
-
- uint256[] memory amounts = new uint256[](1);
- amounts[0] = 2;
-
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
- destChainId,
- Alice,
- address(0),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
+ destChainId, Alice, address(0), tokenIds, amounts, 140_000, 140_000, Alice, ""
);
vm.prank(Alice, Alice);
vm.expectRevert(BaseNFTVault.VAULT_INVALID_TOKEN.selector);
@@ -330,17 +280,8 @@ contract ERC1155VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 0;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
- destChainId,
- Alice,
- address(ctoken1155),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
+ destChainId, Alice, address(ctoken1155), tokenIds, amounts, 140_000, 140_000, Alice, ""
);
vm.prank(Alice, Alice);
vm.expectRevert(BaseNFTVault.VAULT_INVALID_AMOUNT.selector);
@@ -363,17 +304,8 @@ contract ERC1155VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 2;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
- destChainId,
- Alice,
- address(ctoken1155),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
+ destChainId, Alice, address(ctoken1155), tokenIds, amounts, 140_000, 140_000, Alice, ""
);
vm.prank(Alice, Alice);
erc1155Vault.sendToken{ value: 140_000 }(sendOpts);
@@ -389,7 +321,7 @@ contract ERC1155VaultTest is TestBase {
name: ""
});
- uint256 srcChainId = block.chainid;
+ uint64 srcChainId = uint64(block.chainid);
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC1155ToERC1155Vault(
@@ -405,16 +337,14 @@ contract ERC1155VaultTest is TestBase {
);
// Query canonicalToBridged
- address deployedContract = destChainErc1155Vault.canonicalToBridged(
- srcChainId, address(ctoken1155)
- );
+ address deployedContract =
+ destChainErc1155Vault.canonicalToBridged(srcChainId, address(ctoken1155));
// Alice bridged over 2 items
assertEq(ERC1155(deployedContract).balanceOf(Alice, 1), 2);
}
- function test_1155Vault_receiveTokens_but_mint_not_deploy_if_bridged_second_time_1155(
- )
+ function test_1155Vault_receiveTokens_but_mint_not_deploy_if_bridged_second_time_1155()
public
{
vm.prank(Alice, Alice);
@@ -429,17 +359,8 @@ contract ERC1155VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 2;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
- destChainId,
- Alice,
- address(ctoken1155),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
+ destChainId, Alice, address(ctoken1155), tokenIds, amounts, 140_000, 140_000, Alice, ""
);
vm.prank(Alice, Alice);
erc1155Vault.sendToken{ value: 140_000 }(sendOpts);
@@ -454,7 +375,7 @@ contract ERC1155VaultTest is TestBase {
name: ""
});
- uint256 srcChainId = block.chainid;
+ uint64 srcChainId = uint64(block.chainid);
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC1155ToERC1155Vault(
@@ -470,9 +391,8 @@ contract ERC1155VaultTest is TestBase {
);
// Query canonicalToBridged
- address deployedContract = destChainErc1155Vault.canonicalToBridged(
- srcChainId, address(ctoken1155)
- );
+ address deployedContract =
+ destChainErc1155Vault.canonicalToBridged(srcChainId, address(ctoken1155));
// Alice bridged over 2 items
assertEq(ERC1155(deployedContract).balanceOf(Alice, 1), 2);
@@ -484,15 +404,7 @@ contract ERC1155VaultTest is TestBase {
amounts[0] = 1;
sendOpts = BaseNFTVault.BridgeTransferOp(
- destChainId,
- Alice,
- address(ctoken1155),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
+ destChainId, Alice, address(ctoken1155), tokenIds, amounts, 140_000, 140_000, Alice, ""
);
vm.prank(Alice, Alice);
erc1155Vault.sendToken{ value: 140_000 }(sendOpts);
@@ -515,9 +427,8 @@ contract ERC1155VaultTest is TestBase {
);
// Query canonicalToBridged
- address bridgedContract = destChainErc1155Vault.canonicalToBridged(
- srcChainId, address(ctoken1155)
- );
+ address bridgedContract =
+ destChainErc1155Vault.canonicalToBridged(srcChainId, address(ctoken1155));
assertEq(bridgedContract, deployedContract);
}
@@ -537,17 +448,8 @@ contract ERC1155VaultTest is TestBase {
uint256 etherValue = 0.1 ether;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
- destChainId,
- David,
- address(ctoken1155),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
+ destChainId, David, address(ctoken1155), tokenIds, amounts, 140_000, 140_000, Alice, ""
);
vm.prank(Alice, Alice);
erc1155Vault.sendToken{ value: etherValue }(sendOpts);
@@ -563,7 +465,7 @@ contract ERC1155VaultTest is TestBase {
name: ""
});
- uint256 srcChainId = block.chainid;
+ uint64 srcChainId = uint64(block.chainid);
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC1155ToERC1155Vault(
@@ -579,9 +481,8 @@ contract ERC1155VaultTest is TestBase {
);
// Query canonicalToBridged
- address deployedContract = destChainErc1155Vault.canonicalToBridged(
- srcChainId, address(ctoken1155)
- );
+ address deployedContract =
+ destChainErc1155Vault.canonicalToBridged(srcChainId, address(ctoken1155));
// Alice bridged over 2 items and etherValue to David
assertEq(ERC1155(deployedContract).balanceOf(David, 1), 2);
@@ -601,52 +502,17 @@ contract ERC1155VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 2;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
- destChainId,
- Alice,
- address(ctoken1155),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
- );
-
- // Let's test that message is failed and we want to release it back to
- // the owner
- vm.prank(Amelia, Amelia);
- addressManager.setAddress(
- block.chainid, "bridge", address(srcPrankBridge)
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
+ destChainId, Alice, address(ctoken1155), tokenIds, amounts, 140_000, 140_000, Alice, ""
);
vm.prank(Alice, Alice);
- erc1155Vault.sendToken{ value: 140_000 }(sendOpts);
+ IBridge.Message memory message = erc1155Vault.sendToken{ value: 140_000 }(sendOpts);
assertEq(ctoken1155.balanceOf(Alice, 1), 8);
assertEq(ctoken1155.balanceOf(address(erc1155Vault), 1), 2);
- // Reconstruct the message.
- // Actually the only 2 things absolute necessary to fill are the owner
- // and
- // srcChain, because we mock the bridge functions, but good to have data
- // here so that it could have been hashed back to the exact same bytes32
- // value - if we were not mocking.
- IBridge.Message memory message;
- message.srcChainId = 31_337;
- message.destChainId = destChainId;
- message.user = Alice;
- message.from = address(erc1155Vault);
- message.to = address(destChainErc1155Vault);
- message.data = srcPrankBridge.getPreDeterminedDataBytes();
- message.gasLimit = 140_000;
- message.fee = 140_000;
- message.refundTo = Alice;
- message.memo = "";
- bytes memory proof = bytes("");
-
- srcPrankBridge.recallMessage(message, proof);
+ bridge.recallMessage(message, bytes(""));
// Alice got back her NFTs, and vault has 0
assertEq(ctoken1155.balanceOf(Alice, 1), 10);
@@ -671,17 +537,8 @@ contract ERC1155VaultTest is TestBase {
amounts[0] = 2;
amounts[1] = 5;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
- destChainId,
- Alice,
- address(ctoken1155),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
+ destChainId, Alice, address(ctoken1155), tokenIds, amounts, 140_000, 140_000, Alice, ""
);
vm.prank(Alice, Alice);
erc1155Vault.sendToken{ value: 140_000 }(sendOpts);
@@ -699,7 +556,7 @@ contract ERC1155VaultTest is TestBase {
name: ""
});
- uint256 srcChainId = block.chainid;
+ uint64 srcChainId = uint64(block.chainid);
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC1155ToERC1155Vault(
@@ -715,18 +572,15 @@ contract ERC1155VaultTest is TestBase {
);
// Query canonicalToBridged
- address deployedContract = destChainErc1155Vault.canonicalToBridged(
- srcChainId, address(ctoken1155)
- );
+ address deployedContract =
+ destChainErc1155Vault.canonicalToBridged(srcChainId, address(ctoken1155));
// Alice bridged over 2 items
assertEq(ERC1155(deployedContract).balanceOf(Alice, 1), 2);
assertEq(ERC1155(deployedContract).balanceOf(Alice, 2), 5);
}
- function test_1155Vault_bridge_back_but_owner_is_different_now_1155()
- public
- {
+ function test_1155Vault_bridge_back_but_owner_is_different_now_1155() public {
vm.prank(Alice, Alice);
ctoken1155.setApprovalForAll(address(erc1155Vault), true);
@@ -739,17 +593,8 @@ contract ERC1155VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 1;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
- destChainId,
- Alice,
- address(ctoken1155),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
+ destChainId, Alice, address(ctoken1155), tokenIds, amounts, 140_000, 140_000, Alice, ""
);
vm.prank(Alice, Alice);
erc1155Vault.sendToken{ value: 140_000 }(sendOpts);
@@ -759,15 +604,14 @@ contract ERC1155VaultTest is TestBase {
// This canonicalToken is basically need to be exact same as the
// sendToken() puts together
// - here is just mocking putting it together.
- BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault
- .CanonicalNFT({
+ BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault.CanonicalNFT({
chainId: 31_337,
addr: address(ctoken1155),
symbol: "TT",
name: "TT"
});
- uint256 chainId = block.chainid;
+ uint64 chainId = uint64(block.chainid);
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC1155ToERC1155Vault(
@@ -781,11 +625,9 @@ contract ERC1155VaultTest is TestBase {
chainId,
0
);
-
// Query canonicalToBridged
- address deployedContract = destChainErc1155Vault.canonicalToBridged(
- chainId, address(ctoken1155)
- );
+ address deployedContract =
+ destChainErc1155Vault.canonicalToBridged(chainId, address(ctoken1155));
// Alice bridged over 1 from tokenId 1
assertEq(ERC1155(deployedContract).balanceOf(Alice, 1), 1);
@@ -799,20 +641,10 @@ contract ERC1155VaultTest is TestBase {
assertEq(ERC1155(deployedContract).balanceOf(Alice, 1), 0);
vm.prank(Bob, Bob);
- ERC1155(deployedContract).setApprovalForAll(
- address(destChainErc1155Vault), true
- );
+ ERC1155(deployedContract).setApprovalForAll(address(destChainErc1155Vault), true);
sendOpts = BaseNFTVault.BridgeTransferOp(
- chainId,
- Bob,
- address(deployedContract),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Bob,
- ""
+ chainId, Bob, address(deployedContract), tokenIds, amounts, 140_000, 140_000, Bob, ""
);
vm.prank(Bob, Bob);
@@ -824,10 +656,8 @@ contract ERC1155VaultTest is TestBase {
destChainIdBridge.setERC1155Vault(address(erc1155Vault));
- vm.prank(Amelia, Amelia);
- addressManager.setAddress(
- block.chainid, "bridge", address(destChainIdBridge)
- );
+ vm.prank(Carol, Carol);
+ addressManager.setAddress(uint64(block.chainid), "bridge", address(destChainIdBridge));
destChainIdBridge.sendReceiveERC1155ToERC1155Vault(
canonicalToken,
@@ -844,8 +674,7 @@ contract ERC1155VaultTest is TestBase {
assertEq(ctoken1155.balanceOf(Bob, 1), 1);
}
- function test_1155Vault_bridge_back_but_original_owner_cannot_claim_it_anymore_if_sold_1155(
- )
+ function test_1155Vault_bridge_back_but_original_owner_cannot_claim_it_anymore_if_sold_1155()
public
{
vm.prank(Alice, Alice);
@@ -860,17 +689,8 @@ contract ERC1155VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 1;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
- destChainId,
- Alice,
- address(ctoken1155),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
+ destChainId, Alice, address(ctoken1155), tokenIds, amounts, 140_000, 140_000, Alice, ""
);
vm.prank(Alice, Alice);
erc1155Vault.sendToken{ value: 140_000 }(sendOpts);
@@ -880,15 +700,14 @@ contract ERC1155VaultTest is TestBase {
// This canonicalToken is basically need to be exact same as the
// sendToken() puts together
// - here is just mocking putting it together.
- BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault
- .CanonicalNFT({
+ BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault.CanonicalNFT({
chainId: 31_337,
addr: address(ctoken1155),
symbol: "TT",
name: "TT"
});
- uint256 chainId = block.chainid;
+ uint64 chainId = uint64(block.chainid);
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC1155ToERC1155Vault(
@@ -904,9 +723,8 @@ contract ERC1155VaultTest is TestBase {
);
// Query canonicalToBridged
- address deployedContract = destChainErc1155Vault.canonicalToBridged(
- chainId, address(ctoken1155)
- );
+ address deployedContract =
+ destChainErc1155Vault.canonicalToBridged(chainId, address(ctoken1155));
// Alice bridged over 1 from tokenId 1
assertEq(ERC1155(deployedContract).balanceOf(Alice, 1), 1);
@@ -919,20 +737,10 @@ contract ERC1155VaultTest is TestBase {
assertEq(ERC1155(deployedContract).balanceOf(Alice, 1), 0);
vm.prank(Bob, Bob);
- ERC1155(deployedContract).setApprovalForAll(
- address(destChainErc1155Vault), true
- );
+ ERC1155(deployedContract).setApprovalForAll(address(destChainErc1155Vault), true);
sendOpts = BaseNFTVault.BridgeTransferOp(
- chainId,
- Alice,
- address(deployedContract),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Bob,
- ""
+ chainId, Alice, address(deployedContract), tokenIds, amounts, 140_000, 140_000, Bob, ""
);
vm.prank(Alice, Alice);
@@ -953,17 +761,8 @@ contract ERC1155VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 2;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
- destChainId,
- Alice,
- address(ctoken1155),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
+ destChainId, Alice, address(ctoken1155), tokenIds, amounts, 140_000, 140_000, Alice, ""
);
vm.prank(Alice, Alice);
erc1155Vault.sendToken{ value: 140_000 }(sendOpts);
@@ -978,7 +777,7 @@ contract ERC1155VaultTest is TestBase {
name: ""
});
- uint256 srcChainId = block.chainid;
+ uint64 srcChainId = uint64(block.chainid);
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC1155ToERC1155Vault(
@@ -994,9 +793,8 @@ contract ERC1155VaultTest is TestBase {
);
// Query canonicalToBridged
- address deployedContract = destChainErc1155Vault.canonicalToBridged(
- srcChainId, address(ctoken1155)
- );
+ address deployedContract =
+ destChainErc1155Vault.canonicalToBridged(srcChainId, address(ctoken1155));
try UpdatedBridgedERC1155(deployedContract).helloWorld() {
fail();
@@ -1005,10 +803,8 @@ contract ERC1155VaultTest is TestBase {
// Upgrade the implementation of that contract
// so that it supports now the 'helloWorld' call
UpdatedBridgedERC1155 newBridgedContract = new UpdatedBridgedERC1155();
- vm.prank(Amelia, Amelia);
- TransparentUpgradeableProxy(payable(deployedContract)).upgradeTo(
- address(newBridgedContract)
- );
+ vm.prank(Carol, Carol);
+ BridgedERC1155(payable(deployedContract)).upgradeTo(address(newBridgedContract));
try UpdatedBridgedERC1155(deployedContract).helloWorld() { }
catch {
diff --git a/packages/protocol/test/tokenvault/ERC20Vault.t.sol b/packages/protocol/test/tokenvault/ERC20Vault.t.sol
index fed22ca156e..8440cb695cd 100644
--- a/packages/protocol/test/tokenvault/ERC20Vault.t.sol
+++ b/packages/protocol/test/tokenvault/ERC20Vault.t.sol
@@ -1,30 +1,19 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
-import { AddressManager } from "../../contracts/common/AddressManager.sol";
-import { AddressResolver } from "../../contracts/common/AddressResolver.sol";
-import { Bridge } from "../../contracts/bridge/Bridge.sol";
-import { BridgedERC20 } from "../../contracts/tokenvault/BridgedERC20.sol";
-import { BridgeErrors } from "../../contracts/bridge/BridgeErrors.sol";
-import { FreeMintERC20 } from "../../contracts/test/erc20/FreeMintERC20.sol";
-import { SignalService } from "../../contracts/signal/SignalService.sol";
-import { TaikoToken } from "../../contracts/L1/TaikoToken.sol";
-import { Test } from "forge-std/Test.sol";
-import { ERC20Vault } from "../../contracts/tokenvault/ERC20Vault.sol";
-import
- "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
+import "../TaikoTest.sol";
// PrankDestBridge lets us simulate a transaction to the ERC20Vault
// from a named Bridge, without having to test/run through the real Bridge code,
// outside the scope of the unit tests in the ERC20Vault.
contract PrankDestBridge {
ERC20Vault destERC20Vault;
- Context ctx;
+ TContext ctx;
- struct Context {
+ struct TContext {
bytes32 msgHash; // messageHash
address sender;
- uint256 srcChainId;
+ uint64 srcChainId;
}
constructor(ERC20Vault _erc20Vault) {
@@ -35,7 +24,7 @@ contract PrankDestBridge {
destERC20Vault = ERC20Vault(addr);
}
- function context() public view returns (Context memory) {
+ function context() public view returns (TContext memory) {
return ctx;
}
@@ -46,7 +35,7 @@ contract PrankDestBridge {
uint256 amount,
bytes32 msgHash,
address srcChainERC20Vault,
- uint256 srcChainId,
+ uint64 srcChainId,
uint256 mockLibInvokeMsgValue
)
public
@@ -60,9 +49,8 @@ contract PrankDestBridge {
// message.to.call{ value: message.value, gas: gasLimit
// }(message.data);
// The problem (with foundry) is that this way it is not able to deploy
- // a contract
- // most probably due to some deployment address nonce issue. (Seems a
- // known issue).
+ // a contract most probably due to some deployment address nonce issue. (Seems a known
+ // issue).
destERC20Vault.receiveToken{ value: mockLibInvokeMsgValue }(
canonicalToken, from, to, amount
);
@@ -79,7 +67,7 @@ contract UpdatedBridgedERC20 is BridgedERC20 {
}
}
-contract TestERC20Vault is Test {
+contract TestERC20Vault is TaikoTest {
TaikoToken tko;
AddressManager addressManager;
Bridge bridge;
@@ -88,63 +76,94 @@ contract TestERC20Vault is Test {
PrankDestBridge destChainIdBridge;
FreeMintERC20 erc20;
SignalService signalService;
- uint256 destChainId = 7;
-
- address public constant Alice = 0x10020FCb72e27650651B05eD2CEcA493bC807Ba4;
- address public constant Bob = 0x200708D76eB1B69761c23821809d53F65049939e;
- //Need +1 bc. and Amelia is the proxied bridge contracts owner
- address public constant Amelia = 0x60081B12838240B1BA02b3177153BCa678A86080;
- // Dave has nothing so that we can check if he gets the ether (and other
- // erc20)
- address public constant Dave = 0x70081B12838240b1ba02B3177153bcA678a86090;
+ uint64 destChainId = 7;
+ uint64 srcChainId = uint64(block.chainid);
function setUp() public {
- vm.startPrank(Amelia);
+ vm.startPrank(Carol);
vm.deal(Alice, 1 ether);
- vm.deal(Amelia, 1 ether);
+ vm.deal(Carol, 1 ether);
vm.deal(Bob, 1 ether);
- tko = new TaikoToken();
+ tko = TaikoToken(
+ deployProxy({
+ name: "taiko_token",
+ impl: address(new TaikoToken()),
+ data: bytes.concat(
+ TaikoToken.init.selector, abi.encode("Taiko Token", "TTKOk", address(this))
+ )
+ })
+ );
+
+ addressManager = AddressManager(
+ deployProxy({
+ name: "address_manager",
+ impl: address(new AddressManager()),
+ data: bytes.concat(AddressManager.init.selector)
+ })
+ );
- addressManager = new AddressManager();
- addressManager.init();
- addressManager.setAddress(block.chainid, "taiko_token", address(tko));
+ addressManager.setAddress(uint64(block.chainid), "taiko_token", address(tko));
- erc20Vault = new ERC20Vault();
- erc20Vault.init(address(addressManager));
+ erc20Vault = ERC20Vault(
+ deployProxy({
+ name: "erc20_vault",
+ impl: address(new ERC20Vault()),
+ data: bytes.concat(BaseVault.init.selector, abi.encode(address(addressManager)))
+ })
+ );
- destChainIdERC20Vault = new ERC20Vault();
- destChainIdERC20Vault.init(address(addressManager));
+ destChainIdERC20Vault = ERC20Vault(
+ deployProxy({
+ name: "erc20_vault",
+ impl: address(new ERC20Vault()),
+ data: bytes.concat(BaseVault.init.selector, abi.encode(address(addressManager)))
+ })
+ );
erc20 = new FreeMintERC20("ERC20", "ERC20");
erc20.mint(Alice);
- bridge = new Bridge();
- bridge.init(address(addressManager));
+ bridge = Bridge(
+ payable(
+ deployProxy({
+ name: "bridge",
+ impl: address(new Bridge()),
+ data: bytes.concat(Bridge.init.selector, abi.encode(addressManager)),
+ registerTo: address(addressManager),
+ owner: address(0)
+ })
+ )
+ );
destChainIdBridge = new PrankDestBridge(erc20Vault);
vm.deal(address(destChainIdBridge), 100 ether);
- signalService = new SignalService();
- signalService.init(address(addressManager));
+ signalService = SignalService(
+ deployProxy({
+ name: "signal_service",
+ impl: address(new SignalService()),
+ data: bytes.concat(SignalService.init.selector),
+ registerTo: address(0),
+ owner: address(0)
+ })
+ );
- addressManager.setAddress(block.chainid, "bridge", address(bridge));
+ addressManager.setAddress(uint64(block.chainid), "bridge", address(bridge));
- addressManager.setAddress(
- block.chainid, "signal_service", address(signalService)
- );
+ addressManager.setAddress(uint64(block.chainid), "signal_service", address(signalService));
- addressManager.setAddress(
- block.chainid, "erc20_vault", address(erc20Vault)
- );
+ addressManager.setAddress(uint64(block.chainid), "erc20_vault", address(erc20Vault));
- addressManager.setAddress(
- destChainId, "erc20_vault", address(destChainIdERC20Vault)
- );
+ addressManager.setAddress(destChainId, "erc20_vault", address(destChainIdERC20Vault));
- addressManager.setAddress(
- destChainId, "bridge", address(destChainIdBridge)
- );
+ addressManager.setAddress(destChainId, "bridge", address(destChainIdBridge));
+
+ address bridgedERC20 = address(new BridgedERC20());
+
+ addressManager.setAddress(destChainId, "bridged_erc20", bridgedERC20);
+
+ addressManager.setAddress(uint64(block.chainid), "bridged_erc20", bridgedERC20);
vm.stopPrank();
}
@@ -182,10 +201,7 @@ contract TestERC20Vault is Test {
assertEq(erc20VaultBalanceAfter - erc20VaultBalanceBefore, amount);
}
- function test_20Vault_send_erc20_processing_fee_reverts_if_msg_value_too_low(
- )
- public
- {
+ function test_20Vault_send_erc20_processing_fee_reverts_if_msg_value_too_low() public {
vm.startPrank(Alice);
uint256 amount = 2 wei;
@@ -194,14 +210,7 @@ contract TestERC20Vault is Test {
vm.expectRevert();
erc20Vault.sendToken(
ERC20Vault.BridgeTransferOp(
- destChainId,
- Bob,
- address(erc20),
- amount,
- 1_000_000,
- amount - 1,
- Bob,
- ""
+ destChainId, Bob, address(erc20), amount, 1_000_000, amount - 1, Bob, ""
)
);
}
@@ -255,39 +264,15 @@ contract TestERC20Vault is Test {
vm.expectRevert(ERC20Vault.VAULT_INVALID_TOKEN.selector);
erc20Vault.sendToken(
- ERC20Vault.BridgeTransferOp(
- destChainId, Bob, address(0), amount, 1_000_000, 0, Bob, ""
- )
- );
- }
-
- function test_20Vault_send_erc20_reverts_invalid_to() public {
- vm.startPrank(Alice);
-
- uint256 amount = 1;
-
- vm.expectRevert(ERC20Vault.VAULT_INVALID_TO.selector);
- erc20Vault.sendToken(
- ERC20Vault.BridgeTransferOp(
- destChainId,
- address(0),
- address(erc20),
- amount,
- 1_000_000,
- 0,
- Bob,
- ""
- )
+ ERC20Vault.BridgeTransferOp(destChainId, Bob, address(0), amount, 1_000_000, 0, Bob, "")
);
}
- function test_20Vault_receive_erc20_canonical_to_dest_chain_transfers_from_canonical_token(
- )
+ function test_20Vault_receive_erc20_canonical_to_dest_chain_transfers_from_canonical_token()
public
{
vm.startPrank(Alice);
- uint256 srcChainId = block.chainid;
vm.chainId(destChainId);
erc20.mint(address(erc20Vault));
@@ -319,14 +304,13 @@ contract TestERC20Vault is Test {
function test_20Vault_receiveTokens_erc20_with_ether_to_dave() public {
vm.startPrank(Alice);
- uint256 srcChainId = block.chainid;
vm.chainId(destChainId);
erc20.mint(address(erc20Vault));
uint256 amount = 1;
uint256 etherAmount = 0.1 ether;
- address to = Dave;
+ address to = David;
uint256 erc20VaultBalanceBefore = erc20.balanceOf(address(erc20Vault));
uint256 toBalanceBefore = erc20.balanceOf(to);
@@ -347,7 +331,7 @@ contract TestERC20Vault is Test {
uint256 toBalanceAfter = erc20.balanceOf(to);
assertEq(toBalanceAfter - toBalanceBefore, amount);
- assertEq(Dave.balance, etherAmount);
+ assertEq(David.balance, etherAmount);
}
function test_20Vault_receive_erc20_non_canonical_to_dest_chain_deploys_new_bridged_token_and_mints(
@@ -356,7 +340,6 @@ contract TestERC20Vault is Test {
{
vm.startPrank(Alice);
- uint256 srcChainId = block.chainid;
vm.chainId(destChainId);
uint256 amount = 1;
@@ -383,11 +366,12 @@ contract TestERC20Vault is Test {
assertEq(bridgedAddressAfter != address(0), true);
BridgedERC20 bridgedERC20 = BridgedERC20(bridgedAddressAfter);
- assertEq(bridgedERC20.name(), unicode"ERC20 â€31337");
+ assertEq(bridgedERC20.name(), unicode"Bridged ERC20 (â€31337)");
+ assertEq(bridgedERC20.symbol(), unicode"ERC20.t");
assertEq(bridgedERC20.balanceOf(Bob), amount);
}
- function erc20ToCanonicalERC20(uint256 chainId)
+ function erc20ToCanonicalERC20(uint64 chainId)
internal
view
returns (ERC20Vault.CanonicalERC20 memory)
@@ -404,7 +388,6 @@ contract TestERC20Vault is Test {
function test_20Vault_upgrade_bridged_tokens_20() public {
vm.startPrank(Alice);
- uint256 srcChainId = block.chainid;
vm.chainId(destChainId);
uint256 amount = 1;
@@ -433,21 +416,19 @@ contract TestERC20Vault is Test {
try UpdatedBridgedERC20(bridgedAddressAfter).helloWorld() {
fail();
} catch {
- //It should not yet support this function call
+ // It should not yet support this function call
}
// Upgrade the implementation of that contract
// so that it supports now the 'helloWorld' call
UpdatedBridgedERC20 newBridgedContract = new UpdatedBridgedERC20();
vm.stopPrank();
- vm.prank(Amelia, Amelia);
- TransparentUpgradeableProxy(payable(bridgedAddressAfter)).upgradeTo(
- address(newBridgedContract)
- );
+ vm.prank(Carol, Carol);
+ BridgedERC20(payable(bridgedAddressAfter)).upgradeTo(address(newBridgedContract));
vm.prank(Alice, Alice);
try UpdatedBridgedERC20(bridgedAddressAfter).helloWorld() {
- //It should support now this function call
+ // It should support now this function call
} catch {
fail();
}
diff --git a/packages/protocol/test/tokenvault/ERC721Vault.t.sol b/packages/protocol/test/tokenvault/ERC721Vault.t.sol
index 6fb22d642e0..4e74d25f2ce 100644
--- a/packages/protocol/test/tokenvault/ERC721Vault.t.sol
+++ b/packages/protocol/test/tokenvault/ERC721Vault.t.sol
@@ -1,29 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
-import { console2 } from "forge-std/console2.sol";
-import {
- TestBase,
- SkipProofCheckBridge,
- DummyCrossChainSync,
- NonNftContract,
- BadReceiver
-} from "../TestBase.sol";
-import { AddressManager } from "../../contracts/common/AddressManager.sol";
-import { IBridge, Bridge } from "../../contracts/bridge/Bridge.sol";
-import { LibBridgeData } from "../../contracts/bridge/libs/LibBridgeData.sol";
-import { BridgeErrors } from "../../contracts/bridge/BridgeErrors.sol";
-import { BaseNFTVault } from "../../contracts/tokenvault/BaseNFTVault.sol";
-import { ERC721Vault } from "../../contracts/tokenvault/ERC721Vault.sol";
-import { BridgedERC721 } from "../../contracts/tokenvault/BridgedERC721.sol";
-import { EtherVault } from "../../contracts/bridge/EtherVault.sol";
-import { LibBridgeStatus } from
- "../../contracts/bridge/libs/LibBridgeStatus.sol";
-import { SignalService } from "../../contracts/signal/SignalService.sol";
-import { ICrossChainSync } from "../../contracts/common/ICrossChainSync.sol";
-import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
-import
- "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
+import "lib/openzeppelin-contracts/contracts/token/ERC721/ERC721.sol";
+import "../TaikoTest.sol";
contract TestTokenERC721 is ERC721 {
string _baseTokenURI;
@@ -37,18 +16,12 @@ contract TestTokenERC721 is ERC721 {
_baseTokenURI = baseURI;
}
- function _baseURI()
- internal
- view
- virtual
- override
- returns (string memory)
- {
+ function _baseURI() internal view virtual override returns (string memory) {
return _baseTokenURI;
}
function mint(uint256 amount) public {
- for (uint256 i; i < amount; i++) {
+ for (uint256 i; i < amount; ++i) {
_safeMint(msg.sender, minted + i);
}
minted += amount;
@@ -64,7 +37,7 @@ contract PrankDestBridge {
struct BridgeContext {
bytes32 msgHash;
address sender;
- uint256 chainId;
+ uint64 chainId;
}
BridgeContext ctx;
@@ -80,10 +53,10 @@ contract PrankDestBridge {
function sendMessage(IBridge.Message memory message)
external
payable
- returns (bytes32 msgHash)
+ returns (bytes32 msgHash, IBridge.Message memory _message)
{
// Dummy return value
- return keccak256(abi.encode(message.id));
+ return (keccak256(abi.encode(message.id)), _message);
}
function context() public view returns (BridgeContext memory) {
@@ -97,7 +70,7 @@ contract PrankDestBridge {
uint256[] memory tokenIds,
bytes32 msgHash,
address srcChainerc721Vault,
- uint256 chainId,
+ uint64 chainId,
uint256 mockLibInvokeMsgValue
)
public
@@ -124,125 +97,140 @@ contract PrankDestBridge {
}
}
-// PrankSrcBridge lets us mock Bridge/SignalService to return true when called
-// isMessageFailed()
-contract PrankSrcBridge is SkipProofCheckBridge {
- function getPreDeterminedDataBytes() external pure returns (bytes memory) {
- return
- hex"a9976baf000000000000000000000000000000000000000000000000000000000000008000000000000000000000000010020fcb72e27650651b05ed2ceca493bc807ba400000000000000000000000010020fcb72e27650651b05ed2ceca493bc807ba400000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000007a69000000000000000000000000f349eda7118cad7972b7401c1f5d71e9ea218ef8000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000254540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002545400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001";
- }
-}
-
contract UpdatedBridgedERC721 is BridgedERC721 {
function helloWorld() public pure returns (string memory) {
return "helloworld";
}
}
-contract ERC721VaultTest is TestBase {
+contract ERC721VaultTest is TaikoTest {
AddressManager addressManager;
BadReceiver badReceiver;
Bridge bridge;
Bridge destChainBridge;
PrankDestBridge destChainIdBridge;
- PrankSrcBridge srcPrankBridge;
+ SkipProofCheckSignal mockProofSignalService;
ERC721Vault erc721Vault;
ERC721Vault destChainErc721Vault;
TestTokenERC721 canonicalToken721;
- EtherVault etherVault;
SignalService signalService;
DummyCrossChainSync crossChainSync;
- uint256 destChainId = 19_389;
-
- //Need +1 bc. and Amelia is the proxied bridge contracts owner
- address public constant Amelia = 0x60081B12838240B1BA02b3177153BCa678A86080;
+ uint64 destChainId = 19_389;
function setUp() public {
- // TODO(dani): we have to overwrite Alice address, otherise
- // test_onMessageRecalled_721 will fail. Do you know why?
- Alice = 0x10020FCb72e27650651B05eD2CEcA493bC807Ba4;
-
- vm.startPrank(Amelia);
+ vm.startPrank(Carol);
vm.deal(Alice, 100 ether);
- vm.deal(Amelia, 100 ether);
+ vm.deal(Carol, 100 ether);
vm.deal(Bob, 100 ether);
- addressManager = new AddressManager();
- addressManager.init();
-
- bridge = new Bridge();
- bridge.init(address(addressManager));
-
- destChainBridge = new Bridge();
- destChainBridge.init(address(addressManager));
-
- signalService = new SignalService();
- signalService.init(address(addressManager));
- etherVault = new EtherVault();
- etherVault.init(address(addressManager));
-
- erc721Vault = new ERC721Vault();
- erc721Vault.init(address(addressManager));
-
- destChainErc721Vault = new ERC721Vault();
- destChainErc721Vault.init(address(addressManager));
+ addressManager = AddressManager(
+ deployProxy({
+ name: "address_manager",
+ impl: address(new AddressManager()),
+ data: bytes.concat(AddressManager.init.selector)
+ })
+ );
+
+ bridge = Bridge(
+ payable(
+ deployProxy({
+ name: "bridge",
+ impl: address(new Bridge()),
+ data: bytes.concat(Bridge.init.selector, abi.encode(addressManager)),
+ registerTo: address(addressManager),
+ owner: address(0)
+ })
+ )
+ );
+
+ destChainBridge = Bridge(
+ payable(
+ deployProxy({
+ name: "bridge",
+ impl: address(new Bridge()),
+ data: bytes.concat(Bridge.init.selector, abi.encode(addressManager)),
+ registerTo: address(addressManager),
+ owner: address(0)
+ })
+ )
+ );
+
+ signalService = SignalService(
+ deployProxy({
+ name: "signal_service",
+ impl: address(new SignalService()),
+ data: bytes.concat(SignalService.init.selector)
+ })
+ );
+
+ erc721Vault = ERC721Vault(
+ deployProxy({
+ name: "erc721_vault",
+ impl: address(new ERC721Vault()),
+ data: bytes.concat(BaseVault.init.selector, abi.encode(address(addressManager)))
+ })
+ );
+
+ destChainErc721Vault = ERC721Vault(
+ deployProxy({
+ name: "erc721_vault",
+ impl: address(new ERC721Vault()),
+ data: bytes.concat(BaseVault.init.selector, abi.encode(address(addressManager)))
+ })
+ );
destChainIdBridge = new PrankDestBridge(destChainErc721Vault);
vm.deal(address(destChainIdBridge), 100 ether);
- srcPrankBridge = new PrankSrcBridge();
- srcPrankBridge.init(address(addressManager));
+ mockProofSignalService = SkipProofCheckSignal(
+ deployProxy({
+ name: "signal_service",
+ impl: address(new SkipProofCheckSignal()),
+ data: bytes.concat(SignalService.init.selector)
+ })
+ );
crossChainSync = new DummyCrossChainSync();
addressManager.setAddress(
- block.chainid, "signal_service", address(signalService)
+ uint64(block.chainid), "signal_service", address(mockProofSignalService)
);
- addressManager.setAddress(block.chainid, "bridge", address(bridge));
+ addressManager.setAddress(destChainId, "signal_service", address(mockProofSignalService));
- addressManager.setAddress(
- destChainId, "bridge", address(destChainIdBridge)
- );
+ addressManager.setAddress(uint64(block.chainid), "bridge", address(bridge));
- addressManager.setAddress(
- block.chainid, "erc721_vault", address(erc721Vault)
- );
+ addressManager.setAddress(destChainId, "bridge", address(destChainIdBridge));
- addressManager.setAddress(
- destChainId, "erc721_vault", address(destChainErc721Vault)
- );
+ addressManager.setAddress(uint64(block.chainid), "erc721_vault", address(erc721Vault));
+
+ addressManager.setAddress(destChainId, "erc721_vault", address(destChainErc721Vault));
// Below 2-2 registrations (mock) are needed bc of
// LibBridgeRecall.sol's
// resolve address
- addressManager.setAddress(
- destChainId, "erc1155_vault", address(srcPrankBridge)
- );
- addressManager.setAddress(
- destChainId, "erc20_vault", address(srcPrankBridge)
- );
- addressManager.setAddress(
- block.chainid, "erc1155_vault", address(srcPrankBridge)
- );
- addressManager.setAddress(
- block.chainid, "erc20_vault", address(srcPrankBridge)
- );
- addressManager.setAddress(
- block.chainid, "ether_vault", address(etherVault)
- );
- // Authorize
- etherVault.authorize(address(srcPrankBridge), true);
- etherVault.authorize(address(bridge), true);
+ addressManager.setAddress(destChainId, "erc1155_vault", address(erc721Vault));
+ addressManager.setAddress(destChainId, "erc20_vault", address(erc721Vault));
+ addressManager.setAddress(uint64(block.chainid), "erc1155_vault", address(erc721Vault));
+ addressManager.setAddress(uint64(block.chainid), "erc20_vault", address(erc721Vault));
+
+ address bridgedERC721 = address(new BridgedERC721());
+
+ addressManager.setAddress(destChainId, "bridged_erc721", bridgedERC721);
+ addressManager.setAddress(uint64(block.chainid), "bridged_erc721", bridgedERC721);
vm.stopPrank();
vm.startPrank(Alice);
canonicalToken721 = new TestTokenERC721("http://example.host.com/");
canonicalToken721.mint(10);
-
vm.stopPrank();
}
+ function getPreDeterminedDataBytes() internal pure returns (bytes memory) {
+ return
+ hex"a9976baf00000000000000000000000000000000000000000000000000000000000000800000000000000000000000007e5f4552091a69125d5dfcb7b8c2659029395bdf0000000000000000000000007e5f4552091a69125d5dfcb7b8c2659029395bdf00000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000007a69000000000000000000000000f2e246bb76df876cef8b38ae84130f4f55de395b000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000254540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002545400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001";
+ }
+
function test_721Vault_sendToken_721() public {
vm.prank(Alice, Alice);
canonicalToken721.approve(address(erc721Vault), 1);
@@ -255,8 +243,7 @@ contract ERC721VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 0;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
destChainId,
Alice,
address(canonicalToken721),
@@ -273,35 +260,6 @@ contract ERC721VaultTest is TestBase {
assertEq(ERC721(canonicalToken721).ownerOf(1), address(erc721Vault));
}
- function test_721Vault_sendToken_with_invalid_to_address_721() public {
- vm.prank(Alice, Alice);
- canonicalToken721.approve(address(erc721Vault), 1);
-
- assertEq(canonicalToken721.ownerOf(1), Alice);
-
- uint256[] memory tokenIds = new uint256[](1);
- tokenIds[0] = 1;
-
- uint256[] memory amounts = new uint256[](1);
- amounts[0] = 0;
-
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
- destChainId,
- address(0),
- address(canonicalToken721),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
- );
- vm.prank(Alice, Alice);
- vm.expectRevert(BaseNFTVault.VAULT_INVALID_TO.selector);
- erc721Vault.sendToken{ value: 140_000 }(sendOpts);
- }
-
function test_721Vault_sendToken_with_invalid_token_address() public {
vm.prank(Alice, Alice);
canonicalToken721.approve(address(erc721Vault), 1);
@@ -314,26 +272,15 @@ contract ERC721VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 0;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
- destChainId,
- Alice,
- address(0),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Alice,
- ""
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
+ destChainId, Alice, address(0), tokenIds, amounts, 140_000, 140_000, Alice, ""
);
vm.prank(Alice, Alice);
vm.expectRevert(BaseNFTVault.VAULT_INVALID_TOKEN.selector);
erc721Vault.sendToken{ value: 140_000 }(sendOpts);
}
- function test_721Vault_sendToken_with_1_tokens_but_erc721_amount_1_invalid()
- public
- {
+ function test_721Vault_sendToken_with_1_tokens_but_erc721_amount_1_invalid() public {
vm.prank(Alice, Alice);
canonicalToken721.approve(address(erc721Vault), 1);
@@ -344,8 +291,7 @@ contract ERC721VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 1;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
destChainId,
Alice,
address(canonicalToken721),
@@ -376,8 +322,7 @@ contract ERC721VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 0;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
destChainId,
Alice,
address(canonicalToken721),
@@ -393,41 +338,29 @@ contract ERC721VaultTest is TestBase {
assertEq(canonicalToken721.ownerOf(1), address(erc721Vault));
- BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault
- .CanonicalNFT({
+ BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault.CanonicalNFT({
chainId: 31_337,
addr: address(canonicalToken721),
symbol: "TT",
name: "TT"
});
- uint256 chainId = block.chainid;
+ uint64 chainId = uint64(block.chainid);
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC721ToERC721Vault(
- canonicalToken,
- Alice,
- Alice,
- tokenIds,
- bytes32(0),
- address(erc721Vault),
- chainId,
- 0
+ canonicalToken, Alice, Alice, tokenIds, bytes32(0), address(erc721Vault), chainId, 0
);
// Query canonicalToBridged
- address deployedContract = destChainErc721Vault.canonicalToBridged(
- chainId, address(canonicalToken721)
- );
+ address deployedContract =
+ destChainErc721Vault.canonicalToBridged(chainId, address(canonicalToken721));
// Alice bridged over tokenId 1
assertEq(ERC721(deployedContract).ownerOf(1), Alice);
}
- function test_721Vault_receiveTokens_but_mint_not_deploy_if_bridged_second_time_721(
- )
- public
- {
+ function test_721Vault_receiveTokens_but_mint_not_deploy_if_bridged_second_time_721() public {
vm.prank(Alice, Alice);
canonicalToken721.approve(address(erc721Vault), 1);
vm.prank(Alice, Alice);
@@ -441,8 +374,7 @@ contract ERC721VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 0;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
destChainId,
Alice,
address(canonicalToken721),
@@ -461,32 +393,23 @@ contract ERC721VaultTest is TestBase {
// This canonicalToken is basically need to be exact same as the
// sendToken() puts together
// - here is just mocking putting it together.
- BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault
- .CanonicalNFT({
+ BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault.CanonicalNFT({
chainId: 31_337,
addr: address(canonicalToken721),
symbol: "TT",
name: "TT"
});
- uint256 chainId = block.chainid;
+ uint64 chainId = uint64(block.chainid);
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC721ToERC721Vault(
- canonicalToken,
- Alice,
- Alice,
- tokenIds,
- bytes32(0),
- address(erc721Vault),
- chainId,
- 0
+ canonicalToken, Alice, Alice, tokenIds, bytes32(0), address(erc721Vault), chainId, 0
);
// Query canonicalToBridged
- address deployedContract = destChainErc721Vault.canonicalToBridged(
- chainId, address(canonicalToken721)
- );
+ address deployedContract =
+ destChainErc721Vault.canonicalToBridged(chainId, address(canonicalToken721));
// Alice bridged over tokenId 1
assertEq(ERC721(deployedContract).ownerOf(1), Alice);
@@ -517,20 +440,12 @@ contract ERC721VaultTest is TestBase {
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC721ToERC721Vault(
- canonicalToken,
- Alice,
- Alice,
- tokenIds,
- bytes32(0),
- address(erc721Vault),
- chainId,
- 0
+ canonicalToken, Alice, Alice, tokenIds, bytes32(0), address(erc721Vault), chainId, 0
);
// Query canonicalToBridged
- address bridgedContract = destChainErc721Vault.canonicalToBridged(
- chainId, address(canonicalToken721)
- );
+ address bridgedContract =
+ destChainErc721Vault.canonicalToBridged(chainId, address(canonicalToken721));
assertEq(bridgedContract, deployedContract);
}
@@ -548,8 +463,7 @@ contract ERC721VaultTest is TestBase {
amounts[0] = 0;
uint256 etherValue = 0.1 ether;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
destChainId,
David,
address(canonicalToken721),
@@ -565,15 +479,14 @@ contract ERC721VaultTest is TestBase {
assertEq(canonicalToken721.ownerOf(1), address(erc721Vault));
- BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault
- .CanonicalNFT({
+ BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault.CanonicalNFT({
chainId: 31_337,
addr: address(canonicalToken721),
symbol: "TT",
name: "TT"
});
- uint256 chainId = block.chainid;
+ uint64 chainId = uint64(block.chainid);
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC721ToERC721Vault(
@@ -588,9 +501,8 @@ contract ERC721VaultTest is TestBase {
);
// Query canonicalToBridged
- address deployedContract = destChainErc721Vault.canonicalToBridged(
- chainId, address(canonicalToken721)
- );
+ address deployedContract =
+ destChainErc721Vault.canonicalToBridged(chainId, address(canonicalToken721));
// Alice bridged over tokenId 1 and etherValue to David
assertEq(ERC721(deployedContract).ownerOf(1), David);
@@ -609,8 +521,7 @@ contract ERC721VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 0;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
destChainId,
Alice,
address(canonicalToken721),
@@ -621,38 +532,13 @@ contract ERC721VaultTest is TestBase {
Alice,
""
);
- // Let's test that message is failed and we want to release it back to
- // the owner
- vm.prank(Amelia, Amelia);
- addressManager.setAddress(
- block.chainid, "bridge", address(srcPrankBridge)
- );
vm.prank(Alice, Alice);
- erc721Vault.sendToken{ value: 140_000 }(sendOpts);
+ IBridge.Message memory message = erc721Vault.sendToken{ value: 140_000 }(sendOpts);
assertEq(canonicalToken721.ownerOf(1), address(erc721Vault));
- // Reconstruct the message.
- // Actually the only 2 things absolute necessary to fill are the owner
- // and
- // srcChain, because we mock the bridge functions, but good to have data
- // here so that it could have been hashed back to the exact same bytes32
- // value - if we were not mocking.
- IBridge.Message memory message;
- message.srcChainId = 31_337;
- message.destChainId = destChainId;
- message.user = Alice;
- message.from = address(erc721Vault);
- message.to = address(destChainErc721Vault);
- message.data = srcPrankBridge.getPreDeterminedDataBytes();
- message.gasLimit = 140_000;
- message.fee = 140_000;
- message.refundTo = Alice;
- message.memo = "";
- bytes memory proof = bytes("");
-
- srcPrankBridge.recallMessage(message, proof);
+ bridge.recallMessage(message, bytes(""));
// Alice got back her NFT
assertEq(canonicalToken721.ownerOf(1), Alice);
@@ -675,8 +561,7 @@ contract ERC721VaultTest is TestBase {
amounts[0] = 0;
amounts[1] = 0;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
destChainId,
Alice,
address(canonicalToken721),
@@ -693,41 +578,30 @@ contract ERC721VaultTest is TestBase {
assertEq(canonicalToken721.ownerOf(1), address(erc721Vault));
assertEq(canonicalToken721.ownerOf(2), address(erc721Vault));
- BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault
- .CanonicalNFT({
+ BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault.CanonicalNFT({
chainId: 31_337,
addr: address(canonicalToken721),
symbol: "TT",
name: "TT"
});
- uint256 srcChainId = block.chainid;
+ uint64 srcChainId = uint64(block.chainid);
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC721ToERC721Vault(
- canonicalToken,
- Alice,
- Alice,
- tokenIds,
- bytes32(0),
- address(erc721Vault),
- srcChainId,
- 0
+ canonicalToken, Alice, Alice, tokenIds, bytes32(0), address(erc721Vault), srcChainId, 0
);
// Query canonicalToBridged
- address deployedContract = destChainErc721Vault.canonicalToBridged(
- srcChainId, address(canonicalToken721)
- );
+ address deployedContract =
+ destChainErc721Vault.canonicalToBridged(srcChainId, address(canonicalToken721));
// Alice bridged over tokenId 1
assertEq(ERC721(deployedContract).ownerOf(1), Alice);
assertEq(ERC721(deployedContract).ownerOf(2), Alice);
}
- function test_721Vault_bridge_back_but_owner_is_different_now_721()
- public
- {
+ function test_721Vault_bridge_back_but_owner_is_different_now_721() public {
vm.prank(Alice, Alice);
canonicalToken721.approve(address(erc721Vault), 1);
vm.prank(Alice, Alice);
@@ -741,8 +615,7 @@ contract ERC721VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 0;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
destChainId,
Alice,
address(canonicalToken721),
@@ -761,32 +634,23 @@ contract ERC721VaultTest is TestBase {
// This canonicalToken is basically need to be exact same as the
// sendToken() puts together
// - here is just mocking putting it together.
- BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault
- .CanonicalNFT({
+ BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault.CanonicalNFT({
chainId: 31_337,
addr: address(canonicalToken721),
symbol: "TT",
name: "TT"
});
- uint256 chainId = block.chainid;
+ uint64 chainId = uint64(block.chainid);
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC721ToERC721Vault(
- canonicalToken,
- Alice,
- Alice,
- tokenIds,
- bytes32(0),
- address(erc721Vault),
- chainId,
- 0
+ canonicalToken, Alice, Alice, tokenIds, bytes32(0), address(erc721Vault), chainId, 0
);
// Query canonicalToBridged
- address deployedContract = destChainErc721Vault.canonicalToBridged(
- chainId, address(canonicalToken721)
- );
+ address deployedContract =
+ destChainErc721Vault.canonicalToBridged(chainId, address(canonicalToken721));
// Alice bridged over tokenId 1
assertEq(ERC721(deployedContract).ownerOf(1), Alice);
@@ -802,15 +666,7 @@ contract ERC721VaultTest is TestBase {
ERC721(deployedContract).approve(address(destChainErc721Vault), 1);
sendOpts = BaseNFTVault.BridgeTransferOp(
- chainId,
- Bob,
- address(deployedContract),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Bob,
- ""
+ chainId, Bob, address(deployedContract), tokenIds, amounts, 140_000, 140_000, Bob, ""
);
vm.prank(Bob, Bob);
@@ -822,27 +678,17 @@ contract ERC721VaultTest is TestBase {
destChainIdBridge.setERC721Vault(address(erc721Vault));
- vm.prank(Amelia, Amelia);
- addressManager.setAddress(
- block.chainid, "bridge", address(destChainIdBridge)
- );
+ vm.prank(Carol, Carol);
+ addressManager.setAddress(uint64(block.chainid), "bridge", address(destChainIdBridge));
destChainIdBridge.sendReceiveERC721ToERC721Vault(
- canonicalToken,
- Bob,
- Bob,
- tokenIds,
- bytes32(0),
- address(erc721Vault),
- chainId,
- 0
+ canonicalToken, Bob, Bob, tokenIds, bytes32(0), address(erc721Vault), chainId, 0
);
assertEq(canonicalToken721.ownerOf(1), Bob);
}
- function test_721Vault_bridge_back_but_original_owner_cannot_claim_it_anymore_if_sold_721(
- )
+ function test_721Vault_bridge_back_but_original_owner_cannot_claim_it_anymore_if_sold_721()
public
{
vm.prank(Alice, Alice);
@@ -858,8 +704,7 @@ contract ERC721VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 0;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
destChainId,
Alice,
address(canonicalToken721),
@@ -878,32 +723,23 @@ contract ERC721VaultTest is TestBase {
// This canonicalToken is basically need to be exact same as the
// sendToken() puts together
// - here is just mocking putting it together.
- BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault
- .CanonicalNFT({
+ BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault.CanonicalNFT({
chainId: 31_337,
addr: address(canonicalToken721),
symbol: "TT",
name: "TT"
});
- uint256 chainId = block.chainid;
+ uint64 chainId = uint64(block.chainid);
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC721ToERC721Vault(
- canonicalToken,
- Alice,
- Alice,
- tokenIds,
- bytes32(0),
- address(erc721Vault),
- chainId,
- 0
+ canonicalToken, Alice, Alice, tokenIds, bytes32(0), address(erc721Vault), chainId, 0
);
// Query canonicalToBridged
- address deployedContract = destChainErc721Vault.canonicalToBridged(
- chainId, address(canonicalToken721)
- );
+ address deployedContract =
+ destChainErc721Vault.canonicalToBridged(chainId, address(canonicalToken721));
// Alice bridged over tokenId 1
assertEq(ERC721(deployedContract).ownerOf(1), Alice);
@@ -920,19 +756,11 @@ contract ERC721VaultTest is TestBase {
// Alice puts together a malicious bridging back message
sendOpts = BaseNFTVault.BridgeTransferOp(
- chainId,
- Alice,
- address(deployedContract),
- tokenIds,
- amounts,
- 140_000,
- 140_000,
- Bob,
- ""
+ chainId, Alice, address(deployedContract), tokenIds, amounts, 140_000, 140_000, Bob, ""
);
vm.prank(Alice, Alice);
- vm.expectRevert(BridgedERC721.BRIDGED_TOKEN_INVALID_BURN.selector);
+ vm.expectRevert(BridgedERC721.BTOKEN_INVALID_BURN.selector);
destChainErc721Vault.sendToken{ value: 140_000 }(sendOpts);
}
@@ -950,8 +778,7 @@ contract ERC721VaultTest is TestBase {
uint256[] memory amounts = new uint256[](1);
amounts[0] = 0;
- BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault
- .BridgeTransferOp(
+ BaseNFTVault.BridgeTransferOp memory sendOpts = BaseNFTVault.BridgeTransferOp(
destChainId,
Alice,
address(canonicalToken721),
@@ -970,49 +797,38 @@ contract ERC721VaultTest is TestBase {
// This canonicalToken is basically need to be exact same as the
// sendToken() puts together
// - here is just mocking putting it together.
- BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault
- .CanonicalNFT({
+ BaseNFTVault.CanonicalNFT memory canonicalToken = BaseNFTVault.CanonicalNFT({
chainId: 31_337,
addr: address(canonicalToken721),
symbol: "TT",
name: "TT"
});
- uint256 chainId = block.chainid;
+ uint64 chainId = uint64(block.chainid);
vm.chainId(destChainId);
destChainIdBridge.sendReceiveERC721ToERC721Vault(
- canonicalToken,
- Alice,
- Alice,
- tokenIds,
- bytes32(0),
- address(erc721Vault),
- chainId,
- 0
+ canonicalToken, Alice, Alice, tokenIds, bytes32(0), address(erc721Vault), chainId, 0
);
// Query canonicalToBridged
- address deployedContract = destChainErc721Vault.canonicalToBridged(
- chainId, address(canonicalToken721)
- );
+ address deployedContract =
+ destChainErc721Vault.canonicalToBridged(chainId, address(canonicalToken721));
try UpdatedBridgedERC721(deployedContract).helloWorld() {
fail();
} catch {
- //It should not yet support this function call
+ // It should not yet support this function call
}
// Upgrade the implementation of that contract
// so that it supports now the 'helloWorld' call
UpdatedBridgedERC721 newBridgedContract = new UpdatedBridgedERC721();
- vm.prank(Amelia, Amelia);
- TransparentUpgradeableProxy(payable(deployedContract)).upgradeTo(
- address(newBridgedContract)
- );
+ vm.prank(Carol, Carol);
+ BridgedERC721(payable(deployedContract)).upgradeTo(address(newBridgedContract));
try UpdatedBridgedERC721(deployedContract).helloWorld() {
- //It should support now this function call
+ // It should support now this function call
} catch {
fail();
}
diff --git a/packages/protocol/test/tokenvault/EtherVault.t.sol b/packages/protocol/test/tokenvault/EtherVault.t.sol
deleted file mode 100644
index 4e23e0fb7fd..00000000000
--- a/packages/protocol/test/tokenvault/EtherVault.t.sol
+++ /dev/null
@@ -1,108 +0,0 @@
-// SPDX-License-Identifier: MIT
-pragma solidity ^0.8.20;
-
-import { TestBase } from "../TestBase.sol";
-import { AddressManager } from "../../contracts/common/AddressManager.sol";
-import { EtherVault } from "../../contracts/bridge/EtherVault.sol";
-import { BridgeErrors } from "../../contracts/bridge/BridgeErrors.sol";
-
-contract TestEtherVault is TestBase {
- AddressManager addressManager;
- EtherVault etherVault;
-
- function setUp() public {
- vm.deal(Alice, 1 ether);
- vm.deal(Bob, 1 ether);
- addressManager = new AddressManager();
- addressManager.init();
- etherVault = new EtherVault();
- vm.prank(Alice);
- etherVault.init(address(addressManager));
- }
-
- function test_EtherVault_authorize_revert() public {
- vm.prank(Bob);
- vm.expectRevert("Ownable: caller is not the owner");
- etherVault.authorize(Bob, true);
-
- vm.prank(Alice);
- vm.expectRevert(BridgeErrors.B_EV_PARAM.selector);
- etherVault.authorize(address(0), true);
-
- vm.startPrank(Alice);
- etherVault.authorize(Bob, true);
- vm.expectRevert(BridgeErrors.B_EV_PARAM.selector);
- etherVault.authorize(Bob, true);
- assertTrue(etherVault.isAuthorized(Bob));
- }
-
- function test_EtherVault_authorize_authorizes_when_owner_authorizing()
- public
- {
- vm.prank(Alice);
- etherVault.authorize(Bob, true);
- assertTrue(etherVault.isAuthorized(Bob));
- }
-
- function test_EtherVault_receive_allows_sending_when_authorized_only()
- public
- {
- assertEq(address(etherVault).balance, 0);
- assertEq(Alice.balance > 0, true);
- vm.startPrank(Alice);
- etherVault.authorize(Alice, true);
- (bool aliceSent,) = address(etherVault).call{ value: 1 }("");
- assertTrue(aliceSent);
- assertEq(address(etherVault).balance, 1);
-
- vm.stopPrank();
- assertTrue(Bob.balance > 0);
- vm.startPrank(Bob);
-
- (bool bobSent,) = address(etherVault).call{ value: 1 }("");
- assertFalse(bobSent);
- vm.stopPrank();
- }
-
- function test_EtherVault_releaseEther_reverts_when_zero_address() public {
- vm.startPrank(Alice);
- etherVault.authorize(Alice, true);
- _seedEtherVault();
-
- vm.expectRevert(BridgeErrors.B_EV_DO_NOT_BURN.selector);
- etherVault.releaseEther(address(0), 1 ether);
- }
-
- function test_EtherVault_releaseEther_releases_to_authorized_sender()
- public
- {
- vm.startPrank(Alice);
- etherVault.authorize(Alice, true);
- _seedEtherVault();
-
- uint256 aliceBalanceBefore = Alice.balance;
- etherVault.releaseEther(Alice, 1 ether);
- uint256 aliceBalanceAfter = Alice.balance;
- assertEq(aliceBalanceAfter - aliceBalanceBefore, 1 ether);
- vm.stopPrank();
- }
-
- function test_EtherVault_releaseEther_releases_to_receipient_via_authorized_sender(
- )
- public
- {
- vm.startPrank(Alice);
- etherVault.authorize(Alice, true);
- _seedEtherVault();
-
- uint256 bobBalanceBefore = Bob.balance;
- etherVault.releaseEther(Bob, 1 ether);
- uint256 bobBalanceAfter = Bob.balance;
- assertEq(bobBalanceAfter - bobBalanceBefore, 1 ether);
- vm.stopPrank();
- }
-
- function _seedEtherVault() private {
- vm.deal(address(etherVault), 100 ether);
- }
-}
diff --git a/packages/protocol/utils/airdrop/airdrop_db/example_claimList.json b/packages/protocol/utils/airdrop/airdrop_db/example_claimList.json
new file mode 100644
index 00000000000..3208e43309c
--- /dev/null
+++ b/packages/protocol/utils/airdrop/airdrop_db/example_claimList.json
@@ -0,0 +1,7 @@
+[
+ { "address": "0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf", "amount": 100 },
+ { "address": "0x2B5AD5c4795c026514f8317c7a215E218DcCD6cF", "amount": 100 },
+ { "address": "0x6813Eb9362372EEF6200f3b1dbC3f819671cBA69", "amount": 100 },
+ { "address": "0x1efF47bc3a10a45D4B230B5d10E37751FE6AA718", "amount": 100 },
+ { "address": "0xe1AB8145F7E55DC933d51a18c793F901A3A0b276", "amount": 200 }
+]
diff --git a/packages/protocol/utils/airdrop/buildMerkleTree.ts b/packages/protocol/utils/airdrop/buildMerkleTree.ts
new file mode 100644
index 00000000000..f732a115c79
--- /dev/null
+++ b/packages/protocol/utils/airdrop/buildMerkleTree.ts
@@ -0,0 +1,97 @@
+import { MerkleTree } from "merkletreejs/dist/MerkleTree";
+const { ethers } = require("ethers");
+const keccak256 = require("keccak256");
+const fs = require("fs");
+
+interface IClaimListData {
+ address: string;
+ amount: number;
+}
+
+interface IMerkle {
+ merkleTree: MerkleTree;
+ rootHash: string;
+}
+
+async function buildMerkleTree(
+ allowListDataArr: IClaimListData[],
+): Promise {
+ // create merkle tree
+ const leafNodes: any = [];
+ for (let i = 0; i < allowListDataArr.length; i++) {
+ leafNodes.push(buildLeaf(allowListDataArr[i]));
+ }
+ const merkleTree = new MerkleTree(leafNodes, keccak256, {
+ sortPairs: true,
+ });
+
+ const rootHash = merkleTree.getHexRoot();
+
+ return {
+ merkleTree,
+ rootHash,
+ };
+}
+
+function buildLeaf(data: IClaimListData) {
+ const inputData = ethers.utils.defaultAbiCoder.encode(
+ ["address", "uint256"],
+ [data.address, data.amount],
+ );
+
+ return Buffer.from(
+ ethers.utils
+ .keccak256(
+ ethers.utils.defaultAbiCoder.encode(
+ ["bytes", "bytes"],
+ [
+ ethers.utils.toUtf8Bytes("CLAIM_TAIKO_AIRDROP"),
+ inputData,
+ ],
+ ),
+ )
+ .slice(2),
+ "hex",
+ );
+}
+
+async function getMerkleProof(
+ address: string,
+ amount: number,
+ claimList: IClaimListData[],
+) {
+ const merkleData = await buildMerkleTree(claimList);
+ const leaf = buildLeaf({ address, amount });
+
+ return merkleData.merkleTree.getHexProof(leaf);
+}
+
+async function main() {
+ const filePath = process.argv[2];
+
+ if (!filePath) {
+ console.error(
+ "Please provide a path to the JSON file as a command-line argument.",
+ );
+ return;
+ }
+
+ const jsonData = fs.readFileSync(filePath, "utf-8");
+ const claimList: IClaimListData[] = JSON.parse(jsonData);
+ const merkleData = await buildMerkleTree(claimList);
+
+ console.log("Merkle root:", merkleData.rootHash);
+ console.log("Nr of leaves (entries):", claimList.length);
+
+ const exampleProof = await getMerkleProof(
+ "0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf",
+ 100,
+ claimList,
+ );
+
+ console.log("Example proof for Alice (foundry) is: ", exampleProof);
+}
+
+main().catch((error) => {
+ console.error(error);
+});
diff --git a/packages/protocol/utils/generate_genesis/main.ts b/packages/protocol/utils/generate_genesis/main.ts
index 450fe4590fe..a792c95a1c5 100644
--- a/packages/protocol/utils/generate_genesis/main.ts
+++ b/packages/protocol/utils/generate_genesis/main.ts
@@ -47,7 +47,7 @@ async function main() {
console.log("config: %o", config);
- console.log("start deploy ProxiedTaikoL2 contract");
+ console.log("start deploy TaikoL2 contract");
let result = await deployTaikoL2(config, {
alloc: {},
@@ -77,9 +77,16 @@ async function main() {
JSON.stringify(result.storageLayouts, null, 2),
);
+ const configJsonSavedPath = path.join(
+ __dirname,
+ "../../deployments/genesis_config.json",
+ );
+ fs.writeFileSync(configJsonSavedPath, JSON.stringify(config));
+
console.log("done");
console.log(`alloc JSON saved to ${allocSavedPath}`);
console.log(`layout JSON saved to ${layoutSavedPath}`);
+ console.log(`config JSON saved to ${configJsonSavedPath}`);
}
main().catch(console.error);
diff --git a/packages/protocol/utils/generate_genesis/taikoL2.ts b/packages/protocol/utils/generate_genesis/taikoL2.ts
index 41bfda2a0be..39d1e9d4ed5 100644
--- a/packages/protocol/utils/generate_genesis/taikoL2.ts
+++ b/packages/protocol/utils/generate_genesis/taikoL2.ts
@@ -8,22 +8,21 @@ const {
getStorageLayout,
} = require("@defi-wonderland/smock/dist/src/utils");
const ARTIFACTS_PATH = path.join(__dirname, "../../out");
+
const IMPLEMENTATION_SLOT =
"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc";
-const ADMIN_SLOT =
- "0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103";
-
// deployTaikoL2 generates a L2 genesis alloc of the TaikoL2 contract.
export async function deployTaikoL2(
config: Config,
result: Result,
): Promise {
- const { contractOwner, chainId, seedAccounts, contractAdmin } = config;
+ const { contractOwner, chainId, seedAccounts } = config;
const alloc: any = {};
- let etherVaultBalance = ethers.BigNumber.from("2").pow(128).sub(1); // MaxUint128
+ // Premint 1 billion ethers to the bridge, current Ethereum's supply is ~120.27M.
+ let bridgeInitialEtherBalance = ethers.utils.parseEther(`${1_000_000_000}`);
for (const seedAccount of seedAccounts) {
const accountAddress = Object.keys(seedAccount)[0];
@@ -36,15 +35,14 @@ export async function deployTaikoL2(
alloc[accountAddress] = { balance: balance.toHexString() };
- etherVaultBalance = etherVaultBalance.sub(balance);
+ bridgeInitialEtherBalance = bridgeInitialEtherBalance.sub(balance);
}
- console.log({ etherVaultBalance });
+ console.log({ bridgeInitialEtherBalance });
console.log("\n");
const contractConfigs: any = await generateContractConfigs(
contractOwner,
- contractAdmin,
chainId,
config.contractAddresses,
config.param1559,
@@ -63,20 +61,22 @@ export async function deployTaikoL2(
code: contractConfig.deployedBytecode,
};
- // pre-mint ETHs for EtherVault contract
+ // pre-mint ETHs for Bridge contract
alloc[contractConfig.address].balance =
- contractName === "EtherVaultProxy"
- ? etherVaultBalance.toHexString()
+ contractName === "Bridge"
+ ? bridgeInitialEtherBalance.toHexString()
: "0x0";
// since we enable storageLayout compiler output in hardhat.config.ts,
// rollup/artifacts/build-info will contain storage layouts, here
// reading it using smock package.
let storageLayoutName = contractName;
- if (contractConfig.isProxy) {
- storageLayoutName = contractName.replace("Proxy", "");
- storageLayoutName = `Proxied${storageLayoutName}`;
- }
+ if (!contractConfig.isProxy)
+ storageLayoutName = `${contractName.replace("Impl", "")}`;
+
+ storageLayoutName = contractName.includes("AddressManager")
+ ? "AddressManager"
+ : storageLayoutName;
storageLayouts[contractName] =
await getStorageLayout(storageLayoutName);
@@ -113,142 +113,77 @@ export async function deployTaikoL2(
// and initialized variables.
async function generateContractConfigs(
contractOwner: string,
- contractAdmin: string,
chainId: number,
hardCodedAddresses: any,
param1559: any,
): Promise {
const contractArtifacts: any = {
- // Libraries
- LibTrieProof: require(
- path.join(ARTIFACTS_PATH, "./LibTrieProof.sol/LibTrieProof.json"),
+ // ============ Contracts ============
+ // Shared Contracts
+ BridgeImpl: require(
+ path.join(ARTIFACTS_PATH, "./Bridge.sol/Bridge.json"),
),
- LibBridgeRetry: require(
- path.join(
- ARTIFACTS_PATH,
- "./LibBridgeRetry.sol/LibBridgeRetry.json",
- ),
+ ERC20VaultImpl: require(
+ path.join(ARTIFACTS_PATH, "./ERC20Vault.sol/ERC20Vault.json"),
),
- LibBridgeProcess: require(
- path.join(
- ARTIFACTS_PATH,
- "./LibBridgeProcess.sol/LibBridgeProcess.json",
- ),
- ),
- LibVaultUtils: require(
- path.join(ARTIFACTS_PATH, "./LibVaultUtils.sol/LibVaultUtils.json"),
- ),
- // Contracts
- ProxiedAddressManager: require(
- path.join(
- ARTIFACTS_PATH,
- "./AddressManager.sol/ProxiedAddressManager.json",
- ),
+ ERC721VaultImpl: require(
+ path.join(ARTIFACTS_PATH, "./ERC721Vault.sol/ERC721Vault.json"),
),
- ProxiedTaikoL2: require(
- path.join(ARTIFACTS_PATH, "./TaikoL2.sol/ProxiedTaikoL2.json"),
+ ERC1155VaultImpl: require(
+ path.join(ARTIFACTS_PATH, "./ERC1155Vault.sol/ERC1155Vault.json"),
),
- ProxiedBridge: require(
- path.join(ARTIFACTS_PATH, "./Bridge.sol/ProxiedBridge.json"),
+ SignalServiceImpl: require(
+ path.join(ARTIFACTS_PATH, "./SignalService.sol/SignalService.json"),
),
- ProxiedERC20Vault: require(
+ SharedAddressManagerImpl: require(
path.join(
ARTIFACTS_PATH,
- "./ERC20Vault.sol/ProxiedERC20Vault.json",
+ "./AddressManager.sol/AddressManager.json",
),
),
- ProxiedERC721Vault: require(
- path.join(
- ARTIFACTS_PATH,
- "./ERC721Vault.sol/ProxiedERC721Vault.json",
- ),
+ BridgedERC20Impl: require(
+ path.join(ARTIFACTS_PATH, "./BridgedERC20.sol/BridgedERC20.json"),
),
- ProxiedERC1155Vault: require(
- path.join(
- ARTIFACTS_PATH,
- "./ERC1155Vault.sol/ProxiedERC1155Vault.json",
- ),
+ BridgedERC721Impl: require(
+ path.join(ARTIFACTS_PATH, "./BridgedERC721.sol/BridgedERC721.json"),
),
- ProxiedEtherVault: require(
+ BridgedERC1155Impl: require(
path.join(
ARTIFACTS_PATH,
- "./EtherVault.sol/ProxiedEtherVault.json",
+ "./BridgedERC1155.sol/BridgedERC1155.json",
),
),
- ProxiedSignalService: require(
+ // Rollup Contracts
+ TaikoL2Impl: require(
+ path.join(ARTIFACTS_PATH, "./TaikoL2.sol/TaikoL2.json"),
+ ),
+ RollupAddressManagerImpl: require(
path.join(
ARTIFACTS_PATH,
- "./SignalService.sol/ProxiedSignalService.json",
+ "./AddressManager.sol/AddressManager.json",
),
),
};
const proxy = require(
- path.join(
- ARTIFACTS_PATH,
- "./TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json",
- ),
+ path.join(ARTIFACTS_PATH, "./ERC1967Proxy.sol/ERC1967Proxy.json"),
);
- contractArtifacts.TaikoL2Proxy = proxy;
- contractArtifacts.BridgeProxy = proxy;
- contractArtifacts.ERC20VaultProxy = proxy;
- contractArtifacts.ERC721VaultProxy = proxy;
- contractArtifacts.ERC1155VaultProxy = proxy;
- contractArtifacts.EtherVaultProxy = proxy;
- contractArtifacts.SignalServiceProxy = proxy;
- contractArtifacts.AddressManagerProxy = proxy;
+
+ // Shared Contracts
+ contractArtifacts.Bridge = proxy;
+ contractArtifacts.ERC20Vault = proxy;
+ contractArtifacts.ERC721Vault = proxy;
+ contractArtifacts.ERC1155Vault = proxy;
+ contractArtifacts.SignalService = proxy;
+ contractArtifacts.SharedAddressManager = proxy;
+ // Rollup Contracts
+ contractArtifacts.TaikoL2 = proxy;
+ contractArtifacts.RollupAddressManager = proxy;
const addressMap: any = {};
for (const [contractName, artifact] of Object.entries(contractArtifacts)) {
- let bytecode = (artifact as any).bytecode;
-
- switch (contractName) {
- case "ProxiedTaikoL2":
- bytecode = linkContractLibs(
- contractArtifacts.ProxiedTaikoL2,
- addressMap,
- );
- break;
- case "LibBridgeProcess":
- if (!addressMap.LibTrieProof) {
- throw new Error("LibTrieProof not initialized");
- }
-
- bytecode = linkContractLibs(
- contractArtifacts.LibBridgeProcess,
- addressMap,
- );
- break;
- case "ProxiedBridge":
- if (
- !addressMap.LibTrieProof ||
- !addressMap.LibBridgeRetry ||
- !addressMap.LibBridgeProcess
- ) {
- throw new Error(
- "LibTrieProof/LibBridgeRetry/LibBridgeProcess not initialized",
- );
- }
-
- bytecode = linkContractLibs(
- contractArtifacts.ProxiedBridge,
- addressMap,
- );
- break;
- case "ProxiedSignalService":
- if (!addressMap.LibTrieProof) {
- throw new Error("LibTrieProof not initialized");
- }
-
- bytecode = linkContractLibs(
- contractArtifacts.ProxiedSignalService,
- addressMap,
- );
- break;
- default:
- break;
- }
+ const bytecode = (artifact as any).bytecode;
if (
hardCodedAddresses &&
@@ -270,288 +205,307 @@ async function generateContractConfigs(
console.log(addressMap);
return {
- // Libraries
- LibTrieProof: {
- address: addressMap.LibTrieProof,
+ // Shared Contracts
+ SharedAddressManagerImpl: {
+ address: addressMap.SharedAddressManagerImpl,
deployedBytecode:
- contractArtifacts.LibTrieProof.deployedBytecode.object,
- variables: {},
- },
- LibBridgeRetry: {
- address: addressMap.LibBridgeRetry,
- deployedBytecode:
- contractArtifacts.LibBridgeRetry.deployedBytecode.object,
- variables: {},
- },
- LibBridgeProcess: {
- address: addressMap.LibBridgeProcess,
- deployedBytecode: linkContractLibs(
- contractArtifacts.LibBridgeProcess,
- addressMap,
- ),
- variables: {},
- },
- ProxiedAddressManager: {
- address: addressMap.ProxiedAddressManager,
- deployedBytecode:
- contractArtifacts.ProxiedAddressManager.deployedBytecode.object,
+ contractArtifacts.SharedAddressManagerImpl.deployedBytecode
+ .object,
+ variables: {
+ _owner: contractOwner,
+ },
},
- AddressManagerProxy: {
- address: addressMap.AddressManagerProxy,
+ SharedAddressManager: {
+ address: addressMap.SharedAddressManager,
deployedBytecode:
- contractArtifacts.AddressManagerProxy.deployedBytecode.object,
+ contractArtifacts.SharedAddressManager.deployedBytecode.object,
variables: {
// initializer
_initialized: 1,
_initializing: false,
- // OwnableUpgradeable
+ // Ownable2Upgradeable
_owner: contractOwner,
// AddressManager
addresses: {
[chainId]: {
- [ethers.utils.hexlify(
- ethers.utils.toUtf8Bytes("taiko"),
- )]: addressMap.TaikoL2Proxy,
[ethers.utils.hexlify(
ethers.utils.toUtf8Bytes("bridge"),
- )]: addressMap.BridgeProxy,
+ )]: addressMap.Bridge,
[ethers.utils.hexlify(
ethers.utils.toUtf8Bytes("erc20_vault"),
- )]: addressMap.ERC20VaultProxy,
+ )]: addressMap.ERC20Vault,
[ethers.utils.hexlify(
ethers.utils.toUtf8Bytes("erc721_vault"),
- )]: addressMap.ERC721VaultProxy,
+ )]: addressMap.ERC721Vault,
[ethers.utils.hexlify(
ethers.utils.toUtf8Bytes("erc1155_vault"),
- )]: addressMap.ERC1155VaultProxy,
- [ethers.utils.hexlify(
- ethers.utils.toUtf8Bytes("ether_vault"),
- )]: addressMap.EtherVaultProxy,
+ )]: addressMap.ERC1155Vault,
[ethers.utils.hexlify(
ethers.utils.toUtf8Bytes("signal_service"),
- )]: addressMap.SignalServiceProxy,
+ )]: addressMap.SignalService,
+ [ethers.utils.hexlify(
+ ethers.utils.toUtf8Bytes("bridged_erc20"),
+ )]: addressMap.BridgedERC20Impl,
+ [ethers.utils.hexlify(
+ ethers.utils.toUtf8Bytes("bridged_erc721"),
+ )]: addressMap.BridgedERC721Impl,
+ [ethers.utils.hexlify(
+ ethers.utils.toUtf8Bytes("bridged_erc1155"),
+ )]: addressMap.BridgedERC1155Impl,
},
},
},
slots: {
- [ADMIN_SLOT]: contractAdmin,
- [IMPLEMENTATION_SLOT]: addressMap.ProxiedAddressManager,
+ [IMPLEMENTATION_SLOT]: addressMap.SharedAddressManagerImpl,
},
isProxy: true,
},
- ProxiedTaikoL2: {
- address: addressMap.ProxiedTaikoL2,
+ BridgeImpl: {
+ address: addressMap.BridgeImpl,
deployedBytecode: linkContractLibs(
- contractArtifacts.ProxiedTaikoL2,
+ contractArtifacts.BridgeImpl,
addressMap,
),
- },
- TaikoL2Proxy: {
- address: addressMap.TaikoL2Proxy,
- deployedBytecode:
- contractArtifacts.TaikoL2Proxy.deployedBytecode.object,
variables: {
- // TaikoL2
- // keccak256(abi.encodePacked(block.chainid, basefee, ancestors))
- publicInputHash: `${ethers.utils.solidityKeccak256(
- ["bytes32[256]"],
- [
- new Array(255)
- .fill(ethers.constants.HashZero)
- .concat([
- ethers.utils.hexZeroPad(
- ethers.utils.hexlify(chainId),
- 32,
- ),
- ]),
- ],
- )}`,
- eip1559Config: {
- yscale: ethers.BigNumber.from(param1559.yscale),
- xscale: ethers.BigNumber.from(param1559.xscale),
- gasIssuedPerSecond: ethers.BigNumber.from(
- param1559.gasIssuedPerSecond,
- ),
- },
- parentTimestamp: Math.floor(new Date().getTime() / 1000),
- gasExcess: ethers.BigNumber.from(param1559.gasExcess),
- // AddressResolver
- _addressManager: addressMap.AddressManagerProxy,
- },
- slots: {
- [ADMIN_SLOT]: contractAdmin,
- [IMPLEMENTATION_SLOT]: addressMap.ProxiedTaikoL2,
+ _owner: contractOwner,
},
- isProxy: true,
},
- ProxiedBridge: {
- address: addressMap.ProxiedBridge,
- deployedBytecode: linkContractLibs(
- contractArtifacts.ProxiedBridge,
- addressMap,
- ),
- },
- BridgeProxy: {
- address: addressMap.BridgeProxy,
- deployedBytecode:
- contractArtifacts.BridgeProxy.deployedBytecode.object,
+ Bridge: {
+ address: addressMap.Bridge,
+ deployedBytecode: contractArtifacts.Bridge.deployedBytecode.object,
variables: {
// initializer
_initialized: 1,
_initializing: false,
// ReentrancyGuardUpgradeable
- _status: 1, // _NOT_ENTERED
- // OwnableUpgradeable
+ _reentry: 1, // _FALSE
+ _paused: 1, // _FALSE
+ // Ownable2Upgradeable
_owner: contractOwner,
// AddressResolver
- _addressManager: addressMap.AddressManagerProxy,
- // Bridge
- _state: {},
+ addressManager: addressMap.SharedAddressManager,
},
slots: {
- [ADMIN_SLOT]: contractAdmin,
- [IMPLEMENTATION_SLOT]: addressMap.ProxiedBridge,
+ [IMPLEMENTATION_SLOT]: addressMap.BridgeImpl,
},
isProxy: true,
},
- ProxiedERC20Vault: {
- address: addressMap.ProxiedERC20Vault,
+ ERC20VaultImpl: {
+ address: addressMap.ERC20VaultImpl,
deployedBytecode: linkContractLibs(
- contractArtifacts.ProxiedERC20Vault,
+ contractArtifacts.ERC20VaultImpl,
addressMap,
),
+ variables: {
+ _owner: contractOwner,
+ },
},
- ERC20VaultProxy: {
- address: addressMap.ERC20VaultProxy,
+ ERC20Vault: {
+ address: addressMap.ERC20Vault,
deployedBytecode:
- contractArtifacts.ERC20VaultProxy.deployedBytecode.object,
+ contractArtifacts.ERC20Vault.deployedBytecode.object,
variables: {
// initializer
_initialized: 1,
_initializing: false,
// ReentrancyGuardUpgradeable
- _status: 1, // _NOT_ENTERED
- // OwnableUpgradeable
+ _reentry: 1, // _FALSE
+ _paused: 1, // _FALSE
+ // Ownable2Upgradeable
_owner: contractOwner,
// AddressResolver
- _addressManager: addressMap.AddressManagerProxy,
+ addressManager: addressMap.SharedAddressManager,
},
slots: {
- [ADMIN_SLOT]: contractAdmin,
- [IMPLEMENTATION_SLOT]: addressMap.ProxiedERC20Vault,
+ [IMPLEMENTATION_SLOT]: addressMap.ERC20VaultImpl,
},
isProxy: true,
},
- ProxiedERC721Vault: {
- address: addressMap.ProxiedERC721Vault,
+ ERC721VaultImpl: {
+ address: addressMap.ERC721VaultImpl,
deployedBytecode: linkContractLibs(
- contractArtifacts.ProxiedERC721Vault,
+ contractArtifacts.ERC721VaultImpl,
addressMap,
),
+ variables: {
+ _owner: contractOwner,
+ },
},
- ERC721VaultProxy: {
- address: addressMap.ERC721VaultProxy,
+ ERC721Vault: {
+ address: addressMap.ERC721Vault,
deployedBytecode:
- contractArtifacts.ERC721VaultProxy.deployedBytecode.object,
+ contractArtifacts.ERC721Vault.deployedBytecode.object,
variables: {
// initializer
_initialized: 1,
_initializing: false,
// ReentrancyGuardUpgradeable
- _status: 1, // _NOT_ENTERED
- // OwnableUpgradeable
+ _reentry: 1, // _FALSE
+ _paused: 1, // _FALSE
+ // Ownable2Upgradeable
_owner: contractOwner,
// AddressResolver
- _addressManager: addressMap.AddressManagerProxy,
+ addressManager: addressMap.SharedAddressManager,
},
slots: {
- [ADMIN_SLOT]: contractAdmin,
- [IMPLEMENTATION_SLOT]: addressMap.ProxiedERC721Vault,
+ [IMPLEMENTATION_SLOT]: addressMap.ERC721VaultImpl,
},
isProxy: true,
},
- ProxiedERC1155Vault: {
- address: addressMap.ProxiedERC1155Vault,
+ ERC1155VaultImpl: {
+ address: addressMap.ERC1155VaultImpl,
deployedBytecode: linkContractLibs(
- contractArtifacts.ProxiedERC1155Vault,
+ contractArtifacts.ERC1155VaultImpl,
addressMap,
),
+ variables: {
+ _owner: contractOwner,
+ },
},
- ERC1155VaultProxy: {
- address: addressMap.ERC1155VaultProxy,
+ ERC1155Vault: {
+ address: addressMap.ERC1155Vault,
deployedBytecode:
- contractArtifacts.ERC1155VaultProxy.deployedBytecode.object,
+ contractArtifacts.ERC1155Vault.deployedBytecode.object,
variables: {
// initializer
_initialized: 1,
_initializing: false,
// ReentrancyGuardUpgradeable
- _status: 1, // _NOT_ENTERED
- // OwnableUpgradeable
+ _reentry: 1, // _FALSE
+ _paused: 1, // _FALSE
+ // Ownable2Upgradeable
_owner: contractOwner,
// AddressResolver
- _addressManager: addressMap.AddressManagerProxy,
+ addressManager: addressMap.SharedAddressManager,
},
slots: {
- [ADMIN_SLOT]: contractAdmin,
- [IMPLEMENTATION_SLOT]: addressMap.ProxiedERC1155Vault,
+ [IMPLEMENTATION_SLOT]: addressMap.ERC1155VaultImpl,
},
isProxy: true,
},
- ProxiedEtherVault: {
- address: addressMap.ProxiedEtherVault,
+ BridgedERC20: {
+ address: addressMap.BridgedERC20Impl,
+ deployedBytecode:
+ contractArtifacts.BridgedERC20Impl.deployedBytecode.object,
+ },
+ BridgedERC721: {
+ address: addressMap.BridgedERC721Impl,
+ deployedBytecode:
+ contractArtifacts.BridgedERC721Impl.deployedBytecode.object,
+ },
+ BridgedERC1155: {
+ address: addressMap.BridgedERC1155Impl,
deployedBytecode:
- contractArtifacts.ProxiedEtherVault.deployedBytecode.object,
+ contractArtifacts.BridgedERC1155Impl.deployedBytecode.object,
+ },
+ SignalServiceImpl: {
+ address: addressMap.SignalServiceImpl,
+ deployedBytecode: linkContractLibs(
+ contractArtifacts.SignalServiceImpl,
+ addressMap,
+ ),
+ variables: {
+ _owner: contractOwner,
+ },
},
- EtherVaultProxy: {
- address: addressMap.EtherVaultProxy,
+ SignalService: {
+ address: addressMap.SignalService,
deployedBytecode:
- contractArtifacts.EtherVaultProxy.deployedBytecode.object,
+ contractArtifacts.SignalService.deployedBytecode.object,
variables: {
// initializer
_initialized: 1,
_initializing: false,
// ReentrancyGuardUpgradeable
- _status: 1, // _NOT_ENTERED
- // OwnableUpgradeable
+ _reentry: 1, // _FALSE
+ _paused: 1, // _FALSE
+ // Ownable2Upgradeable
_owner: contractOwner,
- // AddressResolver
- _addressManager: addressMap.AddressManagerProxy,
- // EtherVault
- // Authorize L2 bridge
- _authorizedAddrs: { [`${addressMap.BridgeProxy}`]: true },
+ authorizedAddresses: {
+ [addressMap.TaikoL2]: ethers.utils.hexZeroPad(
+ ethers.utils.hexlify(chainId),
+ 32,
+ ),
+ },
},
slots: {
- [ADMIN_SLOT]: contractAdmin,
- [IMPLEMENTATION_SLOT]: addressMap.ProxiedEtherVault,
+ [IMPLEMENTATION_SLOT]: addressMap.SignalServiceImpl,
},
isProxy: true,
},
- ProxiedSignalService: {
- address: addressMap.ProxiedSignalService,
+ // Rollup Contracts
+ TaikoL2Impl: {
+ address: addressMap.TaikoL2Impl,
deployedBytecode: linkContractLibs(
- contractArtifacts.ProxiedSignalService,
+ contractArtifacts.TaikoL2Impl,
addressMap,
),
+ variables: {
+ _owner: contractOwner,
+ },
},
- SignalServiceProxy: {
- address: addressMap.SignalServiceProxy,
+ TaikoL2: {
+ address: addressMap.TaikoL2,
+ deployedBytecode: contractArtifacts.TaikoL2.deployedBytecode.object,
+ variables: {
+ // TaikoL2
+ // Ownable2Upgradeable
+ _owner: contractOwner,
+ signalService: addressMap.SignalService,
+ gasExcess: param1559.gasExcess,
+ // keccak256(abi.encodePacked(block.chainid, basefee, ancestors))
+ publicInputHash: `${ethers.utils.solidityKeccak256(
+ ["bytes32[256]"],
+ [
+ new Array(255)
+ .fill(ethers.constants.HashZero)
+ .concat([
+ ethers.utils.hexZeroPad(
+ ethers.utils.hexlify(chainId),
+ 32,
+ ),
+ ]),
+ ],
+ )}`,
+ },
+ slots: {
+ [IMPLEMENTATION_SLOT]: addressMap.TaikoL2Impl,
+ },
+ isProxy: true,
+ },
+ RollupAddressManagerImpl: {
+ address: addressMap.RollupAddressManagerImpl,
deployedBytecode:
- contractArtifacts.SignalServiceProxy.deployedBytecode.object,
+ contractArtifacts.RollupAddressManagerImpl.deployedBytecode
+ .object,
+ variables: {
+ _owner: contractOwner,
+ },
+ },
+ RollupAddressManager: {
+ address: addressMap.RollupAddressManager,
+ deployedBytecode:
+ contractArtifacts.RollupAddressManager.deployedBytecode.object,
variables: {
// initializer
_initialized: 1,
_initializing: false,
- // ReentrancyGuardUpgradeable
- _status: 1, // _NOT_ENTERED
- // OwnableUpgradeable
+ // Ownable2Upgradeable
_owner: contractOwner,
- // AddressResolver
- _addressManager: addressMap.AddressManagerProxy,
+ // AddressManager
+ addresses: {
+ [chainId]: {
+ [ethers.utils.hexlify(
+ ethers.utils.toUtf8Bytes("taiko"),
+ )]: addressMap.TaikoL2,
+ [ethers.utils.hexlify(
+ ethers.utils.toUtf8Bytes("signal_service"),
+ )]: addressMap.SignalService,
+ },
+ },
},
slots: {
- [ADMIN_SLOT]: contractAdmin,
- [IMPLEMENTATION_SLOT]: addressMap.ProxiedSignalService,
+ [IMPLEMENTATION_SLOT]: addressMap.RollupAddressManagerImpl,
},
isProxy: true,
},
diff --git a/packages/relayer/.gitignore b/packages/relayer/.gitignore
index 4903d05bcad..1e90821859d 100644
--- a/packages/relayer/.gitignore
+++ b/packages/relayer/.gitignore
@@ -3,11 +3,14 @@
.l1l2.env
.l2l3.env
.test.env
-.l1indexer.env
-.l2indexer.env
+.l1l2indexer.env
+.l1l3indexer.env
+.l2l1indexer.env
+.l1l2processor.env
+.l1l3processor.env
+.l2l1processor.env
.l1processor.env
-.l2processor.env
-
+.l2indexer.env
main
coverage.txt
diff --git a/packages/relayer/.golangci.yml b/packages/relayer/.golangci.yml
index 6f7b138feb1..010e197cd32 100644
--- a/packages/relayer/.golangci.yml
+++ b/packages/relayer/.golangci.yml
@@ -28,8 +28,8 @@ linters:
linters-settings:
funlen:
- lines: 155
- statements: 60
+ lines: 250
+ statements: 80
gocognit:
min-complexity: 55
diff --git a/packages/relayer/.l1indexer.example.env b/packages/relayer/.l1indexer.example.env
index fa3d5e8b0a0..4f6fe42409a 100644
--- a/packages/relayer/.l1indexer.example.env
+++ b/packages/relayer/.l1indexer.example.env
@@ -11,7 +11,7 @@ QUEUE_USER=guest
QUEUE_PASSWORD=guest
QUEUE_HOST=localhost
QUEUE_PORT=5672
-SRC_BRIDGE_ADDRESS=0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE
+SRC_BRIDGE_ADDRESS=0x3Aa5ebB10DC797CAC828524e59A333d0A371443c
DEST_BRIDGE_ADDRESS=0x1000777700000000000000000000000000000004
SRC_TAIKO_ADDRESS=0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82
SRC_RPC_URL=wss://l1ws.internal.taiko.xyz
diff --git a/packages/relayer/.l1processor.example.env b/packages/relayer/.l1processor.example.env
index 859b6666822..d4be45f7659 100644
--- a/packages/relayer/.l1processor.example.env
+++ b/packages/relayer/.l1processor.example.env
@@ -12,14 +12,17 @@ QUEUE_HOST=localhost
QUEUE_PORT=5672
PROCESSOR_PRIVATE_KEY=
DEST_BRIDGE_ADDRESS=0x1000777700000000000000000000000000000004
-SRC_ERC20_VAULT_ADDRESS=0xc6e7DF5E7b4f2A278906862b61205850344D4e7d
+SRC_ERC20_VAULT_ADDRESS=0x68B1D87F95878fE05B998F19b66F4baba5De1aed
DEST_ERC20_VAULT_ADDRESS=0x1000777700000000000000000000000000000002
DEST_ERC721_VAULT_ADDRESS=0x1000777700000000000000000000000000000008
DEST_ERC1155_VAULT_ADDRESS=0x1000777700000000000000000000000000000009
DEST_TAIKO_ADDRESS=0x1000777700000000000000000000000000000001
-SRC_SIGNAL_SERVICE_ADDRESS=0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB
+SRC_SIGNAL_SERVICE_ADDRESS=0x998abeb3E57409262aE5b751f60747921B33613E
+HOP_SIGNAL_SERVICE_ADDRESSES=0x1000777700000000000000000000000000000007
+HOP_TAIKO_ADDRESSES=0x1000777700000000000000000000000000000007
SRC_RPC_URL=wss://l1ws.internal.taiko.xyz
-DEST_RPC_URL=wss://ws.internal.taiko.xyz
+HOP_RPC_URLS=wss://ws.internal.taiko.xyz
+DEST_RPC_URL=wss://l3ws.internal.taiko.xyz
CONFIRMATIONS_BEFORE_PROCESSING=2
CORS_ORIGINS=*
NUM_GOROUTINES=50
diff --git a/packages/relayer/ERC1155Vault.json b/packages/relayer/ERC1155Vault.json
new file mode 100644
index 00000000000..909f0a5d82e
--- /dev/null
+++ b/packages/relayer/ERC1155Vault.json
@@ -0,0 +1,1021 @@
+[
+ {
+ "inputs": [],
+ "name": "ETH_TRANSFER_FAILED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "INVALID_PAUSE_STATUS",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "NULL_IMPL_ADDR",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "REENTRANT_CALL",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_DENIED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_INVALID_MANAGER",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_UNEXPECTED_CHAINID",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ }
+ ],
+ "name": "RESOLVER_ZERO_ADDR",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_INTERFACE_NOT_SUPPORTED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_INVALID_AMOUNT",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_INVALID_SRC_CHAIN_ID",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_INVALID_TOKEN",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_INVALID_USER",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_MAX_TOKEN_PER_TXN_EXCEEDED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_PERMISSION_DENIED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_TOKEN_ARRAY_MISMATCH",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "previousAdmin",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "newAdmin",
+ "type": "address"
+ }
+ ],
+ "name": "AdminChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "beacon",
+ "type": "address"
+ }
+ ],
+ "name": "BeaconUpgraded",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "ctoken",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "btoken",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "string",
+ "name": "ctokenSymbol",
+ "type": "string"
+ },
+ {
+ "indexed": false,
+ "internalType": "string",
+ "name": "ctokenName",
+ "type": "string"
+ }
+ ],
+ "name": "BridgedTokenDeployed",
+ "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"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Paused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bytes32",
+ "name": "msgHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint64",
+ "name": "srcChainId",
+ "type": "uint64"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256[]",
+ "name": "tokenIds",
+ "type": "uint256[]"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256[]",
+ "name": "amounts",
+ "type": "uint256[]"
+ }
+ ],
+ "name": "TokenReceived",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bytes32",
+ "name": "msgHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256[]",
+ "name": "tokenIds",
+ "type": "uint256[]"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256[]",
+ "name": "amounts",
+ "type": "uint256[]"
+ }
+ ],
+ "name": "TokenReleased",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bytes32",
+ "name": "msgHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint64",
+ "name": "destChainId",
+ "type": "uint64"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256[]",
+ "name": "tokenIds",
+ "type": "uint256[]"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256[]",
+ "name": "amounts",
+ "type": "uint256[]"
+ }
+ ],
+ "name": "TokenSent",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Unpaused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "implementation",
+ "type": "address"
+ }
+ ],
+ "name": "Upgraded",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "ERC1155_INTERFACE_ID",
+ "outputs": [
+ {
+ "internalType": "bytes4",
+ "name": "",
+ "type": "bytes4"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "ERC721_INTERFACE_ID",
+ "outputs": [
+ {
+ "internalType": "bytes4",
+ "name": "",
+ "type": "bytes4"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "MAX_TOKEN_PER_TXN",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "addressManager",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "bridgedToCanonical",
+ "outputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "addr",
+ "type": "address"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "canonicalToBridged",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "addressManager",
+ "type": "address"
+ }
+ ],
+ "name": "init",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "name",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "pure",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256[]",
+ "name": "",
+ "type": "uint256[]"
+ },
+ {
+ "internalType": "uint256[]",
+ "name": "",
+ "type": "uint256[]"
+ },
+ {
+ "internalType": "bytes",
+ "name": "",
+ "type": "bytes"
+ }
+ ],
+ "name": "onERC1155BatchReceived",
+ "outputs": [
+ {
+ "internalType": "bytes4",
+ "name": "",
+ "type": "bytes4"
+ }
+ ],
+ "stateMutability": "pure",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "",
+ "type": "bytes"
+ }
+ ],
+ "name": "onERC1155Received",
+ "outputs": [
+ {
+ "internalType": "bytes4",
+ "name": "",
+ "type": "bytes4"
+ }
+ ],
+ "stateMutability": "pure",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint128",
+ "name": "id",
+ "type": "uint128"
+ },
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "uint64",
+ "name": "srcChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "destChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "refundTo",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "fee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "gasLimit",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ },
+ {
+ "internalType": "string",
+ "name": "memo",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct IBridge.Message",
+ "name": "message",
+ "type": "tuple"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "msgHash",
+ "type": "bytes32"
+ }
+ ],
+ "name": "onMessageRecalled",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "pause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "paused",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "proxiableUUID",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "addr",
+ "type": "address"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct BaseNFTVault.CanonicalNFT",
+ "name": "ctoken",
+ "type": "tuple"
+ },
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256[]",
+ "name": "tokenIds",
+ "type": "uint256[]"
+ },
+ {
+ "internalType": "uint256[]",
+ "name": "amounts",
+ "type": "uint256[]"
+ }
+ ],
+ "name": "receiveToken",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "renounceOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "name",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowZeroAddress",
+ "type": "bool"
+ }
+ ],
+ "name": "resolve",
+ "outputs": [
+ {
+ "internalType": "address payable",
+ "name": "addr",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes32",
+ "name": "name",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowZeroAddress",
+ "type": "bool"
+ }
+ ],
+ "name": "resolve",
+ "outputs": [
+ {
+ "internalType": "address payable",
+ "name": "addr",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "destChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256[]",
+ "name": "tokenIds",
+ "type": "uint256[]"
+ },
+ {
+ "internalType": "uint256[]",
+ "name": "amounts",
+ "type": "uint256[]"
+ },
+ {
+ "internalType": "uint256",
+ "name": "gasLimit",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "fee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address",
+ "name": "refundTo",
+ "type": "address"
+ },
+ {
+ "internalType": "string",
+ "name": "memo",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct BaseNFTVault.BridgeTransferOp",
+ "name": "op",
+ "type": "tuple"
+ }
+ ],
+ "name": "sendToken",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint128",
+ "name": "id",
+ "type": "uint128"
+ },
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "uint64",
+ "name": "srcChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "destChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "refundTo",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "fee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "gasLimit",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ },
+ {
+ "internalType": "string",
+ "name": "memo",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct IBridge.Message",
+ "name": "_message",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes4",
+ "name": "interfaceId",
+ "type": "bytes4"
+ }
+ ],
+ "name": "supportsInterface",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "transferOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "unpause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ }
+ ],
+ "name": "upgradeTo",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ }
+ ],
+ "name": "upgradeToAndCall",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ }
+]
diff --git a/packages/relayer/ERC20Vault.json b/packages/relayer/ERC20Vault.json
new file mode 100644
index 00000000000..441c47e3852
--- /dev/null
+++ b/packages/relayer/ERC20Vault.json
@@ -0,0 +1,1006 @@
+[
+ {
+ "inputs": [],
+ "name": "ETH_TRANSFER_FAILED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "INVALID_PAUSE_STATUS",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "NULL_IMPL_ADDR",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "REENTRANT_CALL",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_DENIED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_INVALID_MANAGER",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_UNEXPECTED_CHAINID",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ }
+ ],
+ "name": "RESOLVER_ZERO_ADDR",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_BTOKEN_BLACKLISTED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_CTOKEN_MISMATCH",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_INVALID_AMOUNT",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_INVALID_NEW_BTOKEN",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_INVALID_TOKEN",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_NOT_SAME_OWNER",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_PERMISSION_DENIED",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "previousAdmin",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "newAdmin",
+ "type": "address"
+ }
+ ],
+ "name": "AdminChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "beacon",
+ "type": "address"
+ }
+ ],
+ "name": "BeaconUpgraded",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint256",
+ "name": "srcChainId",
+ "type": "uint256"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "ctoken",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "btokenOld",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "btokenNew",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "string",
+ "name": "ctokenSymbol",
+ "type": "string"
+ },
+ {
+ "indexed": false,
+ "internalType": "string",
+ "name": "ctokenName",
+ "type": "string"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint8",
+ "name": "ctokenDecimal",
+ "type": "uint8"
+ }
+ ],
+ "name": "BridgedTokenChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint256",
+ "name": "srcChainId",
+ "type": "uint256"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "ctoken",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "btoken",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "string",
+ "name": "ctokenSymbol",
+ "type": "string"
+ },
+ {
+ "indexed": false,
+ "internalType": "string",
+ "name": "ctokenName",
+ "type": "string"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint8",
+ "name": "ctokenDecimal",
+ "type": "uint8"
+ }
+ ],
+ "name": "BridgedTokenDeployed",
+ "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"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Paused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bytes32",
+ "name": "msgHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint64",
+ "name": "srcChainId",
+ "type": "uint64"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "TokenReceived",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bytes32",
+ "name": "msgHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "TokenReleased",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bytes32",
+ "name": "msgHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint64",
+ "name": "destChainId",
+ "type": "uint64"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "TokenSent",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Unpaused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "implementation",
+ "type": "address"
+ }
+ ],
+ "name": "Upgraded",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "addressManager",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "bridgedToCanonical",
+ "outputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "addr",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "btoken",
+ "type": "address"
+ }
+ ],
+ "name": "btokenBlacklist",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "blacklisted",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "canonicalToBridged",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "addr",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct ERC20Vault.CanonicalERC20",
+ "name": "ctoken",
+ "type": "tuple"
+ },
+ {
+ "internalType": "address",
+ "name": "btokenNew",
+ "type": "address"
+ }
+ ],
+ "name": "changeBridgedToken",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "btokenOld",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "addressManager",
+ "type": "address"
+ }
+ ],
+ "name": "init",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "name",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "pure",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint128",
+ "name": "id",
+ "type": "uint128"
+ },
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "uint64",
+ "name": "srcChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "destChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "refundTo",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "fee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "gasLimit",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ },
+ {
+ "internalType": "string",
+ "name": "memo",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct IBridge.Message",
+ "name": "message",
+ "type": "tuple"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "msgHash",
+ "type": "bytes32"
+ }
+ ],
+ "name": "onMessageRecalled",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "pause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "paused",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "proxiableUUID",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "addr",
+ "type": "address"
+ },
+ {
+ "internalType": "uint8",
+ "name": "decimals",
+ "type": "uint8"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct ERC20Vault.CanonicalERC20",
+ "name": "ctoken",
+ "type": "tuple"
+ },
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "receiveToken",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "renounceOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "name",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowZeroAddress",
+ "type": "bool"
+ }
+ ],
+ "name": "resolve",
+ "outputs": [
+ {
+ "internalType": "address payable",
+ "name": "addr",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes32",
+ "name": "name",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowZeroAddress",
+ "type": "bool"
+ }
+ ],
+ "name": "resolve",
+ "outputs": [
+ {
+ "internalType": "address payable",
+ "name": "addr",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "destChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "gasLimit",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "fee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address",
+ "name": "refundTo",
+ "type": "address"
+ },
+ {
+ "internalType": "string",
+ "name": "memo",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct ERC20Vault.BridgeTransferOp",
+ "name": "op",
+ "type": "tuple"
+ }
+ ],
+ "name": "sendToken",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint128",
+ "name": "id",
+ "type": "uint128"
+ },
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "uint64",
+ "name": "srcChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "destChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "refundTo",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "fee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "gasLimit",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ },
+ {
+ "internalType": "string",
+ "name": "memo",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct IBridge.Message",
+ "name": "_message",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes4",
+ "name": "interfaceId",
+ "type": "bytes4"
+ }
+ ],
+ "name": "supportsInterface",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "transferOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "unpause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ }
+ ],
+ "name": "upgradeTo",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ }
+ ],
+ "name": "upgradeToAndCall",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ }
+]
diff --git a/packages/relayer/ERC721Vault.json b/packages/relayer/ERC721Vault.json
new file mode 100644
index 00000000000..3ab40885b04
--- /dev/null
+++ b/packages/relayer/ERC721Vault.json
@@ -0,0 +1,972 @@
+[
+ {
+ "inputs": [],
+ "name": "ETH_TRANSFER_FAILED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "INVALID_PAUSE_STATUS",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "NULL_IMPL_ADDR",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "REENTRANT_CALL",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_DENIED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_INVALID_MANAGER",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_UNEXPECTED_CHAINID",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ }
+ ],
+ "name": "RESOLVER_ZERO_ADDR",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_INTERFACE_NOT_SUPPORTED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_INVALID_AMOUNT",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_INVALID_SRC_CHAIN_ID",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_INVALID_TOKEN",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_INVALID_USER",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_MAX_TOKEN_PER_TXN_EXCEEDED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_PERMISSION_DENIED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "VAULT_TOKEN_ARRAY_MISMATCH",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "previousAdmin",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "newAdmin",
+ "type": "address"
+ }
+ ],
+ "name": "AdminChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "beacon",
+ "type": "address"
+ }
+ ],
+ "name": "BeaconUpgraded",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "ctoken",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "btoken",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "string",
+ "name": "ctokenSymbol",
+ "type": "string"
+ },
+ {
+ "indexed": false,
+ "internalType": "string",
+ "name": "ctokenName",
+ "type": "string"
+ }
+ ],
+ "name": "BridgedTokenDeployed",
+ "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"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Paused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bytes32",
+ "name": "msgHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint64",
+ "name": "srcChainId",
+ "type": "uint64"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256[]",
+ "name": "tokenIds",
+ "type": "uint256[]"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256[]",
+ "name": "amounts",
+ "type": "uint256[]"
+ }
+ ],
+ "name": "TokenReceived",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bytes32",
+ "name": "msgHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256[]",
+ "name": "tokenIds",
+ "type": "uint256[]"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256[]",
+ "name": "amounts",
+ "type": "uint256[]"
+ }
+ ],
+ "name": "TokenReleased",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "bytes32",
+ "name": "msgHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint64",
+ "name": "destChainId",
+ "type": "uint64"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256[]",
+ "name": "tokenIds",
+ "type": "uint256[]"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256[]",
+ "name": "amounts",
+ "type": "uint256[]"
+ }
+ ],
+ "name": "TokenSent",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Unpaused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "implementation",
+ "type": "address"
+ }
+ ],
+ "name": "Upgraded",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "ERC1155_INTERFACE_ID",
+ "outputs": [
+ {
+ "internalType": "bytes4",
+ "name": "",
+ "type": "bytes4"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "ERC721_INTERFACE_ID",
+ "outputs": [
+ {
+ "internalType": "bytes4",
+ "name": "",
+ "type": "bytes4"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "MAX_TOKEN_PER_TXN",
+ "outputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "addressManager",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "bridgedToCanonical",
+ "outputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "addr",
+ "type": "address"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "canonicalToBridged",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "addressManager",
+ "type": "address"
+ }
+ ],
+ "name": "init",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "name",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "pure",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "",
+ "type": "bytes"
+ }
+ ],
+ "name": "onERC721Received",
+ "outputs": [
+ {
+ "internalType": "bytes4",
+ "name": "",
+ "type": "bytes4"
+ }
+ ],
+ "stateMutability": "pure",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint128",
+ "name": "id",
+ "type": "uint128"
+ },
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "uint64",
+ "name": "srcChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "destChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "refundTo",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "fee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "gasLimit",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ },
+ {
+ "internalType": "string",
+ "name": "memo",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct IBridge.Message",
+ "name": "message",
+ "type": "tuple"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "msgHash",
+ "type": "bytes32"
+ }
+ ],
+ "name": "onMessageRecalled",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "pause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "paused",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "proxiableUUID",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "addr",
+ "type": "address"
+ },
+ {
+ "internalType": "string",
+ "name": "symbol",
+ "type": "string"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct BaseNFTVault.CanonicalNFT",
+ "name": "ctoken",
+ "type": "tuple"
+ },
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256[]",
+ "name": "tokenIds",
+ "type": "uint256[]"
+ }
+ ],
+ "name": "receiveToken",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "renounceOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "name",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowZeroAddress",
+ "type": "bool"
+ }
+ ],
+ "name": "resolve",
+ "outputs": [
+ {
+ "internalType": "address payable",
+ "name": "addr",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes32",
+ "name": "name",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowZeroAddress",
+ "type": "bool"
+ }
+ ],
+ "name": "resolve",
+ "outputs": [
+ {
+ "internalType": "address payable",
+ "name": "addr",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "destChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "token",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256[]",
+ "name": "tokenIds",
+ "type": "uint256[]"
+ },
+ {
+ "internalType": "uint256[]",
+ "name": "amounts",
+ "type": "uint256[]"
+ },
+ {
+ "internalType": "uint256",
+ "name": "gasLimit",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "fee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "address",
+ "name": "refundTo",
+ "type": "address"
+ },
+ {
+ "internalType": "string",
+ "name": "memo",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct BaseNFTVault.BridgeTransferOp",
+ "name": "op",
+ "type": "tuple"
+ }
+ ],
+ "name": "sendToken",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint128",
+ "name": "id",
+ "type": "uint128"
+ },
+ {
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "internalType": "uint64",
+ "name": "srcChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "destChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "owner",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "internalType": "address",
+ "name": "refundTo",
+ "type": "address"
+ },
+ {
+ "internalType": "uint256",
+ "name": "value",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "fee",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "gasLimit",
+ "type": "uint256"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ },
+ {
+ "internalType": "string",
+ "name": "memo",
+ "type": "string"
+ }
+ ],
+ "internalType": "struct IBridge.Message",
+ "name": "_message",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes4",
+ "name": "interfaceId",
+ "type": "bytes4"
+ }
+ ],
+ "name": "supportsInterface",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "transferOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "unpause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ }
+ ],
+ "name": "upgradeTo",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ }
+ ],
+ "name": "upgradeToAndCall",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ }
+]
diff --git a/packages/relayer/ICrossChainSync.json b/packages/relayer/ICrossChainSync.json
new file mode 100644
index 00000000000..95981eed4aa
--- /dev/null
+++ b/packages/relayer/ICrossChainSync.json
@@ -0,0 +1,74 @@
+[
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint64",
+ "name": "syncedInBlock",
+ "type": "uint64"
+ },
+ {
+ "indexed": true,
+ "internalType": "uint64",
+ "name": "blockId",
+ "type": "uint64"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "blockHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
+ }
+ ],
+ "name": "CrossChainSynced",
+ "type": "event"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "blockId",
+ "type": "uint64"
+ }
+ ],
+ "name": "getSyncedSnippet",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "remoteBlockId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "syncedInBlock",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "blockHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
+ }
+ ],
+ "internalType": "struct ICrossChainSync.Snippet",
+ "name": "snippet",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ }
+]
diff --git a/packages/relayer/SignalService.json b/packages/relayer/SignalService.json
new file mode 100644
index 00000000000..01d7755ada5
--- /dev/null
+++ b/packages/relayer/SignalService.json
@@ -0,0 +1,548 @@
+[
+ {
+ "inputs": [],
+ "name": "INVALID_ADDRESS",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "INVALID_LABEL",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "INVALID_PAUSE_STATUS",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "REENTRANT_CALL",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_DENIED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_INVALID_MANAGER",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_UNEXPECTED_CHAINID",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ }
+ ],
+ "name": "RESOLVER_ZERO_ADDR",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "SS_INVALID_APP",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "SS_INVALID_SIGNAL",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "previousAdmin",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "newAdmin",
+ "type": "address"
+ }
+ ],
+ "name": "AdminChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "addr",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "oldLabel",
+ "type": "bytes32"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "newLabel",
+ "type": "bytes32"
+ }
+ ],
+ "name": "Authorized",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "beacon",
+ "type": "address"
+ }
+ ],
+ "name": "BeaconUpgraded",
+ "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"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Paused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Unpaused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "implementation",
+ "type": "address"
+ }
+ ],
+ "name": "Upgraded",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "addressManager",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "addr",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "label",
+ "type": "bytes32"
+ }
+ ],
+ "name": "authorize",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "name": "authorizedAddresses",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "label",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "app",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "signal",
+ "type": "bytes32"
+ }
+ ],
+ "name": "getSignalSlot",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "pure",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "init",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "addr",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "label",
+ "type": "bytes32"
+ }
+ ],
+ "name": "isAuthorizedAs",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "app",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "signal",
+ "type": "bytes32"
+ }
+ ],
+ "name": "isSignalSent",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "pause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "paused",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "srcChainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "address",
+ "name": "app",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "signal",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes",
+ "name": "proof",
+ "type": "bytes"
+ }
+ ],
+ "name": "proveSignalReceived",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "proxiableUUID",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "renounceOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "name",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowZeroAddress",
+ "type": "bool"
+ }
+ ],
+ "name": "resolve",
+ "outputs": [
+ {
+ "internalType": "address payable",
+ "name": "addr",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes32",
+ "name": "name",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowZeroAddress",
+ "type": "bool"
+ }
+ ],
+ "name": "resolve",
+ "outputs": [
+ {
+ "internalType": "address payable",
+ "name": "addr",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes32",
+ "name": "signal",
+ "type": "bytes32"
+ }
+ ],
+ "name": "sendSignal",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "slot",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "skipProofCheck",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "pure",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "transferOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "unpause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ }
+ ],
+ "name": "upgradeTo",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ }
+ ],
+ "name": "upgradeToAndCall",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ }
+]
diff --git a/packages/relayer/TaikoL1.json b/packages/relayer/TaikoL1.json
new file mode 100644
index 00000000000..41f9a2af291
--- /dev/null
+++ b/packages/relayer/TaikoL1.json
@@ -0,0 +1,1763 @@
+[
+ {
+ "inputs": [],
+ "name": "INVALID_PAUSE_STATUS",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_ALREADY_CONTESTED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_ALREADY_PROVED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_ASSIGNED_PROVER_NOT_ALLOWED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_BLOB_FOR_DA_DISABLED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_BLOB_NOT_FOUND",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_BLOB_NOT_REUSEABLE",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_BLOCK_MISMATCH",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_BLOCK_MISMATCH",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_INSUFFICIENT_TOKEN",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_INVALID_ADDRESS",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_INVALID_AMOUNT",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_INVALID_BLOCK_ID",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_INVALID_CONFIG",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_INVALID_ETH_DEPOSIT",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_INVALID_PARAM",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_INVALID_PAUSE_STATUS",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_INVALID_PROOF",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_INVALID_PROVER",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_INVALID_TIER",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_INVALID_TRANSITION",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_LIVENESS_BOND_NOT_RECEIVED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_NOT_ASSIGNED_PROVER",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_PROPOSER_NOT_EOA",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_PROVING_PAUSED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_RECEIVE_DISABLED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_TOO_MANY_BLOCKS",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_TOO_MANY_TIERS",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_TRANSITION_ID_ZERO",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_TRANSITION_ID_ZERO",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_TRANSITION_NOT_FOUND",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_TXLIST_OFFSET_SIZE",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_TXLIST_TOO_LARGE",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_UNAUTHORIZED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_UNEXPECTED_PARENT",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_UNEXPECTED_TRANSITION_ID",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_UNEXPECTED_TRANSITION_ID",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "L1_UNEXPECTED_TRANSITION_TIER",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "REENTRANT_CALL",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_DENIED",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_INVALID_MANAGER",
+ "type": "error"
+ },
+ {
+ "inputs": [],
+ "name": "RESOLVER_UNEXPECTED_CHAINID",
+ "type": "error"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "string",
+ "name": "name",
+ "type": "string"
+ }
+ ],
+ "name": "RESOLVER_ZERO_ADDR",
+ "type": "error"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "previousAdmin",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "newAdmin",
+ "type": "address"
+ }
+ ],
+ "name": "AdminChanged",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "beacon",
+ "type": "address"
+ }
+ ],
+ "name": "BeaconUpgraded",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "blobHash",
+ "type": "bytes32"
+ }
+ ],
+ "name": "BlobCached",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint256",
+ "name": "blockId",
+ "type": "uint256"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "assignedProver",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint96",
+ "name": "livenessBond",
+ "type": "uint96"
+ },
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "l1Hash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "difficulty",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "blobHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "extraData",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "depositsHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "coinbase",
+ "type": "address"
+ },
+ {
+ "internalType": "uint64",
+ "name": "id",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint32",
+ "name": "gasLimit",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint64",
+ "name": "timestamp",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "l1Height",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint24",
+ "name": "txListByteOffset",
+ "type": "uint24"
+ },
+ {
+ "internalType": "uint24",
+ "name": "txListByteSize",
+ "type": "uint24"
+ },
+ {
+ "internalType": "uint16",
+ "name": "minTier",
+ "type": "uint16"
+ },
+ {
+ "internalType": "bool",
+ "name": "blobUsed",
+ "type": "bool"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "parentMetaHash",
+ "type": "bytes32"
+ }
+ ],
+ "indexed": false,
+ "internalType": "struct TaikoData.BlockMetadata",
+ "name": "meta",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "recipient",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "amount",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint64",
+ "name": "id",
+ "type": "uint64"
+ }
+ ],
+ "indexed": false,
+ "internalType": "struct TaikoData.EthDeposit[]",
+ "name": "depositsProcessed",
+ "type": "tuple[]"
+ }
+ ],
+ "name": "BlockProposed",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint256",
+ "name": "blockId",
+ "type": "uint256"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "assignedProver",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "prover",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "blockHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint16",
+ "name": "tier",
+ "type": "uint16"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint8",
+ "name": "contestations",
+ "type": "uint8"
+ }
+ ],
+ "name": "BlockVerified",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint256",
+ "name": "blockId",
+ "type": "uint256"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "assignedProver",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "prover",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "blockHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint16",
+ "name": "tier",
+ "type": "uint16"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint8",
+ "name": "contestations",
+ "type": "uint8"
+ }
+ ],
+ "name": "BlockVerified",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint64",
+ "name": "syncedInBlock",
+ "type": "uint64"
+ },
+ {
+ "indexed": true,
+ "internalType": "uint64",
+ "name": "blockId",
+ "type": "uint64"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "blockHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
+ }
+ ],
+ "name": "CrossChainSynced",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint64",
+ "name": "syncedInBlock",
+ "type": "uint64"
+ },
+ {
+ "indexed": true,
+ "internalType": "uint64",
+ "name": "blockId",
+ "type": "uint64"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "blockHash",
+ "type": "bytes32"
+ },
+ {
+ "indexed": false,
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
+ }
+ ],
+ "name": "CrossChainSynced",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "recipient",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "amount",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint64",
+ "name": "id",
+ "type": "uint64"
+ }
+ ],
+ "indexed": false,
+ "internalType": "struct TaikoData.EthDeposit",
+ "name": "deposit",
+ "type": "tuple"
+ }
+ ],
+ "name": "EthDeposited",
+ "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"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Paused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "bool",
+ "name": "paused",
+ "type": "bool"
+ }
+ ],
+ "name": "ProvingPaused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "TokenCredited",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "from",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "TokenDebited",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "TokenDeposited",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "TokenWithdrawn",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint256",
+ "name": "blockId",
+ "type": "uint256"
+ },
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "parentHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "blockHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "graffiti",
+ "type": "bytes32"
+ }
+ ],
+ "indexed": false,
+ "internalType": "struct TaikoData.Transition",
+ "name": "tran",
+ "type": "tuple"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "contester",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint96",
+ "name": "contestBond",
+ "type": "uint96"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint16",
+ "name": "tier",
+ "type": "uint16"
+ }
+ ],
+ "name": "TransitionContested",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "uint256",
+ "name": "blockId",
+ "type": "uint256"
+ },
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "parentHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "blockHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "graffiti",
+ "type": "bytes32"
+ }
+ ],
+ "indexed": false,
+ "internalType": "struct TaikoData.Transition",
+ "name": "tran",
+ "type": "tuple"
+ },
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "prover",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint96",
+ "name": "validityBond",
+ "type": "uint96"
+ },
+ {
+ "indexed": false,
+ "internalType": "uint16",
+ "name": "tier",
+ "type": "uint16"
+ }
+ ],
+ "name": "TransitionProved",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": false,
+ "internalType": "address",
+ "name": "account",
+ "type": "address"
+ }
+ ],
+ "name": "Unpaused",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "internalType": "address",
+ "name": "implementation",
+ "type": "address"
+ }
+ ],
+ "name": "Upgraded",
+ "type": "event"
+ },
+ {
+ "inputs": [],
+ "name": "addressManager",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "amount",
+ "type": "uint256"
+ }
+ ],
+ "name": "canDepositEthToL2",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "recipient",
+ "type": "address"
+ }
+ ],
+ "name": "depositEtherToL2",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "blockId",
+ "type": "uint64"
+ }
+ ],
+ "name": "getBlock",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "metaHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "assignedProver",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "livenessBond",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint64",
+ "name": "blockId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "proposedAt",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "proposedIn",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint32",
+ "name": "nextTransitionId",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint32",
+ "name": "verifiedTransitionId",
+ "type": "uint32"
+ },
+ {
+ "internalType": "bytes32[7]",
+ "name": "__reserved",
+ "type": "bytes32[7]"
+ }
+ ],
+ "internalType": "struct TaikoData.Block",
+ "name": "blk",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getConfig",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "blockMaxProposals",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "blockRingBufferSize",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "maxBlocksToVerifyPerProposal",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint32",
+ "name": "blockMaxGasLimit",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint24",
+ "name": "blockMaxTxListBytes",
+ "type": "uint24"
+ },
+ {
+ "internalType": "uint24",
+ "name": "blobExpiry",
+ "type": "uint24"
+ },
+ {
+ "internalType": "bool",
+ "name": "blobAllowedForDA",
+ "type": "bool"
+ },
+ {
+ "internalType": "uint96",
+ "name": "livenessBond",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint256",
+ "name": "ethDepositRingBufferSize",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint64",
+ "name": "ethDepositMinCountPerBlock",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "ethDepositMaxCountPerBlock",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint96",
+ "name": "ethDepositMinAmount",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint96",
+ "name": "ethDepositMaxAmount",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint256",
+ "name": "ethDepositGas",
+ "type": "uint256"
+ },
+ {
+ "internalType": "uint256",
+ "name": "ethDepositMaxFee",
+ "type": "uint256"
+ }
+ ],
+ "internalType": "struct TaikoData.Config",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint256",
+ "name": "rand",
+ "type": "uint256"
+ }
+ ],
+ "name": "getMinTier",
+ "outputs": [
+ {
+ "internalType": "uint16",
+ "name": "",
+ "type": "uint16"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getStateVariables",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "genesisHeight",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "genesisTimestamp",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "numEthDeposits",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "nextEthDepositToProcess",
+ "type": "uint64"
+ }
+ ],
+ "internalType": "struct TaikoData.SlotA",
+ "name": "a",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "numBlocks",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "lastVerifiedBlockId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bool",
+ "name": "provingPaused",
+ "type": "bool"
+ }
+ ],
+ "internalType": "struct TaikoData.SlotB",
+ "name": "b",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "blockId",
+ "type": "uint64"
+ }
+ ],
+ "name": "getSyncedSnippet",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "remoteBlockId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "syncedInBlock",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "blockHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
+ }
+ ],
+ "internalType": "struct ICrossChainSync.Snippet",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint16",
+ "name": "tierId",
+ "type": "uint16"
+ }
+ ],
+ "name": "getTier",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "verifierName",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "uint96",
+ "name": "validityBond",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint96",
+ "name": "contestBond",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint24",
+ "name": "cooldownWindow",
+ "type": "uint24"
+ },
+ {
+ "internalType": "uint16",
+ "name": "provingWindow",
+ "type": "uint16"
+ },
+ {
+ "internalType": "uint8",
+ "name": "maxBlocksToVerify",
+ "type": "uint8"
+ }
+ ],
+ "internalType": "struct ITierProvider.Tier",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "getTierIds",
+ "outputs": [
+ {
+ "internalType": "uint16[]",
+ "name": "ids",
+ "type": "uint16[]"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "blockId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "parentHash",
+ "type": "bytes32"
+ }
+ ],
+ "name": "getTransition",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "key",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "blockHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "signalRoot",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "prover",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "validityBond",
+ "type": "uint96"
+ },
+ {
+ "internalType": "address",
+ "name": "contester",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "contestBond",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint64",
+ "name": "timestamp",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint16",
+ "name": "tier",
+ "type": "uint16"
+ },
+ {
+ "internalType": "uint8",
+ "name": "contestations",
+ "type": "uint8"
+ },
+ {
+ "internalType": "bytes32[4]",
+ "name": "__reserved",
+ "type": "bytes32[4]"
+ }
+ ],
+ "internalType": "struct TaikoData.TransitionState",
+ "name": "",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "_addressManager",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "_genesisBlockHash",
+ "type": "bytes32"
+ }
+ ],
+ "name": "init",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes32",
+ "name": "blobHash",
+ "type": "bytes32"
+ }
+ ],
+ "name": "isBlobReusable",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "isConfigValid",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "owner",
+ "outputs": [
+ {
+ "internalType": "address",
+ "name": "",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "pause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bool",
+ "name": "pause",
+ "type": "bool"
+ }
+ ],
+ "name": "pauseProving",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "paused",
+ "outputs": [
+ {
+ "internalType": "bool",
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes",
+ "name": "params",
+ "type": "bytes"
+ },
+ {
+ "internalType": "bytes",
+ "name": "txList",
+ "type": "bytes"
+ }
+ ],
+ "name": "proposeBlock",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "bytes32",
+ "name": "l1Hash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "difficulty",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "blobHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "extraData",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "depositsHash",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "address",
+ "name": "coinbase",
+ "type": "address"
+ },
+ {
+ "internalType": "uint64",
+ "name": "id",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint32",
+ "name": "gasLimit",
+ "type": "uint32"
+ },
+ {
+ "internalType": "uint64",
+ "name": "timestamp",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "l1Height",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint24",
+ "name": "txListByteOffset",
+ "type": "uint24"
+ },
+ {
+ "internalType": "uint24",
+ "name": "txListByteSize",
+ "type": "uint24"
+ },
+ {
+ "internalType": "uint16",
+ "name": "minTier",
+ "type": "uint16"
+ },
+ {
+ "internalType": "bool",
+ "name": "blobUsed",
+ "type": "bool"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "parentMetaHash",
+ "type": "bytes32"
+ }
+ ],
+ "internalType": "struct TaikoData.BlockMetadata",
+ "name": "meta",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "address",
+ "name": "recipient",
+ "type": "address"
+ },
+ {
+ "internalType": "uint96",
+ "name": "amount",
+ "type": "uint96"
+ },
+ {
+ "internalType": "uint64",
+ "name": "id",
+ "type": "uint64"
+ }
+ ],
+ "internalType": "struct TaikoData.EthDeposit[]",
+ "name": "depositsProcessed",
+ "type": "tuple[]"
+ }
+ ],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "blockId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bytes",
+ "name": "input",
+ "type": "bytes"
+ }
+ ],
+ "name": "proveBlock",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "proxiableUUID",
+ "outputs": [
+ {
+ "internalType": "bytes32",
+ "name": "",
+ "type": "bytes32"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "renounceOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "chainId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bytes32",
+ "name": "name",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowZeroAddress",
+ "type": "bool"
+ }
+ ],
+ "name": "resolve",
+ "outputs": [
+ {
+ "internalType": "address payable",
+ "name": "addr",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "bytes32",
+ "name": "name",
+ "type": "bytes32"
+ },
+ {
+ "internalType": "bool",
+ "name": "allowZeroAddress",
+ "type": "bool"
+ }
+ ],
+ "name": "resolve",
+ "outputs": [
+ {
+ "internalType": "address payable",
+ "name": "addr",
+ "type": "address"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "state",
+ "outputs": [
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "genesisHeight",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "genesisTimestamp",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "numEthDeposits",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "nextEthDepositToProcess",
+ "type": "uint64"
+ }
+ ],
+ "internalType": "struct TaikoData.SlotA",
+ "name": "slotA",
+ "type": "tuple"
+ },
+ {
+ "components": [
+ {
+ "internalType": "uint64",
+ "name": "numBlocks",
+ "type": "uint64"
+ },
+ {
+ "internalType": "uint64",
+ "name": "lastVerifiedBlockId",
+ "type": "uint64"
+ },
+ {
+ "internalType": "bool",
+ "name": "provingPaused",
+ "type": "bool"
+ }
+ ],
+ "internalType": "struct TaikoData.SlotB",
+ "name": "slotB",
+ "type": "tuple"
+ }
+ ],
+ "stateMutability": "view",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newOwner",
+ "type": "address"
+ }
+ ],
+ "name": "transferOwnership",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "name": "unpause",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ }
+ ],
+ "name": "upgradeTo",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "address",
+ "name": "newImplementation",
+ "type": "address"
+ },
+ {
+ "internalType": "bytes",
+ "name": "data",
+ "type": "bytes"
+ }
+ ],
+ "name": "upgradeToAndCall",
+ "outputs": [],
+ "stateMutability": "payable",
+ "type": "function"
+ },
+ {
+ "inputs": [
+ {
+ "internalType": "uint64",
+ "name": "maxBlocksToVerify",
+ "type": "uint64"
+ }
+ ],
+ "name": "verifyBlocks",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function"
+ },
+ {
+ "stateMutability": "payable",
+ "type": "receive"
+ }
+]
diff --git a/packages/relayer/bindings/bridge/Bridge.go b/packages/relayer/bindings/bridge/Bridge.go
index 2313b34e13a..c7c19837e5b 100644
--- a/packages/relayer/bindings/bridge/Bridge.go
+++ b/packages/relayer/bindings/bridge/Bridge.go
@@ -33,16 +33,16 @@ var (
type IBridgeContext struct {
MsgHash [32]byte
From common.Address
- SrcChainId *big.Int
+ SrcChainId uint64
}
// IBridgeMessage is an auto generated low-level Go binding around an user-defined struct.
type IBridgeMessage struct {
Id *big.Int
From common.Address
- SrcChainId *big.Int
- DestChainId *big.Int
- User common.Address
+ SrcChainId uint64
+ DestChainId uint64
+ Owner common.Address
To common.Address
RefundTo common.Address
Value *big.Int
@@ -54,7 +54,7 @@ type IBridgeMessage struct {
// BridgeMetaData contains all meta data concerning the Bridge contract.
var BridgeMetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[],\"name\":\"B_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_ERC20_CANNOT_RECEIVE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_EV_DO_NOT_BURN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_EV_NOT_AUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_EV_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_FAILED_TRANSFER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_FORBIDDEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_FORBIDDEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_GAS_LIMIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_GAS_LIMIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INCORRECT_VALUE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INCORRECT_VALUE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INIT_PARAM_ERROR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_HASH_NULL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_HASH_NULL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_NON_RETRIABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_NON_RETRIABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_NOT_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_NOT_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_RECALLED_ALREADY\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_MSG_RECALLED_ALREADY\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_NULL_APP_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_SIGNAL_NOT_RECEIVED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_SIGNAL_NOT_RECEIVED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_STATUS_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_STATUS_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_USER_IS_NULL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_USER_IS_NULL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_WRONG_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_WRONG_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_WRONG_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_WRONG_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_WRONG_TO_ADDRESS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_WRONG_TO_ADDRESS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_ZERO_SIGNAL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"DestChainEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"MessageRecalled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"MessageRecalled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"enumLibBridgeStatus.MessageStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"transactor\",\"type\":\"address\"}],\"name\":\"MessageStatusChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"enumLibBridgeStatus.MessageStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"transactor\",\"type\":\"address\"}],\"name\":\"MessageStatusChanged\",\"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\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"SignalSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"context\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"}],\"internalType\":\"structIBridge.Context\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"getMessageStatus\",\"outputs\":[{\"internalType\":\"enumLibBridgeStatus.MessageStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"getMessageStatusSlot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"hashMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_chainId\",\"type\":\"uint256\"}],\"name\":\"isDestChainEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"isMessageFailed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"isMessageRecalled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"isMessageReceived\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"isMessageSent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"processMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"recallMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"isLastAttempt\",\"type\":\"bool\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
+ ABI: "[{\"inputs\":[],\"name\":\"B_INVALID_CHAINID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INVALID_CONTEXT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INVALID_GAS_LIMIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INVALID_SIGNAL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INVALID_USER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_INVALID_VALUE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_NON_RETRIABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_NOT_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_NOT_RECEIVED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_PERMISSION_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_RECALLED_ALREADY\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"B_STATUS_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ETH_TRANSFER_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"DestChainEnabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"MessageRecalled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"enumBridge.Status\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"MessageStatusChanged\",\"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\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"SignalSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"context\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"}],\"internalType\":\"structIBridge.Context\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"hashMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"}],\"name\":\"isDestChainEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"destBridge\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"isMessageRecalled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"recalled\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"isMessageSent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"messageStatus\",\"outputs\":[{\"internalType\":\"enumBridge.Status\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextMessageId\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"processMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"proveMessageFailed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"proveMessageReceived\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"recallMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"isLastAttempt\",\"type\":\"bool\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"_message\",\"type\":\"tuple\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
}
// BridgeABI is the input ABI used to generate the binding from.
@@ -236,7 +236,7 @@ func (_Bridge *BridgeCallerSession) AddressManager() (common.Address, error) {
// Context is a free data retrieval call binding the contract method 0xd0496d6a.
//
-// Solidity: function context() view returns((bytes32,address,uint256))
+// Solidity: function context() view returns((bytes32,address,uint64))
func (_Bridge *BridgeCaller) Context(opts *bind.CallOpts) (IBridgeContext, error) {
var out []interface{}
err := _Bridge.contract.Call(opts, &out, "context")
@@ -253,117 +253,131 @@ func (_Bridge *BridgeCaller) Context(opts *bind.CallOpts) (IBridgeContext, error
// Context is a free data retrieval call binding the contract method 0xd0496d6a.
//
-// Solidity: function context() view returns((bytes32,address,uint256))
+// Solidity: function context() view returns((bytes32,address,uint64))
func (_Bridge *BridgeSession) Context() (IBridgeContext, error) {
return _Bridge.Contract.Context(&_Bridge.CallOpts)
}
// Context is a free data retrieval call binding the contract method 0xd0496d6a.
//
-// Solidity: function context() view returns((bytes32,address,uint256))
+// Solidity: function context() view returns((bytes32,address,uint64))
func (_Bridge *BridgeCallerSession) Context() (IBridgeContext, error) {
return _Bridge.Contract.Context(&_Bridge.CallOpts)
}
-// GetMessageStatus is a free data retrieval call binding the contract method 0x5075a9d4.
+// HashMessage is a free data retrieval call binding the contract method 0x48c09539.
//
-// Solidity: function getMessageStatus(bytes32 msgHash) view returns(uint8)
-func (_Bridge *BridgeCaller) GetMessageStatus(opts *bind.CallOpts, msgHash [32]byte) (uint8, error) {
+// Solidity: function hashMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) pure returns(bytes32)
+func (_Bridge *BridgeCaller) HashMessage(opts *bind.CallOpts, message IBridgeMessage) ([32]byte, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "getMessageStatus", msgHash)
+ err := _Bridge.contract.Call(opts, &out, "hashMessage", message)
if err != nil {
- return *new(uint8), err
+ return *new([32]byte), err
}
- out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
-// GetMessageStatus is a free data retrieval call binding the contract method 0x5075a9d4.
+// HashMessage is a free data retrieval call binding the contract method 0x48c09539.
//
-// Solidity: function getMessageStatus(bytes32 msgHash) view returns(uint8)
-func (_Bridge *BridgeSession) GetMessageStatus(msgHash [32]byte) (uint8, error) {
- return _Bridge.Contract.GetMessageStatus(&_Bridge.CallOpts, msgHash)
+// Solidity: function hashMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) pure returns(bytes32)
+func (_Bridge *BridgeSession) HashMessage(message IBridgeMessage) ([32]byte, error) {
+ return _Bridge.Contract.HashMessage(&_Bridge.CallOpts, message)
}
-// GetMessageStatus is a free data retrieval call binding the contract method 0x5075a9d4.
+// HashMessage is a free data retrieval call binding the contract method 0x48c09539.
//
-// Solidity: function getMessageStatus(bytes32 msgHash) view returns(uint8)
-func (_Bridge *BridgeCallerSession) GetMessageStatus(msgHash [32]byte) (uint8, error) {
- return _Bridge.Contract.GetMessageStatus(&_Bridge.CallOpts, msgHash)
+// Solidity: function hashMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) pure returns(bytes32)
+func (_Bridge *BridgeCallerSession) HashMessage(message IBridgeMessage) ([32]byte, error) {
+ return _Bridge.Contract.HashMessage(&_Bridge.CallOpts, message)
}
-// GetMessageStatusSlot is a free data retrieval call binding the contract method 0x606b5b74.
+// IsDestChainEnabled is a free data retrieval call binding the contract method 0x8e3881a9.
//
-// Solidity: function getMessageStatusSlot(bytes32 msgHash) pure returns(bytes32)
-func (_Bridge *BridgeCaller) GetMessageStatusSlot(opts *bind.CallOpts, msgHash [32]byte) ([32]byte, error) {
+// Solidity: function isDestChainEnabled(uint64 chainId) view returns(bool enabled, address destBridge)
+func (_Bridge *BridgeCaller) IsDestChainEnabled(opts *bind.CallOpts, chainId uint64) (struct {
+ Enabled bool
+ DestBridge common.Address
+}, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "getMessageStatusSlot", msgHash)
+ err := _Bridge.contract.Call(opts, &out, "isDestChainEnabled", chainId)
+ outstruct := new(struct {
+ Enabled bool
+ DestBridge common.Address
+ })
if err != nil {
- return *new([32]byte), err
+ return *outstruct, err
}
- out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+ outstruct.Enabled = *abi.ConvertType(out[0], new(bool)).(*bool)
+ outstruct.DestBridge = *abi.ConvertType(out[1], new(common.Address)).(*common.Address)
- return out0, err
+ return *outstruct, err
}
-// GetMessageStatusSlot is a free data retrieval call binding the contract method 0x606b5b74.
+// IsDestChainEnabled is a free data retrieval call binding the contract method 0x8e3881a9.
//
-// Solidity: function getMessageStatusSlot(bytes32 msgHash) pure returns(bytes32)
-func (_Bridge *BridgeSession) GetMessageStatusSlot(msgHash [32]byte) ([32]byte, error) {
- return _Bridge.Contract.GetMessageStatusSlot(&_Bridge.CallOpts, msgHash)
+// Solidity: function isDestChainEnabled(uint64 chainId) view returns(bool enabled, address destBridge)
+func (_Bridge *BridgeSession) IsDestChainEnabled(chainId uint64) (struct {
+ Enabled bool
+ DestBridge common.Address
+}, error) {
+ return _Bridge.Contract.IsDestChainEnabled(&_Bridge.CallOpts, chainId)
}
-// GetMessageStatusSlot is a free data retrieval call binding the contract method 0x606b5b74.
+// IsDestChainEnabled is a free data retrieval call binding the contract method 0x8e3881a9.
//
-// Solidity: function getMessageStatusSlot(bytes32 msgHash) pure returns(bytes32)
-func (_Bridge *BridgeCallerSession) GetMessageStatusSlot(msgHash [32]byte) ([32]byte, error) {
- return _Bridge.Contract.GetMessageStatusSlot(&_Bridge.CallOpts, msgHash)
+// Solidity: function isDestChainEnabled(uint64 chainId) view returns(bool enabled, address destBridge)
+func (_Bridge *BridgeCallerSession) IsDestChainEnabled(chainId uint64) (struct {
+ Enabled bool
+ DestBridge common.Address
+}, error) {
+ return _Bridge.Contract.IsDestChainEnabled(&_Bridge.CallOpts, chainId)
}
-// HashMessage is a free data retrieval call binding the contract method 0x263463c8.
+// IsMessageRecalled is a free data retrieval call binding the contract method 0x4f5f9772.
//
-// Solidity: function hashMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) pure returns(bytes32)
-func (_Bridge *BridgeCaller) HashMessage(opts *bind.CallOpts, message IBridgeMessage) ([32]byte, error) {
+// Solidity: function isMessageRecalled(bytes32 msgHash) view returns(bool recalled)
+func (_Bridge *BridgeCaller) IsMessageRecalled(opts *bind.CallOpts, msgHash [32]byte) (bool, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "hashMessage", message)
+ err := _Bridge.contract.Call(opts, &out, "isMessageRecalled", msgHash)
if err != nil {
- return *new([32]byte), err
+ return *new(bool), err
}
- out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
-// HashMessage is a free data retrieval call binding the contract method 0x263463c8.
+// IsMessageRecalled is a free data retrieval call binding the contract method 0x4f5f9772.
//
-// Solidity: function hashMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) pure returns(bytes32)
-func (_Bridge *BridgeSession) HashMessage(message IBridgeMessage) ([32]byte, error) {
- return _Bridge.Contract.HashMessage(&_Bridge.CallOpts, message)
+// Solidity: function isMessageRecalled(bytes32 msgHash) view returns(bool recalled)
+func (_Bridge *BridgeSession) IsMessageRecalled(msgHash [32]byte) (bool, error) {
+ return _Bridge.Contract.IsMessageRecalled(&_Bridge.CallOpts, msgHash)
}
-// HashMessage is a free data retrieval call binding the contract method 0x263463c8.
+// IsMessageRecalled is a free data retrieval call binding the contract method 0x4f5f9772.
//
-// Solidity: function hashMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) pure returns(bytes32)
-func (_Bridge *BridgeCallerSession) HashMessage(message IBridgeMessage) ([32]byte, error) {
- return _Bridge.Contract.HashMessage(&_Bridge.CallOpts, message)
+// Solidity: function isMessageRecalled(bytes32 msgHash) view returns(bool recalled)
+func (_Bridge *BridgeCallerSession) IsMessageRecalled(msgHash [32]byte) (bool, error) {
+ return _Bridge.Contract.IsMessageRecalled(&_Bridge.CallOpts, msgHash)
}
-// IsDestChainEnabled is a free data retrieval call binding the contract method 0x5d0bd986.
+// IsMessageSent is a free data retrieval call binding the contract method 0x60ecbdfd.
//
-// Solidity: function isDestChainEnabled(uint256 _chainId) view returns(bool enabled)
-func (_Bridge *BridgeCaller) IsDestChainEnabled(opts *bind.CallOpts, _chainId *big.Int) (bool, error) {
+// Solidity: function isMessageSent((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) view returns(bool)
+func (_Bridge *BridgeCaller) IsMessageSent(opts *bind.CallOpts, message IBridgeMessage) (bool, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "isDestChainEnabled", _chainId)
+ err := _Bridge.contract.Call(opts, &out, "isMessageSent", message)
if err != nil {
return *new(bool), err
@@ -375,57 +389,119 @@ func (_Bridge *BridgeCaller) IsDestChainEnabled(opts *bind.CallOpts, _chainId *b
}
-// IsDestChainEnabled is a free data retrieval call binding the contract method 0x5d0bd986.
+// IsMessageSent is a free data retrieval call binding the contract method 0x60ecbdfd.
//
-// Solidity: function isDestChainEnabled(uint256 _chainId) view returns(bool enabled)
-func (_Bridge *BridgeSession) IsDestChainEnabled(_chainId *big.Int) (bool, error) {
- return _Bridge.Contract.IsDestChainEnabled(&_Bridge.CallOpts, _chainId)
+// Solidity: function isMessageSent((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) view returns(bool)
+func (_Bridge *BridgeSession) IsMessageSent(message IBridgeMessage) (bool, error) {
+ return _Bridge.Contract.IsMessageSent(&_Bridge.CallOpts, message)
}
-// IsDestChainEnabled is a free data retrieval call binding the contract method 0x5d0bd986.
+// IsMessageSent is a free data retrieval call binding the contract method 0x60ecbdfd.
//
-// Solidity: function isDestChainEnabled(uint256 _chainId) view returns(bool enabled)
-func (_Bridge *BridgeCallerSession) IsDestChainEnabled(_chainId *big.Int) (bool, error) {
- return _Bridge.Contract.IsDestChainEnabled(&_Bridge.CallOpts, _chainId)
+// Solidity: function isMessageSent((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) view returns(bool)
+func (_Bridge *BridgeCallerSession) IsMessageSent(message IBridgeMessage) (bool, error) {
+ return _Bridge.Contract.IsMessageSent(&_Bridge.CallOpts, message)
}
-// IsMessageFailed is a free data retrieval call binding the contract method 0xce70f39b.
+// MessageStatus is a free data retrieval call binding the contract method 0x3c6cf473.
//
-// Solidity: function isMessageFailed(bytes32 msgHash, uint256 destChainId, bytes proof) view returns(bool)
-func (_Bridge *BridgeCaller) IsMessageFailed(opts *bind.CallOpts, msgHash [32]byte, destChainId *big.Int, proof []byte) (bool, error) {
+// Solidity: function messageStatus(bytes32 msgHash) view returns(uint8)
+func (_Bridge *BridgeCaller) MessageStatus(opts *bind.CallOpts, msgHash [32]byte) (uint8, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "isMessageFailed", msgHash, destChainId, proof)
+ err := _Bridge.contract.Call(opts, &out, "messageStatus", msgHash)
if err != nil {
- return *new(bool), err
+ return *new(uint8), err
}
- out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+ out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
return out0, err
}
-// IsMessageFailed is a free data retrieval call binding the contract method 0xce70f39b.
+// MessageStatus is a free data retrieval call binding the contract method 0x3c6cf473.
//
-// Solidity: function isMessageFailed(bytes32 msgHash, uint256 destChainId, bytes proof) view returns(bool)
-func (_Bridge *BridgeSession) IsMessageFailed(msgHash [32]byte, destChainId *big.Int, proof []byte) (bool, error) {
- return _Bridge.Contract.IsMessageFailed(&_Bridge.CallOpts, msgHash, destChainId, proof)
+// Solidity: function messageStatus(bytes32 msgHash) view returns(uint8)
+func (_Bridge *BridgeSession) MessageStatus(msgHash [32]byte) (uint8, error) {
+ return _Bridge.Contract.MessageStatus(&_Bridge.CallOpts, msgHash)
}
-// IsMessageFailed is a free data retrieval call binding the contract method 0xce70f39b.
+// MessageStatus is a free data retrieval call binding the contract method 0x3c6cf473.
//
-// Solidity: function isMessageFailed(bytes32 msgHash, uint256 destChainId, bytes proof) view returns(bool)
-func (_Bridge *BridgeCallerSession) IsMessageFailed(msgHash [32]byte, destChainId *big.Int, proof []byte) (bool, error) {
- return _Bridge.Contract.IsMessageFailed(&_Bridge.CallOpts, msgHash, destChainId, proof)
+// Solidity: function messageStatus(bytes32 msgHash) view returns(uint8)
+func (_Bridge *BridgeCallerSession) MessageStatus(msgHash [32]byte) (uint8, error) {
+ return _Bridge.Contract.MessageStatus(&_Bridge.CallOpts, msgHash)
}
-// IsMessageRecalled is a free data retrieval call binding the contract method 0x4f5f9772.
+// NextMessageId is a free data retrieval call binding the contract method 0xeefbf17e.
//
-// Solidity: function isMessageRecalled(bytes32 msgHash) view returns(bool)
-func (_Bridge *BridgeCaller) IsMessageRecalled(opts *bind.CallOpts, msgHash [32]byte) (bool, error) {
+// Solidity: function nextMessageId() view returns(uint128)
+func (_Bridge *BridgeCaller) NextMessageId(opts *bind.CallOpts) (*big.Int, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "isMessageRecalled", msgHash)
+ err := _Bridge.contract.Call(opts, &out, "nextMessageId")
+
+ if err != nil {
+ return *new(*big.Int), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+
+ return out0, err
+
+}
+
+// NextMessageId is a free data retrieval call binding the contract method 0xeefbf17e.
+//
+// Solidity: function nextMessageId() view returns(uint128)
+func (_Bridge *BridgeSession) NextMessageId() (*big.Int, error) {
+ return _Bridge.Contract.NextMessageId(&_Bridge.CallOpts)
+}
+
+// NextMessageId is a free data retrieval call binding the contract method 0xeefbf17e.
+//
+// Solidity: function nextMessageId() view returns(uint128)
+func (_Bridge *BridgeCallerSession) NextMessageId() (*big.Int, error) {
+ return _Bridge.Contract.NextMessageId(&_Bridge.CallOpts)
+}
+
+// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+//
+// Solidity: function owner() view returns(address)
+func (_Bridge *BridgeCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _Bridge.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 (_Bridge *BridgeSession) Owner() (common.Address, error) {
+ return _Bridge.Contract.Owner(&_Bridge.CallOpts)
+}
+
+// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+//
+// Solidity: function owner() view returns(address)
+func (_Bridge *BridgeCallerSession) Owner() (common.Address, error) {
+ return _Bridge.Contract.Owner(&_Bridge.CallOpts)
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_Bridge *BridgeCaller) Paused(opts *bind.CallOpts) (bool, error) {
+ var out []interface{}
+ err := _Bridge.contract.Call(opts, &out, "paused")
if err != nil {
return *new(bool), err
@@ -437,26 +513,26 @@ func (_Bridge *BridgeCaller) IsMessageRecalled(opts *bind.CallOpts, msgHash [32]
}
-// IsMessageRecalled is a free data retrieval call binding the contract method 0x4f5f9772.
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
//
-// Solidity: function isMessageRecalled(bytes32 msgHash) view returns(bool)
-func (_Bridge *BridgeSession) IsMessageRecalled(msgHash [32]byte) (bool, error) {
- return _Bridge.Contract.IsMessageRecalled(&_Bridge.CallOpts, msgHash)
+// Solidity: function paused() view returns(bool)
+func (_Bridge *BridgeSession) Paused() (bool, error) {
+ return _Bridge.Contract.Paused(&_Bridge.CallOpts)
}
-// IsMessageRecalled is a free data retrieval call binding the contract method 0x4f5f9772.
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
//
-// Solidity: function isMessageRecalled(bytes32 msgHash) view returns(bool)
-func (_Bridge *BridgeCallerSession) IsMessageRecalled(msgHash [32]byte) (bool, error) {
- return _Bridge.Contract.IsMessageRecalled(&_Bridge.CallOpts, msgHash)
+// Solidity: function paused() view returns(bool)
+func (_Bridge *BridgeCallerSession) Paused() (bool, error) {
+ return _Bridge.Contract.Paused(&_Bridge.CallOpts)
}
-// IsMessageReceived is a free data retrieval call binding the contract method 0xa4444efd.
+// ProveMessageFailed is a free data retrieval call binding the contract method 0x625e5b7f.
//
-// Solidity: function isMessageReceived(bytes32 msgHash, uint256 srcChainId, bytes proof) view returns(bool)
-func (_Bridge *BridgeCaller) IsMessageReceived(opts *bind.CallOpts, msgHash [32]byte, srcChainId *big.Int, proof []byte) (bool, error) {
+// Solidity: function proveMessageFailed((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) view returns(bool)
+func (_Bridge *BridgeCaller) ProveMessageFailed(opts *bind.CallOpts, message IBridgeMessage, proof []byte) (bool, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "isMessageReceived", msgHash, srcChainId, proof)
+ err := _Bridge.contract.Call(opts, &out, "proveMessageFailed", message, proof)
if err != nil {
return *new(bool), err
@@ -468,26 +544,26 @@ func (_Bridge *BridgeCaller) IsMessageReceived(opts *bind.CallOpts, msgHash [32]
}
-// IsMessageReceived is a free data retrieval call binding the contract method 0xa4444efd.
+// ProveMessageFailed is a free data retrieval call binding the contract method 0x625e5b7f.
//
-// Solidity: function isMessageReceived(bytes32 msgHash, uint256 srcChainId, bytes proof) view returns(bool)
-func (_Bridge *BridgeSession) IsMessageReceived(msgHash [32]byte, srcChainId *big.Int, proof []byte) (bool, error) {
- return _Bridge.Contract.IsMessageReceived(&_Bridge.CallOpts, msgHash, srcChainId, proof)
+// Solidity: function proveMessageFailed((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) view returns(bool)
+func (_Bridge *BridgeSession) ProveMessageFailed(message IBridgeMessage, proof []byte) (bool, error) {
+ return _Bridge.Contract.ProveMessageFailed(&_Bridge.CallOpts, message, proof)
}
-// IsMessageReceived is a free data retrieval call binding the contract method 0xa4444efd.
+// ProveMessageFailed is a free data retrieval call binding the contract method 0x625e5b7f.
//
-// Solidity: function isMessageReceived(bytes32 msgHash, uint256 srcChainId, bytes proof) view returns(bool)
-func (_Bridge *BridgeCallerSession) IsMessageReceived(msgHash [32]byte, srcChainId *big.Int, proof []byte) (bool, error) {
- return _Bridge.Contract.IsMessageReceived(&_Bridge.CallOpts, msgHash, srcChainId, proof)
+// Solidity: function proveMessageFailed((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) view returns(bool)
+func (_Bridge *BridgeCallerSession) ProveMessageFailed(message IBridgeMessage, proof []byte) (bool, error) {
+ return _Bridge.Contract.ProveMessageFailed(&_Bridge.CallOpts, message, proof)
}
-// IsMessageSent is a free data retrieval call binding the contract method 0x540be6a3.
+// ProveMessageReceived is a free data retrieval call binding the contract method 0x783f8c93.
//
-// Solidity: function isMessageSent(bytes32 msgHash) view returns(bool)
-func (_Bridge *BridgeCaller) IsMessageSent(opts *bind.CallOpts, msgHash [32]byte) (bool, error) {
+// Solidity: function proveMessageReceived((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) view returns(bool)
+func (_Bridge *BridgeCaller) ProveMessageReceived(opts *bind.CallOpts, message IBridgeMessage, proof []byte) (bool, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "isMessageSent", msgHash)
+ err := _Bridge.contract.Call(opts, &out, "proveMessageReceived", message, proof)
if err != nil {
return *new(bool), err
@@ -499,55 +575,55 @@ func (_Bridge *BridgeCaller) IsMessageSent(opts *bind.CallOpts, msgHash [32]byte
}
-// IsMessageSent is a free data retrieval call binding the contract method 0x540be6a3.
+// ProveMessageReceived is a free data retrieval call binding the contract method 0x783f8c93.
//
-// Solidity: function isMessageSent(bytes32 msgHash) view returns(bool)
-func (_Bridge *BridgeSession) IsMessageSent(msgHash [32]byte) (bool, error) {
- return _Bridge.Contract.IsMessageSent(&_Bridge.CallOpts, msgHash)
+// Solidity: function proveMessageReceived((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) view returns(bool)
+func (_Bridge *BridgeSession) ProveMessageReceived(message IBridgeMessage, proof []byte) (bool, error) {
+ return _Bridge.Contract.ProveMessageReceived(&_Bridge.CallOpts, message, proof)
}
-// IsMessageSent is a free data retrieval call binding the contract method 0x540be6a3.
+// ProveMessageReceived is a free data retrieval call binding the contract method 0x783f8c93.
//
-// Solidity: function isMessageSent(bytes32 msgHash) view returns(bool)
-func (_Bridge *BridgeCallerSession) IsMessageSent(msgHash [32]byte) (bool, error) {
- return _Bridge.Contract.IsMessageSent(&_Bridge.CallOpts, msgHash)
+// Solidity: function proveMessageReceived((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) view returns(bool)
+func (_Bridge *BridgeCallerSession) ProveMessageReceived(message IBridgeMessage, proof []byte) (bool, error) {
+ return _Bridge.Contract.ProveMessageReceived(&_Bridge.CallOpts, message, proof)
}
-// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
//
-// Solidity: function owner() view returns(address)
-func (_Bridge *BridgeCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_Bridge *BridgeCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
- err := _Bridge.contract.Call(opts, &out, "owner")
+ err := _Bridge.contract.Call(opts, &out, "proxiableUUID")
if err != nil {
- return *new(common.Address), err
+ return *new([32]byte), err
}
- out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
-// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
//
-// Solidity: function owner() view returns(address)
-func (_Bridge *BridgeSession) Owner() (common.Address, error) {
- return _Bridge.Contract.Owner(&_Bridge.CallOpts)
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_Bridge *BridgeSession) ProxiableUUID() ([32]byte, error) {
+ return _Bridge.Contract.ProxiableUUID(&_Bridge.CallOpts)
}
-// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
//
-// Solidity: function owner() view returns(address)
-func (_Bridge *BridgeCallerSession) Owner() (common.Address, error) {
- return _Bridge.Contract.Owner(&_Bridge.CallOpts)
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_Bridge *BridgeCallerSession) ProxiableUUID() ([32]byte, error) {
+ return _Bridge.Contract.ProxiableUUID(&_Bridge.CallOpts)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_Bridge *BridgeCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_Bridge *BridgeCaller) Resolve(opts *bind.CallOpts, chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
var out []interface{}
err := _Bridge.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress)
@@ -561,17 +637,17 @@ func (_Bridge *BridgeCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_Bridge *BridgeSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_Bridge *BridgeSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _Bridge.Contract.Resolve(&_Bridge.CallOpts, chainId, name, allowZeroAddress)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_Bridge *BridgeCallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_Bridge *BridgeCallerSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _Bridge.Contract.Resolve(&_Bridge.CallOpts, chainId, name, allowZeroAddress)
}
@@ -627,44 +703,65 @@ func (_Bridge *BridgeTransactorSession) Init(_addressManager common.Address) (*t
return _Bridge.Contract.Init(&_Bridge.TransactOpts, _addressManager)
}
-// ProcessMessage is a paid mutator transaction binding the contract method 0xec9b3121.
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_Bridge *BridgeTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _Bridge.contract.Transact(opts, "pause")
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
-// Solidity: function processMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
+// Solidity: function pause() returns()
+func (_Bridge *BridgeSession) Pause() (*types.Transaction, error) {
+ return _Bridge.Contract.Pause(&_Bridge.TransactOpts)
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_Bridge *BridgeTransactorSession) Pause() (*types.Transaction, error) {
+ return _Bridge.Contract.Pause(&_Bridge.TransactOpts)
+}
+
+// ProcessMessage is a paid mutator transaction binding the contract method 0x01382408.
+//
+// Solidity: function processMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
func (_Bridge *BridgeTransactor) ProcessMessage(opts *bind.TransactOpts, message IBridgeMessage, proof []byte) (*types.Transaction, error) {
return _Bridge.contract.Transact(opts, "processMessage", message, proof)
}
-// ProcessMessage is a paid mutator transaction binding the contract method 0xec9b3121.
+// ProcessMessage is a paid mutator transaction binding the contract method 0x01382408.
//
-// Solidity: function processMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
+// Solidity: function processMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
func (_Bridge *BridgeSession) ProcessMessage(message IBridgeMessage, proof []byte) (*types.Transaction, error) {
return _Bridge.Contract.ProcessMessage(&_Bridge.TransactOpts, message, proof)
}
-// ProcessMessage is a paid mutator transaction binding the contract method 0xec9b3121.
+// ProcessMessage is a paid mutator transaction binding the contract method 0x01382408.
//
-// Solidity: function processMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
+// Solidity: function processMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
func (_Bridge *BridgeTransactorSession) ProcessMessage(message IBridgeMessage, proof []byte) (*types.Transaction, error) {
return _Bridge.Contract.ProcessMessage(&_Bridge.TransactOpts, message, proof)
}
-// RecallMessage is a paid mutator transaction binding the contract method 0x620c23fb.
+// RecallMessage is a paid mutator transaction binding the contract method 0x1a92e520.
//
-// Solidity: function recallMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
+// Solidity: function recallMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
func (_Bridge *BridgeTransactor) RecallMessage(opts *bind.TransactOpts, message IBridgeMessage, proof []byte) (*types.Transaction, error) {
return _Bridge.contract.Transact(opts, "recallMessage", message, proof)
}
-// RecallMessage is a paid mutator transaction binding the contract method 0x620c23fb.
+// RecallMessage is a paid mutator transaction binding the contract method 0x1a92e520.
//
-// Solidity: function recallMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
+// Solidity: function recallMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
func (_Bridge *BridgeSession) RecallMessage(message IBridgeMessage, proof []byte) (*types.Transaction, error) {
return _Bridge.Contract.RecallMessage(&_Bridge.TransactOpts, message, proof)
}
-// RecallMessage is a paid mutator transaction binding the contract method 0x620c23fb.
+// RecallMessage is a paid mutator transaction binding the contract method 0x1a92e520.
//
-// Solidity: function recallMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
+// Solidity: function recallMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes proof) returns()
func (_Bridge *BridgeTransactorSession) RecallMessage(message IBridgeMessage, proof []byte) (*types.Transaction, error) {
return _Bridge.Contract.RecallMessage(&_Bridge.TransactOpts, message, proof)
}
@@ -690,69 +787,48 @@ func (_Bridge *BridgeTransactorSession) RenounceOwnership() (*types.Transaction,
return _Bridge.Contract.RenounceOwnership(&_Bridge.TransactOpts)
}
-// RetryMessage is a paid mutator transaction binding the contract method 0xf21be36f.
+// RetryMessage is a paid mutator transaction binding the contract method 0xa24f721b.
//
-// Solidity: function retryMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bool isLastAttempt) returns()
+// Solidity: function retryMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bool isLastAttempt) returns()
func (_Bridge *BridgeTransactor) RetryMessage(opts *bind.TransactOpts, message IBridgeMessage, isLastAttempt bool) (*types.Transaction, error) {
return _Bridge.contract.Transact(opts, "retryMessage", message, isLastAttempt)
}
-// RetryMessage is a paid mutator transaction binding the contract method 0xf21be36f.
+// RetryMessage is a paid mutator transaction binding the contract method 0xa24f721b.
//
-// Solidity: function retryMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bool isLastAttempt) returns()
+// Solidity: function retryMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bool isLastAttempt) returns()
func (_Bridge *BridgeSession) RetryMessage(message IBridgeMessage, isLastAttempt bool) (*types.Transaction, error) {
return _Bridge.Contract.RetryMessage(&_Bridge.TransactOpts, message, isLastAttempt)
}
-// RetryMessage is a paid mutator transaction binding the contract method 0xf21be36f.
+// RetryMessage is a paid mutator transaction binding the contract method 0xa24f721b.
//
-// Solidity: function retryMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message, bool isLastAttempt) returns()
+// Solidity: function retryMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bool isLastAttempt) returns()
func (_Bridge *BridgeTransactorSession) RetryMessage(message IBridgeMessage, isLastAttempt bool) (*types.Transaction, error) {
return _Bridge.Contract.RetryMessage(&_Bridge.TransactOpts, message, isLastAttempt)
}
-// SendMessage is a paid mutator transaction binding the contract method 0x4c1888bc.
+// SendMessage is a paid mutator transaction binding the contract method 0x33bcd0cc.
//
-// Solidity: function sendMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns(bytes32 msgHash)
+// Solidity: function sendMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns(bytes32 msgHash, (uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
func (_Bridge *BridgeTransactor) SendMessage(opts *bind.TransactOpts, message IBridgeMessage) (*types.Transaction, error) {
return _Bridge.contract.Transact(opts, "sendMessage", message)
}
-// SendMessage is a paid mutator transaction binding the contract method 0x4c1888bc.
+// SendMessage is a paid mutator transaction binding the contract method 0x33bcd0cc.
//
-// Solidity: function sendMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns(bytes32 msgHash)
+// Solidity: function sendMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns(bytes32 msgHash, (uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
func (_Bridge *BridgeSession) SendMessage(message IBridgeMessage) (*types.Transaction, error) {
return _Bridge.Contract.SendMessage(&_Bridge.TransactOpts, message)
}
-// SendMessage is a paid mutator transaction binding the contract method 0x4c1888bc.
+// SendMessage is a paid mutator transaction binding the contract method 0x33bcd0cc.
//
-// Solidity: function sendMessage((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns(bytes32 msgHash)
+// Solidity: function sendMessage((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns(bytes32 msgHash, (uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
func (_Bridge *BridgeTransactorSession) SendMessage(message IBridgeMessage) (*types.Transaction, error) {
return _Bridge.Contract.SendMessage(&_Bridge.TransactOpts, message)
}
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_Bridge *BridgeTransactor) SetAddressManager(opts *bind.TransactOpts, newAddressManager common.Address) (*types.Transaction, error) {
- return _Bridge.contract.Transact(opts, "setAddressManager", newAddressManager)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_Bridge *BridgeSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _Bridge.Contract.SetAddressManager(&_Bridge.TransactOpts, newAddressManager)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_Bridge *BridgeTransactorSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _Bridge.Contract.SetAddressManager(&_Bridge.TransactOpts, newAddressManager)
-}
-
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
@@ -774,6 +850,69 @@ func (_Bridge *BridgeTransactorSession) TransferOwnership(newOwner common.Addres
return _Bridge.Contract.TransferOwnership(&_Bridge.TransactOpts, newOwner)
}
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_Bridge *BridgeTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _Bridge.contract.Transact(opts, "unpause")
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_Bridge *BridgeSession) Unpause() (*types.Transaction, error) {
+ return _Bridge.Contract.Unpause(&_Bridge.TransactOpts)
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_Bridge *BridgeTransactorSession) Unpause() (*types.Transaction, error) {
+ return _Bridge.Contract.Unpause(&_Bridge.TransactOpts)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_Bridge *BridgeTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) {
+ return _Bridge.contract.Transact(opts, "upgradeTo", newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_Bridge *BridgeSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _Bridge.Contract.UpgradeTo(&_Bridge.TransactOpts, newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_Bridge *BridgeTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _Bridge.Contract.UpgradeTo(&_Bridge.TransactOpts, newImplementation)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_Bridge *BridgeTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _Bridge.contract.Transact(opts, "upgradeToAndCall", newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_Bridge *BridgeSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _Bridge.Contract.UpgradeToAndCall(&_Bridge.TransactOpts, newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_Bridge *BridgeTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _Bridge.Contract.UpgradeToAndCall(&_Bridge.TransactOpts, newImplementation, data)
+}
+
// Receive is a paid mutator transaction binding the contract receive function.
//
// Solidity: receive() payable returns()
@@ -795,9 +934,9 @@ func (_Bridge *BridgeTransactorSession) Receive() (*types.Transaction, error) {
return _Bridge.Contract.Receive(&_Bridge.TransactOpts)
}
-// BridgeAddressManagerChangedIterator is returned from FilterAddressManagerChanged and is used to iterate over the raw logs and unpacked data for AddressManagerChanged events raised by the Bridge contract.
-type BridgeAddressManagerChangedIterator struct {
- Event *BridgeAddressManagerChanged // Event containing the contract specifics and raw log
+// BridgeAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the Bridge contract.
+type BridgeAdminChangedIterator struct {
+ Event *BridgeAdminChanged // 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
@@ -811,7 +950,7 @@ type BridgeAddressManagerChangedIterator struct {
// 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 *BridgeAddressManagerChangedIterator) Next() bool {
+func (it *BridgeAdminChangedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -820,7 +959,7 @@ func (it *BridgeAddressManagerChangedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeAddressManagerChanged)
+ it.Event = new(BridgeAdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -835,7 +974,7 @@ func (it *BridgeAddressManagerChangedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeAddressManagerChanged)
+ it.Event = new(BridgeAdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -851,51 +990,42 @@ func (it *BridgeAddressManagerChangedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeAddressManagerChangedIterator) Error() error {
+func (it *BridgeAdminChangedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeAddressManagerChangedIterator) Close() error {
+func (it *BridgeAdminChangedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeAddressManagerChanged represents a AddressManagerChanged event raised by the Bridge contract.
-type BridgeAddressManagerChanged struct {
- AddressManager common.Address
- Raw types.Log // Blockchain specific contextual infos
+// BridgeAdminChanged represents a AdminChanged event raised by the Bridge contract.
+type BridgeAdminChanged struct {
+ PreviousAdmin common.Address
+ NewAdmin common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterAddressManagerChanged is a free log retrieval operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_Bridge *BridgeFilterer) FilterAddressManagerChanged(opts *bind.FilterOpts, addressManager []common.Address) (*BridgeAddressManagerChangedIterator, error) {
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_Bridge *BridgeFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*BridgeAdminChangedIterator, error) {
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
- }
-
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "AdminChanged")
if err != nil {
return nil, err
}
- return &BridgeAddressManagerChangedIterator{contract: _Bridge.contract, event: "AddressManagerChanged", logs: logs, sub: sub}, nil
+ return &BridgeAdminChangedIterator{contract: _Bridge.contract, event: "AdminChanged", logs: logs, sub: sub}, nil
}
-// WatchAddressManagerChanged is a free log subscription operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_Bridge *BridgeFilterer) WatchAddressManagerChanged(opts *bind.WatchOpts, sink chan<- *BridgeAddressManagerChanged, addressManager []common.Address) (event.Subscription, error) {
-
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
- }
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_Bridge *BridgeFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *BridgeAdminChanged) (event.Subscription, error) {
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "AdminChanged")
if err != nil {
return nil, err
}
@@ -905,8 +1035,8 @@ func (_Bridge *BridgeFilterer) WatchAddressManagerChanged(opts *bind.WatchOpts,
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeAddressManagerChanged)
- if err := _Bridge.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+ event := new(BridgeAdminChanged)
+ if err := _Bridge.contract.UnpackLog(event, "AdminChanged", log); err != nil {
return err
}
event.Raw = log
@@ -927,21 +1057,21 @@ func (_Bridge *BridgeFilterer) WatchAddressManagerChanged(opts *bind.WatchOpts,
}), nil
}
-// ParseAddressManagerChanged is a log parse operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_Bridge *BridgeFilterer) ParseAddressManagerChanged(log types.Log) (*BridgeAddressManagerChanged, error) {
- event := new(BridgeAddressManagerChanged)
- if err := _Bridge.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_Bridge *BridgeFilterer) ParseAdminChanged(log types.Log) (*BridgeAdminChanged, error) {
+ event := new(BridgeAdminChanged)
+ if err := _Bridge.contract.UnpackLog(event, "AdminChanged", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeDestChainEnabledIterator is returned from FilterDestChainEnabled and is used to iterate over the raw logs and unpacked data for DestChainEnabled events raised by the Bridge contract.
-type BridgeDestChainEnabledIterator struct {
- Event *BridgeDestChainEnabled // Event containing the contract specifics and raw log
+// BridgeBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the Bridge contract.
+type BridgeBeaconUpgradedIterator struct {
+ Event *BridgeBeaconUpgraded // 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
@@ -955,7 +1085,7 @@ type BridgeDestChainEnabledIterator struct {
// 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 *BridgeDestChainEnabledIterator) Next() bool {
+func (it *BridgeBeaconUpgradedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -964,7 +1094,7 @@ func (it *BridgeDestChainEnabledIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeDestChainEnabled)
+ it.Event = new(BridgeBeaconUpgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -979,7 +1109,7 @@ func (it *BridgeDestChainEnabledIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeDestChainEnabled)
+ it.Event = new(BridgeBeaconUpgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -995,52 +1125,51 @@ func (it *BridgeDestChainEnabledIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeDestChainEnabledIterator) Error() error {
+func (it *BridgeBeaconUpgradedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeDestChainEnabledIterator) Close() error {
+func (it *BridgeBeaconUpgradedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeDestChainEnabled represents a DestChainEnabled event raised by the Bridge contract.
-type BridgeDestChainEnabled struct {
- ChainId *big.Int
- Enabled bool
- Raw types.Log // Blockchain specific contextual infos
+// BridgeBeaconUpgraded represents a BeaconUpgraded event raised by the Bridge contract.
+type BridgeBeaconUpgraded struct {
+ Beacon common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterDestChainEnabled is a free log retrieval operation binding the contract event 0x9f391218c06d4fc365ceb15f340bb3d77306b28ac0b8d4e519aec2654794536d.
+// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event DestChainEnabled(uint256 indexed chainId, bool enabled)
-func (_Bridge *BridgeFilterer) FilterDestChainEnabled(opts *bind.FilterOpts, chainId []*big.Int) (*BridgeDestChainEnabledIterator, error) {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_Bridge *BridgeFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*BridgeBeaconUpgradedIterator, error) {
- var chainIdRule []interface{}
- for _, chainIdItem := range chainId {
- chainIdRule = append(chainIdRule, chainIdItem)
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
}
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "DestChainEnabled", chainIdRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule)
if err != nil {
return nil, err
}
- return &BridgeDestChainEnabledIterator{contract: _Bridge.contract, event: "DestChainEnabled", logs: logs, sub: sub}, nil
+ return &BridgeBeaconUpgradedIterator{contract: _Bridge.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil
}
-// WatchDestChainEnabled is a free log subscription operation binding the contract event 0x9f391218c06d4fc365ceb15f340bb3d77306b28ac0b8d4e519aec2654794536d.
+// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event DestChainEnabled(uint256 indexed chainId, bool enabled)
-func (_Bridge *BridgeFilterer) WatchDestChainEnabled(opts *bind.WatchOpts, sink chan<- *BridgeDestChainEnabled, chainId []*big.Int) (event.Subscription, error) {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_Bridge *BridgeFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *BridgeBeaconUpgraded, beacon []common.Address) (event.Subscription, error) {
- var chainIdRule []interface{}
- for _, chainIdItem := range chainId {
- chainIdRule = append(chainIdRule, chainIdItem)
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
}
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "DestChainEnabled", chainIdRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule)
if err != nil {
return nil, err
}
@@ -1050,8 +1179,8 @@ func (_Bridge *BridgeFilterer) WatchDestChainEnabled(opts *bind.WatchOpts, sink
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeDestChainEnabled)
- if err := _Bridge.contract.UnpackLog(event, "DestChainEnabled", log); err != nil {
+ event := new(BridgeBeaconUpgraded)
+ if err := _Bridge.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
return err
}
event.Raw = log
@@ -1072,21 +1201,21 @@ func (_Bridge *BridgeFilterer) WatchDestChainEnabled(opts *bind.WatchOpts, sink
}), nil
}
-// ParseDestChainEnabled is a log parse operation binding the contract event 0x9f391218c06d4fc365ceb15f340bb3d77306b28ac0b8d4e519aec2654794536d.
+// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event DestChainEnabled(uint256 indexed chainId, bool enabled)
-func (_Bridge *BridgeFilterer) ParseDestChainEnabled(log types.Log) (*BridgeDestChainEnabled, error) {
- event := new(BridgeDestChainEnabled)
- if err := _Bridge.contract.UnpackLog(event, "DestChainEnabled", log); err != nil {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_Bridge *BridgeFilterer) ParseBeaconUpgraded(log types.Log) (*BridgeBeaconUpgraded, error) {
+ event := new(BridgeBeaconUpgraded)
+ if err := _Bridge.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Bridge contract.
-type BridgeInitializedIterator struct {
- Event *BridgeInitialized // Event containing the contract specifics and raw log
+// BridgeDestChainEnabledIterator is returned from FilterDestChainEnabled and is used to iterate over the raw logs and unpacked data for DestChainEnabled events raised by the Bridge contract.
+type BridgeDestChainEnabledIterator struct {
+ Event *BridgeDestChainEnabled // 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
@@ -1100,7 +1229,7 @@ type BridgeInitializedIterator struct {
// 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 *BridgeInitializedIterator) Next() bool {
+func (it *BridgeDestChainEnabledIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1109,7 +1238,7 @@ func (it *BridgeInitializedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeInitialized)
+ it.Event = new(BridgeDestChainEnabled)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1124,7 +1253,7 @@ func (it *BridgeInitializedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeInitialized)
+ it.Event = new(BridgeDestChainEnabled)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1140,41 +1269,52 @@ func (it *BridgeInitializedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeInitializedIterator) Error() error {
+func (it *BridgeDestChainEnabledIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeInitializedIterator) Close() error {
+func (it *BridgeDestChainEnabledIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeInitialized represents a Initialized event raised by the Bridge contract.
-type BridgeInitialized struct {
- Version uint8
+// BridgeDestChainEnabled represents a DestChainEnabled event raised by the Bridge contract.
+type BridgeDestChainEnabled struct {
+ ChainId uint64
+ Enabled bool
Raw types.Log // Blockchain specific contextual infos
}
-// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// FilterDestChainEnabled is a free log retrieval operation binding the contract event 0xacf89c9e8ba7f621aa9632bc23b65f5d4c7a0eacfb7bc5149c17a9dec05e89a4.
//
-// Solidity: event Initialized(uint8 version)
-func (_Bridge *BridgeFilterer) FilterInitialized(opts *bind.FilterOpts) (*BridgeInitializedIterator, error) {
+// Solidity: event DestChainEnabled(uint64 indexed chainId, bool enabled)
+func (_Bridge *BridgeFilterer) FilterDestChainEnabled(opts *bind.FilterOpts, chainId []uint64) (*BridgeDestChainEnabledIterator, error) {
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "Initialized")
+ var chainIdRule []interface{}
+ for _, chainIdItem := range chainId {
+ chainIdRule = append(chainIdRule, chainIdItem)
+ }
+
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "DestChainEnabled", chainIdRule)
if err != nil {
return nil, err
}
- return &BridgeInitializedIterator{contract: _Bridge.contract, event: "Initialized", logs: logs, sub: sub}, nil
+ return &BridgeDestChainEnabledIterator{contract: _Bridge.contract, event: "DestChainEnabled", logs: logs, sub: sub}, nil
}
-// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// WatchDestChainEnabled is a free log subscription operation binding the contract event 0xacf89c9e8ba7f621aa9632bc23b65f5d4c7a0eacfb7bc5149c17a9dec05e89a4.
//
-// Solidity: event Initialized(uint8 version)
-func (_Bridge *BridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *BridgeInitialized) (event.Subscription, error) {
+// Solidity: event DestChainEnabled(uint64 indexed chainId, bool enabled)
+func (_Bridge *BridgeFilterer) WatchDestChainEnabled(opts *bind.WatchOpts, sink chan<- *BridgeDestChainEnabled, chainId []uint64) (event.Subscription, error) {
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "Initialized")
+ var chainIdRule []interface{}
+ for _, chainIdItem := range chainId {
+ chainIdRule = append(chainIdRule, chainIdItem)
+ }
+
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "DestChainEnabled", chainIdRule)
if err != nil {
return nil, err
}
@@ -1184,8 +1324,8 @@ func (_Bridge *BridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeInitialized)
- if err := _Bridge.contract.UnpackLog(event, "Initialized", log); err != nil {
+ event := new(BridgeDestChainEnabled)
+ if err := _Bridge.contract.UnpackLog(event, "DestChainEnabled", log); err != nil {
return err
}
event.Raw = log
@@ -1206,21 +1346,21 @@ func (_Bridge *BridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<
}), nil
}
-// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// ParseDestChainEnabled is a log parse operation binding the contract event 0xacf89c9e8ba7f621aa9632bc23b65f5d4c7a0eacfb7bc5149c17a9dec05e89a4.
//
-// Solidity: event Initialized(uint8 version)
-func (_Bridge *BridgeFilterer) ParseInitialized(log types.Log) (*BridgeInitialized, error) {
- event := new(BridgeInitialized)
- if err := _Bridge.contract.UnpackLog(event, "Initialized", log); err != nil {
+// Solidity: event DestChainEnabled(uint64 indexed chainId, bool enabled)
+func (_Bridge *BridgeFilterer) ParseDestChainEnabled(log types.Log) (*BridgeDestChainEnabled, error) {
+ event := new(BridgeDestChainEnabled)
+ if err := _Bridge.contract.UnpackLog(event, "DestChainEnabled", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeMessageRecalledIterator is returned from FilterMessageRecalled and is used to iterate over the raw logs and unpacked data for MessageRecalled events raised by the Bridge contract.
-type BridgeMessageRecalledIterator struct {
- Event *BridgeMessageRecalled // Event containing the contract specifics and raw log
+// BridgeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Bridge contract.
+type BridgeInitializedIterator struct {
+ Event *BridgeInitialized // 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
@@ -1234,7 +1374,7 @@ type BridgeMessageRecalledIterator struct {
// 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 *BridgeMessageRecalledIterator) Next() bool {
+func (it *BridgeInitializedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1243,7 +1383,7 @@ func (it *BridgeMessageRecalledIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageRecalled)
+ it.Event = new(BridgeInitialized)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1258,7 +1398,7 @@ func (it *BridgeMessageRecalledIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageRecalled)
+ it.Event = new(BridgeInitialized)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1274,51 +1414,41 @@ func (it *BridgeMessageRecalledIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeMessageRecalledIterator) Error() error {
+func (it *BridgeInitializedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeMessageRecalledIterator) Close() error {
+func (it *BridgeInitializedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeMessageRecalled represents a MessageRecalled event raised by the Bridge contract.
-type BridgeMessageRecalled struct {
- MsgHash [32]byte
+// BridgeInitialized represents a Initialized event raised by the Bridge contract.
+type BridgeInitialized struct {
+ Version uint8
Raw types.Log // Blockchain specific contextual infos
}
-// FilterMessageRecalled is a free log retrieval operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
+// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
//
-// Solidity: event MessageRecalled(bytes32 indexed msgHash)
-func (_Bridge *BridgeFilterer) FilterMessageRecalled(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageRecalledIterator, error) {
-
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
- }
+// Solidity: event Initialized(uint8 version)
+func (_Bridge *BridgeFilterer) FilterInitialized(opts *bind.FilterOpts) (*BridgeInitializedIterator, error) {
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "MessageRecalled", msgHashRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "Initialized")
if err != nil {
return nil, err
}
- return &BridgeMessageRecalledIterator{contract: _Bridge.contract, event: "MessageRecalled", logs: logs, sub: sub}, nil
+ return &BridgeInitializedIterator{contract: _Bridge.contract, event: "Initialized", logs: logs, sub: sub}, nil
}
-// WatchMessageRecalled is a free log subscription operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
+// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
//
-// Solidity: event MessageRecalled(bytes32 indexed msgHash)
-func (_Bridge *BridgeFilterer) WatchMessageRecalled(opts *bind.WatchOpts, sink chan<- *BridgeMessageRecalled, msgHash [][32]byte) (event.Subscription, error) {
-
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
- }
+// Solidity: event Initialized(uint8 version)
+func (_Bridge *BridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *BridgeInitialized) (event.Subscription, error) {
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "MessageRecalled", msgHashRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "Initialized")
if err != nil {
return nil, err
}
@@ -1328,8 +1458,8 @@ func (_Bridge *BridgeFilterer) WatchMessageRecalled(opts *bind.WatchOpts, sink c
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeMessageRecalled)
- if err := _Bridge.contract.UnpackLog(event, "MessageRecalled", log); err != nil {
+ event := new(BridgeInitialized)
+ if err := _Bridge.contract.UnpackLog(event, "Initialized", log); err != nil {
return err
}
event.Raw = log
@@ -1350,21 +1480,21 @@ func (_Bridge *BridgeFilterer) WatchMessageRecalled(opts *bind.WatchOpts, sink c
}), nil
}
-// ParseMessageRecalled is a log parse operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
+// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
//
-// Solidity: event MessageRecalled(bytes32 indexed msgHash)
-func (_Bridge *BridgeFilterer) ParseMessageRecalled(log types.Log) (*BridgeMessageRecalled, error) {
- event := new(BridgeMessageRecalled)
- if err := _Bridge.contract.UnpackLog(event, "MessageRecalled", log); err != nil {
+// Solidity: event Initialized(uint8 version)
+func (_Bridge *BridgeFilterer) ParseInitialized(log types.Log) (*BridgeInitialized, error) {
+ event := new(BridgeInitialized)
+ if err := _Bridge.contract.UnpackLog(event, "Initialized", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeMessageRecalled0Iterator is returned from FilterMessageRecalled0 and is used to iterate over the raw logs and unpacked data for MessageRecalled0 events raised by the Bridge contract.
-type BridgeMessageRecalled0Iterator struct {
- Event *BridgeMessageRecalled0 // Event containing the contract specifics and raw log
+// BridgeMessageRecalledIterator is returned from FilterMessageRecalled and is used to iterate over the raw logs and unpacked data for MessageRecalled events raised by the Bridge contract.
+type BridgeMessageRecalledIterator struct {
+ Event *BridgeMessageRecalled // 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
@@ -1378,7 +1508,7 @@ type BridgeMessageRecalled0Iterator struct {
// 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 *BridgeMessageRecalled0Iterator) Next() bool {
+func (it *BridgeMessageRecalledIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1387,7 +1517,7 @@ func (it *BridgeMessageRecalled0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageRecalled0)
+ it.Event = new(BridgeMessageRecalled)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1402,7 +1532,7 @@ func (it *BridgeMessageRecalled0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageRecalled0)
+ it.Event = new(BridgeMessageRecalled)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1418,51 +1548,51 @@ func (it *BridgeMessageRecalled0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeMessageRecalled0Iterator) Error() error {
+func (it *BridgeMessageRecalledIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeMessageRecalled0Iterator) Close() error {
+func (it *BridgeMessageRecalledIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeMessageRecalled0 represents a MessageRecalled0 event raised by the Bridge contract.
-type BridgeMessageRecalled0 struct {
+// BridgeMessageRecalled represents a MessageRecalled event raised by the Bridge contract.
+type BridgeMessageRecalled struct {
MsgHash [32]byte
Raw types.Log // Blockchain specific contextual infos
}
-// FilterMessageRecalled0 is a free log retrieval operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
+// FilterMessageRecalled is a free log retrieval operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
//
// Solidity: event MessageRecalled(bytes32 indexed msgHash)
-func (_Bridge *BridgeFilterer) FilterMessageRecalled0(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageRecalled0Iterator, error) {
+func (_Bridge *BridgeFilterer) FilterMessageRecalled(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageRecalledIterator, error) {
var msgHashRule []interface{}
for _, msgHashItem := range msgHash {
msgHashRule = append(msgHashRule, msgHashItem)
}
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "MessageRecalled0", msgHashRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "MessageRecalled", msgHashRule)
if err != nil {
return nil, err
}
- return &BridgeMessageRecalled0Iterator{contract: _Bridge.contract, event: "MessageRecalled0", logs: logs, sub: sub}, nil
+ return &BridgeMessageRecalledIterator{contract: _Bridge.contract, event: "MessageRecalled", logs: logs, sub: sub}, nil
}
-// WatchMessageRecalled0 is a free log subscription operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
+// WatchMessageRecalled is a free log subscription operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
//
// Solidity: event MessageRecalled(bytes32 indexed msgHash)
-func (_Bridge *BridgeFilterer) WatchMessageRecalled0(opts *bind.WatchOpts, sink chan<- *BridgeMessageRecalled0, msgHash [][32]byte) (event.Subscription, error) {
+func (_Bridge *BridgeFilterer) WatchMessageRecalled(opts *bind.WatchOpts, sink chan<- *BridgeMessageRecalled, msgHash [][32]byte) (event.Subscription, error) {
var msgHashRule []interface{}
for _, msgHashItem := range msgHash {
msgHashRule = append(msgHashRule, msgHashItem)
}
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "MessageRecalled0", msgHashRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "MessageRecalled", msgHashRule)
if err != nil {
return nil, err
}
@@ -1472,8 +1602,8 @@ func (_Bridge *BridgeFilterer) WatchMessageRecalled0(opts *bind.WatchOpts, sink
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeMessageRecalled0)
- if err := _Bridge.contract.UnpackLog(event, "MessageRecalled0", log); err != nil {
+ event := new(BridgeMessageRecalled)
+ if err := _Bridge.contract.UnpackLog(event, "MessageRecalled", log); err != nil {
return err
}
event.Raw = log
@@ -1494,12 +1624,12 @@ func (_Bridge *BridgeFilterer) WatchMessageRecalled0(opts *bind.WatchOpts, sink
}), nil
}
-// ParseMessageRecalled0 is a log parse operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
+// ParseMessageRecalled is a log parse operation binding the contract event 0xc6fbc1fa0145a394c9c414b2ae7bd634eb50dd888938bcd75692ae427b680fa2.
//
// Solidity: event MessageRecalled(bytes32 indexed msgHash)
-func (_Bridge *BridgeFilterer) ParseMessageRecalled0(log types.Log) (*BridgeMessageRecalled0, error) {
- event := new(BridgeMessageRecalled0)
- if err := _Bridge.contract.UnpackLog(event, "MessageRecalled0", log); err != nil {
+func (_Bridge *BridgeFilterer) ParseMessageRecalled(log types.Log) (*BridgeMessageRecalled, error) {
+ event := new(BridgeMessageRecalled)
+ if err := _Bridge.contract.UnpackLog(event, "MessageRecalled", log); err != nil {
return nil, err
}
event.Raw = log
@@ -1580,9 +1710,9 @@ type BridgeMessageSent struct {
Raw types.Log // Blockchain specific contextual infos
}
-// FilterMessageSent is a free log retrieval operation binding the contract event 0x238646a410b383b664b8d2fe57d2895c1ecd3464a3159cae73a93a9f21a43355.
+// FilterMessageSent is a free log retrieval operation binding the contract event 0x3406baf0dfd13f7f0ce1d077c461a35b763927e1438d49749442de2eb42148ba.
//
-// Solidity: event MessageSent(bytes32 indexed msgHash, (uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message)
+// Solidity: event MessageSent(bytes32 indexed msgHash, (uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message)
func (_Bridge *BridgeFilterer) FilterMessageSent(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageSentIterator, error) {
var msgHashRule []interface{}
@@ -1597,9 +1727,9 @@ func (_Bridge *BridgeFilterer) FilterMessageSent(opts *bind.FilterOpts, msgHash
return &BridgeMessageSentIterator{contract: _Bridge.contract, event: "MessageSent", logs: logs, sub: sub}, nil
}
-// WatchMessageSent is a free log subscription operation binding the contract event 0x238646a410b383b664b8d2fe57d2895c1ecd3464a3159cae73a93a9f21a43355.
+// WatchMessageSent is a free log subscription operation binding the contract event 0x3406baf0dfd13f7f0ce1d077c461a35b763927e1438d49749442de2eb42148ba.
//
-// Solidity: event MessageSent(bytes32 indexed msgHash, (uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message)
+// Solidity: event MessageSent(bytes32 indexed msgHash, (uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message)
func (_Bridge *BridgeFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<- *BridgeMessageSent, msgHash [][32]byte) (event.Subscription, error) {
var msgHashRule []interface{}
@@ -1639,9 +1769,9 @@ func (_Bridge *BridgeFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<
}), nil
}
-// ParseMessageSent is a log parse operation binding the contract event 0x238646a410b383b664b8d2fe57d2895c1ecd3464a3159cae73a93a9f21a43355.
+// ParseMessageSent is a log parse operation binding the contract event 0x3406baf0dfd13f7f0ce1d077c461a35b763927e1438d49749442de2eb42148ba.
//
-// Solidity: event MessageSent(bytes32 indexed msgHash, (uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message)
+// Solidity: event MessageSent(bytes32 indexed msgHash, (uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message)
func (_Bridge *BridgeFilterer) ParseMessageSent(log types.Log) (*BridgeMessageSent, error) {
event := new(BridgeMessageSent)
if err := _Bridge.contract.UnpackLog(event, "MessageSent", log); err != nil {
@@ -1651,9 +1781,9 @@ func (_Bridge *BridgeFilterer) ParseMessageSent(log types.Log) (*BridgeMessageSe
return event, nil
}
-// BridgeMessageSent0Iterator is returned from FilterMessageSent0 and is used to iterate over the raw logs and unpacked data for MessageSent0 events raised by the Bridge contract.
-type BridgeMessageSent0Iterator struct {
- Event *BridgeMessageSent0 // Event containing the contract specifics and raw log
+// BridgeMessageStatusChangedIterator is returned from FilterMessageStatusChanged and is used to iterate over the raw logs and unpacked data for MessageStatusChanged events raised by the Bridge contract.
+type BridgeMessageStatusChangedIterator struct {
+ Event *BridgeMessageStatusChanged // 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
@@ -1667,7 +1797,7 @@ type BridgeMessageSent0Iterator struct {
// 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 *BridgeMessageSent0Iterator) Next() bool {
+func (it *BridgeMessageStatusChangedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1676,7 +1806,7 @@ func (it *BridgeMessageSent0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageSent0)
+ it.Event = new(BridgeMessageStatusChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1691,7 +1821,7 @@ func (it *BridgeMessageSent0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageSent0)
+ it.Event = new(BridgeMessageStatusChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1707,52 +1837,52 @@ func (it *BridgeMessageSent0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeMessageSent0Iterator) Error() error {
+func (it *BridgeMessageStatusChangedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeMessageSent0Iterator) Close() error {
+func (it *BridgeMessageStatusChangedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeMessageSent0 represents a MessageSent0 event raised by the Bridge contract.
-type BridgeMessageSent0 struct {
+// BridgeMessageStatusChanged represents a MessageStatusChanged event raised by the Bridge contract.
+type BridgeMessageStatusChanged struct {
MsgHash [32]byte
- Message IBridgeMessage
+ Status uint8
Raw types.Log // Blockchain specific contextual infos
}
-// FilterMessageSent0 is a free log retrieval operation binding the contract event 0x238646a410b383b664b8d2fe57d2895c1ecd3464a3159cae73a93a9f21a43355.
+// FilterMessageStatusChanged is a free log retrieval operation binding the contract event 0x6c51882bc2ed67617f77a1e9b9a25d2caad8448647ecb093b357a603b2575634.
//
-// Solidity: event MessageSent(bytes32 indexed msgHash, (uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message)
-func (_Bridge *BridgeFilterer) FilterMessageSent0(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageSent0Iterator, error) {
+// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status)
+func (_Bridge *BridgeFilterer) FilterMessageStatusChanged(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageStatusChangedIterator, error) {
var msgHashRule []interface{}
for _, msgHashItem := range msgHash {
msgHashRule = append(msgHashRule, msgHashItem)
}
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "MessageSent0", msgHashRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "MessageStatusChanged", msgHashRule)
if err != nil {
return nil, err
}
- return &BridgeMessageSent0Iterator{contract: _Bridge.contract, event: "MessageSent0", logs: logs, sub: sub}, nil
+ return &BridgeMessageStatusChangedIterator{contract: _Bridge.contract, event: "MessageStatusChanged", logs: logs, sub: sub}, nil
}
-// WatchMessageSent0 is a free log subscription operation binding the contract event 0x238646a410b383b664b8d2fe57d2895c1ecd3464a3159cae73a93a9f21a43355.
+// WatchMessageStatusChanged is a free log subscription operation binding the contract event 0x6c51882bc2ed67617f77a1e9b9a25d2caad8448647ecb093b357a603b2575634.
//
-// Solidity: event MessageSent(bytes32 indexed msgHash, (uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message)
-func (_Bridge *BridgeFilterer) WatchMessageSent0(opts *bind.WatchOpts, sink chan<- *BridgeMessageSent0, msgHash [][32]byte) (event.Subscription, error) {
+// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status)
+func (_Bridge *BridgeFilterer) WatchMessageStatusChanged(opts *bind.WatchOpts, sink chan<- *BridgeMessageStatusChanged, msgHash [][32]byte) (event.Subscription, error) {
var msgHashRule []interface{}
for _, msgHashItem := range msgHash {
msgHashRule = append(msgHashRule, msgHashItem)
}
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "MessageSent0", msgHashRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "MessageStatusChanged", msgHashRule)
if err != nil {
return nil, err
}
@@ -1762,8 +1892,8 @@ func (_Bridge *BridgeFilterer) WatchMessageSent0(opts *bind.WatchOpts, sink chan
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeMessageSent0)
- if err := _Bridge.contract.UnpackLog(event, "MessageSent0", log); err != nil {
+ event := new(BridgeMessageStatusChanged)
+ if err := _Bridge.contract.UnpackLog(event, "MessageStatusChanged", log); err != nil {
return err
}
event.Raw = log
@@ -1784,21 +1914,21 @@ func (_Bridge *BridgeFilterer) WatchMessageSent0(opts *bind.WatchOpts, sink chan
}), nil
}
-// ParseMessageSent0 is a log parse operation binding the contract event 0x238646a410b383b664b8d2fe57d2895c1ecd3464a3159cae73a93a9f21a43355.
+// ParseMessageStatusChanged is a log parse operation binding the contract event 0x6c51882bc2ed67617f77a1e9b9a25d2caad8448647ecb093b357a603b2575634.
//
-// Solidity: event MessageSent(bytes32 indexed msgHash, (uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message)
-func (_Bridge *BridgeFilterer) ParseMessageSent0(log types.Log) (*BridgeMessageSent0, error) {
- event := new(BridgeMessageSent0)
- if err := _Bridge.contract.UnpackLog(event, "MessageSent0", log); err != nil {
+// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status)
+func (_Bridge *BridgeFilterer) ParseMessageStatusChanged(log types.Log) (*BridgeMessageStatusChanged, error) {
+ event := new(BridgeMessageStatusChanged)
+ if err := _Bridge.contract.UnpackLog(event, "MessageStatusChanged", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeMessageStatusChangedIterator is returned from FilterMessageStatusChanged and is used to iterate over the raw logs and unpacked data for MessageStatusChanged events raised by the Bridge contract.
-type BridgeMessageStatusChangedIterator struct {
- Event *BridgeMessageStatusChanged // Event containing the contract specifics and raw log
+// BridgeOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Bridge contract.
+type BridgeOwnershipTransferredIterator struct {
+ Event *BridgeOwnershipTransferred // 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
@@ -1812,7 +1942,7 @@ type BridgeMessageStatusChangedIterator struct {
// 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 *BridgeMessageStatusChangedIterator) Next() bool {
+func (it *BridgeOwnershipTransferredIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1821,7 +1951,7 @@ func (it *BridgeMessageStatusChangedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageStatusChanged)
+ it.Event = new(BridgeOwnershipTransferred)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1836,7 +1966,7 @@ func (it *BridgeMessageStatusChangedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageStatusChanged)
+ it.Event = new(BridgeOwnershipTransferred)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1852,53 +1982,60 @@ func (it *BridgeMessageStatusChangedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeMessageStatusChangedIterator) Error() error {
+func (it *BridgeOwnershipTransferredIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeMessageStatusChangedIterator) Close() error {
+func (it *BridgeOwnershipTransferredIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeMessageStatusChanged represents a MessageStatusChanged event raised by the Bridge contract.
-type BridgeMessageStatusChanged struct {
- MsgHash [32]byte
- Status uint8
- Transactor common.Address
- Raw types.Log // Blockchain specific contextual infos
+// BridgeOwnershipTransferred represents a OwnershipTransferred event raised by the Bridge contract.
+type BridgeOwnershipTransferred struct {
+ PreviousOwner common.Address
+ NewOwner common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterMessageStatusChanged is a free log retrieval operation binding the contract event 0x0af4d5247f6a4028d6699afb62871a76b398da1d1a626c8a9b90e0bd5f54c73c.
+// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
-// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status, address transactor)
-func (_Bridge *BridgeFilterer) FilterMessageStatusChanged(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageStatusChangedIterator, error) {
+// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
+func (_Bridge *BridgeFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*BridgeOwnershipTransferredIterator, error) {
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
+ 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 := _Bridge.contract.FilterLogs(opts, "MessageStatusChanged", msgHashRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
if err != nil {
return nil, err
}
- return &BridgeMessageStatusChangedIterator{contract: _Bridge.contract, event: "MessageStatusChanged", logs: logs, sub: sub}, nil
+ return &BridgeOwnershipTransferredIterator{contract: _Bridge.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
}
-// WatchMessageStatusChanged is a free log subscription operation binding the contract event 0x0af4d5247f6a4028d6699afb62871a76b398da1d1a626c8a9b90e0bd5f54c73c.
+// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
-// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status, address transactor)
-func (_Bridge *BridgeFilterer) WatchMessageStatusChanged(opts *bind.WatchOpts, sink chan<- *BridgeMessageStatusChanged, msgHash [][32]byte) (event.Subscription, error) {
+// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
+func (_Bridge *BridgeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BridgeOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
+ 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 := _Bridge.contract.WatchLogs(opts, "MessageStatusChanged", msgHashRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
if err != nil {
return nil, err
}
@@ -1908,8 +2045,8 @@ func (_Bridge *BridgeFilterer) WatchMessageStatusChanged(opts *bind.WatchOpts, s
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeMessageStatusChanged)
- if err := _Bridge.contract.UnpackLog(event, "MessageStatusChanged", log); err != nil {
+ event := new(BridgeOwnershipTransferred)
+ if err := _Bridge.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
return err
}
event.Raw = log
@@ -1930,21 +2067,21 @@ func (_Bridge *BridgeFilterer) WatchMessageStatusChanged(opts *bind.WatchOpts, s
}), nil
}
-// ParseMessageStatusChanged is a log parse operation binding the contract event 0x0af4d5247f6a4028d6699afb62871a76b398da1d1a626c8a9b90e0bd5f54c73c.
+// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
//
-// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status, address transactor)
-func (_Bridge *BridgeFilterer) ParseMessageStatusChanged(log types.Log) (*BridgeMessageStatusChanged, error) {
- event := new(BridgeMessageStatusChanged)
- if err := _Bridge.contract.UnpackLog(event, "MessageStatusChanged", log); err != nil {
+// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
+func (_Bridge *BridgeFilterer) ParseOwnershipTransferred(log types.Log) (*BridgeOwnershipTransferred, error) {
+ event := new(BridgeOwnershipTransferred)
+ if err := _Bridge.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeMessageStatusChanged0Iterator is returned from FilterMessageStatusChanged0 and is used to iterate over the raw logs and unpacked data for MessageStatusChanged0 events raised by the Bridge contract.
-type BridgeMessageStatusChanged0Iterator struct {
- Event *BridgeMessageStatusChanged0 // Event containing the contract specifics and raw log
+// BridgePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Bridge contract.
+type BridgePausedIterator struct {
+ Event *BridgePaused // 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
@@ -1958,7 +2095,7 @@ type BridgeMessageStatusChanged0Iterator struct {
// 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 *BridgeMessageStatusChanged0Iterator) Next() bool {
+func (it *BridgePausedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1967,7 +2104,7 @@ func (it *BridgeMessageStatusChanged0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageStatusChanged0)
+ it.Event = new(BridgePaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1982,7 +2119,7 @@ func (it *BridgeMessageStatusChanged0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeMessageStatusChanged0)
+ it.Event = new(BridgePaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1998,53 +2135,41 @@ func (it *BridgeMessageStatusChanged0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeMessageStatusChanged0Iterator) Error() error {
+func (it *BridgePausedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeMessageStatusChanged0Iterator) Close() error {
+func (it *BridgePausedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeMessageStatusChanged0 represents a MessageStatusChanged0 event raised by the Bridge contract.
-type BridgeMessageStatusChanged0 struct {
- MsgHash [32]byte
- Status uint8
- Transactor common.Address
- Raw types.Log // Blockchain specific contextual infos
+// BridgePaused represents a Paused event raised by the Bridge contract.
+type BridgePaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterMessageStatusChanged0 is a free log retrieval operation binding the contract event 0x0af4d5247f6a4028d6699afb62871a76b398da1d1a626c8a9b90e0bd5f54c73c.
+// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status, address transactor)
-func (_Bridge *BridgeFilterer) FilterMessageStatusChanged0(opts *bind.FilterOpts, msgHash [][32]byte) (*BridgeMessageStatusChanged0Iterator, error) {
-
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
- }
+// Solidity: event Paused(address account)
+func (_Bridge *BridgeFilterer) FilterPaused(opts *bind.FilterOpts) (*BridgePausedIterator, error) {
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "MessageStatusChanged0", msgHashRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "Paused")
if err != nil {
return nil, err
}
- return &BridgeMessageStatusChanged0Iterator{contract: _Bridge.contract, event: "MessageStatusChanged0", logs: logs, sub: sub}, nil
+ return &BridgePausedIterator{contract: _Bridge.contract, event: "Paused", logs: logs, sub: sub}, nil
}
-// WatchMessageStatusChanged0 is a free log subscription operation binding the contract event 0x0af4d5247f6a4028d6699afb62871a76b398da1d1a626c8a9b90e0bd5f54c73c.
+// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status, address transactor)
-func (_Bridge *BridgeFilterer) WatchMessageStatusChanged0(opts *bind.WatchOpts, sink chan<- *BridgeMessageStatusChanged0, msgHash [][32]byte) (event.Subscription, error) {
+// Solidity: event Paused(address account)
+func (_Bridge *BridgeFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *BridgePaused) (event.Subscription, error) {
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
- }
-
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "MessageStatusChanged0", msgHashRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "Paused")
if err != nil {
return nil, err
}
@@ -2054,8 +2179,8 @@ func (_Bridge *BridgeFilterer) WatchMessageStatusChanged0(opts *bind.WatchOpts,
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeMessageStatusChanged0)
- if err := _Bridge.contract.UnpackLog(event, "MessageStatusChanged0", log); err != nil {
+ event := new(BridgePaused)
+ if err := _Bridge.contract.UnpackLog(event, "Paused", log); err != nil {
return err
}
event.Raw = log
@@ -2076,21 +2201,21 @@ func (_Bridge *BridgeFilterer) WatchMessageStatusChanged0(opts *bind.WatchOpts,
}), nil
}
-// ParseMessageStatusChanged0 is a log parse operation binding the contract event 0x0af4d5247f6a4028d6699afb62871a76b398da1d1a626c8a9b90e0bd5f54c73c.
+// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event MessageStatusChanged(bytes32 indexed msgHash, uint8 status, address transactor)
-func (_Bridge *BridgeFilterer) ParseMessageStatusChanged0(log types.Log) (*BridgeMessageStatusChanged0, error) {
- event := new(BridgeMessageStatusChanged0)
- if err := _Bridge.contract.UnpackLog(event, "MessageStatusChanged0", log); err != nil {
+// Solidity: event Paused(address account)
+func (_Bridge *BridgeFilterer) ParsePaused(log types.Log) (*BridgePaused, error) {
+ event := new(BridgePaused)
+ if err := _Bridge.contract.UnpackLog(event, "Paused", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Bridge contract.
-type BridgeOwnershipTransferredIterator struct {
- Event *BridgeOwnershipTransferred // Event containing the contract specifics and raw log
+// BridgeSignalSentIterator is returned from FilterSignalSent and is used to iterate over the raw logs and unpacked data for SignalSent events raised by the Bridge contract.
+type BridgeSignalSentIterator struct {
+ Event *BridgeSignalSent // 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
@@ -2104,7 +2229,7 @@ type BridgeOwnershipTransferredIterator struct {
// 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 *BridgeOwnershipTransferredIterator) Next() bool {
+func (it *BridgeSignalSentIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2113,7 +2238,7 @@ func (it *BridgeOwnershipTransferredIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeOwnershipTransferred)
+ it.Event = new(BridgeSignalSent)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2128,7 +2253,7 @@ func (it *BridgeOwnershipTransferredIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeOwnershipTransferred)
+ it.Event = new(BridgeSignalSent)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2144,60 +2269,186 @@ func (it *BridgeOwnershipTransferredIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeOwnershipTransferredIterator) Error() error {
+func (it *BridgeSignalSentIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeOwnershipTransferredIterator) Close() error {
+func (it *BridgeSignalSentIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeOwnershipTransferred represents a OwnershipTransferred event raised by the Bridge contract.
-type BridgeOwnershipTransferred struct {
- PreviousOwner common.Address
- NewOwner common.Address
- Raw types.Log // Blockchain specific contextual infos
+// BridgeSignalSent represents a SignalSent event raised by the Bridge contract.
+type BridgeSignalSent struct {
+ Sender common.Address
+ MsgHash [32]byte
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// FilterSignalSent is a free log retrieval operation binding the contract event 0xf0958489d2a32db2b0faf27a72a31fdf28f2636ca5532f1b077ddc2f51b20d1d.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_Bridge *BridgeFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*BridgeOwnershipTransferredIterator, error) {
+// Solidity: event SignalSent(address indexed sender, bytes32 msgHash)
+func (_Bridge *BridgeFilterer) FilterSignalSent(opts *bind.FilterOpts, sender []common.Address) (*BridgeSignalSentIterator, error) {
- var previousOwnerRule []interface{}
- for _, previousOwnerItem := range previousOwner {
- previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
+ var senderRule []interface{}
+ for _, senderItem := range sender {
+ senderRule = append(senderRule, senderItem)
}
- var newOwnerRule []interface{}
- for _, newOwnerItem := range newOwner {
- newOwnerRule = append(newOwnerRule, newOwnerItem)
+
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "SignalSent", senderRule)
+ if err != nil {
+ return nil, err
}
+ return &BridgeSignalSentIterator{contract: _Bridge.contract, event: "SignalSent", logs: logs, sub: sub}, nil
+}
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+// WatchSignalSent is a free log subscription operation binding the contract event 0xf0958489d2a32db2b0faf27a72a31fdf28f2636ca5532f1b077ddc2f51b20d1d.
+//
+// Solidity: event SignalSent(address indexed sender, bytes32 msgHash)
+func (_Bridge *BridgeFilterer) WatchSignalSent(opts *bind.WatchOpts, sink chan<- *BridgeSignalSent, sender []common.Address) (event.Subscription, error) {
+
+ var senderRule []interface{}
+ for _, senderItem := range sender {
+ senderRule = append(senderRule, senderItem)
+ }
+
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "SignalSent", senderRule)
if err != nil {
return nil, err
}
- return &BridgeOwnershipTransferredIterator{contract: _Bridge.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
+ 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(BridgeSignalSent)
+ if err := _Bridge.contract.UnpackLog(event, "SignalSent", 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
}
-// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// ParseSignalSent is a log parse operation binding the contract event 0xf0958489d2a32db2b0faf27a72a31fdf28f2636ca5532f1b077ddc2f51b20d1d.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_Bridge *BridgeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BridgeOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
+// Solidity: event SignalSent(address indexed sender, bytes32 msgHash)
+func (_Bridge *BridgeFilterer) ParseSignalSent(log types.Log) (*BridgeSignalSent, error) {
+ event := new(BridgeSignalSent)
+ if err := _Bridge.contract.UnpackLog(event, "SignalSent", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
- var previousOwnerRule []interface{}
- for _, previousOwnerItem := range previousOwner {
- previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
+// BridgeUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Bridge contract.
+type BridgeUnpausedIterator struct {
+ Event *BridgeUnpaused // 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 *BridgeUnpausedIterator) Next() bool {
+ // If the iterator failed, stop iterating
+ if it.fail != nil {
+ return false
}
- var newOwnerRule []interface{}
- for _, newOwnerItem := range newOwner {
- newOwnerRule = append(newOwnerRule, newOwnerItem)
+ // If the iterator completed, deliver directly whatever's available
+ if it.done {
+ select {
+ case log := <-it.logs:
+ it.Event = new(BridgeUnpaused)
+ 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(BridgeUnpaused)
+ if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
+ it.fail = err
+ return false
+ }
+ it.Event.Raw = log
+ return true
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+ 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 *BridgeUnpausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *BridgeUnpausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// BridgeUnpaused represents a Unpaused event raised by the Bridge contract.
+type BridgeUnpaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_Bridge *BridgeFilterer) FilterUnpaused(opts *bind.FilterOpts) (*BridgeUnpausedIterator, error) {
+
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "Unpaused")
+ if err != nil {
+ return nil, err
+ }
+ return &BridgeUnpausedIterator{contract: _Bridge.contract, event: "Unpaused", logs: logs, sub: sub}, nil
+}
+
+// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_Bridge *BridgeFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *BridgeUnpaused) (event.Subscription, error) {
+
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "Unpaused")
if err != nil {
return nil, err
}
@@ -2207,8 +2458,8 @@ func (_Bridge *BridgeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, s
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeOwnershipTransferred)
- if err := _Bridge.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+ event := new(BridgeUnpaused)
+ if err := _Bridge.contract.UnpackLog(event, "Unpaused", log); err != nil {
return err
}
event.Raw = log
@@ -2229,21 +2480,21 @@ func (_Bridge *BridgeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, s
}), nil
}
-// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_Bridge *BridgeFilterer) ParseOwnershipTransferred(log types.Log) (*BridgeOwnershipTransferred, error) {
- event := new(BridgeOwnershipTransferred)
- if err := _Bridge.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+// Solidity: event Unpaused(address account)
+func (_Bridge *BridgeFilterer) ParseUnpaused(log types.Log) (*BridgeUnpaused, error) {
+ event := new(BridgeUnpaused)
+ if err := _Bridge.contract.UnpackLog(event, "Unpaused", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// BridgeSignalSentIterator is returned from FilterSignalSent and is used to iterate over the raw logs and unpacked data for SignalSent events raised by the Bridge contract.
-type BridgeSignalSentIterator struct {
- Event *BridgeSignalSent // Event containing the contract specifics and raw log
+// BridgeUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the Bridge contract.
+type BridgeUpgradedIterator struct {
+ Event *BridgeUpgraded // 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
@@ -2257,7 +2508,7 @@ type BridgeSignalSentIterator struct {
// 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 *BridgeSignalSentIterator) Next() bool {
+func (it *BridgeUpgradedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2266,7 +2517,7 @@ func (it *BridgeSignalSentIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(BridgeSignalSent)
+ it.Event = new(BridgeUpgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2281,7 +2532,7 @@ func (it *BridgeSignalSentIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(BridgeSignalSent)
+ it.Event = new(BridgeUpgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2297,52 +2548,51 @@ func (it *BridgeSignalSentIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *BridgeSignalSentIterator) Error() error {
+func (it *BridgeUpgradedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *BridgeSignalSentIterator) Close() error {
+func (it *BridgeUpgradedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// BridgeSignalSent represents a SignalSent event raised by the Bridge contract.
-type BridgeSignalSent struct {
- Sender common.Address
- MsgHash [32]byte
- Raw types.Log // Blockchain specific contextual infos
+// BridgeUpgraded represents a Upgraded event raised by the Bridge contract.
+type BridgeUpgraded struct {
+ Implementation common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterSignalSent is a free log retrieval operation binding the contract event 0xf0958489d2a32db2b0faf27a72a31fdf28f2636ca5532f1b077ddc2f51b20d1d.
+// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
//
-// Solidity: event SignalSent(address indexed sender, bytes32 msgHash)
-func (_Bridge *BridgeFilterer) FilterSignalSent(opts *bind.FilterOpts, sender []common.Address) (*BridgeSignalSentIterator, error) {
+// Solidity: event Upgraded(address indexed implementation)
+func (_Bridge *BridgeFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*BridgeUpgradedIterator, error) {
- var senderRule []interface{}
- for _, senderItem := range sender {
- senderRule = append(senderRule, senderItem)
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
}
- logs, sub, err := _Bridge.contract.FilterLogs(opts, "SignalSent", senderRule)
+ logs, sub, err := _Bridge.contract.FilterLogs(opts, "Upgraded", implementationRule)
if err != nil {
return nil, err
}
- return &BridgeSignalSentIterator{contract: _Bridge.contract, event: "SignalSent", logs: logs, sub: sub}, nil
+ return &BridgeUpgradedIterator{contract: _Bridge.contract, event: "Upgraded", logs: logs, sub: sub}, nil
}
-// WatchSignalSent is a free log subscription operation binding the contract event 0xf0958489d2a32db2b0faf27a72a31fdf28f2636ca5532f1b077ddc2f51b20d1d.
+// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
//
-// Solidity: event SignalSent(address indexed sender, bytes32 msgHash)
-func (_Bridge *BridgeFilterer) WatchSignalSent(opts *bind.WatchOpts, sink chan<- *BridgeSignalSent, sender []common.Address) (event.Subscription, error) {
+// Solidity: event Upgraded(address indexed implementation)
+func (_Bridge *BridgeFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *BridgeUpgraded, implementation []common.Address) (event.Subscription, error) {
- var senderRule []interface{}
- for _, senderItem := range sender {
- senderRule = append(senderRule, senderItem)
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
}
- logs, sub, err := _Bridge.contract.WatchLogs(opts, "SignalSent", senderRule)
+ logs, sub, err := _Bridge.contract.WatchLogs(opts, "Upgraded", implementationRule)
if err != nil {
return nil, err
}
@@ -2352,8 +2602,8 @@ func (_Bridge *BridgeFilterer) WatchSignalSent(opts *bind.WatchOpts, sink chan<-
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(BridgeSignalSent)
- if err := _Bridge.contract.UnpackLog(event, "SignalSent", log); err != nil {
+ event := new(BridgeUpgraded)
+ if err := _Bridge.contract.UnpackLog(event, "Upgraded", log); err != nil {
return err
}
event.Raw = log
@@ -2374,12 +2624,12 @@ func (_Bridge *BridgeFilterer) WatchSignalSent(opts *bind.WatchOpts, sink chan<-
}), nil
}
-// ParseSignalSent is a log parse operation binding the contract event 0xf0958489d2a32db2b0faf27a72a31fdf28f2636ca5532f1b077ddc2f51b20d1d.
+// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
//
-// Solidity: event SignalSent(address indexed sender, bytes32 msgHash)
-func (_Bridge *BridgeFilterer) ParseSignalSent(log types.Log) (*BridgeSignalSent, error) {
- event := new(BridgeSignalSent)
- if err := _Bridge.contract.UnpackLog(event, "SignalSent", log); err != nil {
+// Solidity: event Upgraded(address indexed implementation)
+func (_Bridge *BridgeFilterer) ParseUpgraded(log types.Log) (*BridgeUpgraded, error) {
+ event := new(BridgeUpgraded)
+ if err := _Bridge.contract.UnpackLog(event, "Upgraded", log); err != nil {
return nil, err
}
event.Raw = log
diff --git a/packages/relayer/bindings/erc1155vault/ERC1155Vault.go b/packages/relayer/bindings/erc1155vault/ERC1155Vault.go
index 4e45d122a78..92700566a88 100644
--- a/packages/relayer/bindings/erc1155vault/ERC1155Vault.go
+++ b/packages/relayer/bindings/erc1155vault/ERC1155Vault.go
@@ -31,7 +31,7 @@ var (
// BaseNFTVaultBridgeTransferOp is an auto generated low-level Go binding around an user-defined struct.
type BaseNFTVaultBridgeTransferOp struct {
- DestChainId *big.Int
+ DestChainId uint64
To common.Address
Token common.Address
TokenIds []*big.Int
@@ -44,7 +44,7 @@ type BaseNFTVaultBridgeTransferOp struct {
// BaseNFTVaultCanonicalNFT is an auto generated low-level Go binding around an user-defined struct.
type BaseNFTVaultCanonicalNFT struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Symbol string
Name string
@@ -54,9 +54,9 @@ type BaseNFTVaultCanonicalNFT struct {
type IBridgeMessage struct {
Id *big.Int
From common.Address
- SrcChainId *big.Int
- DestChainId *big.Int
- User common.Address
+ SrcChainId uint64
+ DestChainId uint64
+ Owner common.Address
To common.Address
RefundTo common.Address
Value *big.Int
@@ -68,7 +68,7 @@ type IBridgeMessage struct {
// ERC1155VaultMetaData contains all meta data concerning the ERC1155Vault contract.
var ERC1155VaultMetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INTERFACE_NOT_SUPPORTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_AMOUNT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_FROM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_SRC_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_TO\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_USER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_MAX_TOKEN_PER_TXN_EXCEEDED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_MESSAGE_NOT_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_MESSAGE_RELEASED_ALREADY\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_TOKEN_ARRAY_MISMATCH\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"ctoken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"btoken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ctokenSymbol\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ctokenName\",\"type\":\"string\"}],\"name\":\"BridgedTokenDeployed\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"TokenReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"TokenReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"TokenSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ERC1155_INTERFACE_ID\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ERC721_INTERFACE_ID\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgedToCanonical\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"canonicalToBridged\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isBridgedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"onMessageRecalled\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structBaseNFTVault.CanonicalNFT\",\"name\":\"ctoken\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"receiveToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structBaseNFTVault.BridgeTransferOp\",\"name\":\"opt\",\"type\":\"tuple\"}],\"name\":\"sendToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+ ABI: "[{\"inputs\":[],\"name\":\"ETH_TRANSFER_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NULL_IMPL_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INTERFACE_NOT_SUPPORTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_AMOUNT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_SRC_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_USER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_MAX_TOKEN_PER_TXN_EXCEEDED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_PERMISSION_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_TOKEN_ARRAY_MISMATCH\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"ctoken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"btoken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ctokenSymbol\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ctokenName\",\"type\":\"string\"}],\"name\":\"BridgedTokenDeployed\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"TokenReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"TokenReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"TokenSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ERC1155_INTERFACE_ID\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ERC721_INTERFACE_ID\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_TOKEN_PER_TXN\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgedToCanonical\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"canonicalToBridged\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"onMessageRecalled\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structBaseNFTVault.CanonicalNFT\",\"name\":\"ctoken\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"receiveToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structBaseNFTVault.BridgeTransferOp\",\"name\":\"op\",\"type\":\"tuple\"}],\"name\":\"sendToken\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"_message\",\"type\":\"tuple\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]",
}
// ERC1155VaultABI is the input ABI used to generate the binding from.
@@ -279,6 +279,37 @@ func (_ERC1155Vault *ERC1155VaultCallerSession) ERC721INTERFACEID() ([4]byte, er
return _ERC1155Vault.Contract.ERC721INTERFACEID(&_ERC1155Vault.CallOpts)
}
+// MAXTOKENPERTXN is a free data retrieval call binding the contract method 0x634da63a.
+//
+// Solidity: function MAX_TOKEN_PER_TXN() view returns(uint256)
+func (_ERC1155Vault *ERC1155VaultCaller) MAXTOKENPERTXN(opts *bind.CallOpts) (*big.Int, error) {
+ var out []interface{}
+ err := _ERC1155Vault.contract.Call(opts, &out, "MAX_TOKEN_PER_TXN")
+
+ if err != nil {
+ return *new(*big.Int), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+
+ return out0, err
+
+}
+
+// MAXTOKENPERTXN is a free data retrieval call binding the contract method 0x634da63a.
+//
+// Solidity: function MAX_TOKEN_PER_TXN() view returns(uint256)
+func (_ERC1155Vault *ERC1155VaultSession) MAXTOKENPERTXN() (*big.Int, error) {
+ return _ERC1155Vault.Contract.MAXTOKENPERTXN(&_ERC1155Vault.CallOpts)
+}
+
+// MAXTOKENPERTXN is a free data retrieval call binding the contract method 0x634da63a.
+//
+// Solidity: function MAX_TOKEN_PER_TXN() view returns(uint256)
+func (_ERC1155Vault *ERC1155VaultCallerSession) MAXTOKENPERTXN() (*big.Int, error) {
+ return _ERC1155Vault.Contract.MAXTOKENPERTXN(&_ERC1155Vault.CallOpts)
+}
+
// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f.
//
// Solidity: function addressManager() view returns(address)
@@ -312,9 +343,9 @@ func (_ERC1155Vault *ERC1155VaultCallerSession) AddressManager() (common.Address
// BridgedToCanonical is a free data retrieval call binding the contract method 0x9aa8605c.
//
-// Solidity: function bridgedToCanonical(address ) view returns(uint256 chainId, address addr, string symbol, string name)
+// Solidity: function bridgedToCanonical(address ) view returns(uint64 chainId, address addr, string symbol, string name)
func (_ERC1155Vault *ERC1155VaultCaller) BridgedToCanonical(opts *bind.CallOpts, arg0 common.Address) (struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Symbol string
Name string
@@ -323,7 +354,7 @@ func (_ERC1155Vault *ERC1155VaultCaller) BridgedToCanonical(opts *bind.CallOpts,
err := _ERC1155Vault.contract.Call(opts, &out, "bridgedToCanonical", arg0)
outstruct := new(struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Symbol string
Name string
@@ -332,7 +363,7 @@ func (_ERC1155Vault *ERC1155VaultCaller) BridgedToCanonical(opts *bind.CallOpts,
return *outstruct, err
}
- outstruct.ChainId = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+ outstruct.ChainId = *abi.ConvertType(out[0], new(uint64)).(*uint64)
outstruct.Addr = *abi.ConvertType(out[1], new(common.Address)).(*common.Address)
outstruct.Symbol = *abi.ConvertType(out[2], new(string)).(*string)
outstruct.Name = *abi.ConvertType(out[3], new(string)).(*string)
@@ -343,9 +374,9 @@ func (_ERC1155Vault *ERC1155VaultCaller) BridgedToCanonical(opts *bind.CallOpts,
// BridgedToCanonical is a free data retrieval call binding the contract method 0x9aa8605c.
//
-// Solidity: function bridgedToCanonical(address ) view returns(uint256 chainId, address addr, string symbol, string name)
+// Solidity: function bridgedToCanonical(address ) view returns(uint64 chainId, address addr, string symbol, string name)
func (_ERC1155Vault *ERC1155VaultSession) BridgedToCanonical(arg0 common.Address) (struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Symbol string
Name string
@@ -355,9 +386,9 @@ func (_ERC1155Vault *ERC1155VaultSession) BridgedToCanonical(arg0 common.Address
// BridgedToCanonical is a free data retrieval call binding the contract method 0x9aa8605c.
//
-// Solidity: function bridgedToCanonical(address ) view returns(uint256 chainId, address addr, string symbol, string name)
+// Solidity: function bridgedToCanonical(address ) view returns(uint64 chainId, address addr, string symbol, string name)
func (_ERC1155Vault *ERC1155VaultCallerSession) BridgedToCanonical(arg0 common.Address) (struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Symbol string
Name string
@@ -396,35 +427,35 @@ func (_ERC1155Vault *ERC1155VaultCallerSession) CanonicalToBridged(arg0 *big.Int
return _ERC1155Vault.Contract.CanonicalToBridged(&_ERC1155Vault.CallOpts, arg0, arg1)
}
-// IsBridgedToken is a free data retrieval call binding the contract method 0xc287e578.
+// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
-// Solidity: function isBridgedToken(address ) view returns(bool)
-func (_ERC1155Vault *ERC1155VaultCaller) IsBridgedToken(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
+// Solidity: function name() pure returns(bytes32)
+func (_ERC1155Vault *ERC1155VaultCaller) Name(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
- err := _ERC1155Vault.contract.Call(opts, &out, "isBridgedToken", arg0)
+ err := _ERC1155Vault.contract.Call(opts, &out, "name")
if err != nil {
- return *new(bool), err
+ return *new([32]byte), err
}
- out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
-// IsBridgedToken is a free data retrieval call binding the contract method 0xc287e578.
+// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
-// Solidity: function isBridgedToken(address ) view returns(bool)
-func (_ERC1155Vault *ERC1155VaultSession) IsBridgedToken(arg0 common.Address) (bool, error) {
- return _ERC1155Vault.Contract.IsBridgedToken(&_ERC1155Vault.CallOpts, arg0)
+// Solidity: function name() pure returns(bytes32)
+func (_ERC1155Vault *ERC1155VaultSession) Name() ([32]byte, error) {
+ return _ERC1155Vault.Contract.Name(&_ERC1155Vault.CallOpts)
}
-// IsBridgedToken is a free data retrieval call binding the contract method 0xc287e578.
+// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
-// Solidity: function isBridgedToken(address ) view returns(bool)
-func (_ERC1155Vault *ERC1155VaultCallerSession) IsBridgedToken(arg0 common.Address) (bool, error) {
- return _ERC1155Vault.Contract.IsBridgedToken(&_ERC1155Vault.CallOpts, arg0)
+// Solidity: function name() pure returns(bytes32)
+func (_ERC1155Vault *ERC1155VaultCallerSession) Name() ([32]byte, error) {
+ return _ERC1155Vault.Contract.Name(&_ERC1155Vault.CallOpts)
}
// OnERC1155BatchReceived is a free data retrieval call binding the contract method 0xbc197c81.
@@ -520,10 +551,72 @@ func (_ERC1155Vault *ERC1155VaultCallerSession) Owner() (common.Address, error)
return _ERC1155Vault.Contract.Owner(&_ERC1155Vault.CallOpts)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_ERC1155Vault *ERC1155VaultCaller) Paused(opts *bind.CallOpts) (bool, error) {
+ var out []interface{}
+ err := _ERC1155Vault.contract.Call(opts, &out, "paused")
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_ERC1155Vault *ERC1155VaultCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function paused() view returns(bool)
+func (_ERC1155Vault *ERC1155VaultSession) Paused() (bool, error) {
+ return _ERC1155Vault.Contract.Paused(&_ERC1155Vault.CallOpts)
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_ERC1155Vault *ERC1155VaultCallerSession) Paused() (bool, error) {
+ return _ERC1155Vault.Contract.Paused(&_ERC1155Vault.CallOpts)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_ERC1155Vault *ERC1155VaultCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) {
+ var out []interface{}
+ err := _ERC1155Vault.contract.Call(opts, &out, "proxiableUUID")
+
+ if err != nil {
+ return *new([32]byte), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+
+ return out0, err
+
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_ERC1155Vault *ERC1155VaultSession) ProxiableUUID() ([32]byte, error) {
+ return _ERC1155Vault.Contract.ProxiableUUID(&_ERC1155Vault.CallOpts)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_ERC1155Vault *ERC1155VaultCallerSession) ProxiableUUID() ([32]byte, error) {
+ return _ERC1155Vault.Contract.ProxiableUUID(&_ERC1155Vault.CallOpts)
+}
+
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
+//
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_ERC1155Vault *ERC1155VaultCaller) Resolve(opts *bind.CallOpts, chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
var out []interface{}
err := _ERC1155Vault.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress)
@@ -537,17 +630,17 @@ func (_ERC1155Vault *ERC1155VaultCaller) Resolve(opts *bind.CallOpts, chainId *b
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_ERC1155Vault *ERC1155VaultSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_ERC1155Vault *ERC1155VaultSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _ERC1155Vault.Contract.Resolve(&_ERC1155Vault.CallOpts, chainId, name, allowZeroAddress)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_ERC1155Vault *ERC1155VaultCallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_ERC1155Vault *ERC1155VaultCallerSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _ERC1155Vault.Contract.Resolve(&_ERC1155Vault.CallOpts, chainId, name, allowZeroAddress)
}
@@ -634,44 +727,65 @@ func (_ERC1155Vault *ERC1155VaultTransactorSession) Init(addressManager common.A
return _ERC1155Vault.Contract.Init(&_ERC1155Vault.TransactOpts, addressManager)
}
-// OnMessageRecalled is a paid mutator transaction binding the contract method 0x32a642ca.
+// OnMessageRecalled is a paid mutator transaction binding the contract method 0xc389a180.
+//
+// Solidity: function onMessageRecalled((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes32 msgHash) payable returns()
+func (_ERC1155Vault *ERC1155VaultTransactor) OnMessageRecalled(opts *bind.TransactOpts, message IBridgeMessage, msgHash [32]byte) (*types.Transaction, error) {
+ return _ERC1155Vault.contract.Transact(opts, "onMessageRecalled", message, msgHash)
+}
+
+// OnMessageRecalled is a paid mutator transaction binding the contract method 0xc389a180.
+//
+// Solidity: function onMessageRecalled((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes32 msgHash) payable returns()
+func (_ERC1155Vault *ERC1155VaultSession) OnMessageRecalled(message IBridgeMessage, msgHash [32]byte) (*types.Transaction, error) {
+ return _ERC1155Vault.Contract.OnMessageRecalled(&_ERC1155Vault.TransactOpts, message, msgHash)
+}
+
+// OnMessageRecalled is a paid mutator transaction binding the contract method 0xc389a180.
+//
+// Solidity: function onMessageRecalled((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes32 msgHash) payable returns()
+func (_ERC1155Vault *ERC1155VaultTransactorSession) OnMessageRecalled(message IBridgeMessage, msgHash [32]byte) (*types.Transaction, error) {
+ return _ERC1155Vault.Contract.OnMessageRecalled(&_ERC1155Vault.TransactOpts, message, msgHash)
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
-// Solidity: function onMessageRecalled((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns()
-func (_ERC1155Vault *ERC1155VaultTransactor) OnMessageRecalled(opts *bind.TransactOpts, message IBridgeMessage) (*types.Transaction, error) {
- return _ERC1155Vault.contract.Transact(opts, "onMessageRecalled", message)
+// Solidity: function pause() returns()
+func (_ERC1155Vault *ERC1155VaultTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _ERC1155Vault.contract.Transact(opts, "pause")
}
-// OnMessageRecalled is a paid mutator transaction binding the contract method 0x32a642ca.
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
-// Solidity: function onMessageRecalled((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns()
-func (_ERC1155Vault *ERC1155VaultSession) OnMessageRecalled(message IBridgeMessage) (*types.Transaction, error) {
- return _ERC1155Vault.Contract.OnMessageRecalled(&_ERC1155Vault.TransactOpts, message)
+// Solidity: function pause() returns()
+func (_ERC1155Vault *ERC1155VaultSession) Pause() (*types.Transaction, error) {
+ return _ERC1155Vault.Contract.Pause(&_ERC1155Vault.TransactOpts)
}
-// OnMessageRecalled is a paid mutator transaction binding the contract method 0x32a642ca.
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
-// Solidity: function onMessageRecalled((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns()
-func (_ERC1155Vault *ERC1155VaultTransactorSession) OnMessageRecalled(message IBridgeMessage) (*types.Transaction, error) {
- return _ERC1155Vault.Contract.OnMessageRecalled(&_ERC1155Vault.TransactOpts, message)
+// Solidity: function pause() returns()
+func (_ERC1155Vault *ERC1155VaultTransactorSession) Pause() (*types.Transaction, error) {
+ return _ERC1155Vault.Contract.Pause(&_ERC1155Vault.TransactOpts)
}
-// ReceiveToken is a paid mutator transaction binding the contract method 0x20b81559.
+// ReceiveToken is a paid mutator transaction binding the contract method 0x079312bf.
//
-// Solidity: function receiveToken((uint256,address,string,string) ctoken, address from, address to, uint256[] tokenIds, uint256[] amounts) payable returns()
+// Solidity: function receiveToken((uint64,address,string,string) ctoken, address from, address to, uint256[] tokenIds, uint256[] amounts) payable returns()
func (_ERC1155Vault *ERC1155VaultTransactor) ReceiveToken(opts *bind.TransactOpts, ctoken BaseNFTVaultCanonicalNFT, from common.Address, to common.Address, tokenIds []*big.Int, amounts []*big.Int) (*types.Transaction, error) {
return _ERC1155Vault.contract.Transact(opts, "receiveToken", ctoken, from, to, tokenIds, amounts)
}
-// ReceiveToken is a paid mutator transaction binding the contract method 0x20b81559.
+// ReceiveToken is a paid mutator transaction binding the contract method 0x079312bf.
//
-// Solidity: function receiveToken((uint256,address,string,string) ctoken, address from, address to, uint256[] tokenIds, uint256[] amounts) payable returns()
+// Solidity: function receiveToken((uint64,address,string,string) ctoken, address from, address to, uint256[] tokenIds, uint256[] amounts) payable returns()
func (_ERC1155Vault *ERC1155VaultSession) ReceiveToken(ctoken BaseNFTVaultCanonicalNFT, from common.Address, to common.Address, tokenIds []*big.Int, amounts []*big.Int) (*types.Transaction, error) {
return _ERC1155Vault.Contract.ReceiveToken(&_ERC1155Vault.TransactOpts, ctoken, from, to, tokenIds, amounts)
}
-// ReceiveToken is a paid mutator transaction binding the contract method 0x20b81559.
+// ReceiveToken is a paid mutator transaction binding the contract method 0x079312bf.
//
-// Solidity: function receiveToken((uint256,address,string,string) ctoken, address from, address to, uint256[] tokenIds, uint256[] amounts) payable returns()
+// Solidity: function receiveToken((uint64,address,string,string) ctoken, address from, address to, uint256[] tokenIds, uint256[] amounts) payable returns()
func (_ERC1155Vault *ERC1155VaultTransactorSession) ReceiveToken(ctoken BaseNFTVaultCanonicalNFT, from common.Address, to common.Address, tokenIds []*big.Int, amounts []*big.Int) (*types.Transaction, error) {
return _ERC1155Vault.Contract.ReceiveToken(&_ERC1155Vault.TransactOpts, ctoken, from, to, tokenIds, amounts)
}
@@ -697,46 +811,25 @@ func (_ERC1155Vault *ERC1155VaultTransactorSession) RenounceOwnership() (*types.
return _ERC1155Vault.Contract.RenounceOwnership(&_ERC1155Vault.TransactOpts)
}
-// SendToken is a paid mutator transaction binding the contract method 0x73339643.
+// SendToken is a paid mutator transaction binding the contract method 0x48b2772e.
//
-// Solidity: function sendToken((uint256,address,address,uint256[],uint256[],uint256,uint256,address,string) opt) payable returns()
-func (_ERC1155Vault *ERC1155VaultTransactor) SendToken(opts *bind.TransactOpts, opt BaseNFTVaultBridgeTransferOp) (*types.Transaction, error) {
- return _ERC1155Vault.contract.Transact(opts, "sendToken", opt)
+// Solidity: function sendToken((uint64,address,address,uint256[],uint256[],uint256,uint256,address,string) op) payable returns((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
+func (_ERC1155Vault *ERC1155VaultTransactor) SendToken(opts *bind.TransactOpts, op BaseNFTVaultBridgeTransferOp) (*types.Transaction, error) {
+ return _ERC1155Vault.contract.Transact(opts, "sendToken", op)
}
-// SendToken is a paid mutator transaction binding the contract method 0x73339643.
+// SendToken is a paid mutator transaction binding the contract method 0x48b2772e.
//
-// Solidity: function sendToken((uint256,address,address,uint256[],uint256[],uint256,uint256,address,string) opt) payable returns()
-func (_ERC1155Vault *ERC1155VaultSession) SendToken(opt BaseNFTVaultBridgeTransferOp) (*types.Transaction, error) {
- return _ERC1155Vault.Contract.SendToken(&_ERC1155Vault.TransactOpts, opt)
+// Solidity: function sendToken((uint64,address,address,uint256[],uint256[],uint256,uint256,address,string) op) payable returns((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
+func (_ERC1155Vault *ERC1155VaultSession) SendToken(op BaseNFTVaultBridgeTransferOp) (*types.Transaction, error) {
+ return _ERC1155Vault.Contract.SendToken(&_ERC1155Vault.TransactOpts, op)
}
-// SendToken is a paid mutator transaction binding the contract method 0x73339643.
+// SendToken is a paid mutator transaction binding the contract method 0x48b2772e.
//
-// Solidity: function sendToken((uint256,address,address,uint256[],uint256[],uint256,uint256,address,string) opt) payable returns()
-func (_ERC1155Vault *ERC1155VaultTransactorSession) SendToken(opt BaseNFTVaultBridgeTransferOp) (*types.Transaction, error) {
- return _ERC1155Vault.Contract.SendToken(&_ERC1155Vault.TransactOpts, opt)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_ERC1155Vault *ERC1155VaultTransactor) SetAddressManager(opts *bind.TransactOpts, newAddressManager common.Address) (*types.Transaction, error) {
- return _ERC1155Vault.contract.Transact(opts, "setAddressManager", newAddressManager)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_ERC1155Vault *ERC1155VaultSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _ERC1155Vault.Contract.SetAddressManager(&_ERC1155Vault.TransactOpts, newAddressManager)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_ERC1155Vault *ERC1155VaultTransactorSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _ERC1155Vault.Contract.SetAddressManager(&_ERC1155Vault.TransactOpts, newAddressManager)
+// Solidity: function sendToken((uint64,address,address,uint256[],uint256[],uint256,uint256,address,string) op) payable returns((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
+func (_ERC1155Vault *ERC1155VaultTransactorSession) SendToken(op BaseNFTVaultBridgeTransferOp) (*types.Transaction, error) {
+ return _ERC1155Vault.Contract.SendToken(&_ERC1155Vault.TransactOpts, op)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
@@ -760,9 +853,72 @@ func (_ERC1155Vault *ERC1155VaultTransactorSession) TransferOwnership(newOwner c
return _ERC1155Vault.Contract.TransferOwnership(&_ERC1155Vault.TransactOpts, newOwner)
}
-// ERC1155VaultAddressManagerChangedIterator is returned from FilterAddressManagerChanged and is used to iterate over the raw logs and unpacked data for AddressManagerChanged events raised by the ERC1155Vault contract.
-type ERC1155VaultAddressManagerChangedIterator struct {
- Event *ERC1155VaultAddressManagerChanged // Event containing the contract specifics and raw log
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_ERC1155Vault *ERC1155VaultTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _ERC1155Vault.contract.Transact(opts, "unpause")
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_ERC1155Vault *ERC1155VaultSession) Unpause() (*types.Transaction, error) {
+ return _ERC1155Vault.Contract.Unpause(&_ERC1155Vault.TransactOpts)
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_ERC1155Vault *ERC1155VaultTransactorSession) Unpause() (*types.Transaction, error) {
+ return _ERC1155Vault.Contract.Unpause(&_ERC1155Vault.TransactOpts)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_ERC1155Vault *ERC1155VaultTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) {
+ return _ERC1155Vault.contract.Transact(opts, "upgradeTo", newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_ERC1155Vault *ERC1155VaultSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _ERC1155Vault.Contract.UpgradeTo(&_ERC1155Vault.TransactOpts, newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_ERC1155Vault *ERC1155VaultTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _ERC1155Vault.Contract.UpgradeTo(&_ERC1155Vault.TransactOpts, newImplementation)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_ERC1155Vault *ERC1155VaultTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _ERC1155Vault.contract.Transact(opts, "upgradeToAndCall", newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_ERC1155Vault *ERC1155VaultSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _ERC1155Vault.Contract.UpgradeToAndCall(&_ERC1155Vault.TransactOpts, newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_ERC1155Vault *ERC1155VaultTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _ERC1155Vault.Contract.UpgradeToAndCall(&_ERC1155Vault.TransactOpts, newImplementation, data)
+}
+
+// ERC1155VaultAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the ERC1155Vault contract.
+type ERC1155VaultAdminChangedIterator struct {
+ Event *ERC1155VaultAdminChanged // 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
@@ -776,7 +932,7 @@ type ERC1155VaultAddressManagerChangedIterator struct {
// 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 *ERC1155VaultAddressManagerChangedIterator) Next() bool {
+func (it *ERC1155VaultAdminChangedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -785,7 +941,7 @@ func (it *ERC1155VaultAddressManagerChangedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(ERC1155VaultAddressManagerChanged)
+ it.Event = new(ERC1155VaultAdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -800,7 +956,7 @@ func (it *ERC1155VaultAddressManagerChangedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(ERC1155VaultAddressManagerChanged)
+ it.Event = new(ERC1155VaultAdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -816,51 +972,186 @@ func (it *ERC1155VaultAddressManagerChangedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *ERC1155VaultAddressManagerChangedIterator) Error() error {
+func (it *ERC1155VaultAdminChangedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *ERC1155VaultAddressManagerChangedIterator) Close() error {
+func (it *ERC1155VaultAdminChangedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// ERC1155VaultAddressManagerChanged represents a AddressManagerChanged event raised by the ERC1155Vault contract.
-type ERC1155VaultAddressManagerChanged struct {
- AddressManager common.Address
- Raw types.Log // Blockchain specific contextual infos
+// ERC1155VaultAdminChanged represents a AdminChanged event raised by the ERC1155Vault contract.
+type ERC1155VaultAdminChanged struct {
+ PreviousAdmin common.Address
+ NewAdmin common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
+//
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_ERC1155Vault *ERC1155VaultFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*ERC1155VaultAdminChangedIterator, error) {
+
+ logs, sub, err := _ERC1155Vault.contract.FilterLogs(opts, "AdminChanged")
+ if err != nil {
+ return nil, err
+ }
+ return &ERC1155VaultAdminChangedIterator{contract: _ERC1155Vault.contract, event: "AdminChanged", logs: logs, sub: sub}, nil
+}
+
+// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
+//
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_ERC1155Vault *ERC1155VaultFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *ERC1155VaultAdminChanged) (event.Subscription, error) {
+
+ logs, sub, err := _ERC1155Vault.contract.WatchLogs(opts, "AdminChanged")
+ 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(ERC1155VaultAdminChanged)
+ if err := _ERC1155Vault.contract.UnpackLog(event, "AdminChanged", 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
+}
+
+// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
+//
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_ERC1155Vault *ERC1155VaultFilterer) ParseAdminChanged(log types.Log) (*ERC1155VaultAdminChanged, error) {
+ event := new(ERC1155VaultAdminChanged)
+ if err := _ERC1155Vault.contract.UnpackLog(event, "AdminChanged", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// ERC1155VaultBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the ERC1155Vault contract.
+type ERC1155VaultBeaconUpgradedIterator struct {
+ Event *ERC1155VaultBeaconUpgraded // 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 *ERC1155VaultBeaconUpgradedIterator) 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(ERC1155VaultBeaconUpgraded)
+ 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(ERC1155VaultBeaconUpgraded)
+ 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 *ERC1155VaultBeaconUpgradedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *ERC1155VaultBeaconUpgradedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// ERC1155VaultBeaconUpgraded represents a BeaconUpgraded event raised by the ERC1155Vault contract.
+type ERC1155VaultBeaconUpgraded struct {
+ Beacon common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterAddressManagerChanged is a free log retrieval operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_ERC1155Vault *ERC1155VaultFilterer) FilterAddressManagerChanged(opts *bind.FilterOpts, addressManager []common.Address) (*ERC1155VaultAddressManagerChangedIterator, error) {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_ERC1155Vault *ERC1155VaultFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*ERC1155VaultBeaconUpgradedIterator, error) {
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
}
- logs, sub, err := _ERC1155Vault.contract.FilterLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _ERC1155Vault.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule)
if err != nil {
return nil, err
}
- return &ERC1155VaultAddressManagerChangedIterator{contract: _ERC1155Vault.contract, event: "AddressManagerChanged", logs: logs, sub: sub}, nil
+ return &ERC1155VaultBeaconUpgradedIterator{contract: _ERC1155Vault.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil
}
-// WatchAddressManagerChanged is a free log subscription operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_ERC1155Vault *ERC1155VaultFilterer) WatchAddressManagerChanged(opts *bind.WatchOpts, sink chan<- *ERC1155VaultAddressManagerChanged, addressManager []common.Address) (event.Subscription, error) {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_ERC1155Vault *ERC1155VaultFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *ERC1155VaultBeaconUpgraded, beacon []common.Address) (event.Subscription, error) {
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
}
- logs, sub, err := _ERC1155Vault.contract.WatchLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _ERC1155Vault.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule)
if err != nil {
return nil, err
}
@@ -870,8 +1161,8 @@ func (_ERC1155Vault *ERC1155VaultFilterer) WatchAddressManagerChanged(opts *bind
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(ERC1155VaultAddressManagerChanged)
- if err := _ERC1155Vault.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+ event := new(ERC1155VaultBeaconUpgraded)
+ if err := _ERC1155Vault.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
return err
}
event.Raw = log
@@ -892,12 +1183,12 @@ func (_ERC1155Vault *ERC1155VaultFilterer) WatchAddressManagerChanged(opts *bind
}), nil
}
-// ParseAddressManagerChanged is a log parse operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_ERC1155Vault *ERC1155VaultFilterer) ParseAddressManagerChanged(log types.Log) (*ERC1155VaultAddressManagerChanged, error) {
- event := new(ERC1155VaultAddressManagerChanged)
- if err := _ERC1155Vault.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_ERC1155Vault *ERC1155VaultFilterer) ParseBeaconUpgraded(log types.Log) (*ERC1155VaultBeaconUpgraded, error) {
+ event := new(ERC1155VaultBeaconUpgraded)
+ if err := _ERC1155Vault.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
return nil, err
}
event.Raw = log
@@ -973,7 +1264,7 @@ func (it *ERC1155VaultBridgedTokenDeployedIterator) Close() error {
// ERC1155VaultBridgedTokenDeployed represents a BridgedTokenDeployed event raised by the ERC1155Vault contract.
type ERC1155VaultBridgedTokenDeployed struct {
- ChainId *big.Int
+ ChainId uint64
Ctoken common.Address
Btoken common.Address
CtokenSymbol string
@@ -981,10 +1272,10 @@ type ERC1155VaultBridgedTokenDeployed struct {
Raw types.Log // Blockchain specific contextual infos
}
-// FilterBridgedTokenDeployed is a free log retrieval operation binding the contract event 0x2da3c4d305298f6df3653c23d98b4c055f72f7e6f981b2c477ccbec92b1ee579.
+// FilterBridgedTokenDeployed is a free log retrieval operation binding the contract event 0x44977f2d30fe1e3aee2c1476f2f95aaacaf34e44b9359c403da01fcc93fd751b.
//
-// Solidity: event BridgedTokenDeployed(uint256 indexed chainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName)
-func (_ERC1155Vault *ERC1155VaultFilterer) FilterBridgedTokenDeployed(opts *bind.FilterOpts, chainId []*big.Int, ctoken []common.Address, btoken []common.Address) (*ERC1155VaultBridgedTokenDeployedIterator, error) {
+// Solidity: event BridgedTokenDeployed(uint64 indexed chainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName)
+func (_ERC1155Vault *ERC1155VaultFilterer) FilterBridgedTokenDeployed(opts *bind.FilterOpts, chainId []uint64, ctoken []common.Address, btoken []common.Address) (*ERC1155VaultBridgedTokenDeployedIterator, error) {
var chainIdRule []interface{}
for _, chainIdItem := range chainId {
@@ -1006,10 +1297,10 @@ func (_ERC1155Vault *ERC1155VaultFilterer) FilterBridgedTokenDeployed(opts *bind
return &ERC1155VaultBridgedTokenDeployedIterator{contract: _ERC1155Vault.contract, event: "BridgedTokenDeployed", logs: logs, sub: sub}, nil
}
-// WatchBridgedTokenDeployed is a free log subscription operation binding the contract event 0x2da3c4d305298f6df3653c23d98b4c055f72f7e6f981b2c477ccbec92b1ee579.
+// WatchBridgedTokenDeployed is a free log subscription operation binding the contract event 0x44977f2d30fe1e3aee2c1476f2f95aaacaf34e44b9359c403da01fcc93fd751b.
//
-// Solidity: event BridgedTokenDeployed(uint256 indexed chainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName)
-func (_ERC1155Vault *ERC1155VaultFilterer) WatchBridgedTokenDeployed(opts *bind.WatchOpts, sink chan<- *ERC1155VaultBridgedTokenDeployed, chainId []*big.Int, ctoken []common.Address, btoken []common.Address) (event.Subscription, error) {
+// Solidity: event BridgedTokenDeployed(uint64 indexed chainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName)
+func (_ERC1155Vault *ERC1155VaultFilterer) WatchBridgedTokenDeployed(opts *bind.WatchOpts, sink chan<- *ERC1155VaultBridgedTokenDeployed, chainId []uint64, ctoken []common.Address, btoken []common.Address) (event.Subscription, error) {
var chainIdRule []interface{}
for _, chainIdItem := range chainId {
@@ -1056,9 +1347,9 @@ func (_ERC1155Vault *ERC1155VaultFilterer) WatchBridgedTokenDeployed(opts *bind.
}), nil
}
-// ParseBridgedTokenDeployed is a log parse operation binding the contract event 0x2da3c4d305298f6df3653c23d98b4c055f72f7e6f981b2c477ccbec92b1ee579.
+// ParseBridgedTokenDeployed is a log parse operation binding the contract event 0x44977f2d30fe1e3aee2c1476f2f95aaacaf34e44b9359c403da01fcc93fd751b.
//
-// Solidity: event BridgedTokenDeployed(uint256 indexed chainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName)
+// Solidity: event BridgedTokenDeployed(uint64 indexed chainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName)
func (_ERC1155Vault *ERC1155VaultFilterer) ParseBridgedTokenDeployed(log types.Log) (*ERC1155VaultBridgedTokenDeployed, error) {
event := new(ERC1155VaultBridgedTokenDeployed)
if err := _ERC1155Vault.contract.UnpackLog(event, "BridgedTokenDeployed", log); err != nil {
@@ -1355,9 +1646,9 @@ func (_ERC1155Vault *ERC1155VaultFilterer) ParseOwnershipTransferred(log types.L
return event, nil
}
-// ERC1155VaultTokenReceivedIterator is returned from FilterTokenReceived and is used to iterate over the raw logs and unpacked data for TokenReceived events raised by the ERC1155Vault contract.
-type ERC1155VaultTokenReceivedIterator struct {
- Event *ERC1155VaultTokenReceived // Event containing the contract specifics and raw log
+// ERC1155VaultPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the ERC1155Vault contract.
+type ERC1155VaultPausedIterator struct {
+ Event *ERC1155VaultPaused // 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
@@ -1371,7 +1662,7 @@ type ERC1155VaultTokenReceivedIterator struct {
// 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 *ERC1155VaultTokenReceivedIterator) Next() bool {
+func (it *ERC1155VaultPausedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1380,7 +1671,7 @@ func (it *ERC1155VaultTokenReceivedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(ERC1155VaultTokenReceived)
+ it.Event = new(ERC1155VaultPaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1395,7 +1686,7 @@ func (it *ERC1155VaultTokenReceivedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(ERC1155VaultTokenReceived)
+ it.Event = new(ERC1155VaultPaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1411,70 +1702,204 @@ func (it *ERC1155VaultTokenReceivedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *ERC1155VaultTokenReceivedIterator) Error() error {
+func (it *ERC1155VaultPausedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *ERC1155VaultTokenReceivedIterator) Close() error {
+func (it *ERC1155VaultPausedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// ERC1155VaultTokenReceived represents a TokenReceived event raised by the ERC1155Vault contract.
-type ERC1155VaultTokenReceived struct {
- MsgHash [32]byte
- From common.Address
- To common.Address
- SrcChainId *big.Int
- Token common.Address
- TokenIds []*big.Int
- Amounts []*big.Int
- Raw types.Log // Blockchain specific contextual infos
+// ERC1155VaultPaused represents a Paused event raised by the ERC1155Vault contract.
+type ERC1155VaultPaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterTokenReceived is a free log retrieval operation binding the contract event 0x0f60c37489e435ed8490c30b01c1fa57e62510e88b351b75796ad3d95babe6b1.
+// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 srcChainId, address token, uint256[] tokenIds, uint256[] amounts)
-func (_ERC1155Vault *ERC1155VaultFilterer) FilterTokenReceived(opts *bind.FilterOpts, msgHash [][32]byte, from []common.Address, to []common.Address) (*ERC1155VaultTokenReceivedIterator, error) {
-
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
- }
- var fromRule []interface{}
- for _, fromItem := range from {
- fromRule = append(fromRule, fromItem)
- }
- var toRule []interface{}
- for _, toItem := range to {
- toRule = append(toRule, toItem)
- }
+// Solidity: event Paused(address account)
+func (_ERC1155Vault *ERC1155VaultFilterer) FilterPaused(opts *bind.FilterOpts) (*ERC1155VaultPausedIterator, error) {
- logs, sub, err := _ERC1155Vault.contract.FilterLogs(opts, "TokenReceived", msgHashRule, fromRule, toRule)
+ logs, sub, err := _ERC1155Vault.contract.FilterLogs(opts, "Paused")
if err != nil {
return nil, err
}
- return &ERC1155VaultTokenReceivedIterator{contract: _ERC1155Vault.contract, event: "TokenReceived", logs: logs, sub: sub}, nil
+ return &ERC1155VaultPausedIterator{contract: _ERC1155Vault.contract, event: "Paused", logs: logs, sub: sub}, nil
}
-// WatchTokenReceived is a free log subscription operation binding the contract event 0x0f60c37489e435ed8490c30b01c1fa57e62510e88b351b75796ad3d95babe6b1.
+// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 srcChainId, address token, uint256[] tokenIds, uint256[] amounts)
-func (_ERC1155Vault *ERC1155VaultFilterer) WatchTokenReceived(opts *bind.WatchOpts, sink chan<- *ERC1155VaultTokenReceived, msgHash [][32]byte, from []common.Address, to []common.Address) (event.Subscription, error) {
+// Solidity: event Paused(address account)
+func (_ERC1155Vault *ERC1155VaultFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *ERC1155VaultPaused) (event.Subscription, error) {
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
- }
- var fromRule []interface{}
- for _, fromItem := range from {
- fromRule = append(fromRule, fromItem)
- }
- var toRule []interface{}
- for _, toItem := range to {
- toRule = append(toRule, toItem)
+ logs, sub, err := _ERC1155Vault.contract.WatchLogs(opts, "Paused")
+ 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(ERC1155VaultPaused)
+ if err := _ERC1155Vault.contract.UnpackLog(event, "Paused", 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
+}
+
+// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_ERC1155Vault *ERC1155VaultFilterer) ParsePaused(log types.Log) (*ERC1155VaultPaused, error) {
+ event := new(ERC1155VaultPaused)
+ if err := _ERC1155Vault.contract.UnpackLog(event, "Paused", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// ERC1155VaultTokenReceivedIterator is returned from FilterTokenReceived and is used to iterate over the raw logs and unpacked data for TokenReceived events raised by the ERC1155Vault contract.
+type ERC1155VaultTokenReceivedIterator struct {
+ Event *ERC1155VaultTokenReceived // 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 *ERC1155VaultTokenReceivedIterator) 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(ERC1155VaultTokenReceived)
+ 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(ERC1155VaultTokenReceived)
+ 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 *ERC1155VaultTokenReceivedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *ERC1155VaultTokenReceivedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// ERC1155VaultTokenReceived represents a TokenReceived event raised by the ERC1155Vault contract.
+type ERC1155VaultTokenReceived struct {
+ MsgHash [32]byte
+ From common.Address
+ To common.Address
+ SrcChainId uint64
+ Token common.Address
+ TokenIds []*big.Int
+ Amounts []*big.Int
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterTokenReceived is a free log retrieval operation binding the contract event 0x8a4d138c7a19e12f6cdedfca02085820b0b1f5a9655c7a8b784f1d534347f247.
+//
+// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 srcChainId, address token, uint256[] tokenIds, uint256[] amounts)
+func (_ERC1155Vault *ERC1155VaultFilterer) FilterTokenReceived(opts *bind.FilterOpts, msgHash [][32]byte, from []common.Address, to []common.Address) (*ERC1155VaultTokenReceivedIterator, error) {
+
+ var msgHashRule []interface{}
+ for _, msgHashItem := range msgHash {
+ msgHashRule = append(msgHashRule, msgHashItem)
+ }
+ var fromRule []interface{}
+ for _, fromItem := range from {
+ fromRule = append(fromRule, fromItem)
+ }
+ var toRule []interface{}
+ for _, toItem := range to {
+ toRule = append(toRule, toItem)
+ }
+
+ logs, sub, err := _ERC1155Vault.contract.FilterLogs(opts, "TokenReceived", msgHashRule, fromRule, toRule)
+ if err != nil {
+ return nil, err
+ }
+ return &ERC1155VaultTokenReceivedIterator{contract: _ERC1155Vault.contract, event: "TokenReceived", logs: logs, sub: sub}, nil
+}
+
+// WatchTokenReceived is a free log subscription operation binding the contract event 0x8a4d138c7a19e12f6cdedfca02085820b0b1f5a9655c7a8b784f1d534347f247.
+//
+// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 srcChainId, address token, uint256[] tokenIds, uint256[] amounts)
+func (_ERC1155Vault *ERC1155VaultFilterer) WatchTokenReceived(opts *bind.WatchOpts, sink chan<- *ERC1155VaultTokenReceived, msgHash [][32]byte, from []common.Address, to []common.Address) (event.Subscription, error) {
+
+ var msgHashRule []interface{}
+ for _, msgHashItem := range msgHash {
+ msgHashRule = append(msgHashRule, msgHashItem)
+ }
+ var fromRule []interface{}
+ for _, fromItem := range from {
+ fromRule = append(fromRule, fromItem)
+ }
+ var toRule []interface{}
+ for _, toItem := range to {
+ toRule = append(toRule, toItem)
}
logs, sub, err := _ERC1155Vault.contract.WatchLogs(opts, "TokenReceived", msgHashRule, fromRule, toRule)
@@ -1509,9 +1934,9 @@ func (_ERC1155Vault *ERC1155VaultFilterer) WatchTokenReceived(opts *bind.WatchOp
}), nil
}
-// ParseTokenReceived is a log parse operation binding the contract event 0x0f60c37489e435ed8490c30b01c1fa57e62510e88b351b75796ad3d95babe6b1.
+// ParseTokenReceived is a log parse operation binding the contract event 0x8a4d138c7a19e12f6cdedfca02085820b0b1f5a9655c7a8b784f1d534347f247.
//
-// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 srcChainId, address token, uint256[] tokenIds, uint256[] amounts)
+// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 srcChainId, address token, uint256[] tokenIds, uint256[] amounts)
func (_ERC1155Vault *ERC1155VaultFilterer) ParseTokenReceived(log types.Log) (*ERC1155VaultTokenReceived, error) {
event := new(ERC1155VaultTokenReceived)
if err := _ERC1155Vault.contract.UnpackLog(event, "TokenReceived", log); err != nil {
@@ -1749,16 +2174,16 @@ type ERC1155VaultTokenSent struct {
MsgHash [32]byte
From common.Address
To common.Address
- DestChainId *big.Int
+ DestChainId uint64
Token common.Address
TokenIds []*big.Int
Amounts []*big.Int
Raw types.Log // Blockchain specific contextual infos
}
-// FilterTokenSent is a free log retrieval operation binding the contract event 0x5e54276405062454e6226625b28a6fea0a838d6b054e38955667234afb3345a3.
+// FilterTokenSent is a free log retrieval operation binding the contract event 0x329b657c35d4e2dfede6ef5132869accb1f8542912a40f9a854b4a917ffae2e9.
//
-// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 destChainId, address token, uint256[] tokenIds, uint256[] amounts)
+// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 destChainId, address token, uint256[] tokenIds, uint256[] amounts)
func (_ERC1155Vault *ERC1155VaultFilterer) FilterTokenSent(opts *bind.FilterOpts, msgHash [][32]byte, from []common.Address, to []common.Address) (*ERC1155VaultTokenSentIterator, error) {
var msgHashRule []interface{}
@@ -1781,9 +2206,9 @@ func (_ERC1155Vault *ERC1155VaultFilterer) FilterTokenSent(opts *bind.FilterOpts
return &ERC1155VaultTokenSentIterator{contract: _ERC1155Vault.contract, event: "TokenSent", logs: logs, sub: sub}, nil
}
-// WatchTokenSent is a free log subscription operation binding the contract event 0x5e54276405062454e6226625b28a6fea0a838d6b054e38955667234afb3345a3.
+// WatchTokenSent is a free log subscription operation binding the contract event 0x329b657c35d4e2dfede6ef5132869accb1f8542912a40f9a854b4a917ffae2e9.
//
-// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 destChainId, address token, uint256[] tokenIds, uint256[] amounts)
+// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 destChainId, address token, uint256[] tokenIds, uint256[] amounts)
func (_ERC1155Vault *ERC1155VaultFilterer) WatchTokenSent(opts *bind.WatchOpts, sink chan<- *ERC1155VaultTokenSent, msgHash [][32]byte, from []common.Address, to []common.Address) (event.Subscription, error) {
var msgHashRule []interface{}
@@ -1831,9 +2256,9 @@ func (_ERC1155Vault *ERC1155VaultFilterer) WatchTokenSent(opts *bind.WatchOpts,
}), nil
}
-// ParseTokenSent is a log parse operation binding the contract event 0x5e54276405062454e6226625b28a6fea0a838d6b054e38955667234afb3345a3.
+// ParseTokenSent is a log parse operation binding the contract event 0x329b657c35d4e2dfede6ef5132869accb1f8542912a40f9a854b4a917ffae2e9.
//
-// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 destChainId, address token, uint256[] tokenIds, uint256[] amounts)
+// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 destChainId, address token, uint256[] tokenIds, uint256[] amounts)
func (_ERC1155Vault *ERC1155VaultFilterer) ParseTokenSent(log types.Log) (*ERC1155VaultTokenSent, error) {
event := new(ERC1155VaultTokenSent)
if err := _ERC1155Vault.contract.UnpackLog(event, "TokenSent", log); err != nil {
@@ -1842,3 +2267,281 @@ func (_ERC1155Vault *ERC1155VaultFilterer) ParseTokenSent(log types.Log) (*ERC11
event.Raw = log
return event, nil
}
+
+// ERC1155VaultUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the ERC1155Vault contract.
+type ERC1155VaultUnpausedIterator struct {
+ Event *ERC1155VaultUnpaused // 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 *ERC1155VaultUnpausedIterator) 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(ERC1155VaultUnpaused)
+ 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(ERC1155VaultUnpaused)
+ 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 *ERC1155VaultUnpausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *ERC1155VaultUnpausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// ERC1155VaultUnpaused represents a Unpaused event raised by the ERC1155Vault contract.
+type ERC1155VaultUnpaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_ERC1155Vault *ERC1155VaultFilterer) FilterUnpaused(opts *bind.FilterOpts) (*ERC1155VaultUnpausedIterator, error) {
+
+ logs, sub, err := _ERC1155Vault.contract.FilterLogs(opts, "Unpaused")
+ if err != nil {
+ return nil, err
+ }
+ return &ERC1155VaultUnpausedIterator{contract: _ERC1155Vault.contract, event: "Unpaused", logs: logs, sub: sub}, nil
+}
+
+// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_ERC1155Vault *ERC1155VaultFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *ERC1155VaultUnpaused) (event.Subscription, error) {
+
+ logs, sub, err := _ERC1155Vault.contract.WatchLogs(opts, "Unpaused")
+ 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(ERC1155VaultUnpaused)
+ if err := _ERC1155Vault.contract.UnpackLog(event, "Unpaused", 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
+}
+
+// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_ERC1155Vault *ERC1155VaultFilterer) ParseUnpaused(log types.Log) (*ERC1155VaultUnpaused, error) {
+ event := new(ERC1155VaultUnpaused)
+ if err := _ERC1155Vault.contract.UnpackLog(event, "Unpaused", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// ERC1155VaultUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the ERC1155Vault contract.
+type ERC1155VaultUpgradedIterator struct {
+ Event *ERC1155VaultUpgraded // 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 *ERC1155VaultUpgradedIterator) 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(ERC1155VaultUpgraded)
+ 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(ERC1155VaultUpgraded)
+ 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 *ERC1155VaultUpgradedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *ERC1155VaultUpgradedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// ERC1155VaultUpgraded represents a Upgraded event raised by the ERC1155Vault contract.
+type ERC1155VaultUpgraded struct {
+ Implementation common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_ERC1155Vault *ERC1155VaultFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*ERC1155VaultUpgradedIterator, error) {
+
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
+ }
+
+ logs, sub, err := _ERC1155Vault.contract.FilterLogs(opts, "Upgraded", implementationRule)
+ if err != nil {
+ return nil, err
+ }
+ return &ERC1155VaultUpgradedIterator{contract: _ERC1155Vault.contract, event: "Upgraded", logs: logs, sub: sub}, nil
+}
+
+// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_ERC1155Vault *ERC1155VaultFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *ERC1155VaultUpgraded, implementation []common.Address) (event.Subscription, error) {
+
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
+ }
+
+ logs, sub, err := _ERC1155Vault.contract.WatchLogs(opts, "Upgraded", implementationRule)
+ 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(ERC1155VaultUpgraded)
+ if err := _ERC1155Vault.contract.UnpackLog(event, "Upgraded", 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
+}
+
+// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_ERC1155Vault *ERC1155VaultFilterer) ParseUpgraded(log types.Log) (*ERC1155VaultUpgraded, error) {
+ event := new(ERC1155VaultUpgraded)
+ if err := _ERC1155Vault.contract.UnpackLog(event, "Upgraded", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
diff --git a/packages/relayer/bindings/erc20vault/ERC20Vault.go b/packages/relayer/bindings/erc20vault/ERC20Vault.go
index e59a8868c1b..0878c53bafd 100644
--- a/packages/relayer/bindings/erc20vault/ERC20Vault.go
+++ b/packages/relayer/bindings/erc20vault/ERC20Vault.go
@@ -31,7 +31,7 @@ var (
// ERC20VaultBridgeTransferOp is an auto generated low-level Go binding around an user-defined struct.
type ERC20VaultBridgeTransferOp struct {
- DestChainId *big.Int
+ DestChainId uint64
To common.Address
Token common.Address
Amount *big.Int
@@ -43,7 +43,7 @@ type ERC20VaultBridgeTransferOp struct {
// ERC20VaultCanonicalERC20 is an auto generated low-level Go binding around an user-defined struct.
type ERC20VaultCanonicalERC20 struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Decimals uint8
Symbol string
@@ -54,9 +54,9 @@ type ERC20VaultCanonicalERC20 struct {
type IBridgeMessage struct {
Id *big.Int
From common.Address
- SrcChainId *big.Int
- DestChainId *big.Int
- User common.Address
+ SrcChainId uint64
+ DestChainId uint64
+ Owner common.Address
To common.Address
RefundTo common.Address
Value *big.Int
@@ -68,7 +68,7 @@ type IBridgeMessage struct {
// ERC20VaultMetaData contains all meta data concerning the ERC20Vault contract.
var ERC20VaultMetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_AMOUNT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_FROM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_SRC_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_TO\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_USER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_MESSAGE_NOT_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_MESSAGE_RELEASED_ALREADY\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"ctoken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"btoken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ctokenSymbol\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ctokenName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"ctokenDecimal\",\"type\":\"uint8\"}],\"name\":\"BridgedTokenDeployed\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgedToCanonical\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"canonicalToBridged\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isBridgedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"onMessageRecalled\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structERC20Vault.CanonicalERC20\",\"name\":\"ctoken\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"receiveToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structERC20Vault.BridgeTransferOp\",\"name\":\"opt\",\"type\":\"tuple\"}],\"name\":\"sendToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+ ABI: "[{\"inputs\":[],\"name\":\"ETH_TRANSFER_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NULL_IMPL_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_BTOKEN_BLACKLISTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_CTOKEN_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_AMOUNT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_NEW_BTOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_NOT_SAME_OWNER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_PERMISSION_DENIED\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"ctoken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"btokenOld\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"btokenNew\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ctokenSymbol\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ctokenName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"ctokenDecimal\",\"type\":\"uint8\"}],\"name\":\"BridgedTokenChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"ctoken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"btoken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ctokenSymbol\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ctokenName\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"ctokenDecimal\",\"type\":\"uint8\"}],\"name\":\"BridgedTokenDeployed\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgedToCanonical\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"btoken\",\"type\":\"address\"}],\"name\":\"btokenBlacklist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"blacklisted\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"canonicalToBridged\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structERC20Vault.CanonicalERC20\",\"name\":\"ctoken\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"btokenNew\",\"type\":\"address\"}],\"name\":\"changeBridgedToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"btokenOld\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"onMessageRecalled\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structERC20Vault.CanonicalERC20\",\"name\":\"ctoken\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"receiveToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structERC20Vault.BridgeTransferOp\",\"name\":\"op\",\"type\":\"tuple\"}],\"name\":\"sendToken\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"_message\",\"type\":\"tuple\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]",
}
// ERC20VaultABI is the input ABI used to generate the binding from.
@@ -250,9 +250,9 @@ func (_ERC20Vault *ERC20VaultCallerSession) AddressManager() (common.Address, er
// BridgedToCanonical is a free data retrieval call binding the contract method 0x9aa8605c.
//
-// Solidity: function bridgedToCanonical(address ) view returns(uint256 chainId, address addr, uint8 decimals, string symbol, string name)
+// Solidity: function bridgedToCanonical(address ) view returns(uint64 chainId, address addr, uint8 decimals, string symbol, string name)
func (_ERC20Vault *ERC20VaultCaller) BridgedToCanonical(opts *bind.CallOpts, arg0 common.Address) (struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Decimals uint8
Symbol string
@@ -262,7 +262,7 @@ func (_ERC20Vault *ERC20VaultCaller) BridgedToCanonical(opts *bind.CallOpts, arg
err := _ERC20Vault.contract.Call(opts, &out, "bridgedToCanonical", arg0)
outstruct := new(struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Decimals uint8
Symbol string
@@ -272,7 +272,7 @@ func (_ERC20Vault *ERC20VaultCaller) BridgedToCanonical(opts *bind.CallOpts, arg
return *outstruct, err
}
- outstruct.ChainId = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+ outstruct.ChainId = *abi.ConvertType(out[0], new(uint64)).(*uint64)
outstruct.Addr = *abi.ConvertType(out[1], new(common.Address)).(*common.Address)
outstruct.Decimals = *abi.ConvertType(out[2], new(uint8)).(*uint8)
outstruct.Symbol = *abi.ConvertType(out[3], new(string)).(*string)
@@ -284,9 +284,9 @@ func (_ERC20Vault *ERC20VaultCaller) BridgedToCanonical(opts *bind.CallOpts, arg
// BridgedToCanonical is a free data retrieval call binding the contract method 0x9aa8605c.
//
-// Solidity: function bridgedToCanonical(address ) view returns(uint256 chainId, address addr, uint8 decimals, string symbol, string name)
+// Solidity: function bridgedToCanonical(address ) view returns(uint64 chainId, address addr, uint8 decimals, string symbol, string name)
func (_ERC20Vault *ERC20VaultSession) BridgedToCanonical(arg0 common.Address) (struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Decimals uint8
Symbol string
@@ -297,9 +297,9 @@ func (_ERC20Vault *ERC20VaultSession) BridgedToCanonical(arg0 common.Address) (s
// BridgedToCanonical is a free data retrieval call binding the contract method 0x9aa8605c.
//
-// Solidity: function bridgedToCanonical(address ) view returns(uint256 chainId, address addr, uint8 decimals, string symbol, string name)
+// Solidity: function bridgedToCanonical(address ) view returns(uint64 chainId, address addr, uint8 decimals, string symbol, string name)
func (_ERC20Vault *ERC20VaultCallerSession) BridgedToCanonical(arg0 common.Address) (struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Decimals uint8
Symbol string
@@ -308,6 +308,37 @@ func (_ERC20Vault *ERC20VaultCallerSession) BridgedToCanonical(arg0 common.Addre
return _ERC20Vault.Contract.BridgedToCanonical(&_ERC20Vault.CallOpts, arg0)
}
+// BtokenBlacklist is a free data retrieval call binding the contract method 0xcaec3e4e.
+//
+// Solidity: function btokenBlacklist(address btoken) view returns(bool blacklisted)
+func (_ERC20Vault *ERC20VaultCaller) BtokenBlacklist(opts *bind.CallOpts, btoken common.Address) (bool, error) {
+ var out []interface{}
+ err := _ERC20Vault.contract.Call(opts, &out, "btokenBlacklist", btoken)
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// BtokenBlacklist is a free data retrieval call binding the contract method 0xcaec3e4e.
+//
+// Solidity: function btokenBlacklist(address btoken) view returns(bool blacklisted)
+func (_ERC20Vault *ERC20VaultSession) BtokenBlacklist(btoken common.Address) (bool, error) {
+ return _ERC20Vault.Contract.BtokenBlacklist(&_ERC20Vault.CallOpts, btoken)
+}
+
+// BtokenBlacklist is a free data retrieval call binding the contract method 0xcaec3e4e.
+//
+// Solidity: function btokenBlacklist(address btoken) view returns(bool blacklisted)
+func (_ERC20Vault *ERC20VaultCallerSession) BtokenBlacklist(btoken common.Address) (bool, error) {
+ return _ERC20Vault.Contract.BtokenBlacklist(&_ERC20Vault.CallOpts, btoken)
+}
+
// CanonicalToBridged is a free data retrieval call binding the contract method 0x67090ccf.
//
// Solidity: function canonicalToBridged(uint256 , address ) view returns(address)
@@ -339,35 +370,35 @@ func (_ERC20Vault *ERC20VaultCallerSession) CanonicalToBridged(arg0 *big.Int, ar
return _ERC20Vault.Contract.CanonicalToBridged(&_ERC20Vault.CallOpts, arg0, arg1)
}
-// IsBridgedToken is a free data retrieval call binding the contract method 0xc287e578.
+// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
-// Solidity: function isBridgedToken(address ) view returns(bool)
-func (_ERC20Vault *ERC20VaultCaller) IsBridgedToken(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
+// Solidity: function name() pure returns(bytes32)
+func (_ERC20Vault *ERC20VaultCaller) Name(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
- err := _ERC20Vault.contract.Call(opts, &out, "isBridgedToken", arg0)
+ err := _ERC20Vault.contract.Call(opts, &out, "name")
if err != nil {
- return *new(bool), err
+ return *new([32]byte), err
}
- out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
-// IsBridgedToken is a free data retrieval call binding the contract method 0xc287e578.
+// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
-// Solidity: function isBridgedToken(address ) view returns(bool)
-func (_ERC20Vault *ERC20VaultSession) IsBridgedToken(arg0 common.Address) (bool, error) {
- return _ERC20Vault.Contract.IsBridgedToken(&_ERC20Vault.CallOpts, arg0)
+// Solidity: function name() pure returns(bytes32)
+func (_ERC20Vault *ERC20VaultSession) Name() ([32]byte, error) {
+ return _ERC20Vault.Contract.Name(&_ERC20Vault.CallOpts)
}
-// IsBridgedToken is a free data retrieval call binding the contract method 0xc287e578.
+// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
-// Solidity: function isBridgedToken(address ) view returns(bool)
-func (_ERC20Vault *ERC20VaultCallerSession) IsBridgedToken(arg0 common.Address) (bool, error) {
- return _ERC20Vault.Contract.IsBridgedToken(&_ERC20Vault.CallOpts, arg0)
+// Solidity: function name() pure returns(bytes32)
+func (_ERC20Vault *ERC20VaultCallerSession) Name() ([32]byte, error) {
+ return _ERC20Vault.Contract.Name(&_ERC20Vault.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
@@ -401,10 +432,72 @@ func (_ERC20Vault *ERC20VaultCallerSession) Owner() (common.Address, error) {
return _ERC20Vault.Contract.Owner(&_ERC20Vault.CallOpts)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_ERC20Vault *ERC20VaultCaller) Paused(opts *bind.CallOpts) (bool, error) {
+ var out []interface{}
+ err := _ERC20Vault.contract.Call(opts, &out, "paused")
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_ERC20Vault *ERC20VaultSession) Paused() (bool, error) {
+ return _ERC20Vault.Contract.Paused(&_ERC20Vault.CallOpts)
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_ERC20Vault *ERC20VaultCallerSession) Paused() (bool, error) {
+ return _ERC20Vault.Contract.Paused(&_ERC20Vault.CallOpts)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_ERC20Vault *ERC20VaultCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) {
+ var out []interface{}
+ err := _ERC20Vault.contract.Call(opts, &out, "proxiableUUID")
+
+ if err != nil {
+ return *new([32]byte), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+
+ return out0, err
+
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_ERC20Vault *ERC20VaultSession) ProxiableUUID() ([32]byte, error) {
+ return _ERC20Vault.Contract.ProxiableUUID(&_ERC20Vault.CallOpts)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_ERC20Vault *ERC20VaultCallerSession) ProxiableUUID() ([32]byte, error) {
+ return _ERC20Vault.Contract.ProxiableUUID(&_ERC20Vault.CallOpts)
+}
+
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_ERC20Vault *ERC20VaultCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_ERC20Vault *ERC20VaultCaller) Resolve(opts *bind.CallOpts, chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
var out []interface{}
err := _ERC20Vault.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress)
@@ -418,17 +511,17 @@ func (_ERC20Vault *ERC20VaultCaller) Resolve(opts *bind.CallOpts, chainId *big.I
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_ERC20Vault *ERC20VaultSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_ERC20Vault *ERC20VaultSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _ERC20Vault.Contract.Resolve(&_ERC20Vault.CallOpts, chainId, name, allowZeroAddress)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_ERC20Vault *ERC20VaultCallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_ERC20Vault *ERC20VaultCallerSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _ERC20Vault.Contract.Resolve(&_ERC20Vault.CallOpts, chainId, name, allowZeroAddress)
}
@@ -494,6 +587,27 @@ func (_ERC20Vault *ERC20VaultCallerSession) SupportsInterface(interfaceId [4]byt
return _ERC20Vault.Contract.SupportsInterface(&_ERC20Vault.CallOpts, interfaceId)
}
+// ChangeBridgedToken is a paid mutator transaction binding the contract method 0x0ecd8be9.
+//
+// Solidity: function changeBridgedToken((uint64,address,uint8,string,string) ctoken, address btokenNew) returns(address btokenOld)
+func (_ERC20Vault *ERC20VaultTransactor) ChangeBridgedToken(opts *bind.TransactOpts, ctoken ERC20VaultCanonicalERC20, btokenNew common.Address) (*types.Transaction, error) {
+ return _ERC20Vault.contract.Transact(opts, "changeBridgedToken", ctoken, btokenNew)
+}
+
+// ChangeBridgedToken is a paid mutator transaction binding the contract method 0x0ecd8be9.
+//
+// Solidity: function changeBridgedToken((uint64,address,uint8,string,string) ctoken, address btokenNew) returns(address btokenOld)
+func (_ERC20Vault *ERC20VaultSession) ChangeBridgedToken(ctoken ERC20VaultCanonicalERC20, btokenNew common.Address) (*types.Transaction, error) {
+ return _ERC20Vault.Contract.ChangeBridgedToken(&_ERC20Vault.TransactOpts, ctoken, btokenNew)
+}
+
+// ChangeBridgedToken is a paid mutator transaction binding the contract method 0x0ecd8be9.
+//
+// Solidity: function changeBridgedToken((uint64,address,uint8,string,string) ctoken, address btokenNew) returns(address btokenOld)
+func (_ERC20Vault *ERC20VaultTransactorSession) ChangeBridgedToken(ctoken ERC20VaultCanonicalERC20, btokenNew common.Address) (*types.Transaction, error) {
+ return _ERC20Vault.Contract.ChangeBridgedToken(&_ERC20Vault.TransactOpts, ctoken, btokenNew)
+}
+
// Init is a paid mutator transaction binding the contract method 0x19ab453c.
//
// Solidity: function init(address addressManager) returns()
@@ -515,44 +629,65 @@ func (_ERC20Vault *ERC20VaultTransactorSession) Init(addressManager common.Addre
return _ERC20Vault.Contract.Init(&_ERC20Vault.TransactOpts, addressManager)
}
-// OnMessageRecalled is a paid mutator transaction binding the contract method 0x32a642ca.
+// OnMessageRecalled is a paid mutator transaction binding the contract method 0xc389a180.
+//
+// Solidity: function onMessageRecalled((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes32 msgHash) payable returns()
+func (_ERC20Vault *ERC20VaultTransactor) OnMessageRecalled(opts *bind.TransactOpts, message IBridgeMessage, msgHash [32]byte) (*types.Transaction, error) {
+ return _ERC20Vault.contract.Transact(opts, "onMessageRecalled", message, msgHash)
+}
+
+// OnMessageRecalled is a paid mutator transaction binding the contract method 0xc389a180.
+//
+// Solidity: function onMessageRecalled((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes32 msgHash) payable returns()
+func (_ERC20Vault *ERC20VaultSession) OnMessageRecalled(message IBridgeMessage, msgHash [32]byte) (*types.Transaction, error) {
+ return _ERC20Vault.Contract.OnMessageRecalled(&_ERC20Vault.TransactOpts, message, msgHash)
+}
+
+// OnMessageRecalled is a paid mutator transaction binding the contract method 0xc389a180.
//
-// Solidity: function onMessageRecalled((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns()
-func (_ERC20Vault *ERC20VaultTransactor) OnMessageRecalled(opts *bind.TransactOpts, message IBridgeMessage) (*types.Transaction, error) {
- return _ERC20Vault.contract.Transact(opts, "onMessageRecalled", message)
+// Solidity: function onMessageRecalled((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes32 msgHash) payable returns()
+func (_ERC20Vault *ERC20VaultTransactorSession) OnMessageRecalled(message IBridgeMessage, msgHash [32]byte) (*types.Transaction, error) {
+ return _ERC20Vault.Contract.OnMessageRecalled(&_ERC20Vault.TransactOpts, message, msgHash)
}
-// OnMessageRecalled is a paid mutator transaction binding the contract method 0x32a642ca.
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
-// Solidity: function onMessageRecalled((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns()
-func (_ERC20Vault *ERC20VaultSession) OnMessageRecalled(message IBridgeMessage) (*types.Transaction, error) {
- return _ERC20Vault.Contract.OnMessageRecalled(&_ERC20Vault.TransactOpts, message)
+// Solidity: function pause() returns()
+func (_ERC20Vault *ERC20VaultTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _ERC20Vault.contract.Transact(opts, "pause")
}
-// OnMessageRecalled is a paid mutator transaction binding the contract method 0x32a642ca.
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
-// Solidity: function onMessageRecalled((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns()
-func (_ERC20Vault *ERC20VaultTransactorSession) OnMessageRecalled(message IBridgeMessage) (*types.Transaction, error) {
- return _ERC20Vault.Contract.OnMessageRecalled(&_ERC20Vault.TransactOpts, message)
+// Solidity: function pause() returns()
+func (_ERC20Vault *ERC20VaultSession) Pause() (*types.Transaction, error) {
+ return _ERC20Vault.Contract.Pause(&_ERC20Vault.TransactOpts)
}
-// ReceiveToken is a paid mutator transaction binding the contract method 0xcb03d23c.
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
-// Solidity: function receiveToken((uint256,address,uint8,string,string) ctoken, address from, address to, uint256 amount) payable returns()
+// Solidity: function pause() returns()
+func (_ERC20Vault *ERC20VaultTransactorSession) Pause() (*types.Transaction, error) {
+ return _ERC20Vault.Contract.Pause(&_ERC20Vault.TransactOpts)
+}
+
+// ReceiveToken is a paid mutator transaction binding the contract method 0x240f6a5f.
+//
+// Solidity: function receiveToken((uint64,address,uint8,string,string) ctoken, address from, address to, uint256 amount) payable returns()
func (_ERC20Vault *ERC20VaultTransactor) ReceiveToken(opts *bind.TransactOpts, ctoken ERC20VaultCanonicalERC20, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) {
return _ERC20Vault.contract.Transact(opts, "receiveToken", ctoken, from, to, amount)
}
-// ReceiveToken is a paid mutator transaction binding the contract method 0xcb03d23c.
+// ReceiveToken is a paid mutator transaction binding the contract method 0x240f6a5f.
//
-// Solidity: function receiveToken((uint256,address,uint8,string,string) ctoken, address from, address to, uint256 amount) payable returns()
+// Solidity: function receiveToken((uint64,address,uint8,string,string) ctoken, address from, address to, uint256 amount) payable returns()
func (_ERC20Vault *ERC20VaultSession) ReceiveToken(ctoken ERC20VaultCanonicalERC20, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) {
return _ERC20Vault.Contract.ReceiveToken(&_ERC20Vault.TransactOpts, ctoken, from, to, amount)
}
-// ReceiveToken is a paid mutator transaction binding the contract method 0xcb03d23c.
+// ReceiveToken is a paid mutator transaction binding the contract method 0x240f6a5f.
//
-// Solidity: function receiveToken((uint256,address,uint8,string,string) ctoken, address from, address to, uint256 amount) payable returns()
+// Solidity: function receiveToken((uint64,address,uint8,string,string) ctoken, address from, address to, uint256 amount) payable returns()
func (_ERC20Vault *ERC20VaultTransactorSession) ReceiveToken(ctoken ERC20VaultCanonicalERC20, from common.Address, to common.Address, amount *big.Int) (*types.Transaction, error) {
return _ERC20Vault.Contract.ReceiveToken(&_ERC20Vault.TransactOpts, ctoken, from, to, amount)
}
@@ -578,46 +713,25 @@ func (_ERC20Vault *ERC20VaultTransactorSession) RenounceOwnership() (*types.Tran
return _ERC20Vault.Contract.RenounceOwnership(&_ERC20Vault.TransactOpts)
}
-// SendToken is a paid mutator transaction binding the contract method 0xe2dc9033.
-//
-// Solidity: function sendToken((uint256,address,address,uint256,uint256,uint256,address,string) opt) payable returns()
-func (_ERC20Vault *ERC20VaultTransactor) SendToken(opts *bind.TransactOpts, opt ERC20VaultBridgeTransferOp) (*types.Transaction, error) {
- return _ERC20Vault.contract.Transact(opts, "sendToken", opt)
-}
-
-// SendToken is a paid mutator transaction binding the contract method 0xe2dc9033.
-//
-// Solidity: function sendToken((uint256,address,address,uint256,uint256,uint256,address,string) opt) payable returns()
-func (_ERC20Vault *ERC20VaultSession) SendToken(opt ERC20VaultBridgeTransferOp) (*types.Transaction, error) {
- return _ERC20Vault.Contract.SendToken(&_ERC20Vault.TransactOpts, opt)
-}
-
-// SendToken is a paid mutator transaction binding the contract method 0xe2dc9033.
-//
-// Solidity: function sendToken((uint256,address,address,uint256,uint256,uint256,address,string) opt) payable returns()
-func (_ERC20Vault *ERC20VaultTransactorSession) SendToken(opt ERC20VaultBridgeTransferOp) (*types.Transaction, error) {
- return _ERC20Vault.Contract.SendToken(&_ERC20Vault.TransactOpts, opt)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
+// SendToken is a paid mutator transaction binding the contract method 0x755fc20c.
//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_ERC20Vault *ERC20VaultTransactor) SetAddressManager(opts *bind.TransactOpts, newAddressManager common.Address) (*types.Transaction, error) {
- return _ERC20Vault.contract.Transact(opts, "setAddressManager", newAddressManager)
+// Solidity: function sendToken((uint64,address,address,uint256,uint256,uint256,address,string) op) payable returns((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
+func (_ERC20Vault *ERC20VaultTransactor) SendToken(opts *bind.TransactOpts, op ERC20VaultBridgeTransferOp) (*types.Transaction, error) {
+ return _ERC20Vault.contract.Transact(opts, "sendToken", op)
}
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
+// SendToken is a paid mutator transaction binding the contract method 0x755fc20c.
//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_ERC20Vault *ERC20VaultSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _ERC20Vault.Contract.SetAddressManager(&_ERC20Vault.TransactOpts, newAddressManager)
+// Solidity: function sendToken((uint64,address,address,uint256,uint256,uint256,address,string) op) payable returns((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
+func (_ERC20Vault *ERC20VaultSession) SendToken(op ERC20VaultBridgeTransferOp) (*types.Transaction, error) {
+ return _ERC20Vault.Contract.SendToken(&_ERC20Vault.TransactOpts, op)
}
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
+// SendToken is a paid mutator transaction binding the contract method 0x755fc20c.
//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_ERC20Vault *ERC20VaultTransactorSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _ERC20Vault.Contract.SetAddressManager(&_ERC20Vault.TransactOpts, newAddressManager)
+// Solidity: function sendToken((uint64,address,address,uint256,uint256,uint256,address,string) op) payable returns((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
+func (_ERC20Vault *ERC20VaultTransactorSession) SendToken(op ERC20VaultBridgeTransferOp) (*types.Transaction, error) {
+ return _ERC20Vault.Contract.SendToken(&_ERC20Vault.TransactOpts, op)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
@@ -641,9 +755,72 @@ func (_ERC20Vault *ERC20VaultTransactorSession) TransferOwnership(newOwner commo
return _ERC20Vault.Contract.TransferOwnership(&_ERC20Vault.TransactOpts, newOwner)
}
-// ERC20VaultAddressManagerChangedIterator is returned from FilterAddressManagerChanged and is used to iterate over the raw logs and unpacked data for AddressManagerChanged events raised by the ERC20Vault contract.
-type ERC20VaultAddressManagerChangedIterator struct {
- Event *ERC20VaultAddressManagerChanged // Event containing the contract specifics and raw log
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_ERC20Vault *ERC20VaultTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _ERC20Vault.contract.Transact(opts, "unpause")
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_ERC20Vault *ERC20VaultSession) Unpause() (*types.Transaction, error) {
+ return _ERC20Vault.Contract.Unpause(&_ERC20Vault.TransactOpts)
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_ERC20Vault *ERC20VaultTransactorSession) Unpause() (*types.Transaction, error) {
+ return _ERC20Vault.Contract.Unpause(&_ERC20Vault.TransactOpts)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_ERC20Vault *ERC20VaultTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) {
+ return _ERC20Vault.contract.Transact(opts, "upgradeTo", newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_ERC20Vault *ERC20VaultSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _ERC20Vault.Contract.UpgradeTo(&_ERC20Vault.TransactOpts, newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_ERC20Vault *ERC20VaultTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _ERC20Vault.Contract.UpgradeTo(&_ERC20Vault.TransactOpts, newImplementation)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_ERC20Vault *ERC20VaultTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _ERC20Vault.contract.Transact(opts, "upgradeToAndCall", newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_ERC20Vault *ERC20VaultSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _ERC20Vault.Contract.UpgradeToAndCall(&_ERC20Vault.TransactOpts, newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_ERC20Vault *ERC20VaultTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _ERC20Vault.Contract.UpgradeToAndCall(&_ERC20Vault.TransactOpts, newImplementation, data)
+}
+
+// ERC20VaultAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the ERC20Vault contract.
+type ERC20VaultAdminChangedIterator struct {
+ Event *ERC20VaultAdminChanged // 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
@@ -657,7 +834,7 @@ type ERC20VaultAddressManagerChangedIterator struct {
// 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 *ERC20VaultAddressManagerChangedIterator) Next() bool {
+func (it *ERC20VaultAdminChangedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -666,7 +843,7 @@ func (it *ERC20VaultAddressManagerChangedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(ERC20VaultAddressManagerChanged)
+ it.Event = new(ERC20VaultAdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -681,7 +858,7 @@ func (it *ERC20VaultAddressManagerChangedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(ERC20VaultAddressManagerChanged)
+ it.Event = new(ERC20VaultAdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -697,51 +874,42 @@ func (it *ERC20VaultAddressManagerChangedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *ERC20VaultAddressManagerChangedIterator) Error() error {
+func (it *ERC20VaultAdminChangedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *ERC20VaultAddressManagerChangedIterator) Close() error {
+func (it *ERC20VaultAdminChangedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// ERC20VaultAddressManagerChanged represents a AddressManagerChanged event raised by the ERC20Vault contract.
-type ERC20VaultAddressManagerChanged struct {
- AddressManager common.Address
- Raw types.Log // Blockchain specific contextual infos
+// ERC20VaultAdminChanged represents a AdminChanged event raised by the ERC20Vault contract.
+type ERC20VaultAdminChanged struct {
+ PreviousAdmin common.Address
+ NewAdmin common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterAddressManagerChanged is a free log retrieval operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_ERC20Vault *ERC20VaultFilterer) FilterAddressManagerChanged(opts *bind.FilterOpts, addressManager []common.Address) (*ERC20VaultAddressManagerChangedIterator, error) {
-
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
- }
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_ERC20Vault *ERC20VaultFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*ERC20VaultAdminChangedIterator, error) {
- logs, sub, err := _ERC20Vault.contract.FilterLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _ERC20Vault.contract.FilterLogs(opts, "AdminChanged")
if err != nil {
return nil, err
}
- return &ERC20VaultAddressManagerChangedIterator{contract: _ERC20Vault.contract, event: "AddressManagerChanged", logs: logs, sub: sub}, nil
+ return &ERC20VaultAdminChangedIterator{contract: _ERC20Vault.contract, event: "AdminChanged", logs: logs, sub: sub}, nil
}
-// WatchAddressManagerChanged is a free log subscription operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_ERC20Vault *ERC20VaultFilterer) WatchAddressManagerChanged(opts *bind.WatchOpts, sink chan<- *ERC20VaultAddressManagerChanged, addressManager []common.Address) (event.Subscription, error) {
-
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
- }
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_ERC20Vault *ERC20VaultFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *ERC20VaultAdminChanged) (event.Subscription, error) {
- logs, sub, err := _ERC20Vault.contract.WatchLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _ERC20Vault.contract.WatchLogs(opts, "AdminChanged")
if err != nil {
return nil, err
}
@@ -751,8 +919,8 @@ func (_ERC20Vault *ERC20VaultFilterer) WatchAddressManagerChanged(opts *bind.Wat
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(ERC20VaultAddressManagerChanged)
- if err := _ERC20Vault.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+ event := new(ERC20VaultAdminChanged)
+ if err := _ERC20Vault.contract.UnpackLog(event, "AdminChanged", log); err != nil {
return err
}
event.Raw = log
@@ -773,21 +941,21 @@ func (_ERC20Vault *ERC20VaultFilterer) WatchAddressManagerChanged(opts *bind.Wat
}), nil
}
-// ParseAddressManagerChanged is a log parse operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_ERC20Vault *ERC20VaultFilterer) ParseAddressManagerChanged(log types.Log) (*ERC20VaultAddressManagerChanged, error) {
- event := new(ERC20VaultAddressManagerChanged)
- if err := _ERC20Vault.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_ERC20Vault *ERC20VaultFilterer) ParseAdminChanged(log types.Log) (*ERC20VaultAdminChanged, error) {
+ event := new(ERC20VaultAdminChanged)
+ if err := _ERC20Vault.contract.UnpackLog(event, "AdminChanged", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// ERC20VaultBridgedTokenDeployedIterator is returned from FilterBridgedTokenDeployed and is used to iterate over the raw logs and unpacked data for BridgedTokenDeployed events raised by the ERC20Vault contract.
-type ERC20VaultBridgedTokenDeployedIterator struct {
- Event *ERC20VaultBridgedTokenDeployed // Event containing the contract specifics and raw log
+// ERC20VaultBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the ERC20Vault contract.
+type ERC20VaultBeaconUpgradedIterator struct {
+ Event *ERC20VaultBeaconUpgraded // 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
@@ -801,7 +969,7 @@ type ERC20VaultBridgedTokenDeployedIterator struct {
// 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 *ERC20VaultBridgedTokenDeployedIterator) Next() bool {
+func (it *ERC20VaultBeaconUpgradedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -810,7 +978,7 @@ func (it *ERC20VaultBridgedTokenDeployedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(ERC20VaultBridgedTokenDeployed)
+ it.Event = new(ERC20VaultBeaconUpgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -825,7 +993,7 @@ func (it *ERC20VaultBridgedTokenDeployedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(ERC20VaultBridgedTokenDeployed)
+ it.Event = new(ERC20VaultBeaconUpgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -841,72 +1009,51 @@ func (it *ERC20VaultBridgedTokenDeployedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *ERC20VaultBridgedTokenDeployedIterator) Error() error {
+func (it *ERC20VaultBeaconUpgradedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *ERC20VaultBridgedTokenDeployedIterator) Close() error {
+func (it *ERC20VaultBeaconUpgradedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// ERC20VaultBridgedTokenDeployed represents a BridgedTokenDeployed event raised by the ERC20Vault contract.
-type ERC20VaultBridgedTokenDeployed struct {
- SrcChainId *big.Int
- Ctoken common.Address
- Btoken common.Address
- CtokenSymbol string
- CtokenName string
- CtokenDecimal uint8
- Raw types.Log // Blockchain specific contextual infos
+// ERC20VaultBeaconUpgraded represents a BeaconUpgraded event raised by the ERC20Vault contract.
+type ERC20VaultBeaconUpgraded struct {
+ Beacon common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBridgedTokenDeployed is a free log retrieval operation binding the contract event 0xb6b427556e8cb0ebf9175da4bc48c64c4f56e44cfaf8c3ab5ebf8e2ea1309079.
+// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event BridgedTokenDeployed(uint256 indexed srcChainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName, uint8 ctokenDecimal)
-func (_ERC20Vault *ERC20VaultFilterer) FilterBridgedTokenDeployed(opts *bind.FilterOpts, srcChainId []*big.Int, ctoken []common.Address, btoken []common.Address) (*ERC20VaultBridgedTokenDeployedIterator, error) {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_ERC20Vault *ERC20VaultFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*ERC20VaultBeaconUpgradedIterator, error) {
- var srcChainIdRule []interface{}
- for _, srcChainIdItem := range srcChainId {
- srcChainIdRule = append(srcChainIdRule, srcChainIdItem)
- }
- var ctokenRule []interface{}
- for _, ctokenItem := range ctoken {
- ctokenRule = append(ctokenRule, ctokenItem)
- }
- var btokenRule []interface{}
- for _, btokenItem := range btoken {
- btokenRule = append(btokenRule, btokenItem)
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
}
- logs, sub, err := _ERC20Vault.contract.FilterLogs(opts, "BridgedTokenDeployed", srcChainIdRule, ctokenRule, btokenRule)
+ logs, sub, err := _ERC20Vault.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule)
if err != nil {
return nil, err
}
- return &ERC20VaultBridgedTokenDeployedIterator{contract: _ERC20Vault.contract, event: "BridgedTokenDeployed", logs: logs, sub: sub}, nil
+ return &ERC20VaultBeaconUpgradedIterator{contract: _ERC20Vault.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil
}
-// WatchBridgedTokenDeployed is a free log subscription operation binding the contract event 0xb6b427556e8cb0ebf9175da4bc48c64c4f56e44cfaf8c3ab5ebf8e2ea1309079.
+// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event BridgedTokenDeployed(uint256 indexed srcChainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName, uint8 ctokenDecimal)
-func (_ERC20Vault *ERC20VaultFilterer) WatchBridgedTokenDeployed(opts *bind.WatchOpts, sink chan<- *ERC20VaultBridgedTokenDeployed, srcChainId []*big.Int, ctoken []common.Address, btoken []common.Address) (event.Subscription, error) {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_ERC20Vault *ERC20VaultFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *ERC20VaultBeaconUpgraded, beacon []common.Address) (event.Subscription, error) {
- var srcChainIdRule []interface{}
- for _, srcChainIdItem := range srcChainId {
- srcChainIdRule = append(srcChainIdRule, srcChainIdItem)
- }
- var ctokenRule []interface{}
- for _, ctokenItem := range ctoken {
- ctokenRule = append(ctokenRule, ctokenItem)
- }
- var btokenRule []interface{}
- for _, btokenItem := range btoken {
- btokenRule = append(btokenRule, btokenItem)
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
}
- logs, sub, err := _ERC20Vault.contract.WatchLogs(opts, "BridgedTokenDeployed", srcChainIdRule, ctokenRule, btokenRule)
+ logs, sub, err := _ERC20Vault.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule)
if err != nil {
return nil, err
}
@@ -916,8 +1063,8 @@ func (_ERC20Vault *ERC20VaultFilterer) WatchBridgedTokenDeployed(opts *bind.Watc
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(ERC20VaultBridgedTokenDeployed)
- if err := _ERC20Vault.contract.UnpackLog(event, "BridgedTokenDeployed", log); err != nil {
+ event := new(ERC20VaultBeaconUpgraded)
+ if err := _ERC20Vault.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
return err
}
event.Raw = log
@@ -938,21 +1085,21 @@ func (_ERC20Vault *ERC20VaultFilterer) WatchBridgedTokenDeployed(opts *bind.Watc
}), nil
}
-// ParseBridgedTokenDeployed is a log parse operation binding the contract event 0xb6b427556e8cb0ebf9175da4bc48c64c4f56e44cfaf8c3ab5ebf8e2ea1309079.
+// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event BridgedTokenDeployed(uint256 indexed srcChainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName, uint8 ctokenDecimal)
-func (_ERC20Vault *ERC20VaultFilterer) ParseBridgedTokenDeployed(log types.Log) (*ERC20VaultBridgedTokenDeployed, error) {
- event := new(ERC20VaultBridgedTokenDeployed)
- if err := _ERC20Vault.contract.UnpackLog(event, "BridgedTokenDeployed", log); err != nil {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_ERC20Vault *ERC20VaultFilterer) ParseBeaconUpgraded(log types.Log) (*ERC20VaultBeaconUpgraded, error) {
+ event := new(ERC20VaultBeaconUpgraded)
+ if err := _ERC20Vault.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// ERC20VaultInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the ERC20Vault contract.
-type ERC20VaultInitializedIterator struct {
- Event *ERC20VaultInitialized // Event containing the contract specifics and raw log
+// ERC20VaultBridgedTokenChangedIterator is returned from FilterBridgedTokenChanged and is used to iterate over the raw logs and unpacked data for BridgedTokenChanged events raised by the ERC20Vault contract.
+type ERC20VaultBridgedTokenChangedIterator struct {
+ Event *ERC20VaultBridgedTokenChanged // 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
@@ -966,7 +1113,7 @@ type ERC20VaultInitializedIterator struct {
// 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 *ERC20VaultInitializedIterator) Next() bool {
+func (it *ERC20VaultBridgedTokenChangedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -975,7 +1122,7 @@ func (it *ERC20VaultInitializedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(ERC20VaultInitialized)
+ it.Event = new(ERC20VaultBridgedTokenChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -990,7 +1137,7 @@ func (it *ERC20VaultInitializedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(ERC20VaultInitialized)
+ it.Event = new(ERC20VaultBridgedTokenChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1006,41 +1153,65 @@ func (it *ERC20VaultInitializedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *ERC20VaultInitializedIterator) Error() error {
+func (it *ERC20VaultBridgedTokenChangedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *ERC20VaultInitializedIterator) Close() error {
+func (it *ERC20VaultBridgedTokenChangedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// ERC20VaultInitialized represents a Initialized event raised by the ERC20Vault contract.
-type ERC20VaultInitialized struct {
- Version uint8
- Raw types.Log // Blockchain specific contextual infos
+// ERC20VaultBridgedTokenChanged represents a BridgedTokenChanged event raised by the ERC20Vault contract.
+type ERC20VaultBridgedTokenChanged struct {
+ SrcChainId *big.Int
+ Ctoken common.Address
+ BtokenOld common.Address
+ BtokenNew common.Address
+ CtokenSymbol string
+ CtokenName string
+ CtokenDecimal uint8
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// FilterBridgedTokenChanged is a free log retrieval operation binding the contract event 0x031d68e1805917560c34a5f55a7dd91bef98f911190ed02cdbb53caedae6c39d.
//
-// Solidity: event Initialized(uint8 version)
-func (_ERC20Vault *ERC20VaultFilterer) FilterInitialized(opts *bind.FilterOpts) (*ERC20VaultInitializedIterator, error) {
+// Solidity: event BridgedTokenChanged(uint256 indexed srcChainId, address indexed ctoken, address btokenOld, address btokenNew, string ctokenSymbol, string ctokenName, uint8 ctokenDecimal)
+func (_ERC20Vault *ERC20VaultFilterer) FilterBridgedTokenChanged(opts *bind.FilterOpts, srcChainId []*big.Int, ctoken []common.Address) (*ERC20VaultBridgedTokenChangedIterator, error) {
- logs, sub, err := _ERC20Vault.contract.FilterLogs(opts, "Initialized")
+ var srcChainIdRule []interface{}
+ for _, srcChainIdItem := range srcChainId {
+ srcChainIdRule = append(srcChainIdRule, srcChainIdItem)
+ }
+ var ctokenRule []interface{}
+ for _, ctokenItem := range ctoken {
+ ctokenRule = append(ctokenRule, ctokenItem)
+ }
+
+ logs, sub, err := _ERC20Vault.contract.FilterLogs(opts, "BridgedTokenChanged", srcChainIdRule, ctokenRule)
if err != nil {
return nil, err
}
- return &ERC20VaultInitializedIterator{contract: _ERC20Vault.contract, event: "Initialized", logs: logs, sub: sub}, nil
+ return &ERC20VaultBridgedTokenChangedIterator{contract: _ERC20Vault.contract, event: "BridgedTokenChanged", logs: logs, sub: sub}, nil
}
-// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// WatchBridgedTokenChanged is a free log subscription operation binding the contract event 0x031d68e1805917560c34a5f55a7dd91bef98f911190ed02cdbb53caedae6c39d.
//
-// Solidity: event Initialized(uint8 version)
-func (_ERC20Vault *ERC20VaultFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ERC20VaultInitialized) (event.Subscription, error) {
+// Solidity: event BridgedTokenChanged(uint256 indexed srcChainId, address indexed ctoken, address btokenOld, address btokenNew, string ctokenSymbol, string ctokenName, uint8 ctokenDecimal)
+func (_ERC20Vault *ERC20VaultFilterer) WatchBridgedTokenChanged(opts *bind.WatchOpts, sink chan<- *ERC20VaultBridgedTokenChanged, srcChainId []*big.Int, ctoken []common.Address) (event.Subscription, error) {
- logs, sub, err := _ERC20Vault.contract.WatchLogs(opts, "Initialized")
+ var srcChainIdRule []interface{}
+ for _, srcChainIdItem := range srcChainId {
+ srcChainIdRule = append(srcChainIdRule, srcChainIdItem)
+ }
+ var ctokenRule []interface{}
+ for _, ctokenItem := range ctoken {
+ ctokenRule = append(ctokenRule, ctokenItem)
+ }
+
+ logs, sub, err := _ERC20Vault.contract.WatchLogs(opts, "BridgedTokenChanged", srcChainIdRule, ctokenRule)
if err != nil {
return nil, err
}
@@ -1050,8 +1221,8 @@ func (_ERC20Vault *ERC20VaultFilterer) WatchInitialized(opts *bind.WatchOpts, si
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(ERC20VaultInitialized)
- if err := _ERC20Vault.contract.UnpackLog(event, "Initialized", log); err != nil {
+ event := new(ERC20VaultBridgedTokenChanged)
+ if err := _ERC20Vault.contract.UnpackLog(event, "BridgedTokenChanged", log); err != nil {
return err
}
event.Raw = log
@@ -1072,21 +1243,21 @@ func (_ERC20Vault *ERC20VaultFilterer) WatchInitialized(opts *bind.WatchOpts, si
}), nil
}
-// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// ParseBridgedTokenChanged is a log parse operation binding the contract event 0x031d68e1805917560c34a5f55a7dd91bef98f911190ed02cdbb53caedae6c39d.
//
-// Solidity: event Initialized(uint8 version)
-func (_ERC20Vault *ERC20VaultFilterer) ParseInitialized(log types.Log) (*ERC20VaultInitialized, error) {
- event := new(ERC20VaultInitialized)
- if err := _ERC20Vault.contract.UnpackLog(event, "Initialized", log); err != nil {
+// Solidity: event BridgedTokenChanged(uint256 indexed srcChainId, address indexed ctoken, address btokenOld, address btokenNew, string ctokenSymbol, string ctokenName, uint8 ctokenDecimal)
+func (_ERC20Vault *ERC20VaultFilterer) ParseBridgedTokenChanged(log types.Log) (*ERC20VaultBridgedTokenChanged, error) {
+ event := new(ERC20VaultBridgedTokenChanged)
+ if err := _ERC20Vault.contract.UnpackLog(event, "BridgedTokenChanged", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// ERC20VaultOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ERC20Vault contract.
-type ERC20VaultOwnershipTransferredIterator struct {
- Event *ERC20VaultOwnershipTransferred // Event containing the contract specifics and raw log
+// ERC20VaultBridgedTokenDeployedIterator is returned from FilterBridgedTokenDeployed and is used to iterate over the raw logs and unpacked data for BridgedTokenDeployed events raised by the ERC20Vault contract.
+type ERC20VaultBridgedTokenDeployedIterator struct {
+ Event *ERC20VaultBridgedTokenDeployed // 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
@@ -1100,7 +1271,7 @@ type ERC20VaultOwnershipTransferredIterator struct {
// 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 *ERC20VaultOwnershipTransferredIterator) Next() bool {
+func (it *ERC20VaultBridgedTokenDeployedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1109,7 +1280,7 @@ func (it *ERC20VaultOwnershipTransferredIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(ERC20VaultOwnershipTransferred)
+ it.Event = new(ERC20VaultBridgedTokenDeployed)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1124,7 +1295,7 @@ func (it *ERC20VaultOwnershipTransferredIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(ERC20VaultOwnershipTransferred)
+ it.Event = new(ERC20VaultBridgedTokenDeployed)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1140,28 +1311,327 @@ func (it *ERC20VaultOwnershipTransferredIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *ERC20VaultOwnershipTransferredIterator) Error() error {
+func (it *ERC20VaultBridgedTokenDeployedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *ERC20VaultOwnershipTransferredIterator) Close() error {
+func (it *ERC20VaultBridgedTokenDeployedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// ERC20VaultOwnershipTransferred represents a OwnershipTransferred event raised by the ERC20Vault contract.
-type ERC20VaultOwnershipTransferred struct {
- PreviousOwner common.Address
- NewOwner common.Address
+// ERC20VaultBridgedTokenDeployed represents a BridgedTokenDeployed event raised by the ERC20Vault contract.
+type ERC20VaultBridgedTokenDeployed struct {
+ SrcChainId *big.Int
+ Ctoken common.Address
+ Btoken common.Address
+ CtokenSymbol string
+ CtokenName string
+ CtokenDecimal uint8
Raw types.Log // Blockchain specific contextual infos
}
-// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// FilterBridgedTokenDeployed is a free log retrieval operation binding the contract event 0xb6b427556e8cb0ebf9175da4bc48c64c4f56e44cfaf8c3ab5ebf8e2ea1309079.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_ERC20Vault *ERC20VaultFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ERC20VaultOwnershipTransferredIterator, error) {
+// Solidity: event BridgedTokenDeployed(uint256 indexed srcChainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName, uint8 ctokenDecimal)
+func (_ERC20Vault *ERC20VaultFilterer) FilterBridgedTokenDeployed(opts *bind.FilterOpts, srcChainId []*big.Int, ctoken []common.Address, btoken []common.Address) (*ERC20VaultBridgedTokenDeployedIterator, error) {
+
+ var srcChainIdRule []interface{}
+ for _, srcChainIdItem := range srcChainId {
+ srcChainIdRule = append(srcChainIdRule, srcChainIdItem)
+ }
+ var ctokenRule []interface{}
+ for _, ctokenItem := range ctoken {
+ ctokenRule = append(ctokenRule, ctokenItem)
+ }
+ var btokenRule []interface{}
+ for _, btokenItem := range btoken {
+ btokenRule = append(btokenRule, btokenItem)
+ }
+
+ logs, sub, err := _ERC20Vault.contract.FilterLogs(opts, "BridgedTokenDeployed", srcChainIdRule, ctokenRule, btokenRule)
+ if err != nil {
+ return nil, err
+ }
+ return &ERC20VaultBridgedTokenDeployedIterator{contract: _ERC20Vault.contract, event: "BridgedTokenDeployed", logs: logs, sub: sub}, nil
+}
+
+// WatchBridgedTokenDeployed is a free log subscription operation binding the contract event 0xb6b427556e8cb0ebf9175da4bc48c64c4f56e44cfaf8c3ab5ebf8e2ea1309079.
+//
+// Solidity: event BridgedTokenDeployed(uint256 indexed srcChainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName, uint8 ctokenDecimal)
+func (_ERC20Vault *ERC20VaultFilterer) WatchBridgedTokenDeployed(opts *bind.WatchOpts, sink chan<- *ERC20VaultBridgedTokenDeployed, srcChainId []*big.Int, ctoken []common.Address, btoken []common.Address) (event.Subscription, error) {
+
+ var srcChainIdRule []interface{}
+ for _, srcChainIdItem := range srcChainId {
+ srcChainIdRule = append(srcChainIdRule, srcChainIdItem)
+ }
+ var ctokenRule []interface{}
+ for _, ctokenItem := range ctoken {
+ ctokenRule = append(ctokenRule, ctokenItem)
+ }
+ var btokenRule []interface{}
+ for _, btokenItem := range btoken {
+ btokenRule = append(btokenRule, btokenItem)
+ }
+
+ logs, sub, err := _ERC20Vault.contract.WatchLogs(opts, "BridgedTokenDeployed", srcChainIdRule, ctokenRule, btokenRule)
+ 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(ERC20VaultBridgedTokenDeployed)
+ if err := _ERC20Vault.contract.UnpackLog(event, "BridgedTokenDeployed", 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
+}
+
+// ParseBridgedTokenDeployed is a log parse operation binding the contract event 0xb6b427556e8cb0ebf9175da4bc48c64c4f56e44cfaf8c3ab5ebf8e2ea1309079.
+//
+// Solidity: event BridgedTokenDeployed(uint256 indexed srcChainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName, uint8 ctokenDecimal)
+func (_ERC20Vault *ERC20VaultFilterer) ParseBridgedTokenDeployed(log types.Log) (*ERC20VaultBridgedTokenDeployed, error) {
+ event := new(ERC20VaultBridgedTokenDeployed)
+ if err := _ERC20Vault.contract.UnpackLog(event, "BridgedTokenDeployed", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// ERC20VaultInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the ERC20Vault contract.
+type ERC20VaultInitializedIterator struct {
+ Event *ERC20VaultInitialized // 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 *ERC20VaultInitializedIterator) 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(ERC20VaultInitialized)
+ 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(ERC20VaultInitialized)
+ 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 *ERC20VaultInitializedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *ERC20VaultInitializedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// ERC20VaultInitialized represents a Initialized event raised by the ERC20Vault contract.
+type ERC20VaultInitialized 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 (_ERC20Vault *ERC20VaultFilterer) FilterInitialized(opts *bind.FilterOpts) (*ERC20VaultInitializedIterator, error) {
+
+ logs, sub, err := _ERC20Vault.contract.FilterLogs(opts, "Initialized")
+ if err != nil {
+ return nil, err
+ }
+ return &ERC20VaultInitializedIterator{contract: _ERC20Vault.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 (_ERC20Vault *ERC20VaultFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ERC20VaultInitialized) (event.Subscription, error) {
+
+ logs, sub, err := _ERC20Vault.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(ERC20VaultInitialized)
+ if err := _ERC20Vault.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 (_ERC20Vault *ERC20VaultFilterer) ParseInitialized(log types.Log) (*ERC20VaultInitialized, error) {
+ event := new(ERC20VaultInitialized)
+ if err := _ERC20Vault.contract.UnpackLog(event, "Initialized", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// ERC20VaultOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the ERC20Vault contract.
+type ERC20VaultOwnershipTransferredIterator struct {
+ Event *ERC20VaultOwnershipTransferred // 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 *ERC20VaultOwnershipTransferredIterator) 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(ERC20VaultOwnershipTransferred)
+ 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(ERC20VaultOwnershipTransferred)
+ 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 *ERC20VaultOwnershipTransferredIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *ERC20VaultOwnershipTransferredIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// ERC20VaultOwnershipTransferred represents a OwnershipTransferred event raised by the ERC20Vault contract.
+type ERC20VaultOwnershipTransferred 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 (_ERC20Vault *ERC20VaultFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*ERC20VaultOwnershipTransferredIterator, error) {
var previousOwnerRule []interface{}
for _, previousOwnerItem := range previousOwner {
@@ -1172,28 +1642,162 @@ func (_ERC20Vault *ERC20VaultFilterer) FilterOwnershipTransferred(opts *bind.Fil
newOwnerRule = append(newOwnerRule, newOwnerItem)
}
- logs, sub, err := _ERC20Vault.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+ logs, sub, err := _ERC20Vault.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+ if err != nil {
+ return nil, err
+ }
+ return &ERC20VaultOwnershipTransferredIterator{contract: _ERC20Vault.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 (_ERC20Vault *ERC20VaultFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ERC20VaultOwnershipTransferred, 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 := _ERC20Vault.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(ERC20VaultOwnershipTransferred)
+ if err := _ERC20Vault.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 (_ERC20Vault *ERC20VaultFilterer) ParseOwnershipTransferred(log types.Log) (*ERC20VaultOwnershipTransferred, error) {
+ event := new(ERC20VaultOwnershipTransferred)
+ if err := _ERC20Vault.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// ERC20VaultPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the ERC20Vault contract.
+type ERC20VaultPausedIterator struct {
+ Event *ERC20VaultPaused // 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 *ERC20VaultPausedIterator) 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(ERC20VaultPaused)
+ 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(ERC20VaultPaused)
+ 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 *ERC20VaultPausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *ERC20VaultPausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// ERC20VaultPaused represents a Paused event raised by the ERC20Vault contract.
+type ERC20VaultPaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_ERC20Vault *ERC20VaultFilterer) FilterPaused(opts *bind.FilterOpts) (*ERC20VaultPausedIterator, error) {
+
+ logs, sub, err := _ERC20Vault.contract.FilterLogs(opts, "Paused")
if err != nil {
return nil, err
}
- return &ERC20VaultOwnershipTransferredIterator{contract: _ERC20Vault.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
+ return &ERC20VaultPausedIterator{contract: _ERC20Vault.contract, event: "Paused", logs: logs, sub: sub}, nil
}
-// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_ERC20Vault *ERC20VaultFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *ERC20VaultOwnershipTransferred, 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)
- }
+// Solidity: event Paused(address account)
+func (_ERC20Vault *ERC20VaultFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *ERC20VaultPaused) (event.Subscription, error) {
- logs, sub, err := _ERC20Vault.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+ logs, sub, err := _ERC20Vault.contract.WatchLogs(opts, "Paused")
if err != nil {
return nil, err
}
@@ -1203,8 +1807,8 @@ func (_ERC20Vault *ERC20VaultFilterer) WatchOwnershipTransferred(opts *bind.Watc
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(ERC20VaultOwnershipTransferred)
- if err := _ERC20Vault.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+ event := new(ERC20VaultPaused)
+ if err := _ERC20Vault.contract.UnpackLog(event, "Paused", log); err != nil {
return err
}
event.Raw = log
@@ -1225,12 +1829,12 @@ func (_ERC20Vault *ERC20VaultFilterer) WatchOwnershipTransferred(opts *bind.Watc
}), nil
}
-// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_ERC20Vault *ERC20VaultFilterer) ParseOwnershipTransferred(log types.Log) (*ERC20VaultOwnershipTransferred, error) {
- event := new(ERC20VaultOwnershipTransferred)
- if err := _ERC20Vault.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+// Solidity: event Paused(address account)
+func (_ERC20Vault *ERC20VaultFilterer) ParsePaused(log types.Log) (*ERC20VaultPaused, error) {
+ event := new(ERC20VaultPaused)
+ if err := _ERC20Vault.contract.UnpackLog(event, "Paused", log); err != nil {
return nil, err
}
event.Raw = log
@@ -1309,15 +1913,15 @@ type ERC20VaultTokenReceived struct {
MsgHash [32]byte
From common.Address
To common.Address
- SrcChainId *big.Int
+ SrcChainId uint64
Token common.Address
Amount *big.Int
Raw types.Log // Blockchain specific contextual infos
}
-// FilterTokenReceived is a free log retrieval operation binding the contract event 0x883b72735ca0ee2cdd2a462a393658b1a0b36ebd8756e4c22b7509a92ff86a02.
+// FilterTokenReceived is a free log retrieval operation binding the contract event 0xc8d296a7a3ffa2fb1e316d8c6cbaf5f7ea5e12f11abd76e61f47d2dfa12bb467.
//
-// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 srcChainId, address token, uint256 amount)
+// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 srcChainId, address token, uint256 amount)
func (_ERC20Vault *ERC20VaultFilterer) FilterTokenReceived(opts *bind.FilterOpts, msgHash [][32]byte, from []common.Address, to []common.Address) (*ERC20VaultTokenReceivedIterator, error) {
var msgHashRule []interface{}
@@ -1340,9 +1944,9 @@ func (_ERC20Vault *ERC20VaultFilterer) FilterTokenReceived(opts *bind.FilterOpts
return &ERC20VaultTokenReceivedIterator{contract: _ERC20Vault.contract, event: "TokenReceived", logs: logs, sub: sub}, nil
}
-// WatchTokenReceived is a free log subscription operation binding the contract event 0x883b72735ca0ee2cdd2a462a393658b1a0b36ebd8756e4c22b7509a92ff86a02.
+// WatchTokenReceived is a free log subscription operation binding the contract event 0xc8d296a7a3ffa2fb1e316d8c6cbaf5f7ea5e12f11abd76e61f47d2dfa12bb467.
//
-// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 srcChainId, address token, uint256 amount)
+// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 srcChainId, address token, uint256 amount)
func (_ERC20Vault *ERC20VaultFilterer) WatchTokenReceived(opts *bind.WatchOpts, sink chan<- *ERC20VaultTokenReceived, msgHash [][32]byte, from []common.Address, to []common.Address) (event.Subscription, error) {
var msgHashRule []interface{}
@@ -1390,9 +1994,9 @@ func (_ERC20Vault *ERC20VaultFilterer) WatchTokenReceived(opts *bind.WatchOpts,
}), nil
}
-// ParseTokenReceived is a log parse operation binding the contract event 0x883b72735ca0ee2cdd2a462a393658b1a0b36ebd8756e4c22b7509a92ff86a02.
+// ParseTokenReceived is a log parse operation binding the contract event 0xc8d296a7a3ffa2fb1e316d8c6cbaf5f7ea5e12f11abd76e61f47d2dfa12bb467.
//
-// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 srcChainId, address token, uint256 amount)
+// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 srcChainId, address token, uint256 amount)
func (_ERC20Vault *ERC20VaultFilterer) ParseTokenReceived(log types.Log) (*ERC20VaultTokenReceived, error) {
event := new(ERC20VaultTokenReceived)
if err := _ERC20Vault.contract.UnpackLog(event, "TokenReceived", log); err != nil {
@@ -1629,15 +2233,15 @@ type ERC20VaultTokenSent struct {
MsgHash [32]byte
From common.Address
To common.Address
- DestChainId *big.Int
+ DestChainId uint64
Token common.Address
Amount *big.Int
Raw types.Log // Blockchain specific contextual infos
}
-// FilterTokenSent is a free log retrieval operation binding the contract event 0x91462591aed3d13dcadac8ed73fdc175ec6e79b798ca205822e7ec33dc019e88.
+// FilterTokenSent is a free log retrieval operation binding the contract event 0xd2934b7e737b6465ee52ffdc702435c483343c4354cafc7f296e05e890358e48.
//
-// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 destChainId, address token, uint256 amount)
+// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 destChainId, address token, uint256 amount)
func (_ERC20Vault *ERC20VaultFilterer) FilterTokenSent(opts *bind.FilterOpts, msgHash [][32]byte, from []common.Address, to []common.Address) (*ERC20VaultTokenSentIterator, error) {
var msgHashRule []interface{}
@@ -1660,9 +2264,9 @@ func (_ERC20Vault *ERC20VaultFilterer) FilterTokenSent(opts *bind.FilterOpts, ms
return &ERC20VaultTokenSentIterator{contract: _ERC20Vault.contract, event: "TokenSent", logs: logs, sub: sub}, nil
}
-// WatchTokenSent is a free log subscription operation binding the contract event 0x91462591aed3d13dcadac8ed73fdc175ec6e79b798ca205822e7ec33dc019e88.
+// WatchTokenSent is a free log subscription operation binding the contract event 0xd2934b7e737b6465ee52ffdc702435c483343c4354cafc7f296e05e890358e48.
//
-// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 destChainId, address token, uint256 amount)
+// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 destChainId, address token, uint256 amount)
func (_ERC20Vault *ERC20VaultFilterer) WatchTokenSent(opts *bind.WatchOpts, sink chan<- *ERC20VaultTokenSent, msgHash [][32]byte, from []common.Address, to []common.Address) (event.Subscription, error) {
var msgHashRule []interface{}
@@ -1710,9 +2314,9 @@ func (_ERC20Vault *ERC20VaultFilterer) WatchTokenSent(opts *bind.WatchOpts, sink
}), nil
}
-// ParseTokenSent is a log parse operation binding the contract event 0x91462591aed3d13dcadac8ed73fdc175ec6e79b798ca205822e7ec33dc019e88.
+// ParseTokenSent is a log parse operation binding the contract event 0xd2934b7e737b6465ee52ffdc702435c483343c4354cafc7f296e05e890358e48.
//
-// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 destChainId, address token, uint256 amount)
+// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 destChainId, address token, uint256 amount)
func (_ERC20Vault *ERC20VaultFilterer) ParseTokenSent(log types.Log) (*ERC20VaultTokenSent, error) {
event := new(ERC20VaultTokenSent)
if err := _ERC20Vault.contract.UnpackLog(event, "TokenSent", log); err != nil {
@@ -1721,3 +2325,281 @@ func (_ERC20Vault *ERC20VaultFilterer) ParseTokenSent(log types.Log) (*ERC20Vaul
event.Raw = log
return event, nil
}
+
+// ERC20VaultUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the ERC20Vault contract.
+type ERC20VaultUnpausedIterator struct {
+ Event *ERC20VaultUnpaused // 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 *ERC20VaultUnpausedIterator) 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(ERC20VaultUnpaused)
+ 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(ERC20VaultUnpaused)
+ 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 *ERC20VaultUnpausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *ERC20VaultUnpausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// ERC20VaultUnpaused represents a Unpaused event raised by the ERC20Vault contract.
+type ERC20VaultUnpaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_ERC20Vault *ERC20VaultFilterer) FilterUnpaused(opts *bind.FilterOpts) (*ERC20VaultUnpausedIterator, error) {
+
+ logs, sub, err := _ERC20Vault.contract.FilterLogs(opts, "Unpaused")
+ if err != nil {
+ return nil, err
+ }
+ return &ERC20VaultUnpausedIterator{contract: _ERC20Vault.contract, event: "Unpaused", logs: logs, sub: sub}, nil
+}
+
+// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_ERC20Vault *ERC20VaultFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *ERC20VaultUnpaused) (event.Subscription, error) {
+
+ logs, sub, err := _ERC20Vault.contract.WatchLogs(opts, "Unpaused")
+ 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(ERC20VaultUnpaused)
+ if err := _ERC20Vault.contract.UnpackLog(event, "Unpaused", 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
+}
+
+// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_ERC20Vault *ERC20VaultFilterer) ParseUnpaused(log types.Log) (*ERC20VaultUnpaused, error) {
+ event := new(ERC20VaultUnpaused)
+ if err := _ERC20Vault.contract.UnpackLog(event, "Unpaused", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// ERC20VaultUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the ERC20Vault contract.
+type ERC20VaultUpgradedIterator struct {
+ Event *ERC20VaultUpgraded // 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 *ERC20VaultUpgradedIterator) 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(ERC20VaultUpgraded)
+ 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(ERC20VaultUpgraded)
+ 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 *ERC20VaultUpgradedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *ERC20VaultUpgradedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// ERC20VaultUpgraded represents a Upgraded event raised by the ERC20Vault contract.
+type ERC20VaultUpgraded struct {
+ Implementation common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_ERC20Vault *ERC20VaultFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*ERC20VaultUpgradedIterator, error) {
+
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
+ }
+
+ logs, sub, err := _ERC20Vault.contract.FilterLogs(opts, "Upgraded", implementationRule)
+ if err != nil {
+ return nil, err
+ }
+ return &ERC20VaultUpgradedIterator{contract: _ERC20Vault.contract, event: "Upgraded", logs: logs, sub: sub}, nil
+}
+
+// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_ERC20Vault *ERC20VaultFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *ERC20VaultUpgraded, implementation []common.Address) (event.Subscription, error) {
+
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
+ }
+
+ logs, sub, err := _ERC20Vault.contract.WatchLogs(opts, "Upgraded", implementationRule)
+ 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(ERC20VaultUpgraded)
+ if err := _ERC20Vault.contract.UnpackLog(event, "Upgraded", 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
+}
+
+// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_ERC20Vault *ERC20VaultFilterer) ParseUpgraded(log types.Log) (*ERC20VaultUpgraded, error) {
+ event := new(ERC20VaultUpgraded)
+ if err := _ERC20Vault.contract.UnpackLog(event, "Upgraded", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
diff --git a/packages/relayer/bindings/erc721vault/ERC721Vault.go b/packages/relayer/bindings/erc721vault/ERC721Vault.go
index 1620b734584..94ccb9f5afb 100644
--- a/packages/relayer/bindings/erc721vault/ERC721Vault.go
+++ b/packages/relayer/bindings/erc721vault/ERC721Vault.go
@@ -31,7 +31,7 @@ var (
// BaseNFTVaultBridgeTransferOp is an auto generated low-level Go binding around an user-defined struct.
type BaseNFTVaultBridgeTransferOp struct {
- DestChainId *big.Int
+ DestChainId uint64
To common.Address
Token common.Address
TokenIds []*big.Int
@@ -44,7 +44,7 @@ type BaseNFTVaultBridgeTransferOp struct {
// BaseNFTVaultCanonicalNFT is an auto generated low-level Go binding around an user-defined struct.
type BaseNFTVaultCanonicalNFT struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Symbol string
Name string
@@ -54,9 +54,9 @@ type BaseNFTVaultCanonicalNFT struct {
type IBridgeMessage struct {
Id *big.Int
From common.Address
- SrcChainId *big.Int
- DestChainId *big.Int
- User common.Address
+ SrcChainId uint64
+ DestChainId uint64
+ Owner common.Address
To common.Address
RefundTo common.Address
Value *big.Int
@@ -68,7 +68,7 @@ type IBridgeMessage struct {
// ERC721VaultMetaData contains all meta data concerning the ERC721Vault contract.
var ERC721VaultMetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INTERFACE_NOT_SUPPORTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_AMOUNT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_FROM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_SRC_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_TO\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_USER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_MAX_TOKEN_PER_TXN_EXCEEDED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_MESSAGE_NOT_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_MESSAGE_RELEASED_ALREADY\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_TOKEN_ARRAY_MISMATCH\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"ctoken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"btoken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ctokenSymbol\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ctokenName\",\"type\":\"string\"}],\"name\":\"BridgedTokenDeployed\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"TokenReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"TokenReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"TokenSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ERC1155_INTERFACE_ID\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ERC721_INTERFACE_ID\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgedToCanonical\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"canonicalToBridged\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isBridgedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"}],\"name\":\"onMessageRecalled\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structBaseNFTVault.CanonicalNFT\",\"name\":\"ctoken\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"receiveToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destChainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structBaseNFTVault.BridgeTransferOp\",\"name\":\"opt\",\"type\":\"tuple\"}],\"name\":\"sendToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+ ABI: "[{\"inputs\":[],\"name\":\"ETH_TRANSFER_FAILED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NULL_IMPL_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INTERFACE_NOT_SUPPORTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_AMOUNT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_SRC_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_INVALID_USER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_MAX_TOKEN_PER_TXN_EXCEEDED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_PERMISSION_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"VAULT_TOKEN_ARRAY_MISMATCH\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"ctoken\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"btoken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ctokenSymbol\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"ctokenName\",\"type\":\"string\"}],\"name\":\"BridgedTokenDeployed\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"TokenReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"TokenReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"TokenSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ERC1155_INTERFACE_ID\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ERC721_INTERFACE_ID\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_TOKEN_PER_TXN\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"bridgedToCanonical\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"canonicalToBridged\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"onMessageRecalled\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"internalType\":\"structBaseNFTVault.CanonicalNFT\",\"name\":\"ctoken\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"receiveToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structBaseNFTVault.BridgeTransferOp\",\"name\":\"op\",\"type\":\"tuple\"}],\"name\":\"sendToken\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"id\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"destChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"memo\",\"type\":\"string\"}],\"internalType\":\"structIBridge.Message\",\"name\":\"_message\",\"type\":\"tuple\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]",
}
// ERC721VaultABI is the input ABI used to generate the binding from.
@@ -279,6 +279,37 @@ func (_ERC721Vault *ERC721VaultCallerSession) ERC721INTERFACEID() ([4]byte, erro
return _ERC721Vault.Contract.ERC721INTERFACEID(&_ERC721Vault.CallOpts)
}
+// MAXTOKENPERTXN is a free data retrieval call binding the contract method 0x634da63a.
+//
+// Solidity: function MAX_TOKEN_PER_TXN() view returns(uint256)
+func (_ERC721Vault *ERC721VaultCaller) MAXTOKENPERTXN(opts *bind.CallOpts) (*big.Int, error) {
+ var out []interface{}
+ err := _ERC721Vault.contract.Call(opts, &out, "MAX_TOKEN_PER_TXN")
+
+ if err != nil {
+ return *new(*big.Int), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+
+ return out0, err
+
+}
+
+// MAXTOKENPERTXN is a free data retrieval call binding the contract method 0x634da63a.
+//
+// Solidity: function MAX_TOKEN_PER_TXN() view returns(uint256)
+func (_ERC721Vault *ERC721VaultSession) MAXTOKENPERTXN() (*big.Int, error) {
+ return _ERC721Vault.Contract.MAXTOKENPERTXN(&_ERC721Vault.CallOpts)
+}
+
+// MAXTOKENPERTXN is a free data retrieval call binding the contract method 0x634da63a.
+//
+// Solidity: function MAX_TOKEN_PER_TXN() view returns(uint256)
+func (_ERC721Vault *ERC721VaultCallerSession) MAXTOKENPERTXN() (*big.Int, error) {
+ return _ERC721Vault.Contract.MAXTOKENPERTXN(&_ERC721Vault.CallOpts)
+}
+
// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f.
//
// Solidity: function addressManager() view returns(address)
@@ -312,9 +343,9 @@ func (_ERC721Vault *ERC721VaultCallerSession) AddressManager() (common.Address,
// BridgedToCanonical is a free data retrieval call binding the contract method 0x9aa8605c.
//
-// Solidity: function bridgedToCanonical(address ) view returns(uint256 chainId, address addr, string symbol, string name)
+// Solidity: function bridgedToCanonical(address ) view returns(uint64 chainId, address addr, string symbol, string name)
func (_ERC721Vault *ERC721VaultCaller) BridgedToCanonical(opts *bind.CallOpts, arg0 common.Address) (struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Symbol string
Name string
@@ -323,7 +354,7 @@ func (_ERC721Vault *ERC721VaultCaller) BridgedToCanonical(opts *bind.CallOpts, a
err := _ERC721Vault.contract.Call(opts, &out, "bridgedToCanonical", arg0)
outstruct := new(struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Symbol string
Name string
@@ -332,7 +363,7 @@ func (_ERC721Vault *ERC721VaultCaller) BridgedToCanonical(opts *bind.CallOpts, a
return *outstruct, err
}
- outstruct.ChainId = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+ outstruct.ChainId = *abi.ConvertType(out[0], new(uint64)).(*uint64)
outstruct.Addr = *abi.ConvertType(out[1], new(common.Address)).(*common.Address)
outstruct.Symbol = *abi.ConvertType(out[2], new(string)).(*string)
outstruct.Name = *abi.ConvertType(out[3], new(string)).(*string)
@@ -343,9 +374,9 @@ func (_ERC721Vault *ERC721VaultCaller) BridgedToCanonical(opts *bind.CallOpts, a
// BridgedToCanonical is a free data retrieval call binding the contract method 0x9aa8605c.
//
-// Solidity: function bridgedToCanonical(address ) view returns(uint256 chainId, address addr, string symbol, string name)
+// Solidity: function bridgedToCanonical(address ) view returns(uint64 chainId, address addr, string symbol, string name)
func (_ERC721Vault *ERC721VaultSession) BridgedToCanonical(arg0 common.Address) (struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Symbol string
Name string
@@ -355,9 +386,9 @@ func (_ERC721Vault *ERC721VaultSession) BridgedToCanonical(arg0 common.Address)
// BridgedToCanonical is a free data retrieval call binding the contract method 0x9aa8605c.
//
-// Solidity: function bridgedToCanonical(address ) view returns(uint256 chainId, address addr, string symbol, string name)
+// Solidity: function bridgedToCanonical(address ) view returns(uint64 chainId, address addr, string symbol, string name)
func (_ERC721Vault *ERC721VaultCallerSession) BridgedToCanonical(arg0 common.Address) (struct {
- ChainId *big.Int
+ ChainId uint64
Addr common.Address
Symbol string
Name string
@@ -396,35 +427,35 @@ func (_ERC721Vault *ERC721VaultCallerSession) CanonicalToBridged(arg0 *big.Int,
return _ERC721Vault.Contract.CanonicalToBridged(&_ERC721Vault.CallOpts, arg0, arg1)
}
-// IsBridgedToken is a free data retrieval call binding the contract method 0xc287e578.
+// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
-// Solidity: function isBridgedToken(address ) view returns(bool)
-func (_ERC721Vault *ERC721VaultCaller) IsBridgedToken(opts *bind.CallOpts, arg0 common.Address) (bool, error) {
+// Solidity: function name() pure returns(bytes32)
+func (_ERC721Vault *ERC721VaultCaller) Name(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
- err := _ERC721Vault.contract.Call(opts, &out, "isBridgedToken", arg0)
+ err := _ERC721Vault.contract.Call(opts, &out, "name")
if err != nil {
- return *new(bool), err
+ return *new([32]byte), err
}
- out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
-// IsBridgedToken is a free data retrieval call binding the contract method 0xc287e578.
+// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
-// Solidity: function isBridgedToken(address ) view returns(bool)
-func (_ERC721Vault *ERC721VaultSession) IsBridgedToken(arg0 common.Address) (bool, error) {
- return _ERC721Vault.Contract.IsBridgedToken(&_ERC721Vault.CallOpts, arg0)
+// Solidity: function name() pure returns(bytes32)
+func (_ERC721Vault *ERC721VaultSession) Name() ([32]byte, error) {
+ return _ERC721Vault.Contract.Name(&_ERC721Vault.CallOpts)
}
-// IsBridgedToken is a free data retrieval call binding the contract method 0xc287e578.
+// Name is a free data retrieval call binding the contract method 0x06fdde03.
//
-// Solidity: function isBridgedToken(address ) view returns(bool)
-func (_ERC721Vault *ERC721VaultCallerSession) IsBridgedToken(arg0 common.Address) (bool, error) {
- return _ERC721Vault.Contract.IsBridgedToken(&_ERC721Vault.CallOpts, arg0)
+// Solidity: function name() pure returns(bytes32)
+func (_ERC721Vault *ERC721VaultCallerSession) Name() ([32]byte, error) {
+ return _ERC721Vault.Contract.Name(&_ERC721Vault.CallOpts)
}
// OnERC721Received is a free data retrieval call binding the contract method 0x150b7a02.
@@ -489,10 +520,72 @@ func (_ERC721Vault *ERC721VaultCallerSession) Owner() (common.Address, error) {
return _ERC721Vault.Contract.Owner(&_ERC721Vault.CallOpts)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_ERC721Vault *ERC721VaultCaller) Paused(opts *bind.CallOpts) (bool, error) {
+ var out []interface{}
+ err := _ERC721Vault.contract.Call(opts, &out, "paused")
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_ERC721Vault *ERC721VaultCaller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function paused() view returns(bool)
+func (_ERC721Vault *ERC721VaultSession) Paused() (bool, error) {
+ return _ERC721Vault.Contract.Paused(&_ERC721Vault.CallOpts)
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_ERC721Vault *ERC721VaultCallerSession) Paused() (bool, error) {
+ return _ERC721Vault.Contract.Paused(&_ERC721Vault.CallOpts)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_ERC721Vault *ERC721VaultCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) {
+ var out []interface{}
+ err := _ERC721Vault.contract.Call(opts, &out, "proxiableUUID")
+
+ if err != nil {
+ return *new([32]byte), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+
+ return out0, err
+
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_ERC721Vault *ERC721VaultSession) ProxiableUUID() ([32]byte, error) {
+ return _ERC721Vault.Contract.ProxiableUUID(&_ERC721Vault.CallOpts)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_ERC721Vault *ERC721VaultCallerSession) ProxiableUUID() ([32]byte, error) {
+ return _ERC721Vault.Contract.ProxiableUUID(&_ERC721Vault.CallOpts)
+}
+
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
+//
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_ERC721Vault *ERC721VaultCaller) Resolve(opts *bind.CallOpts, chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
var out []interface{}
err := _ERC721Vault.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress)
@@ -506,17 +599,17 @@ func (_ERC721Vault *ERC721VaultCaller) Resolve(opts *bind.CallOpts, chainId *big
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_ERC721Vault *ERC721VaultSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_ERC721Vault *ERC721VaultSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _ERC721Vault.Contract.Resolve(&_ERC721Vault.CallOpts, chainId, name, allowZeroAddress)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_ERC721Vault *ERC721VaultCallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_ERC721Vault *ERC721VaultCallerSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _ERC721Vault.Contract.Resolve(&_ERC721Vault.CallOpts, chainId, name, allowZeroAddress)
}
@@ -603,44 +696,65 @@ func (_ERC721Vault *ERC721VaultTransactorSession) Init(addressManager common.Add
return _ERC721Vault.Contract.Init(&_ERC721Vault.TransactOpts, addressManager)
}
-// OnMessageRecalled is a paid mutator transaction binding the contract method 0x32a642ca.
+// OnMessageRecalled is a paid mutator transaction binding the contract method 0xc389a180.
+//
+// Solidity: function onMessageRecalled((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes32 msgHash) payable returns()
+func (_ERC721Vault *ERC721VaultTransactor) OnMessageRecalled(opts *bind.TransactOpts, message IBridgeMessage, msgHash [32]byte) (*types.Transaction, error) {
+ return _ERC721Vault.contract.Transact(opts, "onMessageRecalled", message, msgHash)
+}
+
+// OnMessageRecalled is a paid mutator transaction binding the contract method 0xc389a180.
+//
+// Solidity: function onMessageRecalled((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes32 msgHash) payable returns()
+func (_ERC721Vault *ERC721VaultSession) OnMessageRecalled(message IBridgeMessage, msgHash [32]byte) (*types.Transaction, error) {
+ return _ERC721Vault.Contract.OnMessageRecalled(&_ERC721Vault.TransactOpts, message, msgHash)
+}
+
+// OnMessageRecalled is a paid mutator transaction binding the contract method 0xc389a180.
+//
+// Solidity: function onMessageRecalled((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) message, bytes32 msgHash) payable returns()
+func (_ERC721Vault *ERC721VaultTransactorSession) OnMessageRecalled(message IBridgeMessage, msgHash [32]byte) (*types.Transaction, error) {
+ return _ERC721Vault.Contract.OnMessageRecalled(&_ERC721Vault.TransactOpts, message, msgHash)
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
-// Solidity: function onMessageRecalled((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns()
-func (_ERC721Vault *ERC721VaultTransactor) OnMessageRecalled(opts *bind.TransactOpts, message IBridgeMessage) (*types.Transaction, error) {
- return _ERC721Vault.contract.Transact(opts, "onMessageRecalled", message)
+// Solidity: function pause() returns()
+func (_ERC721Vault *ERC721VaultTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _ERC721Vault.contract.Transact(opts, "pause")
}
-// OnMessageRecalled is a paid mutator transaction binding the contract method 0x32a642ca.
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
-// Solidity: function onMessageRecalled((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns()
-func (_ERC721Vault *ERC721VaultSession) OnMessageRecalled(message IBridgeMessage) (*types.Transaction, error) {
- return _ERC721Vault.Contract.OnMessageRecalled(&_ERC721Vault.TransactOpts, message)
+// Solidity: function pause() returns()
+func (_ERC721Vault *ERC721VaultSession) Pause() (*types.Transaction, error) {
+ return _ERC721Vault.Contract.Pause(&_ERC721Vault.TransactOpts)
}
-// OnMessageRecalled is a paid mutator transaction binding the contract method 0x32a642ca.
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
-// Solidity: function onMessageRecalled((uint256,address,uint256,uint256,address,address,address,uint256,uint256,uint256,bytes,string) message) payable returns()
-func (_ERC721Vault *ERC721VaultTransactorSession) OnMessageRecalled(message IBridgeMessage) (*types.Transaction, error) {
- return _ERC721Vault.Contract.OnMessageRecalled(&_ERC721Vault.TransactOpts, message)
+// Solidity: function pause() returns()
+func (_ERC721Vault *ERC721VaultTransactorSession) Pause() (*types.Transaction, error) {
+ return _ERC721Vault.Contract.Pause(&_ERC721Vault.TransactOpts)
}
-// ReceiveToken is a paid mutator transaction binding the contract method 0xa9976baf.
+// ReceiveToken is a paid mutator transaction binding the contract method 0x300536b5.
//
-// Solidity: function receiveToken((uint256,address,string,string) ctoken, address from, address to, uint256[] tokenIds) payable returns()
+// Solidity: function receiveToken((uint64,address,string,string) ctoken, address from, address to, uint256[] tokenIds) payable returns()
func (_ERC721Vault *ERC721VaultTransactor) ReceiveToken(opts *bind.TransactOpts, ctoken BaseNFTVaultCanonicalNFT, from common.Address, to common.Address, tokenIds []*big.Int) (*types.Transaction, error) {
return _ERC721Vault.contract.Transact(opts, "receiveToken", ctoken, from, to, tokenIds)
}
-// ReceiveToken is a paid mutator transaction binding the contract method 0xa9976baf.
+// ReceiveToken is a paid mutator transaction binding the contract method 0x300536b5.
//
-// Solidity: function receiveToken((uint256,address,string,string) ctoken, address from, address to, uint256[] tokenIds) payable returns()
+// Solidity: function receiveToken((uint64,address,string,string) ctoken, address from, address to, uint256[] tokenIds) payable returns()
func (_ERC721Vault *ERC721VaultSession) ReceiveToken(ctoken BaseNFTVaultCanonicalNFT, from common.Address, to common.Address, tokenIds []*big.Int) (*types.Transaction, error) {
return _ERC721Vault.Contract.ReceiveToken(&_ERC721Vault.TransactOpts, ctoken, from, to, tokenIds)
}
-// ReceiveToken is a paid mutator transaction binding the contract method 0xa9976baf.
+// ReceiveToken is a paid mutator transaction binding the contract method 0x300536b5.
//
-// Solidity: function receiveToken((uint256,address,string,string) ctoken, address from, address to, uint256[] tokenIds) payable returns()
+// Solidity: function receiveToken((uint64,address,string,string) ctoken, address from, address to, uint256[] tokenIds) payable returns()
func (_ERC721Vault *ERC721VaultTransactorSession) ReceiveToken(ctoken BaseNFTVaultCanonicalNFT, from common.Address, to common.Address, tokenIds []*big.Int) (*types.Transaction, error) {
return _ERC721Vault.Contract.ReceiveToken(&_ERC721Vault.TransactOpts, ctoken, from, to, tokenIds)
}
@@ -666,46 +780,25 @@ func (_ERC721Vault *ERC721VaultTransactorSession) RenounceOwnership() (*types.Tr
return _ERC721Vault.Contract.RenounceOwnership(&_ERC721Vault.TransactOpts)
}
-// SendToken is a paid mutator transaction binding the contract method 0x73339643.
+// SendToken is a paid mutator transaction binding the contract method 0x48b2772e.
//
-// Solidity: function sendToken((uint256,address,address,uint256[],uint256[],uint256,uint256,address,string) opt) payable returns()
-func (_ERC721Vault *ERC721VaultTransactor) SendToken(opts *bind.TransactOpts, opt BaseNFTVaultBridgeTransferOp) (*types.Transaction, error) {
- return _ERC721Vault.contract.Transact(opts, "sendToken", opt)
+// Solidity: function sendToken((uint64,address,address,uint256[],uint256[],uint256,uint256,address,string) op) payable returns((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
+func (_ERC721Vault *ERC721VaultTransactor) SendToken(opts *bind.TransactOpts, op BaseNFTVaultBridgeTransferOp) (*types.Transaction, error) {
+ return _ERC721Vault.contract.Transact(opts, "sendToken", op)
}
-// SendToken is a paid mutator transaction binding the contract method 0x73339643.
+// SendToken is a paid mutator transaction binding the contract method 0x48b2772e.
//
-// Solidity: function sendToken((uint256,address,address,uint256[],uint256[],uint256,uint256,address,string) opt) payable returns()
-func (_ERC721Vault *ERC721VaultSession) SendToken(opt BaseNFTVaultBridgeTransferOp) (*types.Transaction, error) {
- return _ERC721Vault.Contract.SendToken(&_ERC721Vault.TransactOpts, opt)
+// Solidity: function sendToken((uint64,address,address,uint256[],uint256[],uint256,uint256,address,string) op) payable returns((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
+func (_ERC721Vault *ERC721VaultSession) SendToken(op BaseNFTVaultBridgeTransferOp) (*types.Transaction, error) {
+ return _ERC721Vault.Contract.SendToken(&_ERC721Vault.TransactOpts, op)
}
-// SendToken is a paid mutator transaction binding the contract method 0x73339643.
+// SendToken is a paid mutator transaction binding the contract method 0x48b2772e.
//
-// Solidity: function sendToken((uint256,address,address,uint256[],uint256[],uint256,uint256,address,string) opt) payable returns()
-func (_ERC721Vault *ERC721VaultTransactorSession) SendToken(opt BaseNFTVaultBridgeTransferOp) (*types.Transaction, error) {
- return _ERC721Vault.Contract.SendToken(&_ERC721Vault.TransactOpts, opt)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_ERC721Vault *ERC721VaultTransactor) SetAddressManager(opts *bind.TransactOpts, newAddressManager common.Address) (*types.Transaction, error) {
- return _ERC721Vault.contract.Transact(opts, "setAddressManager", newAddressManager)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_ERC721Vault *ERC721VaultSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _ERC721Vault.Contract.SetAddressManager(&_ERC721Vault.TransactOpts, newAddressManager)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_ERC721Vault *ERC721VaultTransactorSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _ERC721Vault.Contract.SetAddressManager(&_ERC721Vault.TransactOpts, newAddressManager)
+// Solidity: function sendToken((uint64,address,address,uint256[],uint256[],uint256,uint256,address,string) op) payable returns((uint128,address,uint64,uint64,address,address,address,uint256,uint256,uint256,bytes,string) _message)
+func (_ERC721Vault *ERC721VaultTransactorSession) SendToken(op BaseNFTVaultBridgeTransferOp) (*types.Transaction, error) {
+ return _ERC721Vault.Contract.SendToken(&_ERC721Vault.TransactOpts, op)
}
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
@@ -729,9 +822,72 @@ func (_ERC721Vault *ERC721VaultTransactorSession) TransferOwnership(newOwner com
return _ERC721Vault.Contract.TransferOwnership(&_ERC721Vault.TransactOpts, newOwner)
}
-// ERC721VaultAddressManagerChangedIterator is returned from FilterAddressManagerChanged and is used to iterate over the raw logs and unpacked data for AddressManagerChanged events raised by the ERC721Vault contract.
-type ERC721VaultAddressManagerChangedIterator struct {
- Event *ERC721VaultAddressManagerChanged // Event containing the contract specifics and raw log
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_ERC721Vault *ERC721VaultTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _ERC721Vault.contract.Transact(opts, "unpause")
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_ERC721Vault *ERC721VaultSession) Unpause() (*types.Transaction, error) {
+ return _ERC721Vault.Contract.Unpause(&_ERC721Vault.TransactOpts)
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_ERC721Vault *ERC721VaultTransactorSession) Unpause() (*types.Transaction, error) {
+ return _ERC721Vault.Contract.Unpause(&_ERC721Vault.TransactOpts)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_ERC721Vault *ERC721VaultTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) {
+ return _ERC721Vault.contract.Transact(opts, "upgradeTo", newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_ERC721Vault *ERC721VaultSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _ERC721Vault.Contract.UpgradeTo(&_ERC721Vault.TransactOpts, newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_ERC721Vault *ERC721VaultTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _ERC721Vault.Contract.UpgradeTo(&_ERC721Vault.TransactOpts, newImplementation)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_ERC721Vault *ERC721VaultTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _ERC721Vault.contract.Transact(opts, "upgradeToAndCall", newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_ERC721Vault *ERC721VaultSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _ERC721Vault.Contract.UpgradeToAndCall(&_ERC721Vault.TransactOpts, newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_ERC721Vault *ERC721VaultTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _ERC721Vault.Contract.UpgradeToAndCall(&_ERC721Vault.TransactOpts, newImplementation, data)
+}
+
+// ERC721VaultAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the ERC721Vault contract.
+type ERC721VaultAdminChangedIterator struct {
+ Event *ERC721VaultAdminChanged // 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
@@ -745,7 +901,7 @@ type ERC721VaultAddressManagerChangedIterator struct {
// 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 *ERC721VaultAddressManagerChangedIterator) Next() bool {
+func (it *ERC721VaultAdminChangedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -754,7 +910,7 @@ func (it *ERC721VaultAddressManagerChangedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(ERC721VaultAddressManagerChanged)
+ it.Event = new(ERC721VaultAdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -769,7 +925,7 @@ func (it *ERC721VaultAddressManagerChangedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(ERC721VaultAddressManagerChanged)
+ it.Event = new(ERC721VaultAdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -785,51 +941,186 @@ func (it *ERC721VaultAddressManagerChangedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *ERC721VaultAddressManagerChangedIterator) Error() error {
+func (it *ERC721VaultAdminChangedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *ERC721VaultAddressManagerChangedIterator) Close() error {
+func (it *ERC721VaultAdminChangedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// ERC721VaultAddressManagerChanged represents a AddressManagerChanged event raised by the ERC721Vault contract.
-type ERC721VaultAddressManagerChanged struct {
- AddressManager common.Address
- Raw types.Log // Blockchain specific contextual infos
+// ERC721VaultAdminChanged represents a AdminChanged event raised by the ERC721Vault contract.
+type ERC721VaultAdminChanged struct {
+ PreviousAdmin common.Address
+ NewAdmin common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
+//
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_ERC721Vault *ERC721VaultFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*ERC721VaultAdminChangedIterator, error) {
+
+ logs, sub, err := _ERC721Vault.contract.FilterLogs(opts, "AdminChanged")
+ if err != nil {
+ return nil, err
+ }
+ return &ERC721VaultAdminChangedIterator{contract: _ERC721Vault.contract, event: "AdminChanged", logs: logs, sub: sub}, nil
+}
+
+// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
+//
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_ERC721Vault *ERC721VaultFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *ERC721VaultAdminChanged) (event.Subscription, error) {
+
+ logs, sub, err := _ERC721Vault.contract.WatchLogs(opts, "AdminChanged")
+ 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(ERC721VaultAdminChanged)
+ if err := _ERC721Vault.contract.UnpackLog(event, "AdminChanged", 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
+}
+
+// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
+//
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_ERC721Vault *ERC721VaultFilterer) ParseAdminChanged(log types.Log) (*ERC721VaultAdminChanged, error) {
+ event := new(ERC721VaultAdminChanged)
+ if err := _ERC721Vault.contract.UnpackLog(event, "AdminChanged", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// ERC721VaultBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the ERC721Vault contract.
+type ERC721VaultBeaconUpgradedIterator struct {
+ Event *ERC721VaultBeaconUpgraded // 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 *ERC721VaultBeaconUpgradedIterator) 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(ERC721VaultBeaconUpgraded)
+ 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(ERC721VaultBeaconUpgraded)
+ 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 *ERC721VaultBeaconUpgradedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *ERC721VaultBeaconUpgradedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// ERC721VaultBeaconUpgraded represents a BeaconUpgraded event raised by the ERC721Vault contract.
+type ERC721VaultBeaconUpgraded struct {
+ Beacon common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterAddressManagerChanged is a free log retrieval operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_ERC721Vault *ERC721VaultFilterer) FilterAddressManagerChanged(opts *bind.FilterOpts, addressManager []common.Address) (*ERC721VaultAddressManagerChangedIterator, error) {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_ERC721Vault *ERC721VaultFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*ERC721VaultBeaconUpgradedIterator, error) {
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
}
- logs, sub, err := _ERC721Vault.contract.FilterLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _ERC721Vault.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule)
if err != nil {
return nil, err
}
- return &ERC721VaultAddressManagerChangedIterator{contract: _ERC721Vault.contract, event: "AddressManagerChanged", logs: logs, sub: sub}, nil
+ return &ERC721VaultBeaconUpgradedIterator{contract: _ERC721Vault.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil
}
-// WatchAddressManagerChanged is a free log subscription operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_ERC721Vault *ERC721VaultFilterer) WatchAddressManagerChanged(opts *bind.WatchOpts, sink chan<- *ERC721VaultAddressManagerChanged, addressManager []common.Address) (event.Subscription, error) {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_ERC721Vault *ERC721VaultFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *ERC721VaultBeaconUpgraded, beacon []common.Address) (event.Subscription, error) {
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
}
- logs, sub, err := _ERC721Vault.contract.WatchLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _ERC721Vault.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule)
if err != nil {
return nil, err
}
@@ -839,8 +1130,8 @@ func (_ERC721Vault *ERC721VaultFilterer) WatchAddressManagerChanged(opts *bind.W
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(ERC721VaultAddressManagerChanged)
- if err := _ERC721Vault.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+ event := new(ERC721VaultBeaconUpgraded)
+ if err := _ERC721Vault.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
return err
}
event.Raw = log
@@ -861,12 +1152,12 @@ func (_ERC721Vault *ERC721VaultFilterer) WatchAddressManagerChanged(opts *bind.W
}), nil
}
-// ParseAddressManagerChanged is a log parse operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_ERC721Vault *ERC721VaultFilterer) ParseAddressManagerChanged(log types.Log) (*ERC721VaultAddressManagerChanged, error) {
- event := new(ERC721VaultAddressManagerChanged)
- if err := _ERC721Vault.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_ERC721Vault *ERC721VaultFilterer) ParseBeaconUpgraded(log types.Log) (*ERC721VaultBeaconUpgraded, error) {
+ event := new(ERC721VaultBeaconUpgraded)
+ if err := _ERC721Vault.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
return nil, err
}
event.Raw = log
@@ -942,7 +1233,7 @@ func (it *ERC721VaultBridgedTokenDeployedIterator) Close() error {
// ERC721VaultBridgedTokenDeployed represents a BridgedTokenDeployed event raised by the ERC721Vault contract.
type ERC721VaultBridgedTokenDeployed struct {
- ChainId *big.Int
+ ChainId uint64
Ctoken common.Address
Btoken common.Address
CtokenSymbol string
@@ -950,10 +1241,10 @@ type ERC721VaultBridgedTokenDeployed struct {
Raw types.Log // Blockchain specific contextual infos
}
-// FilterBridgedTokenDeployed is a free log retrieval operation binding the contract event 0x2da3c4d305298f6df3653c23d98b4c055f72f7e6f981b2c477ccbec92b1ee579.
+// FilterBridgedTokenDeployed is a free log retrieval operation binding the contract event 0x44977f2d30fe1e3aee2c1476f2f95aaacaf34e44b9359c403da01fcc93fd751b.
//
-// Solidity: event BridgedTokenDeployed(uint256 indexed chainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName)
-func (_ERC721Vault *ERC721VaultFilterer) FilterBridgedTokenDeployed(opts *bind.FilterOpts, chainId []*big.Int, ctoken []common.Address, btoken []common.Address) (*ERC721VaultBridgedTokenDeployedIterator, error) {
+// Solidity: event BridgedTokenDeployed(uint64 indexed chainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName)
+func (_ERC721Vault *ERC721VaultFilterer) FilterBridgedTokenDeployed(opts *bind.FilterOpts, chainId []uint64, ctoken []common.Address, btoken []common.Address) (*ERC721VaultBridgedTokenDeployedIterator, error) {
var chainIdRule []interface{}
for _, chainIdItem := range chainId {
@@ -975,10 +1266,10 @@ func (_ERC721Vault *ERC721VaultFilterer) FilterBridgedTokenDeployed(opts *bind.F
return &ERC721VaultBridgedTokenDeployedIterator{contract: _ERC721Vault.contract, event: "BridgedTokenDeployed", logs: logs, sub: sub}, nil
}
-// WatchBridgedTokenDeployed is a free log subscription operation binding the contract event 0x2da3c4d305298f6df3653c23d98b4c055f72f7e6f981b2c477ccbec92b1ee579.
+// WatchBridgedTokenDeployed is a free log subscription operation binding the contract event 0x44977f2d30fe1e3aee2c1476f2f95aaacaf34e44b9359c403da01fcc93fd751b.
//
-// Solidity: event BridgedTokenDeployed(uint256 indexed chainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName)
-func (_ERC721Vault *ERC721VaultFilterer) WatchBridgedTokenDeployed(opts *bind.WatchOpts, sink chan<- *ERC721VaultBridgedTokenDeployed, chainId []*big.Int, ctoken []common.Address, btoken []common.Address) (event.Subscription, error) {
+// Solidity: event BridgedTokenDeployed(uint64 indexed chainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName)
+func (_ERC721Vault *ERC721VaultFilterer) WatchBridgedTokenDeployed(opts *bind.WatchOpts, sink chan<- *ERC721VaultBridgedTokenDeployed, chainId []uint64, ctoken []common.Address, btoken []common.Address) (event.Subscription, error) {
var chainIdRule []interface{}
for _, chainIdItem := range chainId {
@@ -1025,9 +1316,9 @@ func (_ERC721Vault *ERC721VaultFilterer) WatchBridgedTokenDeployed(opts *bind.Wa
}), nil
}
-// ParseBridgedTokenDeployed is a log parse operation binding the contract event 0x2da3c4d305298f6df3653c23d98b4c055f72f7e6f981b2c477ccbec92b1ee579.
+// ParseBridgedTokenDeployed is a log parse operation binding the contract event 0x44977f2d30fe1e3aee2c1476f2f95aaacaf34e44b9359c403da01fcc93fd751b.
//
-// Solidity: event BridgedTokenDeployed(uint256 indexed chainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName)
+// Solidity: event BridgedTokenDeployed(uint64 indexed chainId, address indexed ctoken, address indexed btoken, string ctokenSymbol, string ctokenName)
func (_ERC721Vault *ERC721VaultFilterer) ParseBridgedTokenDeployed(log types.Log) (*ERC721VaultBridgedTokenDeployed, error) {
event := new(ERC721VaultBridgedTokenDeployed)
if err := _ERC721Vault.contract.UnpackLog(event, "BridgedTokenDeployed", log); err != nil {
@@ -1324,9 +1615,9 @@ func (_ERC721Vault *ERC721VaultFilterer) ParseOwnershipTransferred(log types.Log
return event, nil
}
-// ERC721VaultTokenReceivedIterator is returned from FilterTokenReceived and is used to iterate over the raw logs and unpacked data for TokenReceived events raised by the ERC721Vault contract.
-type ERC721VaultTokenReceivedIterator struct {
- Event *ERC721VaultTokenReceived // Event containing the contract specifics and raw log
+// ERC721VaultPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the ERC721Vault contract.
+type ERC721VaultPausedIterator struct {
+ Event *ERC721VaultPaused // 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
@@ -1340,7 +1631,7 @@ type ERC721VaultTokenReceivedIterator struct {
// 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 *ERC721VaultTokenReceivedIterator) Next() bool {
+func (it *ERC721VaultPausedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1349,7 +1640,7 @@ func (it *ERC721VaultTokenReceivedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(ERC721VaultTokenReceived)
+ it.Event = new(ERC721VaultPaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1364,7 +1655,7 @@ func (it *ERC721VaultTokenReceivedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(ERC721VaultTokenReceived)
+ it.Event = new(ERC721VaultPaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1380,70 +1671,204 @@ func (it *ERC721VaultTokenReceivedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *ERC721VaultTokenReceivedIterator) Error() error {
+func (it *ERC721VaultPausedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *ERC721VaultTokenReceivedIterator) Close() error {
+func (it *ERC721VaultPausedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// ERC721VaultTokenReceived represents a TokenReceived event raised by the ERC721Vault contract.
-type ERC721VaultTokenReceived struct {
- MsgHash [32]byte
- From common.Address
- To common.Address
- SrcChainId *big.Int
- Token common.Address
- TokenIds []*big.Int
- Amounts []*big.Int
- Raw types.Log // Blockchain specific contextual infos
+// ERC721VaultPaused represents a Paused event raised by the ERC721Vault contract.
+type ERC721VaultPaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterTokenReceived is a free log retrieval operation binding the contract event 0x0f60c37489e435ed8490c30b01c1fa57e62510e88b351b75796ad3d95babe6b1.
+// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 srcChainId, address token, uint256[] tokenIds, uint256[] amounts)
-func (_ERC721Vault *ERC721VaultFilterer) FilterTokenReceived(opts *bind.FilterOpts, msgHash [][32]byte, from []common.Address, to []common.Address) (*ERC721VaultTokenReceivedIterator, error) {
-
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
- }
- var fromRule []interface{}
- for _, fromItem := range from {
- fromRule = append(fromRule, fromItem)
- }
- var toRule []interface{}
- for _, toItem := range to {
- toRule = append(toRule, toItem)
- }
+// Solidity: event Paused(address account)
+func (_ERC721Vault *ERC721VaultFilterer) FilterPaused(opts *bind.FilterOpts) (*ERC721VaultPausedIterator, error) {
- logs, sub, err := _ERC721Vault.contract.FilterLogs(opts, "TokenReceived", msgHashRule, fromRule, toRule)
+ logs, sub, err := _ERC721Vault.contract.FilterLogs(opts, "Paused")
if err != nil {
return nil, err
}
- return &ERC721VaultTokenReceivedIterator{contract: _ERC721Vault.contract, event: "TokenReceived", logs: logs, sub: sub}, nil
+ return &ERC721VaultPausedIterator{contract: _ERC721Vault.contract, event: "Paused", logs: logs, sub: sub}, nil
}
-// WatchTokenReceived is a free log subscription operation binding the contract event 0x0f60c37489e435ed8490c30b01c1fa57e62510e88b351b75796ad3d95babe6b1.
+// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
//
-// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 srcChainId, address token, uint256[] tokenIds, uint256[] amounts)
-func (_ERC721Vault *ERC721VaultFilterer) WatchTokenReceived(opts *bind.WatchOpts, sink chan<- *ERC721VaultTokenReceived, msgHash [][32]byte, from []common.Address, to []common.Address) (event.Subscription, error) {
+// Solidity: event Paused(address account)
+func (_ERC721Vault *ERC721VaultFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *ERC721VaultPaused) (event.Subscription, error) {
- var msgHashRule []interface{}
- for _, msgHashItem := range msgHash {
- msgHashRule = append(msgHashRule, msgHashItem)
- }
- var fromRule []interface{}
- for _, fromItem := range from {
- fromRule = append(fromRule, fromItem)
- }
- var toRule []interface{}
- for _, toItem := range to {
- toRule = append(toRule, toItem)
+ logs, sub, err := _ERC721Vault.contract.WatchLogs(opts, "Paused")
+ 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(ERC721VaultPaused)
+ if err := _ERC721Vault.contract.UnpackLog(event, "Paused", 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
+}
+
+// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_ERC721Vault *ERC721VaultFilterer) ParsePaused(log types.Log) (*ERC721VaultPaused, error) {
+ event := new(ERC721VaultPaused)
+ if err := _ERC721Vault.contract.UnpackLog(event, "Paused", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// ERC721VaultTokenReceivedIterator is returned from FilterTokenReceived and is used to iterate over the raw logs and unpacked data for TokenReceived events raised by the ERC721Vault contract.
+type ERC721VaultTokenReceivedIterator struct {
+ Event *ERC721VaultTokenReceived // 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 *ERC721VaultTokenReceivedIterator) 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(ERC721VaultTokenReceived)
+ 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(ERC721VaultTokenReceived)
+ 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 *ERC721VaultTokenReceivedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *ERC721VaultTokenReceivedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// ERC721VaultTokenReceived represents a TokenReceived event raised by the ERC721Vault contract.
+type ERC721VaultTokenReceived struct {
+ MsgHash [32]byte
+ From common.Address
+ To common.Address
+ SrcChainId uint64
+ Token common.Address
+ TokenIds []*big.Int
+ Amounts []*big.Int
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterTokenReceived is a free log retrieval operation binding the contract event 0x8a4d138c7a19e12f6cdedfca02085820b0b1f5a9655c7a8b784f1d534347f247.
+//
+// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 srcChainId, address token, uint256[] tokenIds, uint256[] amounts)
+func (_ERC721Vault *ERC721VaultFilterer) FilterTokenReceived(opts *bind.FilterOpts, msgHash [][32]byte, from []common.Address, to []common.Address) (*ERC721VaultTokenReceivedIterator, error) {
+
+ var msgHashRule []interface{}
+ for _, msgHashItem := range msgHash {
+ msgHashRule = append(msgHashRule, msgHashItem)
+ }
+ var fromRule []interface{}
+ for _, fromItem := range from {
+ fromRule = append(fromRule, fromItem)
+ }
+ var toRule []interface{}
+ for _, toItem := range to {
+ toRule = append(toRule, toItem)
+ }
+
+ logs, sub, err := _ERC721Vault.contract.FilterLogs(opts, "TokenReceived", msgHashRule, fromRule, toRule)
+ if err != nil {
+ return nil, err
+ }
+ return &ERC721VaultTokenReceivedIterator{contract: _ERC721Vault.contract, event: "TokenReceived", logs: logs, sub: sub}, nil
+}
+
+// WatchTokenReceived is a free log subscription operation binding the contract event 0x8a4d138c7a19e12f6cdedfca02085820b0b1f5a9655c7a8b784f1d534347f247.
+//
+// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 srcChainId, address token, uint256[] tokenIds, uint256[] amounts)
+func (_ERC721Vault *ERC721VaultFilterer) WatchTokenReceived(opts *bind.WatchOpts, sink chan<- *ERC721VaultTokenReceived, msgHash [][32]byte, from []common.Address, to []common.Address) (event.Subscription, error) {
+
+ var msgHashRule []interface{}
+ for _, msgHashItem := range msgHash {
+ msgHashRule = append(msgHashRule, msgHashItem)
+ }
+ var fromRule []interface{}
+ for _, fromItem := range from {
+ fromRule = append(fromRule, fromItem)
+ }
+ var toRule []interface{}
+ for _, toItem := range to {
+ toRule = append(toRule, toItem)
}
logs, sub, err := _ERC721Vault.contract.WatchLogs(opts, "TokenReceived", msgHashRule, fromRule, toRule)
@@ -1478,9 +1903,9 @@ func (_ERC721Vault *ERC721VaultFilterer) WatchTokenReceived(opts *bind.WatchOpts
}), nil
}
-// ParseTokenReceived is a log parse operation binding the contract event 0x0f60c37489e435ed8490c30b01c1fa57e62510e88b351b75796ad3d95babe6b1.
+// ParseTokenReceived is a log parse operation binding the contract event 0x8a4d138c7a19e12f6cdedfca02085820b0b1f5a9655c7a8b784f1d534347f247.
//
-// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 srcChainId, address token, uint256[] tokenIds, uint256[] amounts)
+// Solidity: event TokenReceived(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 srcChainId, address token, uint256[] tokenIds, uint256[] amounts)
func (_ERC721Vault *ERC721VaultFilterer) ParseTokenReceived(log types.Log) (*ERC721VaultTokenReceived, error) {
event := new(ERC721VaultTokenReceived)
if err := _ERC721Vault.contract.UnpackLog(event, "TokenReceived", log); err != nil {
@@ -1718,16 +2143,16 @@ type ERC721VaultTokenSent struct {
MsgHash [32]byte
From common.Address
To common.Address
- DestChainId *big.Int
+ DestChainId uint64
Token common.Address
TokenIds []*big.Int
Amounts []*big.Int
Raw types.Log // Blockchain specific contextual infos
}
-// FilterTokenSent is a free log retrieval operation binding the contract event 0x5e54276405062454e6226625b28a6fea0a838d6b054e38955667234afb3345a3.
+// FilterTokenSent is a free log retrieval operation binding the contract event 0x329b657c35d4e2dfede6ef5132869accb1f8542912a40f9a854b4a917ffae2e9.
//
-// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 destChainId, address token, uint256[] tokenIds, uint256[] amounts)
+// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 destChainId, address token, uint256[] tokenIds, uint256[] amounts)
func (_ERC721Vault *ERC721VaultFilterer) FilterTokenSent(opts *bind.FilterOpts, msgHash [][32]byte, from []common.Address, to []common.Address) (*ERC721VaultTokenSentIterator, error) {
var msgHashRule []interface{}
@@ -1750,9 +2175,9 @@ func (_ERC721Vault *ERC721VaultFilterer) FilterTokenSent(opts *bind.FilterOpts,
return &ERC721VaultTokenSentIterator{contract: _ERC721Vault.contract, event: "TokenSent", logs: logs, sub: sub}, nil
}
-// WatchTokenSent is a free log subscription operation binding the contract event 0x5e54276405062454e6226625b28a6fea0a838d6b054e38955667234afb3345a3.
+// WatchTokenSent is a free log subscription operation binding the contract event 0x329b657c35d4e2dfede6ef5132869accb1f8542912a40f9a854b4a917ffae2e9.
//
-// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 destChainId, address token, uint256[] tokenIds, uint256[] amounts)
+// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 destChainId, address token, uint256[] tokenIds, uint256[] amounts)
func (_ERC721Vault *ERC721VaultFilterer) WatchTokenSent(opts *bind.WatchOpts, sink chan<- *ERC721VaultTokenSent, msgHash [][32]byte, from []common.Address, to []common.Address) (event.Subscription, error) {
var msgHashRule []interface{}
@@ -1800,9 +2225,9 @@ func (_ERC721Vault *ERC721VaultFilterer) WatchTokenSent(opts *bind.WatchOpts, si
}), nil
}
-// ParseTokenSent is a log parse operation binding the contract event 0x5e54276405062454e6226625b28a6fea0a838d6b054e38955667234afb3345a3.
+// ParseTokenSent is a log parse operation binding the contract event 0x329b657c35d4e2dfede6ef5132869accb1f8542912a40f9a854b4a917ffae2e9.
//
-// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint256 destChainId, address token, uint256[] tokenIds, uint256[] amounts)
+// Solidity: event TokenSent(bytes32 indexed msgHash, address indexed from, address indexed to, uint64 destChainId, address token, uint256[] tokenIds, uint256[] amounts)
func (_ERC721Vault *ERC721VaultFilterer) ParseTokenSent(log types.Log) (*ERC721VaultTokenSent, error) {
event := new(ERC721VaultTokenSent)
if err := _ERC721Vault.contract.UnpackLog(event, "TokenSent", log); err != nil {
@@ -1811,3 +2236,281 @@ func (_ERC721Vault *ERC721VaultFilterer) ParseTokenSent(log types.Log) (*ERC721V
event.Raw = log
return event, nil
}
+
+// ERC721VaultUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the ERC721Vault contract.
+type ERC721VaultUnpausedIterator struct {
+ Event *ERC721VaultUnpaused // 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 *ERC721VaultUnpausedIterator) 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(ERC721VaultUnpaused)
+ 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(ERC721VaultUnpaused)
+ 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 *ERC721VaultUnpausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *ERC721VaultUnpausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// ERC721VaultUnpaused represents a Unpaused event raised by the ERC721Vault contract.
+type ERC721VaultUnpaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_ERC721Vault *ERC721VaultFilterer) FilterUnpaused(opts *bind.FilterOpts) (*ERC721VaultUnpausedIterator, error) {
+
+ logs, sub, err := _ERC721Vault.contract.FilterLogs(opts, "Unpaused")
+ if err != nil {
+ return nil, err
+ }
+ return &ERC721VaultUnpausedIterator{contract: _ERC721Vault.contract, event: "Unpaused", logs: logs, sub: sub}, nil
+}
+
+// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_ERC721Vault *ERC721VaultFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *ERC721VaultUnpaused) (event.Subscription, error) {
+
+ logs, sub, err := _ERC721Vault.contract.WatchLogs(opts, "Unpaused")
+ 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(ERC721VaultUnpaused)
+ if err := _ERC721Vault.contract.UnpackLog(event, "Unpaused", 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
+}
+
+// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_ERC721Vault *ERC721VaultFilterer) ParseUnpaused(log types.Log) (*ERC721VaultUnpaused, error) {
+ event := new(ERC721VaultUnpaused)
+ if err := _ERC721Vault.contract.UnpackLog(event, "Unpaused", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// ERC721VaultUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the ERC721Vault contract.
+type ERC721VaultUpgradedIterator struct {
+ Event *ERC721VaultUpgraded // 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 *ERC721VaultUpgradedIterator) 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(ERC721VaultUpgraded)
+ 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(ERC721VaultUpgraded)
+ 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 *ERC721VaultUpgradedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *ERC721VaultUpgradedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// ERC721VaultUpgraded represents a Upgraded event raised by the ERC721Vault contract.
+type ERC721VaultUpgraded struct {
+ Implementation common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_ERC721Vault *ERC721VaultFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*ERC721VaultUpgradedIterator, error) {
+
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
+ }
+
+ logs, sub, err := _ERC721Vault.contract.FilterLogs(opts, "Upgraded", implementationRule)
+ if err != nil {
+ return nil, err
+ }
+ return &ERC721VaultUpgradedIterator{contract: _ERC721Vault.contract, event: "Upgraded", logs: logs, sub: sub}, nil
+}
+
+// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_ERC721Vault *ERC721VaultFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *ERC721VaultUpgraded, implementation []common.Address) (event.Subscription, error) {
+
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
+ }
+
+ logs, sub, err := _ERC721Vault.contract.WatchLogs(opts, "Upgraded", implementationRule)
+ 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(ERC721VaultUpgraded)
+ if err := _ERC721Vault.contract.UnpackLog(event, "Upgraded", 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
+}
+
+// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_ERC721Vault *ERC721VaultFilterer) ParseUpgraded(log types.Log) (*ERC721VaultUpgraded, error) {
+ event := new(ERC721VaultUpgraded)
+ if err := _ERC721Vault.contract.UnpackLog(event, "Upgraded", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
diff --git a/packages/relayer/bindings/icrosschainsync/ICrossChainSync.go b/packages/relayer/bindings/icrosschainsync/ICrossChainSync.go
index f14a5ba1b4b..e1e12a79531 100644
--- a/packages/relayer/bindings/icrosschainsync/ICrossChainSync.go
+++ b/packages/relayer/bindings/icrosschainsync/ICrossChainSync.go
@@ -29,9 +29,17 @@ var (
_ = abi.ConvertType
)
+// ICrossChainSyncSnippet is an auto generated low-level Go binding around an user-defined struct.
+type ICrossChainSyncSnippet struct {
+ RemoteBlockId uint64
+ SyncedInBlock uint64
+ BlockHash [32]byte
+ SignalRoot [32]byte
+}
+
// ICrossChainSyncMetaData contains all meta data concerning the ICrossChainSync contract.
var ICrossChainSyncMetaData = &bind.MetaData{
- ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"srcHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
+ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"syncedInBlock\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getSyncedSnippet\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"syncedInBlock\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structICrossChainSync.Snippet\",\"name\":\"snippet\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
}
// ICrossChainSyncABI is the input ABI used to generate the binding from.
@@ -180,66 +188,35 @@ func (_ICrossChainSync *ICrossChainSyncTransactorRaw) Transact(opts *bind.Transa
return _ICrossChainSync.Contract.contract.Transact(opts, method, params...)
}
-// GetCrossChainBlockHash is a free data retrieval call binding the contract method 0xbdd6bc36.
+// GetSyncedSnippet is a free data retrieval call binding the contract method 0x8cfb0459.
//
-// Solidity: function getCrossChainBlockHash(uint64 blockId) view returns(bytes32)
-func (_ICrossChainSync *ICrossChainSyncCaller) GetCrossChainBlockHash(opts *bind.CallOpts, blockId uint64) ([32]byte, error) {
+// Solidity: function getSyncedSnippet(uint64 blockId) view returns((uint64,uint64,bytes32,bytes32) snippet)
+func (_ICrossChainSync *ICrossChainSyncCaller) GetSyncedSnippet(opts *bind.CallOpts, blockId uint64) (ICrossChainSyncSnippet, error) {
var out []interface{}
- err := _ICrossChainSync.contract.Call(opts, &out, "getCrossChainBlockHash", blockId)
+ err := _ICrossChainSync.contract.Call(opts, &out, "getSyncedSnippet", blockId)
if err != nil {
- return *new([32]byte), err
+ return *new(ICrossChainSyncSnippet), err
}
- out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+ out0 := *abi.ConvertType(out[0], new(ICrossChainSyncSnippet)).(*ICrossChainSyncSnippet)
return out0, err
}
-// GetCrossChainBlockHash is a free data retrieval call binding the contract method 0xbdd6bc36.
+// GetSyncedSnippet is a free data retrieval call binding the contract method 0x8cfb0459.
//
-// Solidity: function getCrossChainBlockHash(uint64 blockId) view returns(bytes32)
-func (_ICrossChainSync *ICrossChainSyncSession) GetCrossChainBlockHash(blockId uint64) ([32]byte, error) {
- return _ICrossChainSync.Contract.GetCrossChainBlockHash(&_ICrossChainSync.CallOpts, blockId)
+// Solidity: function getSyncedSnippet(uint64 blockId) view returns((uint64,uint64,bytes32,bytes32) snippet)
+func (_ICrossChainSync *ICrossChainSyncSession) GetSyncedSnippet(blockId uint64) (ICrossChainSyncSnippet, error) {
+ return _ICrossChainSync.Contract.GetSyncedSnippet(&_ICrossChainSync.CallOpts, blockId)
}
-// GetCrossChainBlockHash is a free data retrieval call binding the contract method 0xbdd6bc36.
+// GetSyncedSnippet is a free data retrieval call binding the contract method 0x8cfb0459.
//
-// Solidity: function getCrossChainBlockHash(uint64 blockId) view returns(bytes32)
-func (_ICrossChainSync *ICrossChainSyncCallerSession) GetCrossChainBlockHash(blockId uint64) ([32]byte, error) {
- return _ICrossChainSync.Contract.GetCrossChainBlockHash(&_ICrossChainSync.CallOpts, blockId)
-}
-
-// GetCrossChainSignalRoot is a free data retrieval call binding the contract method 0x0599d294.
-//
-// Solidity: function getCrossChainSignalRoot(uint64 blockId) view returns(bytes32)
-func (_ICrossChainSync *ICrossChainSyncCaller) GetCrossChainSignalRoot(opts *bind.CallOpts, blockId uint64) ([32]byte, error) {
- var out []interface{}
- err := _ICrossChainSync.contract.Call(opts, &out, "getCrossChainSignalRoot", blockId)
-
- if err != nil {
- return *new([32]byte), err
- }
-
- out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
-
- return out0, err
-
-}
-
-// GetCrossChainSignalRoot is a free data retrieval call binding the contract method 0x0599d294.
-//
-// Solidity: function getCrossChainSignalRoot(uint64 blockId) view returns(bytes32)
-func (_ICrossChainSync *ICrossChainSyncSession) GetCrossChainSignalRoot(blockId uint64) ([32]byte, error) {
- return _ICrossChainSync.Contract.GetCrossChainSignalRoot(&_ICrossChainSync.CallOpts, blockId)
-}
-
-// GetCrossChainSignalRoot is a free data retrieval call binding the contract method 0x0599d294.
-//
-// Solidity: function getCrossChainSignalRoot(uint64 blockId) view returns(bytes32)
-func (_ICrossChainSync *ICrossChainSyncCallerSession) GetCrossChainSignalRoot(blockId uint64) ([32]byte, error) {
- return _ICrossChainSync.Contract.GetCrossChainSignalRoot(&_ICrossChainSync.CallOpts, blockId)
+// Solidity: function getSyncedSnippet(uint64 blockId) view returns((uint64,uint64,bytes32,bytes32) snippet)
+func (_ICrossChainSync *ICrossChainSyncCallerSession) GetSyncedSnippet(blockId uint64) (ICrossChainSyncSnippet, error) {
+ return _ICrossChainSync.Contract.GetSyncedSnippet(&_ICrossChainSync.CallOpts, blockId)
}
// ICrossChainSyncCrossChainSyncedIterator is returned from FilterCrossChainSynced and is used to iterate over the raw logs and unpacked data for CrossChainSynced events raised by the ICrossChainSync contract.
@@ -311,40 +288,49 @@ func (it *ICrossChainSyncCrossChainSyncedIterator) Close() error {
// ICrossChainSyncCrossChainSynced represents a CrossChainSynced event raised by the ICrossChainSync contract.
type ICrossChainSyncCrossChainSynced struct {
- SrcHeight uint64
- BlockHash [32]byte
- SignalRoot [32]byte
- Raw types.Log // Blockchain specific contextual infos
+ SyncedInBlock uint64
+ BlockId uint64
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterCrossChainSynced is a free log retrieval operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// FilterCrossChainSynced is a free log retrieval operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_ICrossChainSync *ICrossChainSyncFilterer) FilterCrossChainSynced(opts *bind.FilterOpts, srcHeight []uint64) (*ICrossChainSyncCrossChainSyncedIterator, error) {
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_ICrossChainSync *ICrossChainSyncFilterer) FilterCrossChainSynced(opts *bind.FilterOpts, syncedInBlock []uint64, blockId []uint64) (*ICrossChainSyncCrossChainSyncedIterator, error) {
- var srcHeightRule []interface{}
- for _, srcHeightItem := range srcHeight {
- srcHeightRule = append(srcHeightRule, srcHeightItem)
+ var syncedInBlockRule []interface{}
+ for _, syncedInBlockItem := range syncedInBlock {
+ syncedInBlockRule = append(syncedInBlockRule, syncedInBlockItem)
+ }
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
}
- logs, sub, err := _ICrossChainSync.contract.FilterLogs(opts, "CrossChainSynced", srcHeightRule)
+ logs, sub, err := _ICrossChainSync.contract.FilterLogs(opts, "CrossChainSynced", syncedInBlockRule, blockIdRule)
if err != nil {
return nil, err
}
return &ICrossChainSyncCrossChainSyncedIterator{contract: _ICrossChainSync.contract, event: "CrossChainSynced", logs: logs, sub: sub}, nil
}
-// WatchCrossChainSynced is a free log subscription operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// WatchCrossChainSynced is a free log subscription operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_ICrossChainSync *ICrossChainSyncFilterer) WatchCrossChainSynced(opts *bind.WatchOpts, sink chan<- *ICrossChainSyncCrossChainSynced, srcHeight []uint64) (event.Subscription, error) {
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_ICrossChainSync *ICrossChainSyncFilterer) WatchCrossChainSynced(opts *bind.WatchOpts, sink chan<- *ICrossChainSyncCrossChainSynced, syncedInBlock []uint64, blockId []uint64) (event.Subscription, error) {
- var srcHeightRule []interface{}
- for _, srcHeightItem := range srcHeight {
- srcHeightRule = append(srcHeightRule, srcHeightItem)
+ var syncedInBlockRule []interface{}
+ for _, syncedInBlockItem := range syncedInBlock {
+ syncedInBlockRule = append(syncedInBlockRule, syncedInBlockItem)
+ }
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
}
- logs, sub, err := _ICrossChainSync.contract.WatchLogs(opts, "CrossChainSynced", srcHeightRule)
+ logs, sub, err := _ICrossChainSync.contract.WatchLogs(opts, "CrossChainSynced", syncedInBlockRule, blockIdRule)
if err != nil {
return nil, err
}
@@ -376,9 +362,9 @@ func (_ICrossChainSync *ICrossChainSyncFilterer) WatchCrossChainSynced(opts *bin
}), nil
}
-// ParseCrossChainSynced is a log parse operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// ParseCrossChainSynced is a log parse operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
func (_ICrossChainSync *ICrossChainSyncFilterer) ParseCrossChainSynced(log types.Log) (*ICrossChainSyncCrossChainSynced, error) {
event := new(ICrossChainSyncCrossChainSynced)
if err := _ICrossChainSync.contract.UnpackLog(event, "CrossChainSynced", log); err != nil {
diff --git a/packages/relayer/bindings/signalservice/SignalService.go b/packages/relayer/bindings/signalservice/SignalService.go
new file mode 100644
index 00000000000..f29144aa598
--- /dev/null
+++ b/packages/relayer/bindings/signalservice/SignalService.go
@@ -0,0 +1,1866 @@
+// Code generated - DO NOT EDIT.
+// This file is a generated binding and any manual changes will be lost.
+
+package signalservice
+
+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
+)
+
+// SignalServiceMetaData contains all meta data concerning the SignalService contract.
+var SignalServiceMetaData = &bind.MetaData{
+ ABI: "[{\"inputs\":[],\"name\":\"INVALID_ADDRESS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_LABEL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SS_INVALID_APP\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SS_INVALID_SIGNAL\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"oldLabel\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"newLabel\",\"type\":\"bytes32\"}],\"name\":\"Authorized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"}],\"name\":\"authorize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"authorizedAddresses\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"signal\",\"type\":\"bytes32\"}],\"name\":\"getSignalSlot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"}],\"name\":\"isAuthorizedAs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"signal\",\"type\":\"bytes32\"}],\"name\":\"isSignalSent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"signal\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"proveSignalReceived\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"signal\",\"type\":\"bytes32\"}],\"name\":\"sendSignal\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"skipProofCheck\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]",
+}
+
+// SignalServiceABI is the input ABI used to generate the binding from.
+// Deprecated: Use SignalServiceMetaData.ABI instead.
+var SignalServiceABI = SignalServiceMetaData.ABI
+
+// SignalService is an auto generated Go binding around an Ethereum contract.
+type SignalService struct {
+ SignalServiceCaller // Read-only binding to the contract
+ SignalServiceTransactor // Write-only binding to the contract
+ SignalServiceFilterer // Log filterer for contract events
+}
+
+// SignalServiceCaller is an auto generated read-only Go binding around an Ethereum contract.
+type SignalServiceCaller struct {
+ contract *bind.BoundContract // Generic contract wrapper for the low level calls
+}
+
+// SignalServiceTransactor is an auto generated write-only Go binding around an Ethereum contract.
+type SignalServiceTransactor struct {
+ contract *bind.BoundContract // Generic contract wrapper for the low level calls
+}
+
+// SignalServiceFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
+type SignalServiceFilterer struct {
+ contract *bind.BoundContract // Generic contract wrapper for the low level calls
+}
+
+// SignalServiceSession is an auto generated Go binding around an Ethereum contract,
+// with pre-set call and transact options.
+type SignalServiceSession struct {
+ Contract *SignalService // 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
+}
+
+// SignalServiceCallerSession is an auto generated read-only Go binding around an Ethereum contract,
+// with pre-set call options.
+type SignalServiceCallerSession struct {
+ Contract *SignalServiceCaller // Generic contract caller binding to set the session for
+ CallOpts bind.CallOpts // Call options to use throughout this session
+}
+
+// SignalServiceTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
+// with pre-set transact options.
+type SignalServiceTransactorSession struct {
+ Contract *SignalServiceTransactor // Generic contract transactor binding to set the session for
+ TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
+}
+
+// SignalServiceRaw is an auto generated low-level Go binding around an Ethereum contract.
+type SignalServiceRaw struct {
+ Contract *SignalService // Generic contract binding to access the raw methods on
+}
+
+// SignalServiceCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
+type SignalServiceCallerRaw struct {
+ Contract *SignalServiceCaller // Generic read-only contract binding to access the raw methods on
+}
+
+// SignalServiceTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
+type SignalServiceTransactorRaw struct {
+ Contract *SignalServiceTransactor // Generic write-only contract binding to access the raw methods on
+}
+
+// NewSignalService creates a new instance of SignalService, bound to a specific deployed contract.
+func NewSignalService(address common.Address, backend bind.ContractBackend) (*SignalService, error) {
+ contract, err := bindSignalService(address, backend, backend, backend)
+ if err != nil {
+ return nil, err
+ }
+ return &SignalService{SignalServiceCaller: SignalServiceCaller{contract: contract}, SignalServiceTransactor: SignalServiceTransactor{contract: contract}, SignalServiceFilterer: SignalServiceFilterer{contract: contract}}, nil
+}
+
+// NewSignalServiceCaller creates a new read-only instance of SignalService, bound to a specific deployed contract.
+func NewSignalServiceCaller(address common.Address, caller bind.ContractCaller) (*SignalServiceCaller, error) {
+ contract, err := bindSignalService(address, caller, nil, nil)
+ if err != nil {
+ return nil, err
+ }
+ return &SignalServiceCaller{contract: contract}, nil
+}
+
+// NewSignalServiceTransactor creates a new write-only instance of SignalService, bound to a specific deployed contract.
+func NewSignalServiceTransactor(address common.Address, transactor bind.ContractTransactor) (*SignalServiceTransactor, error) {
+ contract, err := bindSignalService(address, nil, transactor, nil)
+ if err != nil {
+ return nil, err
+ }
+ return &SignalServiceTransactor{contract: contract}, nil
+}
+
+// NewSignalServiceFilterer creates a new log filterer instance of SignalService, bound to a specific deployed contract.
+func NewSignalServiceFilterer(address common.Address, filterer bind.ContractFilterer) (*SignalServiceFilterer, error) {
+ contract, err := bindSignalService(address, nil, nil, filterer)
+ if err != nil {
+ return nil, err
+ }
+ return &SignalServiceFilterer{contract: contract}, nil
+}
+
+// bindSignalService binds a generic wrapper to an already deployed contract.
+func bindSignalService(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
+ parsed, err := SignalServiceMetaData.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 (_SignalService *SignalServiceRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
+ return _SignalService.Contract.SignalServiceCaller.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 (_SignalService *SignalServiceRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _SignalService.Contract.SignalServiceTransactor.contract.Transfer(opts)
+}
+
+// Transact invokes the (paid) contract method with params as input values.
+func (_SignalService *SignalServiceRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
+ return _SignalService.Contract.SignalServiceTransactor.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 (_SignalService *SignalServiceCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
+ return _SignalService.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 (_SignalService *SignalServiceTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _SignalService.Contract.contract.Transfer(opts)
+}
+
+// Transact invokes the (paid) contract method with params as input values.
+func (_SignalService *SignalServiceTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
+ return _SignalService.Contract.contract.Transact(opts, method, params...)
+}
+
+// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f.
+//
+// Solidity: function addressManager() view returns(address)
+func (_SignalService *SignalServiceCaller) AddressManager(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _SignalService.contract.Call(opts, &out, "addressManager")
+
+ if err != nil {
+ return *new(common.Address), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+
+ return out0, err
+
+}
+
+// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f.
+//
+// Solidity: function addressManager() view returns(address)
+func (_SignalService *SignalServiceSession) AddressManager() (common.Address, error) {
+ return _SignalService.Contract.AddressManager(&_SignalService.CallOpts)
+}
+
+// AddressManager is a free data retrieval call binding the contract method 0x3ab76e9f.
+//
+// Solidity: function addressManager() view returns(address)
+func (_SignalService *SignalServiceCallerSession) AddressManager() (common.Address, error) {
+ return _SignalService.Contract.AddressManager(&_SignalService.CallOpts)
+}
+
+// AuthorizedAddresses is a free data retrieval call binding the contract method 0xf19e207e.
+//
+// Solidity: function authorizedAddresses(address ) view returns(bytes32 label)
+func (_SignalService *SignalServiceCaller) AuthorizedAddresses(opts *bind.CallOpts, arg0 common.Address) ([32]byte, error) {
+ var out []interface{}
+ err := _SignalService.contract.Call(opts, &out, "authorizedAddresses", arg0)
+
+ if err != nil {
+ return *new([32]byte), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+
+ return out0, err
+
+}
+
+// AuthorizedAddresses is a free data retrieval call binding the contract method 0xf19e207e.
+//
+// Solidity: function authorizedAddresses(address ) view returns(bytes32 label)
+func (_SignalService *SignalServiceSession) AuthorizedAddresses(arg0 common.Address) ([32]byte, error) {
+ return _SignalService.Contract.AuthorizedAddresses(&_SignalService.CallOpts, arg0)
+}
+
+// AuthorizedAddresses is a free data retrieval call binding the contract method 0xf19e207e.
+//
+// Solidity: function authorizedAddresses(address ) view returns(bytes32 label)
+func (_SignalService *SignalServiceCallerSession) AuthorizedAddresses(arg0 common.Address) ([32]byte, error) {
+ return _SignalService.Contract.AuthorizedAddresses(&_SignalService.CallOpts, arg0)
+}
+
+// GetSignalSlot is a free data retrieval call binding the contract method 0x91f3f74b.
+//
+// Solidity: function getSignalSlot(uint64 chainId, address app, bytes32 signal) pure returns(bytes32)
+func (_SignalService *SignalServiceCaller) GetSignalSlot(opts *bind.CallOpts, chainId uint64, app common.Address, signal [32]byte) ([32]byte, error) {
+ var out []interface{}
+ err := _SignalService.contract.Call(opts, &out, "getSignalSlot", chainId, app, signal)
+
+ if err != nil {
+ return *new([32]byte), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+
+ return out0, err
+
+}
+
+// GetSignalSlot is a free data retrieval call binding the contract method 0x91f3f74b.
+//
+// Solidity: function getSignalSlot(uint64 chainId, address app, bytes32 signal) pure returns(bytes32)
+func (_SignalService *SignalServiceSession) GetSignalSlot(chainId uint64, app common.Address, signal [32]byte) ([32]byte, error) {
+ return _SignalService.Contract.GetSignalSlot(&_SignalService.CallOpts, chainId, app, signal)
+}
+
+// GetSignalSlot is a free data retrieval call binding the contract method 0x91f3f74b.
+//
+// Solidity: function getSignalSlot(uint64 chainId, address app, bytes32 signal) pure returns(bytes32)
+func (_SignalService *SignalServiceCallerSession) GetSignalSlot(chainId uint64, app common.Address, signal [32]byte) ([32]byte, error) {
+ return _SignalService.Contract.GetSignalSlot(&_SignalService.CallOpts, chainId, app, signal)
+}
+
+// IsAuthorizedAs is a free data retrieval call binding the contract method 0xa354b9de.
+//
+// Solidity: function isAuthorizedAs(address addr, bytes32 label) view returns(bool)
+func (_SignalService *SignalServiceCaller) IsAuthorizedAs(opts *bind.CallOpts, addr common.Address, label [32]byte) (bool, error) {
+ var out []interface{}
+ err := _SignalService.contract.Call(opts, &out, "isAuthorizedAs", addr, label)
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// IsAuthorizedAs is a free data retrieval call binding the contract method 0xa354b9de.
+//
+// Solidity: function isAuthorizedAs(address addr, bytes32 label) view returns(bool)
+func (_SignalService *SignalServiceSession) IsAuthorizedAs(addr common.Address, label [32]byte) (bool, error) {
+ return _SignalService.Contract.IsAuthorizedAs(&_SignalService.CallOpts, addr, label)
+}
+
+// IsAuthorizedAs is a free data retrieval call binding the contract method 0xa354b9de.
+//
+// Solidity: function isAuthorizedAs(address addr, bytes32 label) view returns(bool)
+func (_SignalService *SignalServiceCallerSession) IsAuthorizedAs(addr common.Address, label [32]byte) (bool, error) {
+ return _SignalService.Contract.IsAuthorizedAs(&_SignalService.CallOpts, addr, label)
+}
+
+// IsSignalSent is a free data retrieval call binding the contract method 0x32676bc6.
+//
+// Solidity: function isSignalSent(address app, bytes32 signal) view returns(bool)
+func (_SignalService *SignalServiceCaller) IsSignalSent(opts *bind.CallOpts, app common.Address, signal [32]byte) (bool, error) {
+ var out []interface{}
+ err := _SignalService.contract.Call(opts, &out, "isSignalSent", app, signal)
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// IsSignalSent is a free data retrieval call binding the contract method 0x32676bc6.
+//
+// Solidity: function isSignalSent(address app, bytes32 signal) view returns(bool)
+func (_SignalService *SignalServiceSession) IsSignalSent(app common.Address, signal [32]byte) (bool, error) {
+ return _SignalService.Contract.IsSignalSent(&_SignalService.CallOpts, app, signal)
+}
+
+// IsSignalSent is a free data retrieval call binding the contract method 0x32676bc6.
+//
+// Solidity: function isSignalSent(address app, bytes32 signal) view returns(bool)
+func (_SignalService *SignalServiceCallerSession) IsSignalSent(app common.Address, signal [32]byte) (bool, error) {
+ return _SignalService.Contract.IsSignalSent(&_SignalService.CallOpts, app, signal)
+}
+
+// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+//
+// Solidity: function owner() view returns(address)
+func (_SignalService *SignalServiceCaller) Owner(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _SignalService.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 (_SignalService *SignalServiceSession) Owner() (common.Address, error) {
+ return _SignalService.Contract.Owner(&_SignalService.CallOpts)
+}
+
+// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
+//
+// Solidity: function owner() view returns(address)
+func (_SignalService *SignalServiceCallerSession) Owner() (common.Address, error) {
+ return _SignalService.Contract.Owner(&_SignalService.CallOpts)
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_SignalService *SignalServiceCaller) Paused(opts *bind.CallOpts) (bool, error) {
+ var out []interface{}
+ err := _SignalService.contract.Call(opts, &out, "paused")
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_SignalService *SignalServiceSession) Paused() (bool, error) {
+ return _SignalService.Contract.Paused(&_SignalService.CallOpts)
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_SignalService *SignalServiceCallerSession) Paused() (bool, error) {
+ return _SignalService.Contract.Paused(&_SignalService.CallOpts)
+}
+
+// ProveSignalReceived is a free data retrieval call binding the contract method 0x910af6ed.
+//
+// Solidity: function proveSignalReceived(uint64 srcChainId, address app, bytes32 signal, bytes proof) view returns(bool)
+func (_SignalService *SignalServiceCaller) ProveSignalReceived(opts *bind.CallOpts, srcChainId uint64, app common.Address, signal [32]byte, proof []byte) (bool, error) {
+ var out []interface{}
+ err := _SignalService.contract.Call(opts, &out, "proveSignalReceived", srcChainId, app, signal, proof)
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// ProveSignalReceived is a free data retrieval call binding the contract method 0x910af6ed.
+//
+// Solidity: function proveSignalReceived(uint64 srcChainId, address app, bytes32 signal, bytes proof) view returns(bool)
+func (_SignalService *SignalServiceSession) ProveSignalReceived(srcChainId uint64, app common.Address, signal [32]byte, proof []byte) (bool, error) {
+ return _SignalService.Contract.ProveSignalReceived(&_SignalService.CallOpts, srcChainId, app, signal, proof)
+}
+
+// ProveSignalReceived is a free data retrieval call binding the contract method 0x910af6ed.
+//
+// Solidity: function proveSignalReceived(uint64 srcChainId, address app, bytes32 signal, bytes proof) view returns(bool)
+func (_SignalService *SignalServiceCallerSession) ProveSignalReceived(srcChainId uint64, app common.Address, signal [32]byte, proof []byte) (bool, error) {
+ return _SignalService.Contract.ProveSignalReceived(&_SignalService.CallOpts, srcChainId, app, signal, proof)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_SignalService *SignalServiceCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) {
+ var out []interface{}
+ err := _SignalService.contract.Call(opts, &out, "proxiableUUID")
+
+ if err != nil {
+ return *new([32]byte), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+
+ return out0, err
+
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_SignalService *SignalServiceSession) ProxiableUUID() ([32]byte, error) {
+ return _SignalService.Contract.ProxiableUUID(&_SignalService.CallOpts)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_SignalService *SignalServiceCallerSession) ProxiableUUID() ([32]byte, error) {
+ return _SignalService.Contract.ProxiableUUID(&_SignalService.CallOpts)
+}
+
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
+//
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_SignalService *SignalServiceCaller) Resolve(opts *bind.CallOpts, chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ var out []interface{}
+ err := _SignalService.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress)
+
+ if err != nil {
+ return *new(common.Address), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+
+ return out0, err
+
+}
+
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
+//
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_SignalService *SignalServiceSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ return _SignalService.Contract.Resolve(&_SignalService.CallOpts, chainId, name, allowZeroAddress)
+}
+
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
+//
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_SignalService *SignalServiceCallerSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ return _SignalService.Contract.Resolve(&_SignalService.CallOpts, chainId, name, allowZeroAddress)
+}
+
+// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e.
+//
+// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_SignalService *SignalServiceCaller) Resolve0(opts *bind.CallOpts, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ var out []interface{}
+ err := _SignalService.contract.Call(opts, &out, "resolve0", name, allowZeroAddress)
+
+ if err != nil {
+ return *new(common.Address), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+
+ return out0, err
+
+}
+
+// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e.
+//
+// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_SignalService *SignalServiceSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ return _SignalService.Contract.Resolve0(&_SignalService.CallOpts, name, allowZeroAddress)
+}
+
+// Resolve0 is a free data retrieval call binding the contract method 0xa86f9d9e.
+//
+// Solidity: function resolve(bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_SignalService *SignalServiceCallerSession) Resolve0(name [32]byte, allowZeroAddress bool) (common.Address, error) {
+ return _SignalService.Contract.Resolve0(&_SignalService.CallOpts, name, allowZeroAddress)
+}
+
+// SkipProofCheck is a free data retrieval call binding the contract method 0xcbb3ddf3.
+//
+// Solidity: function skipProofCheck() pure returns(bool)
+func (_SignalService *SignalServiceCaller) SkipProofCheck(opts *bind.CallOpts) (bool, error) {
+ var out []interface{}
+ err := _SignalService.contract.Call(opts, &out, "skipProofCheck")
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// SkipProofCheck is a free data retrieval call binding the contract method 0xcbb3ddf3.
+//
+// Solidity: function skipProofCheck() pure returns(bool)
+func (_SignalService *SignalServiceSession) SkipProofCheck() (bool, error) {
+ return _SignalService.Contract.SkipProofCheck(&_SignalService.CallOpts)
+}
+
+// SkipProofCheck is a free data retrieval call binding the contract method 0xcbb3ddf3.
+//
+// Solidity: function skipProofCheck() pure returns(bool)
+func (_SignalService *SignalServiceCallerSession) SkipProofCheck() (bool, error) {
+ return _SignalService.Contract.SkipProofCheck(&_SignalService.CallOpts)
+}
+
+// Authorize is a paid mutator transaction binding the contract method 0x969e15a3.
+//
+// Solidity: function authorize(address addr, bytes32 label) returns()
+func (_SignalService *SignalServiceTransactor) Authorize(opts *bind.TransactOpts, addr common.Address, label [32]byte) (*types.Transaction, error) {
+ return _SignalService.contract.Transact(opts, "authorize", addr, label)
+}
+
+// Authorize is a paid mutator transaction binding the contract method 0x969e15a3.
+//
+// Solidity: function authorize(address addr, bytes32 label) returns()
+func (_SignalService *SignalServiceSession) Authorize(addr common.Address, label [32]byte) (*types.Transaction, error) {
+ return _SignalService.Contract.Authorize(&_SignalService.TransactOpts, addr, label)
+}
+
+// Authorize is a paid mutator transaction binding the contract method 0x969e15a3.
+//
+// Solidity: function authorize(address addr, bytes32 label) returns()
+func (_SignalService *SignalServiceTransactorSession) Authorize(addr common.Address, label [32]byte) (*types.Transaction, error) {
+ return _SignalService.Contract.Authorize(&_SignalService.TransactOpts, addr, label)
+}
+
+// Init is a paid mutator transaction binding the contract method 0xe1c7392a.
+//
+// Solidity: function init() returns()
+func (_SignalService *SignalServiceTransactor) Init(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _SignalService.contract.Transact(opts, "init")
+}
+
+// Init is a paid mutator transaction binding the contract method 0xe1c7392a.
+//
+// Solidity: function init() returns()
+func (_SignalService *SignalServiceSession) Init() (*types.Transaction, error) {
+ return _SignalService.Contract.Init(&_SignalService.TransactOpts)
+}
+
+// Init is a paid mutator transaction binding the contract method 0xe1c7392a.
+//
+// Solidity: function init() returns()
+func (_SignalService *SignalServiceTransactorSession) Init() (*types.Transaction, error) {
+ return _SignalService.Contract.Init(&_SignalService.TransactOpts)
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_SignalService *SignalServiceTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _SignalService.contract.Transact(opts, "pause")
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_SignalService *SignalServiceSession) Pause() (*types.Transaction, error) {
+ return _SignalService.Contract.Pause(&_SignalService.TransactOpts)
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_SignalService *SignalServiceTransactorSession) Pause() (*types.Transaction, error) {
+ return _SignalService.Contract.Pause(&_SignalService.TransactOpts)
+}
+
+// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
+//
+// Solidity: function renounceOwnership() returns()
+func (_SignalService *SignalServiceTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _SignalService.contract.Transact(opts, "renounceOwnership")
+}
+
+// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
+//
+// Solidity: function renounceOwnership() returns()
+func (_SignalService *SignalServiceSession) RenounceOwnership() (*types.Transaction, error) {
+ return _SignalService.Contract.RenounceOwnership(&_SignalService.TransactOpts)
+}
+
+// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
+//
+// Solidity: function renounceOwnership() returns()
+func (_SignalService *SignalServiceTransactorSession) RenounceOwnership() (*types.Transaction, error) {
+ return _SignalService.Contract.RenounceOwnership(&_SignalService.TransactOpts)
+}
+
+// SendSignal is a paid mutator transaction binding the contract method 0x66ca2bc0.
+//
+// Solidity: function sendSignal(bytes32 signal) returns(bytes32 slot)
+func (_SignalService *SignalServiceTransactor) SendSignal(opts *bind.TransactOpts, signal [32]byte) (*types.Transaction, error) {
+ return _SignalService.contract.Transact(opts, "sendSignal", signal)
+}
+
+// SendSignal is a paid mutator transaction binding the contract method 0x66ca2bc0.
+//
+// Solidity: function sendSignal(bytes32 signal) returns(bytes32 slot)
+func (_SignalService *SignalServiceSession) SendSignal(signal [32]byte) (*types.Transaction, error) {
+ return _SignalService.Contract.SendSignal(&_SignalService.TransactOpts, signal)
+}
+
+// SendSignal is a paid mutator transaction binding the contract method 0x66ca2bc0.
+//
+// Solidity: function sendSignal(bytes32 signal) returns(bytes32 slot)
+func (_SignalService *SignalServiceTransactorSession) SendSignal(signal [32]byte) (*types.Transaction, error) {
+ return _SignalService.Contract.SendSignal(&_SignalService.TransactOpts, signal)
+}
+
+// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
+//
+// Solidity: function transferOwnership(address newOwner) returns()
+func (_SignalService *SignalServiceTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
+ return _SignalService.contract.Transact(opts, "transferOwnership", newOwner)
+}
+
+// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
+//
+// Solidity: function transferOwnership(address newOwner) returns()
+func (_SignalService *SignalServiceSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
+ return _SignalService.Contract.TransferOwnership(&_SignalService.TransactOpts, newOwner)
+}
+
+// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
+//
+// Solidity: function transferOwnership(address newOwner) returns()
+func (_SignalService *SignalServiceTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) {
+ return _SignalService.Contract.TransferOwnership(&_SignalService.TransactOpts, newOwner)
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_SignalService *SignalServiceTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _SignalService.contract.Transact(opts, "unpause")
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_SignalService *SignalServiceSession) Unpause() (*types.Transaction, error) {
+ return _SignalService.Contract.Unpause(&_SignalService.TransactOpts)
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_SignalService *SignalServiceTransactorSession) Unpause() (*types.Transaction, error) {
+ return _SignalService.Contract.Unpause(&_SignalService.TransactOpts)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_SignalService *SignalServiceTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) {
+ return _SignalService.contract.Transact(opts, "upgradeTo", newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_SignalService *SignalServiceSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _SignalService.Contract.UpgradeTo(&_SignalService.TransactOpts, newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_SignalService *SignalServiceTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _SignalService.Contract.UpgradeTo(&_SignalService.TransactOpts, newImplementation)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_SignalService *SignalServiceTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _SignalService.contract.Transact(opts, "upgradeToAndCall", newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_SignalService *SignalServiceSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _SignalService.Contract.UpgradeToAndCall(&_SignalService.TransactOpts, newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_SignalService *SignalServiceTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _SignalService.Contract.UpgradeToAndCall(&_SignalService.TransactOpts, newImplementation, data)
+}
+
+// SignalServiceAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the SignalService contract.
+type SignalServiceAdminChangedIterator struct {
+ Event *SignalServiceAdminChanged // 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 *SignalServiceAdminChangedIterator) 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(SignalServiceAdminChanged)
+ 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(SignalServiceAdminChanged)
+ 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 *SignalServiceAdminChangedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *SignalServiceAdminChangedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// SignalServiceAdminChanged represents a AdminChanged event raised by the SignalService contract.
+type SignalServiceAdminChanged struct {
+ PreviousAdmin common.Address
+ NewAdmin common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
+//
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_SignalService *SignalServiceFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*SignalServiceAdminChangedIterator, error) {
+
+ logs, sub, err := _SignalService.contract.FilterLogs(opts, "AdminChanged")
+ if err != nil {
+ return nil, err
+ }
+ return &SignalServiceAdminChangedIterator{contract: _SignalService.contract, event: "AdminChanged", logs: logs, sub: sub}, nil
+}
+
+// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
+//
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_SignalService *SignalServiceFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *SignalServiceAdminChanged) (event.Subscription, error) {
+
+ logs, sub, err := _SignalService.contract.WatchLogs(opts, "AdminChanged")
+ 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(SignalServiceAdminChanged)
+ if err := _SignalService.contract.UnpackLog(event, "AdminChanged", 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
+}
+
+// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
+//
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_SignalService *SignalServiceFilterer) ParseAdminChanged(log types.Log) (*SignalServiceAdminChanged, error) {
+ event := new(SignalServiceAdminChanged)
+ if err := _SignalService.contract.UnpackLog(event, "AdminChanged", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// SignalServiceAuthorizedIterator is returned from FilterAuthorized and is used to iterate over the raw logs and unpacked data for Authorized events raised by the SignalService contract.
+type SignalServiceAuthorizedIterator struct {
+ Event *SignalServiceAuthorized // 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 *SignalServiceAuthorizedIterator) 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(SignalServiceAuthorized)
+ 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(SignalServiceAuthorized)
+ 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 *SignalServiceAuthorizedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *SignalServiceAuthorizedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// SignalServiceAuthorized represents a Authorized event raised by the SignalService contract.
+type SignalServiceAuthorized struct {
+ Addr common.Address
+ OldLabel [32]byte
+ NewLabel [32]byte
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterAuthorized is a free log retrieval operation binding the contract event 0x7abb39ef31cf9e4e81ee30577a27909b031ee95c0459c22280fb8d3468c96fdf.
+//
+// Solidity: event Authorized(address indexed addr, bytes32 oldLabel, bytes32 newLabel)
+func (_SignalService *SignalServiceFilterer) FilterAuthorized(opts *bind.FilterOpts, addr []common.Address) (*SignalServiceAuthorizedIterator, error) {
+
+ var addrRule []interface{}
+ for _, addrItem := range addr {
+ addrRule = append(addrRule, addrItem)
+ }
+
+ logs, sub, err := _SignalService.contract.FilterLogs(opts, "Authorized", addrRule)
+ if err != nil {
+ return nil, err
+ }
+ return &SignalServiceAuthorizedIterator{contract: _SignalService.contract, event: "Authorized", logs: logs, sub: sub}, nil
+}
+
+// WatchAuthorized is a free log subscription operation binding the contract event 0x7abb39ef31cf9e4e81ee30577a27909b031ee95c0459c22280fb8d3468c96fdf.
+//
+// Solidity: event Authorized(address indexed addr, bytes32 oldLabel, bytes32 newLabel)
+func (_SignalService *SignalServiceFilterer) WatchAuthorized(opts *bind.WatchOpts, sink chan<- *SignalServiceAuthorized, addr []common.Address) (event.Subscription, error) {
+
+ var addrRule []interface{}
+ for _, addrItem := range addr {
+ addrRule = append(addrRule, addrItem)
+ }
+
+ logs, sub, err := _SignalService.contract.WatchLogs(opts, "Authorized", addrRule)
+ 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(SignalServiceAuthorized)
+ if err := _SignalService.contract.UnpackLog(event, "Authorized", 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
+}
+
+// ParseAuthorized is a log parse operation binding the contract event 0x7abb39ef31cf9e4e81ee30577a27909b031ee95c0459c22280fb8d3468c96fdf.
+//
+// Solidity: event Authorized(address indexed addr, bytes32 oldLabel, bytes32 newLabel)
+func (_SignalService *SignalServiceFilterer) ParseAuthorized(log types.Log) (*SignalServiceAuthorized, error) {
+ event := new(SignalServiceAuthorized)
+ if err := _SignalService.contract.UnpackLog(event, "Authorized", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// SignalServiceBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the SignalService contract.
+type SignalServiceBeaconUpgradedIterator struct {
+ Event *SignalServiceBeaconUpgraded // 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 *SignalServiceBeaconUpgradedIterator) 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(SignalServiceBeaconUpgraded)
+ 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(SignalServiceBeaconUpgraded)
+ 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 *SignalServiceBeaconUpgradedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *SignalServiceBeaconUpgradedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// SignalServiceBeaconUpgraded represents a BeaconUpgraded event raised by the SignalService contract.
+type SignalServiceBeaconUpgraded struct {
+ Beacon common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
+//
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_SignalService *SignalServiceFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*SignalServiceBeaconUpgradedIterator, error) {
+
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
+ }
+
+ logs, sub, err := _SignalService.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule)
+ if err != nil {
+ return nil, err
+ }
+ return &SignalServiceBeaconUpgradedIterator{contract: _SignalService.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil
+}
+
+// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
+//
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_SignalService *SignalServiceFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *SignalServiceBeaconUpgraded, beacon []common.Address) (event.Subscription, error) {
+
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
+ }
+
+ logs, sub, err := _SignalService.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule)
+ 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(SignalServiceBeaconUpgraded)
+ if err := _SignalService.contract.UnpackLog(event, "BeaconUpgraded", 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
+}
+
+// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
+//
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_SignalService *SignalServiceFilterer) ParseBeaconUpgraded(log types.Log) (*SignalServiceBeaconUpgraded, error) {
+ event := new(SignalServiceBeaconUpgraded)
+ if err := _SignalService.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// SignalServiceInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the SignalService contract.
+type SignalServiceInitializedIterator struct {
+ Event *SignalServiceInitialized // 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 *SignalServiceInitializedIterator) 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(SignalServiceInitialized)
+ 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(SignalServiceInitialized)
+ 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 *SignalServiceInitializedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *SignalServiceInitializedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// SignalServiceInitialized represents a Initialized event raised by the SignalService contract.
+type SignalServiceInitialized 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 (_SignalService *SignalServiceFilterer) FilterInitialized(opts *bind.FilterOpts) (*SignalServiceInitializedIterator, error) {
+
+ logs, sub, err := _SignalService.contract.FilterLogs(opts, "Initialized")
+ if err != nil {
+ return nil, err
+ }
+ return &SignalServiceInitializedIterator{contract: _SignalService.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 (_SignalService *SignalServiceFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *SignalServiceInitialized) (event.Subscription, error) {
+
+ logs, sub, err := _SignalService.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(SignalServiceInitialized)
+ if err := _SignalService.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 (_SignalService *SignalServiceFilterer) ParseInitialized(log types.Log) (*SignalServiceInitialized, error) {
+ event := new(SignalServiceInitialized)
+ if err := _SignalService.contract.UnpackLog(event, "Initialized", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// SignalServiceOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the SignalService contract.
+type SignalServiceOwnershipTransferredIterator struct {
+ Event *SignalServiceOwnershipTransferred // 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 *SignalServiceOwnershipTransferredIterator) 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(SignalServiceOwnershipTransferred)
+ 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(SignalServiceOwnershipTransferred)
+ 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 *SignalServiceOwnershipTransferredIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *SignalServiceOwnershipTransferredIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// SignalServiceOwnershipTransferred represents a OwnershipTransferred event raised by the SignalService contract.
+type SignalServiceOwnershipTransferred 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 (_SignalService *SignalServiceFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*SignalServiceOwnershipTransferredIterator, 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 := _SignalService.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+ if err != nil {
+ return nil, err
+ }
+ return &SignalServiceOwnershipTransferredIterator{contract: _SignalService.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 (_SignalService *SignalServiceFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *SignalServiceOwnershipTransferred, 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 := _SignalService.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(SignalServiceOwnershipTransferred)
+ if err := _SignalService.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 (_SignalService *SignalServiceFilterer) ParseOwnershipTransferred(log types.Log) (*SignalServiceOwnershipTransferred, error) {
+ event := new(SignalServiceOwnershipTransferred)
+ if err := _SignalService.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// SignalServicePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the SignalService contract.
+type SignalServicePausedIterator struct {
+ Event *SignalServicePaused // 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 *SignalServicePausedIterator) 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(SignalServicePaused)
+ 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(SignalServicePaused)
+ 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 *SignalServicePausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *SignalServicePausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// SignalServicePaused represents a Paused event raised by the SignalService contract.
+type SignalServicePaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_SignalService *SignalServiceFilterer) FilterPaused(opts *bind.FilterOpts) (*SignalServicePausedIterator, error) {
+
+ logs, sub, err := _SignalService.contract.FilterLogs(opts, "Paused")
+ if err != nil {
+ return nil, err
+ }
+ return &SignalServicePausedIterator{contract: _SignalService.contract, event: "Paused", logs: logs, sub: sub}, nil
+}
+
+// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_SignalService *SignalServiceFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *SignalServicePaused) (event.Subscription, error) {
+
+ logs, sub, err := _SignalService.contract.WatchLogs(opts, "Paused")
+ 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(SignalServicePaused)
+ if err := _SignalService.contract.UnpackLog(event, "Paused", 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
+}
+
+// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_SignalService *SignalServiceFilterer) ParsePaused(log types.Log) (*SignalServicePaused, error) {
+ event := new(SignalServicePaused)
+ if err := _SignalService.contract.UnpackLog(event, "Paused", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// SignalServiceUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the SignalService contract.
+type SignalServiceUnpausedIterator struct {
+ Event *SignalServiceUnpaused // 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 *SignalServiceUnpausedIterator) 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(SignalServiceUnpaused)
+ 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(SignalServiceUnpaused)
+ 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 *SignalServiceUnpausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *SignalServiceUnpausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// SignalServiceUnpaused represents a Unpaused event raised by the SignalService contract.
+type SignalServiceUnpaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_SignalService *SignalServiceFilterer) FilterUnpaused(opts *bind.FilterOpts) (*SignalServiceUnpausedIterator, error) {
+
+ logs, sub, err := _SignalService.contract.FilterLogs(opts, "Unpaused")
+ if err != nil {
+ return nil, err
+ }
+ return &SignalServiceUnpausedIterator{contract: _SignalService.contract, event: "Unpaused", logs: logs, sub: sub}, nil
+}
+
+// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_SignalService *SignalServiceFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *SignalServiceUnpaused) (event.Subscription, error) {
+
+ logs, sub, err := _SignalService.contract.WatchLogs(opts, "Unpaused")
+ 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(SignalServiceUnpaused)
+ if err := _SignalService.contract.UnpackLog(event, "Unpaused", 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
+}
+
+// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_SignalService *SignalServiceFilterer) ParseUnpaused(log types.Log) (*SignalServiceUnpaused, error) {
+ event := new(SignalServiceUnpaused)
+ if err := _SignalService.contract.UnpackLog(event, "Unpaused", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// SignalServiceUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the SignalService contract.
+type SignalServiceUpgradedIterator struct {
+ Event *SignalServiceUpgraded // 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 *SignalServiceUpgradedIterator) 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(SignalServiceUpgraded)
+ 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(SignalServiceUpgraded)
+ 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 *SignalServiceUpgradedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *SignalServiceUpgradedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// SignalServiceUpgraded represents a Upgraded event raised by the SignalService contract.
+type SignalServiceUpgraded struct {
+ Implementation common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_SignalService *SignalServiceFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*SignalServiceUpgradedIterator, error) {
+
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
+ }
+
+ logs, sub, err := _SignalService.contract.FilterLogs(opts, "Upgraded", implementationRule)
+ if err != nil {
+ return nil, err
+ }
+ return &SignalServiceUpgradedIterator{contract: _SignalService.contract, event: "Upgraded", logs: logs, sub: sub}, nil
+}
+
+// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_SignalService *SignalServiceFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *SignalServiceUpgraded, implementation []common.Address) (event.Subscription, error) {
+
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
+ }
+
+ logs, sub, err := _SignalService.contract.WatchLogs(opts, "Upgraded", implementationRule)
+ 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(SignalServiceUpgraded)
+ if err := _SignalService.contract.UnpackLog(event, "Upgraded", 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
+}
+
+// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_SignalService *SignalServiceFilterer) ParseUpgraded(log types.Log) (*SignalServiceUpgraded, error) {
+ event := new(SignalServiceUpgraded)
+ if err := _SignalService.contract.UnpackLog(event, "Upgraded", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
diff --git a/packages/relayer/bindings/taikol1/TaikoL1.go b/packages/relayer/bindings/taikol1/TaikoL1.go
index b60a05648cb..100a7318744 100644
--- a/packages/relayer/bindings/taikol1/TaikoL1.go
+++ b/packages/relayer/bindings/taikol1/TaikoL1.go
@@ -29,58 +29,74 @@ var (
_ = abi.ConvertType
)
+// ICrossChainSyncSnippet is an auto generated low-level Go binding around an user-defined struct.
+type ICrossChainSyncSnippet struct {
+ RemoteBlockId uint64
+ SyncedInBlock uint64
+ BlockHash [32]byte
+ SignalRoot [32]byte
+}
+
+// ITierProviderTier is an auto generated low-level Go binding around an user-defined struct.
+type ITierProviderTier struct {
+ VerifierName [32]byte
+ ValidityBond *big.Int
+ ContestBond *big.Int
+ CooldownWindow *big.Int
+ ProvingWindow uint16
+ MaxBlocksToVerify uint8
+}
+
// TaikoDataBlock is an auto generated low-level Go binding around an user-defined struct.
type TaikoDataBlock struct {
MetaHash [32]byte
- Prover common.Address
- ProposedAt uint64
- NextForkChoiceId uint16
- VerifiedForkChoiceId uint16
+ AssignedProver common.Address
+ LivenessBond *big.Int
BlockId uint64
- ProofBond *big.Int
- ProofWindow uint16
+ ProposedAt uint64
+ ProposedIn uint64
+ NextTransitionId uint32
+ VerifiedTransitionId uint32
+ Reserved [7][32]byte
}
// TaikoDataBlockMetadata is an auto generated low-level Go binding around an user-defined struct.
type TaikoDataBlockMetadata struct {
- Id uint64
- Timestamp uint64
- L1Height uint64
- L1Hash [32]byte
- MixHash [32]byte
- TxListHash [32]byte
- TxListByteStart *big.Int
- TxListByteEnd *big.Int
- GasLimit uint32
- Beneficiary common.Address
- DepositsProcessed []TaikoDataEthDeposit
+ L1Hash [32]byte
+ Difficulty [32]byte
+ BlobHash [32]byte
+ ExtraData [32]byte
+ DepositsHash [32]byte
+ Coinbase common.Address
+ Id uint64
+ GasLimit uint32
+ Timestamp uint64
+ L1Height uint64
+ TxListByteOffset *big.Int
+ TxListByteSize *big.Int
+ MinTier uint16
+ BlobUsed bool
+ ParentMetaHash [32]byte
}
// TaikoDataConfig is an auto generated low-level Go binding around an user-defined struct.
type TaikoDataConfig struct {
- ChainId *big.Int
- RelaySignalRoot bool
- BlockMaxProposals uint64
- BlockRingBufferSize uint64
- BlockMaxVerificationsPerTx uint64
- BlockMaxGasLimit uint32
- BlockFeeBaseGas uint32
- BlockMaxTxListBytes *big.Int
- BlockTxListExpiry *big.Int
- ProposerRewardPerSecond *big.Int
- ProposerRewardMax *big.Int
- ProofRegularCooldown *big.Int
- ProofOracleCooldown *big.Int
- ProofWindow uint16
- ProofBond *big.Int
- SkipProverAssignmentVerificaiton bool
- EthDepositRingBufferSize *big.Int
- EthDepositMinCountPerBlock uint64
- EthDepositMaxCountPerBlock uint64
- EthDepositMinAmount *big.Int
- EthDepositMaxAmount *big.Int
- EthDepositGas *big.Int
- EthDepositMaxFee *big.Int
+ ChainId uint64
+ BlockMaxProposals uint64
+ BlockRingBufferSize uint64
+ MaxBlocksToVerifyPerProposal uint64
+ BlockMaxGasLimit uint32
+ BlockMaxTxListBytes *big.Int
+ BlobExpiry *big.Int
+ BlobAllowedForDA bool
+ LivenessBond *big.Int
+ EthDepositRingBufferSize *big.Int
+ EthDepositMinCountPerBlock uint64
+ EthDepositMaxCountPerBlock uint64
+ EthDepositMinAmount *big.Int
+ EthDepositMaxAmount *big.Int
+ EthDepositGas *big.Int
+ EthDepositMaxFee *big.Int
}
// TaikoDataEthDeposit is an auto generated low-level Go binding around an user-defined struct.
@@ -90,15 +106,6 @@ type TaikoDataEthDeposit struct {
Id uint64
}
-// TaikoDataForkChoice is an auto generated low-level Go binding around an user-defined struct.
-type TaikoDataForkChoice struct {
- Key [32]byte
- BlockHash [32]byte
- SignalRoot [32]byte
- Prover common.Address
- ProvenAt uint64
-}
-
// TaikoDataSlotA is an auto generated low-level Go binding around an user-defined struct.
type TaikoDataSlotA struct {
GenesisHeight uint64
@@ -109,25 +116,37 @@ type TaikoDataSlotA struct {
// TaikoDataSlotB is an auto generated low-level Go binding around an user-defined struct.
type TaikoDataSlotB struct {
- NumBlocks uint64
- NextEthDepositToProcess uint64
- LastVerifiedAt uint64
- LastVerifiedBlockId uint64
+ NumBlocks uint64
+ LastVerifiedBlockId uint64
+ ProvingPaused bool
}
-// TaikoDataStateVariables is an auto generated low-level Go binding around an user-defined struct.
-type TaikoDataStateVariables struct {
- GenesisHeight uint64
- GenesisTimestamp uint64
- NumBlocks uint64
- LastVerifiedBlockId uint64
- NextEthDepositToProcess uint64
- NumEthDeposits uint64
+// TaikoDataTransition is an auto generated low-level Go binding around an user-defined struct.
+type TaikoDataTransition struct {
+ ParentHash [32]byte
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ Graffiti [32]byte
+}
+
+// TaikoDataTransitionState is an auto generated low-level Go binding around an user-defined struct.
+type TaikoDataTransitionState struct {
+ Key [32]byte
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ Prover common.Address
+ ValidityBond *big.Int
+ Contester common.Address
+ ContestBond *big.Int
+ Timestamp uint64
+ Tier uint16
+ Contestations uint8
+ Reserved [4][32]byte
}
// TaikoL1MetaData contains all meta data concerning the TaikoL1 contract.
var TaikoL1MetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_ID_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_EVIDENCE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_FORK_CHOICE_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ASSIGNMENT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ASSIGNMENT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_EVIDENCE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_METADATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ORACLE_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ORACLE_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROPOSER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROPOSER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROVER_SIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROVER_SIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_PROVEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SAME_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_HASH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_NOT_EXIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST_RANGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_FORK_CHOICE_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_FORK_CHOICE_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"srcHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"srcHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"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\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"canDepositEthToL2\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"proposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"nextForkChoiceId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"verifiedForkChoiceId\",\"type\":\"uint16\"},{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"proofBond\",\"type\":\"uint96\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"}],\"internalType\":\"structTaikoData.Block\",\"name\":\"blk\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"relaySignalRoot\",\"type\":\"bool\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxProposals\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockRingBufferSize\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxVerificationsPerTx\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockFeeBaseGas\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockMaxTxListBytes\",\"type\":\"uint24\"},{\"internalType\":\"uint256\",\"name\":\"blockTxListExpiry\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proposerRewardPerSecond\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proposerRewardMax\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofRegularCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofOracleCooldown\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"proofWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"proofBond\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"skipProverAssignmentVerificaiton\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMinCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMaxCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMinAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMaxAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getTaikoTokenBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"id\",\"type\":\"uint16\"}],\"name\":\"getVerifierName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"assignment\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint24\",\"name\":\"txListByteStart\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteEnd\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.SlotA\",\"name\":\"slotA\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.SlotB\",\"name\":\"slotB\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"maxBlocks\",\"type\":\"uint64\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawTaikoToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
+ ABI: "[{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_CONTESTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ASSIGNED_PROVER_NOT_ALLOWED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOB_FOR_DA_DISABLED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOB_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOB_NOT_REUSEABLE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INSUFFICIENT_TOKEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ADDRESS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_AMOUNT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_BLOCK_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_ETH_DEPOSIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_TIER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_TRANSITION\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_LIVENESS_BOND_NOT_RECEIVED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_ASSIGNED_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_PROPOSER_NOT_EOA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_PROVING_PAUSED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_RECEIVE_DISABLED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_TIERS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_ID_ZERO\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_ID_ZERO\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TRANSITION_NOT_FOUND\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TXLIST_OFFSET_SIZE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TXLIST_TOO_LARGE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNAUTHORIZED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_PARENT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_UNEXPECTED_TRANSITION_TIER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blobHash\",\"type\":\"bytes32\"}],\"name\":\"BlobCached\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"difficulty\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blobHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"depositsHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint24\",\"name\":\"txListByteOffset\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteSize\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"minTier\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"blobUsed\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"parentMetaHash\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"contestations\",\"type\":\"uint8\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"contestations\",\"type\":\"uint8\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"syncedInBlock\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"syncedInBlock\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.EthDeposit\",\"name\":\"deposit\",\"type\":\"tuple\"}],\"name\":\"EthDeposited\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"ProvingPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenCredited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDebited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"graffiti\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"name\":\"tran\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"contestBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"}],\"name\":\"TransitionContested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"graffiti\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"structTaikoData.Transition\",\"name\":\"tran\",\"type\":\"tuple\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"validityBond\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"}],\"name\":\"TransitionProved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"canDepositEthToL2\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"depositEtherToL2\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"assignedProver\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proposedIn\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nextTransitionId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"verifiedTransitionId\",\"type\":\"uint32\"},{\"internalType\":\"bytes32[7]\",\"name\":\"__reserved\",\"type\":\"bytes32[7]\"}],\"internalType\":\"structTaikoData.Block\",\"name\":\"blk\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockMaxProposals\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockRingBufferSize\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxBlocksToVerifyPerProposal\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockMaxTxListBytes\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"blobExpiry\",\"type\":\"uint24\"},{\"internalType\":\"bool\",\"name\":\"blobAllowedForDA\",\"type\":\"bool\"},{\"internalType\":\"uint96\",\"name\":\"livenessBond\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositRingBufferSize\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMinCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ethDepositMaxCountPerBlock\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMinAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"ethDepositMaxAmount\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ethDepositMaxFee\",\"type\":\"uint256\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"rand\",\"type\":\"uint256\"}],\"name\":\"getMinTier\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.SlotA\",\"name\":\"a\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"provingPaused\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.SlotB\",\"name\":\"b\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getSyncedSnippet\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"syncedInBlock\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structICrossChainSync.Snippet\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"tierId\",\"type\":\"uint16\"}],\"name\":\"getTier\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"verifierName\",\"type\":\"bytes32\"},{\"internalType\":\"uint96\",\"name\":\"validityBond\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"contestBond\",\"type\":\"uint96\"},{\"internalType\":\"uint24\",\"name\":\"cooldownWindow\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"provingWindow\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"maxBlocksToVerify\",\"type\":\"uint8\"}],\"internalType\":\"structITierProvider.Tier\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTierIds\",\"outputs\":[{\"internalType\":\"uint16[]\",\"name\":\"ids\",\"type\":\"uint16[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"}],\"name\":\"getTransition\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"validityBond\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"contester\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"contestBond\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"tier\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"contestations\",\"type\":\"uint8\"},{\"internalType\":\"bytes32[4]\",\"name\":\"__reserved\",\"type\":\"bytes32[4]\"}],\"internalType\":\"structTaikoData.TransitionState\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"blobHash\",\"type\":\"bytes32\"}],\"name\":\"isBlobReusable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isConfigValid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pause\",\"type\":\"bool\"}],\"name\":\"pauseProving\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"params\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"}],\"name\":\"proposeBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"difficulty\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blobHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"extraData\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"depositsHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint24\",\"name\":\"txListByteOffset\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"txListByteSize\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"minTier\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"blobUsed\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"parentMetaHash\",\"type\":\"bytes32\"}],\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.EthDeposit[]\",\"name\":\"depositsProcessed\",\"type\":\"tuple[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"input\",\"type\":\"bytes\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"numEthDeposits\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextEthDepositToProcess\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.SlotA\",\"name\":\"slotA\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"numBlocks\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastVerifiedBlockId\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"provingPaused\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.SlotB\",\"name\":\"slotB\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"maxBlocksToVerify\",\"type\":\"uint64\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]",
}
// TaikoL1ABI is the input ABI used to generate the binding from.
@@ -340,7 +359,7 @@ func (_TaikoL1 *TaikoL1CallerSession) CanDepositEthToL2(amount *big.Int) (bool,
// GetBlock is a free data retrieval call binding the contract method 0x5fa15e79.
//
-// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint64,uint16,uint16,uint64,uint96,uint16) blk)
+// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32,bytes32[7]) blk)
func (_TaikoL1 *TaikoL1Caller) GetBlock(opts *bind.CallOpts, blockId uint64) (TaikoDataBlock, error) {
var out []interface{}
err := _TaikoL1.contract.Call(opts, &out, "getBlock", blockId)
@@ -357,21 +376,21 @@ func (_TaikoL1 *TaikoL1Caller) GetBlock(opts *bind.CallOpts, blockId uint64) (Ta
// GetBlock is a free data retrieval call binding the contract method 0x5fa15e79.
//
-// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint64,uint16,uint16,uint64,uint96,uint16) blk)
+// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32,bytes32[7]) blk)
func (_TaikoL1 *TaikoL1Session) GetBlock(blockId uint64) (TaikoDataBlock, error) {
return _TaikoL1.Contract.GetBlock(&_TaikoL1.CallOpts, blockId)
}
// GetBlock is a free data retrieval call binding the contract method 0x5fa15e79.
//
-// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint64,uint16,uint16,uint64,uint96,uint16) blk)
+// Solidity: function getBlock(uint64 blockId) view returns((bytes32,address,uint96,uint64,uint64,uint64,uint32,uint32,bytes32[7]) blk)
func (_TaikoL1 *TaikoL1CallerSession) GetBlock(blockId uint64) (TaikoDataBlock, error) {
return _TaikoL1.Contract.GetBlock(&_TaikoL1.CallOpts, blockId)
}
// GetConfig is a free data retrieval call binding the contract method 0xc3f909d4.
//
-// Solidity: function getConfig() pure returns((uint256,bool,uint64,uint64,uint64,uint32,uint32,uint24,uint256,uint256,uint256,uint256,uint256,uint16,uint96,bool,uint256,uint64,uint64,uint96,uint96,uint256,uint256))
+// Solidity: function getConfig() view returns((uint64,uint64,uint64,uint64,uint32,uint24,uint24,bool,uint96,uint256,uint64,uint64,uint96,uint96,uint256,uint256))
func (_TaikoL1 *TaikoL1Caller) GetConfig(opts *bind.CallOpts) (TaikoDataConfig, error) {
var out []interface{}
err := _TaikoL1.contract.Call(opts, &out, "getConfig")
@@ -388,202 +407,278 @@ func (_TaikoL1 *TaikoL1Caller) GetConfig(opts *bind.CallOpts) (TaikoDataConfig,
// GetConfig is a free data retrieval call binding the contract method 0xc3f909d4.
//
-// Solidity: function getConfig() pure returns((uint256,bool,uint64,uint64,uint64,uint32,uint32,uint24,uint256,uint256,uint256,uint256,uint256,uint16,uint96,bool,uint256,uint64,uint64,uint96,uint96,uint256,uint256))
+// Solidity: function getConfig() view returns((uint64,uint64,uint64,uint64,uint32,uint24,uint24,bool,uint96,uint256,uint64,uint64,uint96,uint96,uint256,uint256))
func (_TaikoL1 *TaikoL1Session) GetConfig() (TaikoDataConfig, error) {
return _TaikoL1.Contract.GetConfig(&_TaikoL1.CallOpts)
}
// GetConfig is a free data retrieval call binding the contract method 0xc3f909d4.
//
-// Solidity: function getConfig() pure returns((uint256,bool,uint64,uint64,uint64,uint32,uint32,uint24,uint256,uint256,uint256,uint256,uint256,uint16,uint96,bool,uint256,uint64,uint64,uint96,uint96,uint256,uint256))
+// Solidity: function getConfig() view returns((uint64,uint64,uint64,uint64,uint32,uint24,uint24,bool,uint96,uint256,uint64,uint64,uint96,uint96,uint256,uint256))
func (_TaikoL1 *TaikoL1CallerSession) GetConfig() (TaikoDataConfig, error) {
return _TaikoL1.Contract.GetConfig(&_TaikoL1.CallOpts)
}
-// GetCrossChainBlockHash is a free data retrieval call binding the contract method 0xbdd6bc36.
+// GetMinTier is a free data retrieval call binding the contract method 0x59ab4e23.
//
-// Solidity: function getCrossChainBlockHash(uint64 blockId) view returns(bytes32)
-func (_TaikoL1 *TaikoL1Caller) GetCrossChainBlockHash(opts *bind.CallOpts, blockId uint64) ([32]byte, error) {
+// Solidity: function getMinTier(uint256 rand) view returns(uint16)
+func (_TaikoL1 *TaikoL1Caller) GetMinTier(opts *bind.CallOpts, rand *big.Int) (uint16, error) {
var out []interface{}
- err := _TaikoL1.contract.Call(opts, &out, "getCrossChainBlockHash", blockId)
+ err := _TaikoL1.contract.Call(opts, &out, "getMinTier", rand)
if err != nil {
- return *new([32]byte), err
+ return *new(uint16), err
}
- out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+ out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16)
return out0, err
}
-// GetCrossChainBlockHash is a free data retrieval call binding the contract method 0xbdd6bc36.
+// GetMinTier is a free data retrieval call binding the contract method 0x59ab4e23.
//
-// Solidity: function getCrossChainBlockHash(uint64 blockId) view returns(bytes32)
-func (_TaikoL1 *TaikoL1Session) GetCrossChainBlockHash(blockId uint64) ([32]byte, error) {
- return _TaikoL1.Contract.GetCrossChainBlockHash(&_TaikoL1.CallOpts, blockId)
+// Solidity: function getMinTier(uint256 rand) view returns(uint16)
+func (_TaikoL1 *TaikoL1Session) GetMinTier(rand *big.Int) (uint16, error) {
+ return _TaikoL1.Contract.GetMinTier(&_TaikoL1.CallOpts, rand)
}
-// GetCrossChainBlockHash is a free data retrieval call binding the contract method 0xbdd6bc36.
+// GetMinTier is a free data retrieval call binding the contract method 0x59ab4e23.
//
-// Solidity: function getCrossChainBlockHash(uint64 blockId) view returns(bytes32)
-func (_TaikoL1 *TaikoL1CallerSession) GetCrossChainBlockHash(blockId uint64) ([32]byte, error) {
- return _TaikoL1.Contract.GetCrossChainBlockHash(&_TaikoL1.CallOpts, blockId)
+// Solidity: function getMinTier(uint256 rand) view returns(uint16)
+func (_TaikoL1 *TaikoL1CallerSession) GetMinTier(rand *big.Int) (uint16, error) {
+ return _TaikoL1.Contract.GetMinTier(&_TaikoL1.CallOpts, rand)
}
-// GetCrossChainSignalRoot is a free data retrieval call binding the contract method 0x0599d294.
+// GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5.
//
-// Solidity: function getCrossChainSignalRoot(uint64 blockId) view returns(bytes32)
-func (_TaikoL1 *TaikoL1Caller) GetCrossChainSignalRoot(opts *bind.CallOpts, blockId uint64) ([32]byte, error) {
+// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64) a, (uint64,uint64,bool) b)
+func (_TaikoL1 *TaikoL1Caller) GetStateVariables(opts *bind.CallOpts) (struct {
+ A TaikoDataSlotA
+ B TaikoDataSlotB
+}, error) {
var out []interface{}
- err := _TaikoL1.contract.Call(opts, &out, "getCrossChainSignalRoot", blockId)
+ err := _TaikoL1.contract.Call(opts, &out, "getStateVariables")
+ outstruct := new(struct {
+ A TaikoDataSlotA
+ B TaikoDataSlotB
+ })
if err != nil {
- return *new([32]byte), err
+ return *outstruct, err
}
- out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+ outstruct.A = *abi.ConvertType(out[0], new(TaikoDataSlotA)).(*TaikoDataSlotA)
+ outstruct.B = *abi.ConvertType(out[1], new(TaikoDataSlotB)).(*TaikoDataSlotB)
+
+ return *outstruct, err
+
+}
+
+// GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5.
+//
+// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64) a, (uint64,uint64,bool) b)
+func (_TaikoL1 *TaikoL1Session) GetStateVariables() (struct {
+ A TaikoDataSlotA
+ B TaikoDataSlotB
+}, error) {
+ return _TaikoL1.Contract.GetStateVariables(&_TaikoL1.CallOpts)
+}
+
+// GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5.
+//
+// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64) a, (uint64,uint64,bool) b)
+func (_TaikoL1 *TaikoL1CallerSession) GetStateVariables() (struct {
+ A TaikoDataSlotA
+ B TaikoDataSlotB
+}, error) {
+ return _TaikoL1.Contract.GetStateVariables(&_TaikoL1.CallOpts)
+}
+
+// GetSyncedSnippet is a free data retrieval call binding the contract method 0x8cfb0459.
+//
+// Solidity: function getSyncedSnippet(uint64 blockId) view returns((uint64,uint64,bytes32,bytes32))
+func (_TaikoL1 *TaikoL1Caller) GetSyncedSnippet(opts *bind.CallOpts, blockId uint64) (ICrossChainSyncSnippet, error) {
+ var out []interface{}
+ err := _TaikoL1.contract.Call(opts, &out, "getSyncedSnippet", blockId)
+
+ if err != nil {
+ return *new(ICrossChainSyncSnippet), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(ICrossChainSyncSnippet)).(*ICrossChainSyncSnippet)
return out0, err
}
-// GetCrossChainSignalRoot is a free data retrieval call binding the contract method 0x0599d294.
+// GetSyncedSnippet is a free data retrieval call binding the contract method 0x8cfb0459.
//
-// Solidity: function getCrossChainSignalRoot(uint64 blockId) view returns(bytes32)
-func (_TaikoL1 *TaikoL1Session) GetCrossChainSignalRoot(blockId uint64) ([32]byte, error) {
- return _TaikoL1.Contract.GetCrossChainSignalRoot(&_TaikoL1.CallOpts, blockId)
+// Solidity: function getSyncedSnippet(uint64 blockId) view returns((uint64,uint64,bytes32,bytes32))
+func (_TaikoL1 *TaikoL1Session) GetSyncedSnippet(blockId uint64) (ICrossChainSyncSnippet, error) {
+ return _TaikoL1.Contract.GetSyncedSnippet(&_TaikoL1.CallOpts, blockId)
}
-// GetCrossChainSignalRoot is a free data retrieval call binding the contract method 0x0599d294.
+// GetSyncedSnippet is a free data retrieval call binding the contract method 0x8cfb0459.
//
-// Solidity: function getCrossChainSignalRoot(uint64 blockId) view returns(bytes32)
-func (_TaikoL1 *TaikoL1CallerSession) GetCrossChainSignalRoot(blockId uint64) ([32]byte, error) {
- return _TaikoL1.Contract.GetCrossChainSignalRoot(&_TaikoL1.CallOpts, blockId)
+// Solidity: function getSyncedSnippet(uint64 blockId) view returns((uint64,uint64,bytes32,bytes32))
+func (_TaikoL1 *TaikoL1CallerSession) GetSyncedSnippet(blockId uint64) (ICrossChainSyncSnippet, error) {
+ return _TaikoL1.Contract.GetSyncedSnippet(&_TaikoL1.CallOpts, blockId)
}
-// GetForkChoice is a free data retrieval call binding the contract method 0xc24c235c.
+// GetTier is a free data retrieval call binding the contract method 0x576c3de7.
//
-// Solidity: function getForkChoice(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint64))
-func (_TaikoL1 *TaikoL1Caller) GetForkChoice(opts *bind.CallOpts, blockId uint64, parentHash [32]byte) (TaikoDataForkChoice, error) {
+// Solidity: function getTier(uint16 tierId) view returns((bytes32,uint96,uint96,uint24,uint16,uint8))
+func (_TaikoL1 *TaikoL1Caller) GetTier(opts *bind.CallOpts, tierId uint16) (ITierProviderTier, error) {
var out []interface{}
- err := _TaikoL1.contract.Call(opts, &out, "getForkChoice", blockId, parentHash)
+ err := _TaikoL1.contract.Call(opts, &out, "getTier", tierId)
if err != nil {
- return *new(TaikoDataForkChoice), err
+ return *new(ITierProviderTier), err
}
- out0 := *abi.ConvertType(out[0], new(TaikoDataForkChoice)).(*TaikoDataForkChoice)
+ out0 := *abi.ConvertType(out[0], new(ITierProviderTier)).(*ITierProviderTier)
return out0, err
}
-// GetForkChoice is a free data retrieval call binding the contract method 0xc24c235c.
+// GetTier is a free data retrieval call binding the contract method 0x576c3de7.
//
-// Solidity: function getForkChoice(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint64))
-func (_TaikoL1 *TaikoL1Session) GetForkChoice(blockId uint64, parentHash [32]byte) (TaikoDataForkChoice, error) {
- return _TaikoL1.Contract.GetForkChoice(&_TaikoL1.CallOpts, blockId, parentHash)
+// Solidity: function getTier(uint16 tierId) view returns((bytes32,uint96,uint96,uint24,uint16,uint8))
+func (_TaikoL1 *TaikoL1Session) GetTier(tierId uint16) (ITierProviderTier, error) {
+ return _TaikoL1.Contract.GetTier(&_TaikoL1.CallOpts, tierId)
}
-// GetForkChoice is a free data retrieval call binding the contract method 0xc24c235c.
+// GetTier is a free data retrieval call binding the contract method 0x576c3de7.
//
-// Solidity: function getForkChoice(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint64))
-func (_TaikoL1 *TaikoL1CallerSession) GetForkChoice(blockId uint64, parentHash [32]byte) (TaikoDataForkChoice, error) {
- return _TaikoL1.Contract.GetForkChoice(&_TaikoL1.CallOpts, blockId, parentHash)
+// Solidity: function getTier(uint16 tierId) view returns((bytes32,uint96,uint96,uint24,uint16,uint8))
+func (_TaikoL1 *TaikoL1CallerSession) GetTier(tierId uint16) (ITierProviderTier, error) {
+ return _TaikoL1.Contract.GetTier(&_TaikoL1.CallOpts, tierId)
}
-// GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5.
+// GetTierIds is a free data retrieval call binding the contract method 0xd8cde1c6.
//
-// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64,uint64,uint64))
-func (_TaikoL1 *TaikoL1Caller) GetStateVariables(opts *bind.CallOpts) (TaikoDataStateVariables, error) {
+// Solidity: function getTierIds() view returns(uint16[] ids)
+func (_TaikoL1 *TaikoL1Caller) GetTierIds(opts *bind.CallOpts) ([]uint16, error) {
var out []interface{}
- err := _TaikoL1.contract.Call(opts, &out, "getStateVariables")
+ err := _TaikoL1.contract.Call(opts, &out, "getTierIds")
if err != nil {
- return *new(TaikoDataStateVariables), err
+ return *new([]uint16), err
}
- out0 := *abi.ConvertType(out[0], new(TaikoDataStateVariables)).(*TaikoDataStateVariables)
+ out0 := *abi.ConvertType(out[0], new([]uint16)).(*[]uint16)
return out0, err
}
-// GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5.
+// GetTierIds is a free data retrieval call binding the contract method 0xd8cde1c6.
//
-// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64,uint64,uint64))
-func (_TaikoL1 *TaikoL1Session) GetStateVariables() (TaikoDataStateVariables, error) {
- return _TaikoL1.Contract.GetStateVariables(&_TaikoL1.CallOpts)
+// Solidity: function getTierIds() view returns(uint16[] ids)
+func (_TaikoL1 *TaikoL1Session) GetTierIds() ([]uint16, error) {
+ return _TaikoL1.Contract.GetTierIds(&_TaikoL1.CallOpts)
}
-// GetStateVariables is a free data retrieval call binding the contract method 0xdde89cf5.
+// GetTierIds is a free data retrieval call binding the contract method 0xd8cde1c6.
//
-// Solidity: function getStateVariables() view returns((uint64,uint64,uint64,uint64,uint64,uint64))
-func (_TaikoL1 *TaikoL1CallerSession) GetStateVariables() (TaikoDataStateVariables, error) {
- return _TaikoL1.Contract.GetStateVariables(&_TaikoL1.CallOpts)
+// Solidity: function getTierIds() view returns(uint16[] ids)
+func (_TaikoL1 *TaikoL1CallerSession) GetTierIds() ([]uint16, error) {
+ return _TaikoL1.Contract.GetTierIds(&_TaikoL1.CallOpts)
}
-// GetTaikoTokenBalance is a free data retrieval call binding the contract method 0x8dff9cea.
+// GetTransition is a free data retrieval call binding the contract method 0xfd257e29.
//
-// Solidity: function getTaikoTokenBalance(address addr) view returns(uint256)
-func (_TaikoL1 *TaikoL1Caller) GetTaikoTokenBalance(opts *bind.CallOpts, addr common.Address) (*big.Int, error) {
+// Solidity: function getTransition(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint96,address,uint96,uint64,uint16,uint8,bytes32[4]))
+func (_TaikoL1 *TaikoL1Caller) GetTransition(opts *bind.CallOpts, blockId uint64, parentHash [32]byte) (TaikoDataTransitionState, error) {
var out []interface{}
- err := _TaikoL1.contract.Call(opts, &out, "getTaikoTokenBalance", addr)
+ err := _TaikoL1.contract.Call(opts, &out, "getTransition", blockId, parentHash)
if err != nil {
- return *new(*big.Int), err
+ return *new(TaikoDataTransitionState), err
}
- out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
+ out0 := *abi.ConvertType(out[0], new(TaikoDataTransitionState)).(*TaikoDataTransitionState)
return out0, err
}
-// GetTaikoTokenBalance is a free data retrieval call binding the contract method 0x8dff9cea.
+// GetTransition is a free data retrieval call binding the contract method 0xfd257e29.
//
-// Solidity: function getTaikoTokenBalance(address addr) view returns(uint256)
-func (_TaikoL1 *TaikoL1Session) GetTaikoTokenBalance(addr common.Address) (*big.Int, error) {
- return _TaikoL1.Contract.GetTaikoTokenBalance(&_TaikoL1.CallOpts, addr)
+// Solidity: function getTransition(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint96,address,uint96,uint64,uint16,uint8,bytes32[4]))
+func (_TaikoL1 *TaikoL1Session) GetTransition(blockId uint64, parentHash [32]byte) (TaikoDataTransitionState, error) {
+ return _TaikoL1.Contract.GetTransition(&_TaikoL1.CallOpts, blockId, parentHash)
}
-// GetTaikoTokenBalance is a free data retrieval call binding the contract method 0x8dff9cea.
+// GetTransition is a free data retrieval call binding the contract method 0xfd257e29.
//
-// Solidity: function getTaikoTokenBalance(address addr) view returns(uint256)
-func (_TaikoL1 *TaikoL1CallerSession) GetTaikoTokenBalance(addr common.Address) (*big.Int, error) {
- return _TaikoL1.Contract.GetTaikoTokenBalance(&_TaikoL1.CallOpts, addr)
+// Solidity: function getTransition(uint64 blockId, bytes32 parentHash) view returns((bytes32,bytes32,bytes32,address,uint96,address,uint96,uint64,uint16,uint8,bytes32[4]))
+func (_TaikoL1 *TaikoL1CallerSession) GetTransition(blockId uint64, parentHash [32]byte) (TaikoDataTransitionState, error) {
+ return _TaikoL1.Contract.GetTransition(&_TaikoL1.CallOpts, blockId, parentHash)
}
-// GetVerifierName is a free data retrieval call binding the contract method 0x0372303d.
+// IsBlobReusable is a free data retrieval call binding the contract method 0xb67d7638.
//
-// Solidity: function getVerifierName(uint16 id) pure returns(bytes32)
-func (_TaikoL1 *TaikoL1Caller) GetVerifierName(opts *bind.CallOpts, id uint16) ([32]byte, error) {
+// Solidity: function isBlobReusable(bytes32 blobHash) view returns(bool)
+func (_TaikoL1 *TaikoL1Caller) IsBlobReusable(opts *bind.CallOpts, blobHash [32]byte) (bool, error) {
var out []interface{}
- err := _TaikoL1.contract.Call(opts, &out, "getVerifierName", id)
+ err := _TaikoL1.contract.Call(opts, &out, "isBlobReusable", blobHash)
if err != nil {
- return *new([32]byte), err
+ return *new(bool), err
}
- out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
-// GetVerifierName is a free data retrieval call binding the contract method 0x0372303d.
+// IsBlobReusable is a free data retrieval call binding the contract method 0xb67d7638.
//
-// Solidity: function getVerifierName(uint16 id) pure returns(bytes32)
-func (_TaikoL1 *TaikoL1Session) GetVerifierName(id uint16) ([32]byte, error) {
- return _TaikoL1.Contract.GetVerifierName(&_TaikoL1.CallOpts, id)
+// Solidity: function isBlobReusable(bytes32 blobHash) view returns(bool)
+func (_TaikoL1 *TaikoL1Session) IsBlobReusable(blobHash [32]byte) (bool, error) {
+ return _TaikoL1.Contract.IsBlobReusable(&_TaikoL1.CallOpts, blobHash)
}
-// GetVerifierName is a free data retrieval call binding the contract method 0x0372303d.
+// IsBlobReusable is a free data retrieval call binding the contract method 0xb67d7638.
//
-// Solidity: function getVerifierName(uint16 id) pure returns(bytes32)
-func (_TaikoL1 *TaikoL1CallerSession) GetVerifierName(id uint16) ([32]byte, error) {
- return _TaikoL1.Contract.GetVerifierName(&_TaikoL1.CallOpts, id)
+// Solidity: function isBlobReusable(bytes32 blobHash) view returns(bool)
+func (_TaikoL1 *TaikoL1CallerSession) IsBlobReusable(blobHash [32]byte) (bool, error) {
+ return _TaikoL1.Contract.IsBlobReusable(&_TaikoL1.CallOpts, blobHash)
+}
+
+// IsConfigValid is a free data retrieval call binding the contract method 0xe3f1bdc5.
+//
+// Solidity: function isConfigValid() view returns(bool)
+func (_TaikoL1 *TaikoL1Caller) IsConfigValid(opts *bind.CallOpts) (bool, error) {
+ var out []interface{}
+ err := _TaikoL1.contract.Call(opts, &out, "isConfigValid")
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// IsConfigValid is a free data retrieval call binding the contract method 0xe3f1bdc5.
+//
+// Solidity: function isConfigValid() view returns(bool)
+func (_TaikoL1 *TaikoL1Session) IsConfigValid() (bool, error) {
+ return _TaikoL1.Contract.IsConfigValid(&_TaikoL1.CallOpts)
+}
+
+// IsConfigValid is a free data retrieval call binding the contract method 0xe3f1bdc5.
+//
+// Solidity: function isConfigValid() view returns(bool)
+func (_TaikoL1 *TaikoL1CallerSession) IsConfigValid() (bool, error) {
+ return _TaikoL1.Contract.IsConfigValid(&_TaikoL1.CallOpts)
}
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
@@ -617,10 +712,72 @@ func (_TaikoL1 *TaikoL1CallerSession) Owner() (common.Address, error) {
return _TaikoL1.Contract.Owner(&_TaikoL1.CallOpts)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_TaikoL1 *TaikoL1Caller) Paused(opts *bind.CallOpts) (bool, error) {
+ var out []interface{}
+ err := _TaikoL1.contract.Call(opts, &out, "paused")
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_TaikoL1 *TaikoL1Caller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function paused() view returns(bool)
+func (_TaikoL1 *TaikoL1Session) Paused() (bool, error) {
+ return _TaikoL1.Contract.Paused(&_TaikoL1.CallOpts)
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_TaikoL1 *TaikoL1CallerSession) Paused() (bool, error) {
+ return _TaikoL1.Contract.Paused(&_TaikoL1.CallOpts)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_TaikoL1 *TaikoL1Caller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) {
+ var out []interface{}
+ err := _TaikoL1.contract.Call(opts, &out, "proxiableUUID")
+
+ if err != nil {
+ return *new([32]byte), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+
+ return out0, err
+
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_TaikoL1 *TaikoL1Session) ProxiableUUID() ([32]byte, error) {
+ return _TaikoL1.Contract.ProxiableUUID(&_TaikoL1.CallOpts)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_TaikoL1 *TaikoL1CallerSession) ProxiableUUID() ([32]byte, error) {
+ return _TaikoL1.Contract.ProxiableUUID(&_TaikoL1.CallOpts)
+}
+
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
+//
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_TaikoL1 *TaikoL1Caller) Resolve(opts *bind.CallOpts, chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
var out []interface{}
err := _TaikoL1.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress)
@@ -634,17 +791,17 @@ func (_TaikoL1 *TaikoL1Caller) Resolve(opts *bind.CallOpts, chainId *big.Int, na
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_TaikoL1 *TaikoL1Session) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_TaikoL1 *TaikoL1Session) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _TaikoL1.Contract.Resolve(&_TaikoL1.CallOpts, chainId, name, allowZeroAddress)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_TaikoL1 *TaikoL1CallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_TaikoL1 *TaikoL1CallerSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _TaikoL1.Contract.Resolve(&_TaikoL1.CallOpts, chainId, name, allowZeroAddress)
}
@@ -681,7 +838,7 @@ func (_TaikoL1 *TaikoL1CallerSession) Resolve0(name [32]byte, allowZeroAddress b
// State is a free data retrieval call binding the contract method 0xc19d93fb.
//
-// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,uint64,uint64) slotB)
+// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,bool) slotB)
func (_TaikoL1 *TaikoL1Caller) State(opts *bind.CallOpts) (struct {
SlotA TaikoDataSlotA
SlotB TaikoDataSlotB
@@ -706,7 +863,7 @@ func (_TaikoL1 *TaikoL1Caller) State(opts *bind.CallOpts) (struct {
// State is a free data retrieval call binding the contract method 0xc19d93fb.
//
-// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,uint64,uint64) slotB)
+// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,bool) slotB)
func (_TaikoL1 *TaikoL1Session) State() (struct {
SlotA TaikoDataSlotA
SlotB TaikoDataSlotB
@@ -716,7 +873,7 @@ func (_TaikoL1 *TaikoL1Session) State() (struct {
// State is a free data retrieval call binding the contract method 0xc19d93fb.
//
-// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,uint64,uint64) slotB)
+// Solidity: function state() view returns((uint64,uint64,uint64,uint64) slotA, (uint64,uint64,bool) slotB)
func (_TaikoL1 *TaikoL1CallerSession) State() (struct {
SlotA TaikoDataSlotA
SlotB TaikoDataSlotB
@@ -745,27 +902,6 @@ func (_TaikoL1 *TaikoL1TransactorSession) DepositEtherToL2(recipient common.Addr
return _TaikoL1.Contract.DepositEtherToL2(&_TaikoL1.TransactOpts, recipient)
}
-// DepositTaikoToken is a paid mutator transaction binding the contract method 0x98f39aba.
-//
-// Solidity: function depositTaikoToken(uint256 amount) returns()
-func (_TaikoL1 *TaikoL1Transactor) DepositTaikoToken(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) {
- return _TaikoL1.contract.Transact(opts, "depositTaikoToken", amount)
-}
-
-// DepositTaikoToken is a paid mutator transaction binding the contract method 0x98f39aba.
-//
-// Solidity: function depositTaikoToken(uint256 amount) returns()
-func (_TaikoL1 *TaikoL1Session) DepositTaikoToken(amount *big.Int) (*types.Transaction, error) {
- return _TaikoL1.Contract.DepositTaikoToken(&_TaikoL1.TransactOpts, amount)
-}
-
-// DepositTaikoToken is a paid mutator transaction binding the contract method 0x98f39aba.
-//
-// Solidity: function depositTaikoToken(uint256 amount) returns()
-func (_TaikoL1 *TaikoL1TransactorSession) DepositTaikoToken(amount *big.Int) (*types.Transaction, error) {
- return _TaikoL1.Contract.DepositTaikoToken(&_TaikoL1.TransactOpts, amount)
-}
-
// Init is a paid mutator transaction binding the contract method 0x2cc0b254.
//
// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash) returns()
@@ -787,25 +923,67 @@ func (_TaikoL1 *TaikoL1TransactorSession) Init(_addressManager common.Address, _
return _TaikoL1.Contract.Init(&_TaikoL1.TransactOpts, _addressManager, _genesisBlockHash)
}
-// ProposeBlock is a paid mutator transaction binding the contract method 0xb6d5a397.
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_TaikoL1 *TaikoL1Transactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "pause")
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_TaikoL1 *TaikoL1Session) Pause() (*types.Transaction, error) {
+ return _TaikoL1.Contract.Pause(&_TaikoL1.TransactOpts)
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_TaikoL1 *TaikoL1TransactorSession) Pause() (*types.Transaction, error) {
+ return _TaikoL1.Contract.Pause(&_TaikoL1.TransactOpts)
+}
+
+// PauseProving is a paid mutator transaction binding the contract method 0xff00c391.
+//
+// Solidity: function pauseProving(bool pause) returns()
+func (_TaikoL1 *TaikoL1Transactor) PauseProving(opts *bind.TransactOpts, pause bool) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "pauseProving", pause)
+}
+
+// PauseProving is a paid mutator transaction binding the contract method 0xff00c391.
+//
+// Solidity: function pauseProving(bool pause) returns()
+func (_TaikoL1 *TaikoL1Session) PauseProving(pause bool) (*types.Transaction, error) {
+ return _TaikoL1.Contract.PauseProving(&_TaikoL1.TransactOpts, pause)
+}
+
+// PauseProving is a paid mutator transaction binding the contract method 0xff00c391.
+//
+// Solidity: function pauseProving(bool pause) returns()
+func (_TaikoL1 *TaikoL1TransactorSession) PauseProving(pause bool) (*types.Transaction, error) {
+ return _TaikoL1.Contract.PauseProving(&_TaikoL1.TransactOpts, pause)
+}
+
+// ProposeBlock is a paid mutator transaction binding the contract method 0xef16e845.
//
-// Solidity: function proposeBlock(bytes input, bytes assignment, bytes txList) payable returns((uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Transactor) ProposeBlock(opts *bind.TransactOpts, input []byte, assignment []byte, txList []byte) (*types.Transaction, error) {
- return _TaikoL1.contract.Transact(opts, "proposeBlock", input, assignment, txList)
+// Solidity: function proposeBlock(bytes params, bytes txList) payable returns((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint96,uint64)[] depositsProcessed)
+func (_TaikoL1 *TaikoL1Transactor) ProposeBlock(opts *bind.TransactOpts, params []byte, txList []byte) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "proposeBlock", params, txList)
}
-// ProposeBlock is a paid mutator transaction binding the contract method 0xb6d5a397.
+// ProposeBlock is a paid mutator transaction binding the contract method 0xef16e845.
//
-// Solidity: function proposeBlock(bytes input, bytes assignment, bytes txList) payable returns((uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Session) ProposeBlock(input []byte, assignment []byte, txList []byte) (*types.Transaction, error) {
- return _TaikoL1.Contract.ProposeBlock(&_TaikoL1.TransactOpts, input, assignment, txList)
+// Solidity: function proposeBlock(bytes params, bytes txList) payable returns((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint96,uint64)[] depositsProcessed)
+func (_TaikoL1 *TaikoL1Session) ProposeBlock(params []byte, txList []byte) (*types.Transaction, error) {
+ return _TaikoL1.Contract.ProposeBlock(&_TaikoL1.TransactOpts, params, txList)
}
-// ProposeBlock is a paid mutator transaction binding the contract method 0xb6d5a397.
+// ProposeBlock is a paid mutator transaction binding the contract method 0xef16e845.
//
-// Solidity: function proposeBlock(bytes input, bytes assignment, bytes txList) payable returns((uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1TransactorSession) ProposeBlock(input []byte, assignment []byte, txList []byte) (*types.Transaction, error) {
- return _TaikoL1.Contract.ProposeBlock(&_TaikoL1.TransactOpts, input, assignment, txList)
+// Solidity: function proposeBlock(bytes params, bytes txList) payable returns((bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint96,uint64)[] depositsProcessed)
+func (_TaikoL1 *TaikoL1TransactorSession) ProposeBlock(params []byte, txList []byte) (*types.Transaction, error) {
+ return _TaikoL1.Contract.ProposeBlock(&_TaikoL1.TransactOpts, params, txList)
}
// ProveBlock is a paid mutator transaction binding the contract method 0x10d008bd.
@@ -850,27 +1028,6 @@ func (_TaikoL1 *TaikoL1TransactorSession) RenounceOwnership() (*types.Transactio
return _TaikoL1.Contract.RenounceOwnership(&_TaikoL1.TransactOpts)
}
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_TaikoL1 *TaikoL1Transactor) SetAddressManager(opts *bind.TransactOpts, newAddressManager common.Address) (*types.Transaction, error) {
- return _TaikoL1.contract.Transact(opts, "setAddressManager", newAddressManager)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_TaikoL1 *TaikoL1Session) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _TaikoL1.Contract.SetAddressManager(&_TaikoL1.TransactOpts, newAddressManager)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_TaikoL1 *TaikoL1TransactorSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _TaikoL1.Contract.SetAddressManager(&_TaikoL1.TransactOpts, newAddressManager)
-}
-
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
@@ -892,46 +1049,88 @@ func (_TaikoL1 *TaikoL1TransactorSession) TransferOwnership(newOwner common.Addr
return _TaikoL1.Contract.TransferOwnership(&_TaikoL1.TransactOpts, newOwner)
}
-// VerifyBlocks is a paid mutator transaction binding the contract method 0x8778209d.
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
//
-// Solidity: function verifyBlocks(uint64 maxBlocks) returns()
-func (_TaikoL1 *TaikoL1Transactor) VerifyBlocks(opts *bind.TransactOpts, maxBlocks uint64) (*types.Transaction, error) {
- return _TaikoL1.contract.Transact(opts, "verifyBlocks", maxBlocks)
+// Solidity: function unpause() returns()
+func (_TaikoL1 *TaikoL1Transactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "unpause")
}
-// VerifyBlocks is a paid mutator transaction binding the contract method 0x8778209d.
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
//
-// Solidity: function verifyBlocks(uint64 maxBlocks) returns()
-func (_TaikoL1 *TaikoL1Session) VerifyBlocks(maxBlocks uint64) (*types.Transaction, error) {
- return _TaikoL1.Contract.VerifyBlocks(&_TaikoL1.TransactOpts, maxBlocks)
+// Solidity: function unpause() returns()
+func (_TaikoL1 *TaikoL1Session) Unpause() (*types.Transaction, error) {
+ return _TaikoL1.Contract.Unpause(&_TaikoL1.TransactOpts)
}
-// VerifyBlocks is a paid mutator transaction binding the contract method 0x8778209d.
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
//
-// Solidity: function verifyBlocks(uint64 maxBlocks) returns()
-func (_TaikoL1 *TaikoL1TransactorSession) VerifyBlocks(maxBlocks uint64) (*types.Transaction, error) {
- return _TaikoL1.Contract.VerifyBlocks(&_TaikoL1.TransactOpts, maxBlocks)
+// Solidity: function unpause() returns()
+func (_TaikoL1 *TaikoL1TransactorSession) Unpause() (*types.Transaction, error) {
+ return _TaikoL1.Contract.Unpause(&_TaikoL1.TransactOpts)
}
-// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x5043f059.
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
//
-// Solidity: function withdrawTaikoToken(uint256 amount) returns()
-func (_TaikoL1 *TaikoL1Transactor) WithdrawTaikoToken(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) {
- return _TaikoL1.contract.Transact(opts, "withdrawTaikoToken", amount)
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_TaikoL1 *TaikoL1Transactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "upgradeTo", newImplementation)
}
-// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x5043f059.
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
//
-// Solidity: function withdrawTaikoToken(uint256 amount) returns()
-func (_TaikoL1 *TaikoL1Session) WithdrawTaikoToken(amount *big.Int) (*types.Transaction, error) {
- return _TaikoL1.Contract.WithdrawTaikoToken(&_TaikoL1.TransactOpts, amount)
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_TaikoL1 *TaikoL1Session) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _TaikoL1.Contract.UpgradeTo(&_TaikoL1.TransactOpts, newImplementation)
}
-// WithdrawTaikoToken is a paid mutator transaction binding the contract method 0x5043f059.
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
//
-// Solidity: function withdrawTaikoToken(uint256 amount) returns()
-func (_TaikoL1 *TaikoL1TransactorSession) WithdrawTaikoToken(amount *big.Int) (*types.Transaction, error) {
- return _TaikoL1.Contract.WithdrawTaikoToken(&_TaikoL1.TransactOpts, amount)
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_TaikoL1 *TaikoL1TransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _TaikoL1.Contract.UpgradeTo(&_TaikoL1.TransactOpts, newImplementation)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_TaikoL1 *TaikoL1Transactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "upgradeToAndCall", newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_TaikoL1 *TaikoL1Session) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _TaikoL1.Contract.UpgradeToAndCall(&_TaikoL1.TransactOpts, newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_TaikoL1 *TaikoL1TransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _TaikoL1.Contract.UpgradeToAndCall(&_TaikoL1.TransactOpts, newImplementation, data)
+}
+
+// VerifyBlocks is a paid mutator transaction binding the contract method 0x8778209d.
+//
+// Solidity: function verifyBlocks(uint64 maxBlocksToVerify) returns()
+func (_TaikoL1 *TaikoL1Transactor) VerifyBlocks(opts *bind.TransactOpts, maxBlocksToVerify uint64) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "verifyBlocks", maxBlocksToVerify)
+}
+
+// VerifyBlocks is a paid mutator transaction binding the contract method 0x8778209d.
+//
+// Solidity: function verifyBlocks(uint64 maxBlocksToVerify) returns()
+func (_TaikoL1 *TaikoL1Session) VerifyBlocks(maxBlocksToVerify uint64) (*types.Transaction, error) {
+ return _TaikoL1.Contract.VerifyBlocks(&_TaikoL1.TransactOpts, maxBlocksToVerify)
+}
+
+// VerifyBlocks is a paid mutator transaction binding the contract method 0x8778209d.
+//
+// Solidity: function verifyBlocks(uint64 maxBlocksToVerify) returns()
+func (_TaikoL1 *TaikoL1TransactorSession) VerifyBlocks(maxBlocksToVerify uint64) (*types.Transaction, error) {
+ return _TaikoL1.Contract.VerifyBlocks(&_TaikoL1.TransactOpts, maxBlocksToVerify)
}
// Receive is a paid mutator transaction binding the contract receive function.
@@ -955,9 +1154,9 @@ func (_TaikoL1 *TaikoL1TransactorSession) Receive() (*types.Transaction, error)
return _TaikoL1.Contract.Receive(&_TaikoL1.TransactOpts)
}
-// TaikoL1AddressManagerChangedIterator is returned from FilterAddressManagerChanged and is used to iterate over the raw logs and unpacked data for AddressManagerChanged events raised by the TaikoL1 contract.
-type TaikoL1AddressManagerChangedIterator struct {
- Event *TaikoL1AddressManagerChanged // Event containing the contract specifics and raw log
+// TaikoL1AdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the TaikoL1 contract.
+type TaikoL1AdminChangedIterator struct {
+ Event *TaikoL1AdminChanged // 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
@@ -971,7 +1170,7 @@ type TaikoL1AddressManagerChangedIterator struct {
// 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 *TaikoL1AddressManagerChangedIterator) Next() bool {
+func (it *TaikoL1AdminChangedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -980,7 +1179,7 @@ func (it *TaikoL1AddressManagerChangedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1AddressManagerChanged)
+ it.Event = new(TaikoL1AdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -995,7 +1194,7 @@ func (it *TaikoL1AddressManagerChangedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1AddressManagerChanged)
+ it.Event = new(TaikoL1AdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1011,51 +1210,42 @@ func (it *TaikoL1AddressManagerChangedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1AddressManagerChangedIterator) Error() error {
+func (it *TaikoL1AdminChangedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1AddressManagerChangedIterator) Close() error {
+func (it *TaikoL1AdminChangedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1AddressManagerChanged represents a AddressManagerChanged event raised by the TaikoL1 contract.
-type TaikoL1AddressManagerChanged struct {
- AddressManager common.Address
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1AdminChanged represents a AdminChanged event raised by the TaikoL1 contract.
+type TaikoL1AdminChanged struct {
+ PreviousAdmin common.Address
+ NewAdmin common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterAddressManagerChanged is a free log retrieval operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_TaikoL1 *TaikoL1Filterer) FilterAddressManagerChanged(opts *bind.FilterOpts, addressManager []common.Address) (*TaikoL1AddressManagerChangedIterator, error) {
-
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
- }
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_TaikoL1 *TaikoL1Filterer) FilterAdminChanged(opts *bind.FilterOpts) (*TaikoL1AdminChangedIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "AdminChanged")
if err != nil {
return nil, err
}
- return &TaikoL1AddressManagerChangedIterator{contract: _TaikoL1.contract, event: "AddressManagerChanged", logs: logs, sub: sub}, nil
+ return &TaikoL1AdminChangedIterator{contract: _TaikoL1.contract, event: "AdminChanged", logs: logs, sub: sub}, nil
}
-// WatchAddressManagerChanged is a free log subscription operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_TaikoL1 *TaikoL1Filterer) WatchAddressManagerChanged(opts *bind.WatchOpts, sink chan<- *TaikoL1AddressManagerChanged, addressManager []common.Address) (event.Subscription, error) {
-
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
- }
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_TaikoL1 *TaikoL1Filterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *TaikoL1AdminChanged) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "AdminChanged")
if err != nil {
return nil, err
}
@@ -1065,8 +1255,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchAddressManagerChanged(opts *bind.WatchOpts
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1AddressManagerChanged)
- if err := _TaikoL1.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+ event := new(TaikoL1AdminChanged)
+ if err := _TaikoL1.contract.UnpackLog(event, "AdminChanged", log); err != nil {
return err
}
event.Raw = log
@@ -1087,21 +1277,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchAddressManagerChanged(opts *bind.WatchOpts
}), nil
}
-// ParseAddressManagerChanged is a log parse operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_TaikoL1 *TaikoL1Filterer) ParseAddressManagerChanged(log types.Log) (*TaikoL1AddressManagerChanged, error) {
- event := new(TaikoL1AddressManagerChanged)
- if err := _TaikoL1.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_TaikoL1 *TaikoL1Filterer) ParseAdminChanged(log types.Log) (*TaikoL1AdminChanged, error) {
+ event := new(TaikoL1AdminChanged)
+ if err := _TaikoL1.contract.UnpackLog(event, "AdminChanged", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BlockProposedIterator is returned from FilterBlockProposed and is used to iterate over the raw logs and unpacked data for BlockProposed events raised by the TaikoL1 contract.
-type TaikoL1BlockProposedIterator struct {
- Event *TaikoL1BlockProposed // Event containing the contract specifics and raw log
+// TaikoL1BeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the TaikoL1 contract.
+type TaikoL1BeaconUpgradedIterator struct {
+ Event *TaikoL1BeaconUpgraded // 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
@@ -1115,7 +1305,7 @@ type TaikoL1BlockProposedIterator struct {
// 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 *TaikoL1BlockProposedIterator) Next() bool {
+func (it *TaikoL1BeaconUpgradedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1124,7 +1314,7 @@ func (it *TaikoL1BlockProposedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProposed)
+ it.Event = new(TaikoL1BeaconUpgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1139,7 +1329,7 @@ func (it *TaikoL1BlockProposedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProposed)
+ it.Event = new(TaikoL1BeaconUpgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1155,62 +1345,51 @@ func (it *TaikoL1BlockProposedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BlockProposedIterator) Error() error {
+func (it *TaikoL1BeaconUpgradedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BlockProposedIterator) Close() error {
+func (it *TaikoL1BeaconUpgradedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BlockProposed represents a BlockProposed event raised by the TaikoL1 contract.
-type TaikoL1BlockProposed struct {
- BlockId *big.Int
- Prover common.Address
- Reward *big.Int
- Meta TaikoDataBlockMetadata
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1BeaconUpgraded represents a BeaconUpgraded event raised by the TaikoL1 contract.
+type TaikoL1BeaconUpgraded struct {
+ Beacon common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBlockProposed is a free log retrieval operation binding the contract event 0xe3713939242e9072c6fbb16f90e98d4b583d66b9fae9208ba2148aa8d6e82af6.
+// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event BlockProposed(uint256 indexed blockId, address indexed prover, uint256 reward, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Filterer) FilterBlockProposed(opts *bind.FilterOpts, blockId []*big.Int, prover []common.Address) (*TaikoL1BlockProposedIterator, error) {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_TaikoL1 *TaikoL1Filterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*TaikoL1BeaconUpgradedIterator, error) {
- var blockIdRule []interface{}
- for _, blockIdItem := range blockId {
- blockIdRule = append(blockIdRule, blockIdItem)
- }
- var proverRule []interface{}
- for _, proverItem := range prover {
- proverRule = append(proverRule, proverItem)
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
}
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProposed", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule)
if err != nil {
return nil, err
}
- return &TaikoL1BlockProposedIterator{contract: _TaikoL1.contract, event: "BlockProposed", logs: logs, sub: sub}, nil
+ return &TaikoL1BeaconUpgradedIterator{contract: _TaikoL1.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil
}
-// WatchBlockProposed is a free log subscription operation binding the contract event 0xe3713939242e9072c6fbb16f90e98d4b583d66b9fae9208ba2148aa8d6e82af6.
+// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event BlockProposed(uint256 indexed blockId, address indexed prover, uint256 reward, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProposed, blockId []*big.Int, prover []common.Address) (event.Subscription, error) {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_TaikoL1 *TaikoL1Filterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *TaikoL1BeaconUpgraded, beacon []common.Address) (event.Subscription, error) {
- var blockIdRule []interface{}
- for _, blockIdItem := range blockId {
- blockIdRule = append(blockIdRule, blockIdItem)
- }
- var proverRule []interface{}
- for _, proverItem := range prover {
- proverRule = append(proverRule, proverItem)
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
}
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProposed", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule)
if err != nil {
return nil, err
}
@@ -1220,8 +1399,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed(opts *bind.WatchOpts, sink c
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BlockProposed)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed", log); err != nil {
+ event := new(TaikoL1BeaconUpgraded)
+ if err := _TaikoL1.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
return err
}
event.Raw = log
@@ -1242,21 +1421,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed(opts *bind.WatchOpts, sink c
}), nil
}
-// ParseBlockProposed is a log parse operation binding the contract event 0xe3713939242e9072c6fbb16f90e98d4b583d66b9fae9208ba2148aa8d6e82af6.
+// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
//
-// Solidity: event BlockProposed(uint256 indexed blockId, address indexed prover, uint256 reward, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Filterer) ParseBlockProposed(log types.Log) (*TaikoL1BlockProposed, error) {
- event := new(TaikoL1BlockProposed)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed", log); err != nil {
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_TaikoL1 *TaikoL1Filterer) ParseBeaconUpgraded(log types.Log) (*TaikoL1BeaconUpgraded, error) {
+ event := new(TaikoL1BeaconUpgraded)
+ if err := _TaikoL1.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BlockProposed0Iterator is returned from FilterBlockProposed0 and is used to iterate over the raw logs and unpacked data for BlockProposed0 events raised by the TaikoL1 contract.
-type TaikoL1BlockProposed0Iterator struct {
- Event *TaikoL1BlockProposed0 // Event containing the contract specifics and raw log
+// TaikoL1BlobCachedIterator is returned from FilterBlobCached and is used to iterate over the raw logs and unpacked data for BlobCached events raised by the TaikoL1 contract.
+type TaikoL1BlobCachedIterator struct {
+ Event *TaikoL1BlobCached // 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
@@ -1270,7 +1449,7 @@ type TaikoL1BlockProposed0Iterator struct {
// 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 *TaikoL1BlockProposed0Iterator) Next() bool {
+func (it *TaikoL1BlobCachedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1279,7 +1458,7 @@ func (it *TaikoL1BlockProposed0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProposed0)
+ it.Event = new(TaikoL1BlobCached)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1294,7 +1473,7 @@ func (it *TaikoL1BlockProposed0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProposed0)
+ it.Event = new(TaikoL1BlobCached)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1310,62 +1489,41 @@ func (it *TaikoL1BlockProposed0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BlockProposed0Iterator) Error() error {
+func (it *TaikoL1BlobCachedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BlockProposed0Iterator) Close() error {
+func (it *TaikoL1BlobCachedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BlockProposed0 represents a BlockProposed0 event raised by the TaikoL1 contract.
-type TaikoL1BlockProposed0 struct {
- BlockId *big.Int
- Prover common.Address
- Reward *big.Int
- Meta TaikoDataBlockMetadata
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1BlobCached represents a BlobCached event raised by the TaikoL1 contract.
+type TaikoL1BlobCached struct {
+ BlobHash [32]byte
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBlockProposed0 is a free log retrieval operation binding the contract event 0xe3713939242e9072c6fbb16f90e98d4b583d66b9fae9208ba2148aa8d6e82af6.
+// FilterBlobCached is a free log retrieval operation binding the contract event 0xb303828b7c63a3e480df6d8239eb7be1d4a1eb1c8878d6fa461103b94f4ce852.
//
-// Solidity: event BlockProposed(uint256 indexed blockId, address indexed prover, uint256 reward, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Filterer) FilterBlockProposed0(opts *bind.FilterOpts, blockId []*big.Int, prover []common.Address) (*TaikoL1BlockProposed0Iterator, error) {
-
- var blockIdRule []interface{}
- for _, blockIdItem := range blockId {
- blockIdRule = append(blockIdRule, blockIdItem)
- }
- var proverRule []interface{}
- for _, proverItem := range prover {
- proverRule = append(proverRule, proverItem)
- }
+// Solidity: event BlobCached(bytes32 blobHash)
+func (_TaikoL1 *TaikoL1Filterer) FilterBlobCached(opts *bind.FilterOpts) (*TaikoL1BlobCachedIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProposed0", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlobCached")
if err != nil {
return nil, err
}
- return &TaikoL1BlockProposed0Iterator{contract: _TaikoL1.contract, event: "BlockProposed0", logs: logs, sub: sub}, nil
+ return &TaikoL1BlobCachedIterator{contract: _TaikoL1.contract, event: "BlobCached", logs: logs, sub: sub}, nil
}
-// WatchBlockProposed0 is a free log subscription operation binding the contract event 0xe3713939242e9072c6fbb16f90e98d4b583d66b9fae9208ba2148aa8d6e82af6.
+// WatchBlobCached is a free log subscription operation binding the contract event 0xb303828b7c63a3e480df6d8239eb7be1d4a1eb1c8878d6fa461103b94f4ce852.
//
-// Solidity: event BlockProposed(uint256 indexed blockId, address indexed prover, uint256 reward, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed0(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProposed0, blockId []*big.Int, prover []common.Address) (event.Subscription, error) {
-
- var blockIdRule []interface{}
- for _, blockIdItem := range blockId {
- blockIdRule = append(blockIdRule, blockIdItem)
- }
- var proverRule []interface{}
- for _, proverItem := range prover {
- proverRule = append(proverRule, proverItem)
- }
+// Solidity: event BlobCached(bytes32 blobHash)
+func (_TaikoL1 *TaikoL1Filterer) WatchBlobCached(opts *bind.WatchOpts, sink chan<- *TaikoL1BlobCached) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProposed0", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlobCached")
if err != nil {
return nil, err
}
@@ -1375,8 +1533,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed0(opts *bind.WatchOpts, sink
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BlockProposed0)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed0", log); err != nil {
+ event := new(TaikoL1BlobCached)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlobCached", log); err != nil {
return err
}
event.Raw = log
@@ -1397,21 +1555,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed0(opts *bind.WatchOpts, sink
}), nil
}
-// ParseBlockProposed0 is a log parse operation binding the contract event 0xe3713939242e9072c6fbb16f90e98d4b583d66b9fae9208ba2148aa8d6e82af6.
+// ParseBlobCached is a log parse operation binding the contract event 0xb303828b7c63a3e480df6d8239eb7be1d4a1eb1c8878d6fa461103b94f4ce852.
//
-// Solidity: event BlockProposed(uint256 indexed blockId, address indexed prover, uint256 reward, (uint64,uint64,uint64,bytes32,bytes32,bytes32,uint24,uint24,uint32,address,(address,uint96,uint64)[]) meta)
-func (_TaikoL1 *TaikoL1Filterer) ParseBlockProposed0(log types.Log) (*TaikoL1BlockProposed0, error) {
- event := new(TaikoL1BlockProposed0)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed0", log); err != nil {
+// Solidity: event BlobCached(bytes32 blobHash)
+func (_TaikoL1 *TaikoL1Filterer) ParseBlobCached(log types.Log) (*TaikoL1BlobCached, error) {
+ event := new(TaikoL1BlobCached)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlobCached", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BlockProvenIterator is returned from FilterBlockProven and is used to iterate over the raw logs and unpacked data for BlockProven events raised by the TaikoL1 contract.
-type TaikoL1BlockProvenIterator struct {
- Event *TaikoL1BlockProven // Event containing the contract specifics and raw log
+// TaikoL1BlockProposedIterator is returned from FilterBlockProposed and is used to iterate over the raw logs and unpacked data for BlockProposed events raised by the TaikoL1 contract.
+type TaikoL1BlockProposedIterator struct {
+ Event *TaikoL1BlockProposed // 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
@@ -1425,7 +1583,7 @@ type TaikoL1BlockProvenIterator struct {
// 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 *TaikoL1BlockProvenIterator) Next() bool {
+func (it *TaikoL1BlockProposedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1434,7 +1592,7 @@ func (it *TaikoL1BlockProvenIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProven)
+ it.Event = new(TaikoL1BlockProposed)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1449,7 +1607,7 @@ func (it *TaikoL1BlockProvenIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProven)
+ it.Event = new(TaikoL1BlockProposed)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1465,55 +1623,63 @@ func (it *TaikoL1BlockProvenIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BlockProvenIterator) Error() error {
+func (it *TaikoL1BlockProposedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BlockProvenIterator) Close() error {
+func (it *TaikoL1BlockProposedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BlockProven represents a BlockProven event raised by the TaikoL1 contract.
-type TaikoL1BlockProven struct {
- BlockId *big.Int
- ParentHash [32]byte
- BlockHash [32]byte
- SignalRoot [32]byte
- Prover common.Address
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1BlockProposed represents a BlockProposed event raised by the TaikoL1 contract.
+type TaikoL1BlockProposed struct {
+ BlockId *big.Int
+ AssignedProver common.Address
+ LivenessBond *big.Int
+ Meta TaikoDataBlockMetadata
+ DepositsProcessed []TaikoDataEthDeposit
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBlockProven is a free log retrieval operation binding the contract event 0xd93fde3ea1bb11dcd7a4e66320a05fc5aa63983b6447eff660084c4b1b1b499b.
+// FilterBlockProposed is a free log retrieval operation binding the contract event 0xa62cea5af360b010ef0d23472a2a7493b54175fd9fd2f9c2aa2bb427d2f4d3ca.
//
-// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover)
-func (_TaikoL1 *TaikoL1Filterer) FilterBlockProven(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1BlockProvenIterator, error) {
+// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint96,uint64)[] depositsProcessed)
+func (_TaikoL1 *TaikoL1Filterer) FilterBlockProposed(opts *bind.FilterOpts, blockId []*big.Int, assignedProver []common.Address) (*TaikoL1BlockProposedIterator, error) {
var blockIdRule []interface{}
for _, blockIdItem := range blockId {
blockIdRule = append(blockIdRule, blockIdItem)
}
+ var assignedProverRule []interface{}
+ for _, assignedProverItem := range assignedProver {
+ assignedProverRule = append(assignedProverRule, assignedProverItem)
+ }
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProven", blockIdRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProposed", blockIdRule, assignedProverRule)
if err != nil {
return nil, err
}
- return &TaikoL1BlockProvenIterator{contract: _TaikoL1.contract, event: "BlockProven", logs: logs, sub: sub}, nil
+ return &TaikoL1BlockProposedIterator{contract: _TaikoL1.contract, event: "BlockProposed", logs: logs, sub: sub}, nil
}
-// WatchBlockProven is a free log subscription operation binding the contract event 0xd93fde3ea1bb11dcd7a4e66320a05fc5aa63983b6447eff660084c4b1b1b499b.
+// WatchBlockProposed is a free log subscription operation binding the contract event 0xa62cea5af360b010ef0d23472a2a7493b54175fd9fd2f9c2aa2bb427d2f4d3ca.
//
-// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover)
-func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProven, blockId []*big.Int) (event.Subscription, error) {
+// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint96,uint64)[] depositsProcessed)
+func (_TaikoL1 *TaikoL1Filterer) WatchBlockProposed(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProposed, blockId []*big.Int, assignedProver []common.Address) (event.Subscription, error) {
var blockIdRule []interface{}
for _, blockIdItem := range blockId {
blockIdRule = append(blockIdRule, blockIdItem)
}
+ var assignedProverRule []interface{}
+ for _, assignedProverItem := range assignedProver {
+ assignedProverRule = append(assignedProverRule, assignedProverItem)
+ }
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProven", blockIdRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProposed", blockIdRule, assignedProverRule)
if err != nil {
return nil, err
}
@@ -1523,8 +1689,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven(opts *bind.WatchOpts, sink cha
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BlockProven)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProven", log); err != nil {
+ event := new(TaikoL1BlockProposed)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed", log); err != nil {
return err
}
event.Raw = log
@@ -1545,21 +1711,1218 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven(opts *bind.WatchOpts, sink cha
}), nil
}
-// ParseBlockProven is a log parse operation binding the contract event 0xd93fde3ea1bb11dcd7a4e66320a05fc5aa63983b6447eff660084c4b1b1b499b.
+// ParseBlockProposed is a log parse operation binding the contract event 0xa62cea5af360b010ef0d23472a2a7493b54175fd9fd2f9c2aa2bb427d2f4d3ca.
//
-// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover)
-func (_TaikoL1 *TaikoL1Filterer) ParseBlockProven(log types.Log) (*TaikoL1BlockProven, error) {
- event := new(TaikoL1BlockProven)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProven", log); err != nil {
+// Solidity: event BlockProposed(uint256 indexed blockId, address indexed assignedProver, uint96 livenessBond, (bytes32,bytes32,bytes32,bytes32,bytes32,address,uint64,uint32,uint64,uint64,uint24,uint24,uint16,bool,bytes32) meta, (address,uint96,uint64)[] depositsProcessed)
+func (_TaikoL1 *TaikoL1Filterer) ParseBlockProposed(log types.Log) (*TaikoL1BlockProposed, error) {
+ event := new(TaikoL1BlockProposed)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlockProposed", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// TaikoL1BlockVerifiedIterator is returned from FilterBlockVerified and is used to iterate over the raw logs and unpacked data for BlockVerified events raised by the TaikoL1 contract.
+type TaikoL1BlockVerifiedIterator struct {
+ Event *TaikoL1BlockVerified // 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 *TaikoL1BlockVerifiedIterator) 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(TaikoL1BlockVerified)
+ 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(TaikoL1BlockVerified)
+ 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 *TaikoL1BlockVerifiedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *TaikoL1BlockVerifiedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// TaikoL1BlockVerified represents a BlockVerified event raised by the TaikoL1 contract.
+type TaikoL1BlockVerified struct {
+ BlockId *big.Int
+ AssignedProver common.Address
+ Prover common.Address
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ Tier uint16
+ Contestations uint8
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterBlockVerified is a free log retrieval operation binding the contract event 0xaeba6e73abba9419294b1017075cf8dc2e7de6f2d7fd3b336b3ba882a2acfca5.
+//
+// Solidity: event BlockVerified(uint256 indexed blockId, address indexed assignedProver, address indexed prover, bytes32 blockHash, bytes32 signalRoot, uint16 tier, uint8 contestations)
+func (_TaikoL1 *TaikoL1Filterer) FilterBlockVerified(opts *bind.FilterOpts, blockId []*big.Int, assignedProver []common.Address, prover []common.Address) (*TaikoL1BlockVerifiedIterator, error) {
+
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+ var assignedProverRule []interface{}
+ for _, assignedProverItem := range assignedProver {
+ assignedProverRule = append(assignedProverRule, assignedProverItem)
+ }
+ var proverRule []interface{}
+ for _, proverItem := range prover {
+ proverRule = append(proverRule, proverItem)
+ }
+
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockVerified", blockIdRule, assignedProverRule, proverRule)
+ if err != nil {
+ return nil, err
+ }
+ return &TaikoL1BlockVerifiedIterator{contract: _TaikoL1.contract, event: "BlockVerified", logs: logs, sub: sub}, nil
+}
+
+// WatchBlockVerified is a free log subscription operation binding the contract event 0xaeba6e73abba9419294b1017075cf8dc2e7de6f2d7fd3b336b3ba882a2acfca5.
+//
+// Solidity: event BlockVerified(uint256 indexed blockId, address indexed assignedProver, address indexed prover, bytes32 blockHash, bytes32 signalRoot, uint16 tier, uint8 contestations)
+func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockVerified, blockId []*big.Int, assignedProver []common.Address, prover []common.Address) (event.Subscription, error) {
+
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+ var assignedProverRule []interface{}
+ for _, assignedProverItem := range assignedProver {
+ assignedProverRule = append(assignedProverRule, assignedProverItem)
+ }
+ var proverRule []interface{}
+ for _, proverItem := range prover {
+ proverRule = append(proverRule, proverItem)
+ }
+
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockVerified", blockIdRule, assignedProverRule, proverRule)
+ 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(TaikoL1BlockVerified)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified", 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
+}
+
+// ParseBlockVerified is a log parse operation binding the contract event 0xaeba6e73abba9419294b1017075cf8dc2e7de6f2d7fd3b336b3ba882a2acfca5.
+//
+// Solidity: event BlockVerified(uint256 indexed blockId, address indexed assignedProver, address indexed prover, bytes32 blockHash, bytes32 signalRoot, uint16 tier, uint8 contestations)
+func (_TaikoL1 *TaikoL1Filterer) ParseBlockVerified(log types.Log) (*TaikoL1BlockVerified, error) {
+ event := new(TaikoL1BlockVerified)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// TaikoL1BlockVerified0Iterator is returned from FilterBlockVerified0 and is used to iterate over the raw logs and unpacked data for BlockVerified0 events raised by the TaikoL1 contract.
+type TaikoL1BlockVerified0Iterator struct {
+ Event *TaikoL1BlockVerified0 // 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 *TaikoL1BlockVerified0Iterator) 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(TaikoL1BlockVerified0)
+ 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(TaikoL1BlockVerified0)
+ 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 *TaikoL1BlockVerified0Iterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *TaikoL1BlockVerified0Iterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// TaikoL1BlockVerified0 represents a BlockVerified0 event raised by the TaikoL1 contract.
+type TaikoL1BlockVerified0 struct {
+ BlockId *big.Int
+ AssignedProver common.Address
+ Prover common.Address
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ Tier uint16
+ Contestations uint8
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterBlockVerified0 is a free log retrieval operation binding the contract event 0xaeba6e73abba9419294b1017075cf8dc2e7de6f2d7fd3b336b3ba882a2acfca5.
+//
+// Solidity: event BlockVerified(uint256 indexed blockId, address indexed assignedProver, address indexed prover, bytes32 blockHash, bytes32 signalRoot, uint16 tier, uint8 contestations)
+func (_TaikoL1 *TaikoL1Filterer) FilterBlockVerified0(opts *bind.FilterOpts, blockId []*big.Int, assignedProver []common.Address, prover []common.Address) (*TaikoL1BlockVerified0Iterator, error) {
+
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+ var assignedProverRule []interface{}
+ for _, assignedProverItem := range assignedProver {
+ assignedProverRule = append(assignedProverRule, assignedProverItem)
+ }
+ var proverRule []interface{}
+ for _, proverItem := range prover {
+ proverRule = append(proverRule, proverItem)
+ }
+
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockVerified0", blockIdRule, assignedProverRule, proverRule)
+ if err != nil {
+ return nil, err
+ }
+ return &TaikoL1BlockVerified0Iterator{contract: _TaikoL1.contract, event: "BlockVerified0", logs: logs, sub: sub}, nil
+}
+
+// WatchBlockVerified0 is a free log subscription operation binding the contract event 0xaeba6e73abba9419294b1017075cf8dc2e7de6f2d7fd3b336b3ba882a2acfca5.
+//
+// Solidity: event BlockVerified(uint256 indexed blockId, address indexed assignedProver, address indexed prover, bytes32 blockHash, bytes32 signalRoot, uint16 tier, uint8 contestations)
+func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified0(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockVerified0, blockId []*big.Int, assignedProver []common.Address, prover []common.Address) (event.Subscription, error) {
+
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+ var assignedProverRule []interface{}
+ for _, assignedProverItem := range assignedProver {
+ assignedProverRule = append(assignedProverRule, assignedProverItem)
+ }
+ var proverRule []interface{}
+ for _, proverItem := range prover {
+ proverRule = append(proverRule, proverItem)
+ }
+
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockVerified0", blockIdRule, assignedProverRule, proverRule)
+ 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(TaikoL1BlockVerified0)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified0", 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
+}
+
+// ParseBlockVerified0 is a log parse operation binding the contract event 0xaeba6e73abba9419294b1017075cf8dc2e7de6f2d7fd3b336b3ba882a2acfca5.
+//
+// Solidity: event BlockVerified(uint256 indexed blockId, address indexed assignedProver, address indexed prover, bytes32 blockHash, bytes32 signalRoot, uint16 tier, uint8 contestations)
+func (_TaikoL1 *TaikoL1Filterer) ParseBlockVerified0(log types.Log) (*TaikoL1BlockVerified0, error) {
+ event := new(TaikoL1BlockVerified0)
+ if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified0", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// TaikoL1CrossChainSyncedIterator is returned from FilterCrossChainSynced and is used to iterate over the raw logs and unpacked data for CrossChainSynced events raised by the TaikoL1 contract.
+type TaikoL1CrossChainSyncedIterator struct {
+ Event *TaikoL1CrossChainSynced // 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 *TaikoL1CrossChainSyncedIterator) 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(TaikoL1CrossChainSynced)
+ 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(TaikoL1CrossChainSynced)
+ 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 *TaikoL1CrossChainSyncedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *TaikoL1CrossChainSyncedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// TaikoL1CrossChainSynced represents a CrossChainSynced event raised by the TaikoL1 contract.
+type TaikoL1CrossChainSynced struct {
+ SyncedInBlock uint64
+ BlockId uint64
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterCrossChainSynced is a free log retrieval operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
+//
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL1 *TaikoL1Filterer) FilterCrossChainSynced(opts *bind.FilterOpts, syncedInBlock []uint64, blockId []uint64) (*TaikoL1CrossChainSyncedIterator, error) {
+
+ var syncedInBlockRule []interface{}
+ for _, syncedInBlockItem := range syncedInBlock {
+ syncedInBlockRule = append(syncedInBlockRule, syncedInBlockItem)
+ }
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "CrossChainSynced", syncedInBlockRule, blockIdRule)
+ if err != nil {
+ return nil, err
+ }
+ return &TaikoL1CrossChainSyncedIterator{contract: _TaikoL1.contract, event: "CrossChainSynced", logs: logs, sub: sub}, nil
+}
+
+// WatchCrossChainSynced is a free log subscription operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
+//
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sink chan<- *TaikoL1CrossChainSynced, syncedInBlock []uint64, blockId []uint64) (event.Subscription, error) {
+
+ var syncedInBlockRule []interface{}
+ for _, syncedInBlockItem := range syncedInBlock {
+ syncedInBlockRule = append(syncedInBlockRule, syncedInBlockItem)
+ }
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "CrossChainSynced", syncedInBlockRule, blockIdRule)
+ 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(TaikoL1CrossChainSynced)
+ if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced", 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
+}
+
+// ParseCrossChainSynced is a log parse operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
+//
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL1 *TaikoL1Filterer) ParseCrossChainSynced(log types.Log) (*TaikoL1CrossChainSynced, error) {
+ event := new(TaikoL1CrossChainSynced)
+ if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// TaikoL1CrossChainSynced0Iterator is returned from FilterCrossChainSynced0 and is used to iterate over the raw logs and unpacked data for CrossChainSynced0 events raised by the TaikoL1 contract.
+type TaikoL1CrossChainSynced0Iterator struct {
+ Event *TaikoL1CrossChainSynced0 // 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 *TaikoL1CrossChainSynced0Iterator) 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(TaikoL1CrossChainSynced0)
+ 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(TaikoL1CrossChainSynced0)
+ 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 *TaikoL1CrossChainSynced0Iterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *TaikoL1CrossChainSynced0Iterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// TaikoL1CrossChainSynced0 represents a CrossChainSynced0 event raised by the TaikoL1 contract.
+type TaikoL1CrossChainSynced0 struct {
+ SyncedInBlock uint64
+ BlockId uint64
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterCrossChainSynced0 is a free log retrieval operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
+//
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL1 *TaikoL1Filterer) FilterCrossChainSynced0(opts *bind.FilterOpts, syncedInBlock []uint64, blockId []uint64) (*TaikoL1CrossChainSynced0Iterator, error) {
+
+ var syncedInBlockRule []interface{}
+ for _, syncedInBlockItem := range syncedInBlock {
+ syncedInBlockRule = append(syncedInBlockRule, syncedInBlockItem)
+ }
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "CrossChainSynced0", syncedInBlockRule, blockIdRule)
+ if err != nil {
+ return nil, err
+ }
+ return &TaikoL1CrossChainSynced0Iterator{contract: _TaikoL1.contract, event: "CrossChainSynced0", logs: logs, sub: sub}, nil
+}
+
+// WatchCrossChainSynced0 is a free log subscription operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
+//
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced0(opts *bind.WatchOpts, sink chan<- *TaikoL1CrossChainSynced0, syncedInBlock []uint64, blockId []uint64) (event.Subscription, error) {
+
+ var syncedInBlockRule []interface{}
+ for _, syncedInBlockItem := range syncedInBlock {
+ syncedInBlockRule = append(syncedInBlockRule, syncedInBlockItem)
+ }
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "CrossChainSynced0", syncedInBlockRule, blockIdRule)
+ 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(TaikoL1CrossChainSynced0)
+ if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced0", 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
+}
+
+// ParseCrossChainSynced0 is a log parse operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
+//
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL1 *TaikoL1Filterer) ParseCrossChainSynced0(log types.Log) (*TaikoL1CrossChainSynced0, error) {
+ event := new(TaikoL1CrossChainSynced0)
+ if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced0", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// TaikoL1EthDepositedIterator is returned from FilterEthDeposited and is used to iterate over the raw logs and unpacked data for EthDeposited events raised by the TaikoL1 contract.
+type TaikoL1EthDepositedIterator struct {
+ Event *TaikoL1EthDeposited // 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 *TaikoL1EthDepositedIterator) 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(TaikoL1EthDeposited)
+ 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(TaikoL1EthDeposited)
+ 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 *TaikoL1EthDepositedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *TaikoL1EthDepositedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// TaikoL1EthDeposited represents a EthDeposited event raised by the TaikoL1 contract.
+type TaikoL1EthDeposited struct {
+ Deposit TaikoDataEthDeposit
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterEthDeposited is a free log retrieval operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+//
+// Solidity: event EthDeposited((address,uint96,uint64) deposit)
+func (_TaikoL1 *TaikoL1Filterer) FilterEthDeposited(opts *bind.FilterOpts) (*TaikoL1EthDepositedIterator, error) {
+
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "EthDeposited")
+ if err != nil {
+ return nil, err
+ }
+ return &TaikoL1EthDepositedIterator{contract: _TaikoL1.contract, event: "EthDeposited", logs: logs, sub: sub}, nil
+}
+
+// WatchEthDeposited is a free log subscription operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+//
+// Solidity: event EthDeposited((address,uint96,uint64) deposit)
+func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited(opts *bind.WatchOpts, sink chan<- *TaikoL1EthDeposited) (event.Subscription, error) {
+
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "EthDeposited")
+ 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(TaikoL1EthDeposited)
+ if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited", 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
+}
+
+// ParseEthDeposited is a log parse operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+//
+// Solidity: event EthDeposited((address,uint96,uint64) deposit)
+func (_TaikoL1 *TaikoL1Filterer) ParseEthDeposited(log types.Log) (*TaikoL1EthDeposited, error) {
+ event := new(TaikoL1EthDeposited)
+ if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// TaikoL1InitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TaikoL1 contract.
+type TaikoL1InitializedIterator struct {
+ Event *TaikoL1Initialized // 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 *TaikoL1InitializedIterator) 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(TaikoL1Initialized)
+ 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(TaikoL1Initialized)
+ 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 *TaikoL1InitializedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *TaikoL1InitializedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// TaikoL1Initialized represents a Initialized event raised by the TaikoL1 contract.
+type TaikoL1Initialized 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 (_TaikoL1 *TaikoL1Filterer) FilterInitialized(opts *bind.FilterOpts) (*TaikoL1InitializedIterator, error) {
+
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "Initialized")
+ if err != nil {
+ return nil, err
+ }
+ return &TaikoL1InitializedIterator{contract: _TaikoL1.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 (_TaikoL1 *TaikoL1Filterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *TaikoL1Initialized) (event.Subscription, error) {
+
+ logs, sub, err := _TaikoL1.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(TaikoL1Initialized)
+ if err := _TaikoL1.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 (_TaikoL1 *TaikoL1Filterer) ParseInitialized(log types.Log) (*TaikoL1Initialized, error) {
+ event := new(TaikoL1Initialized)
+ if err := _TaikoL1.contract.UnpackLog(event, "Initialized", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// TaikoL1OwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoL1 contract.
+type TaikoL1OwnershipTransferredIterator struct {
+ Event *TaikoL1OwnershipTransferred // 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 *TaikoL1OwnershipTransferredIterator) 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(TaikoL1OwnershipTransferred)
+ 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(TaikoL1OwnershipTransferred)
+ 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 *TaikoL1OwnershipTransferredIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *TaikoL1OwnershipTransferredIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// TaikoL1OwnershipTransferred represents a OwnershipTransferred event raised by the TaikoL1 contract.
+type TaikoL1OwnershipTransferred 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 (_TaikoL1 *TaikoL1Filterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoL1OwnershipTransferredIterator, 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 := _TaikoL1.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+ if err != nil {
+ return nil, err
+ }
+ return &TaikoL1OwnershipTransferredIterator{contract: _TaikoL1.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 (_TaikoL1 *TaikoL1Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TaikoL1OwnershipTransferred, 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 := _TaikoL1.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(TaikoL1OwnershipTransferred)
+ if err := _TaikoL1.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 (_TaikoL1 *TaikoL1Filterer) ParseOwnershipTransferred(log types.Log) (*TaikoL1OwnershipTransferred, error) {
+ event := new(TaikoL1OwnershipTransferred)
+ if err := _TaikoL1.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// TaikoL1PausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the TaikoL1 contract.
+type TaikoL1PausedIterator struct {
+ Event *TaikoL1Paused // 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 *TaikoL1PausedIterator) 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(TaikoL1Paused)
+ 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(TaikoL1Paused)
+ 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 *TaikoL1PausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *TaikoL1PausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// TaikoL1Paused represents a Paused event raised by the TaikoL1 contract.
+type TaikoL1Paused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_TaikoL1 *TaikoL1Filterer) FilterPaused(opts *bind.FilterOpts) (*TaikoL1PausedIterator, error) {
+
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "Paused")
+ if err != nil {
+ return nil, err
+ }
+ return &TaikoL1PausedIterator{contract: _TaikoL1.contract, event: "Paused", logs: logs, sub: sub}, nil
+}
+
+// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_TaikoL1 *TaikoL1Filterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *TaikoL1Paused) (event.Subscription, error) {
+
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "Paused")
+ 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(TaikoL1Paused)
+ if err := _TaikoL1.contract.UnpackLog(event, "Paused", 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
+}
+
+// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_TaikoL1 *TaikoL1Filterer) ParsePaused(log types.Log) (*TaikoL1Paused, error) {
+ event := new(TaikoL1Paused)
+ if err := _TaikoL1.contract.UnpackLog(event, "Paused", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BlockProven0Iterator is returned from FilterBlockProven0 and is used to iterate over the raw logs and unpacked data for BlockProven0 events raised by the TaikoL1 contract.
-type TaikoL1BlockProven0Iterator struct {
- Event *TaikoL1BlockProven0 // Event containing the contract specifics and raw log
+// TaikoL1ProvingPausedIterator is returned from FilterProvingPaused and is used to iterate over the raw logs and unpacked data for ProvingPaused events raised by the TaikoL1 contract.
+type TaikoL1ProvingPausedIterator struct {
+ Event *TaikoL1ProvingPaused // 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
@@ -1573,7 +2936,7 @@ type TaikoL1BlockProven0Iterator struct {
// 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 *TaikoL1BlockProven0Iterator) Next() bool {
+func (it *TaikoL1ProvingPausedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1582,7 +2945,7 @@ func (it *TaikoL1BlockProven0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProven0)
+ it.Event = new(TaikoL1ProvingPaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1597,7 +2960,7 @@ func (it *TaikoL1BlockProven0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockProven0)
+ it.Event = new(TaikoL1ProvingPaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1613,55 +2976,41 @@ func (it *TaikoL1BlockProven0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BlockProven0Iterator) Error() error {
+func (it *TaikoL1ProvingPausedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BlockProven0Iterator) Close() error {
+func (it *TaikoL1ProvingPausedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BlockProven0 represents a BlockProven0 event raised by the TaikoL1 contract.
-type TaikoL1BlockProven0 struct {
- BlockId *big.Int
- ParentHash [32]byte
- BlockHash [32]byte
- SignalRoot [32]byte
- Prover common.Address
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1ProvingPaused represents a ProvingPaused event raised by the TaikoL1 contract.
+type TaikoL1ProvingPaused struct {
+ Paused bool
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBlockProven0 is a free log retrieval operation binding the contract event 0xd93fde3ea1bb11dcd7a4e66320a05fc5aa63983b6447eff660084c4b1b1b499b.
+// FilterProvingPaused is a free log retrieval operation binding the contract event 0xed64db85835d07c3c990b8ebdd55e32d64e5ed53143b6ef2179e7bfaf17ddc3b.
//
-// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover)
-func (_TaikoL1 *TaikoL1Filterer) FilterBlockProven0(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1BlockProven0Iterator, error) {
-
- var blockIdRule []interface{}
- for _, blockIdItem := range blockId {
- blockIdRule = append(blockIdRule, blockIdItem)
- }
+// Solidity: event ProvingPaused(bool paused)
+func (_TaikoL1 *TaikoL1Filterer) FilterProvingPaused(opts *bind.FilterOpts) (*TaikoL1ProvingPausedIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockProven0", blockIdRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "ProvingPaused")
if err != nil {
return nil, err
}
- return &TaikoL1BlockProven0Iterator{contract: _TaikoL1.contract, event: "BlockProven0", logs: logs, sub: sub}, nil
+ return &TaikoL1ProvingPausedIterator{contract: _TaikoL1.contract, event: "ProvingPaused", logs: logs, sub: sub}, nil
}
-// WatchBlockProven0 is a free log subscription operation binding the contract event 0xd93fde3ea1bb11dcd7a4e66320a05fc5aa63983b6447eff660084c4b1b1b499b.
+// WatchProvingPaused is a free log subscription operation binding the contract event 0xed64db85835d07c3c990b8ebdd55e32d64e5ed53143b6ef2179e7bfaf17ddc3b.
//
-// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover)
-func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven0(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockProven0, blockId []*big.Int) (event.Subscription, error) {
-
- var blockIdRule []interface{}
- for _, blockIdItem := range blockId {
- blockIdRule = append(blockIdRule, blockIdItem)
- }
+// Solidity: event ProvingPaused(bool paused)
+func (_TaikoL1 *TaikoL1Filterer) WatchProvingPaused(opts *bind.WatchOpts, sink chan<- *TaikoL1ProvingPaused) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockProven0", blockIdRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "ProvingPaused")
if err != nil {
return nil, err
}
@@ -1671,8 +3020,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven0(opts *bind.WatchOpts, sink ch
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BlockProven0)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProven0", log); err != nil {
+ event := new(TaikoL1ProvingPaused)
+ if err := _TaikoL1.contract.UnpackLog(event, "ProvingPaused", log); err != nil {
return err
}
event.Raw = log
@@ -1693,21 +3042,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockProven0(opts *bind.WatchOpts, sink ch
}), nil
}
-// ParseBlockProven0 is a log parse operation binding the contract event 0xd93fde3ea1bb11dcd7a4e66320a05fc5aa63983b6447eff660084c4b1b1b499b.
+// ParseProvingPaused is a log parse operation binding the contract event 0xed64db85835d07c3c990b8ebdd55e32d64e5ed53143b6ef2179e7bfaf17ddc3b.
//
-// Solidity: event BlockProven(uint256 indexed blockId, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover)
-func (_TaikoL1 *TaikoL1Filterer) ParseBlockProven0(log types.Log) (*TaikoL1BlockProven0, error) {
- event := new(TaikoL1BlockProven0)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockProven0", log); err != nil {
+// Solidity: event ProvingPaused(bool paused)
+func (_TaikoL1 *TaikoL1Filterer) ParseProvingPaused(log types.Log) (*TaikoL1ProvingPaused, error) {
+ event := new(TaikoL1ProvingPaused)
+ if err := _TaikoL1.contract.UnpackLog(event, "ProvingPaused", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BlockVerifiedIterator is returned from FilterBlockVerified and is used to iterate over the raw logs and unpacked data for BlockVerified events raised by the TaikoL1 contract.
-type TaikoL1BlockVerifiedIterator struct {
- Event *TaikoL1BlockVerified // Event containing the contract specifics and raw log
+// TaikoL1TokenCreditedIterator is returned from FilterTokenCredited and is used to iterate over the raw logs and unpacked data for TokenCredited events raised by the TaikoL1 contract.
+type TaikoL1TokenCreditedIterator struct {
+ Event *TaikoL1TokenCredited // 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
@@ -1721,7 +3070,7 @@ type TaikoL1BlockVerifiedIterator struct {
// 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 *TaikoL1BlockVerifiedIterator) Next() bool {
+func (it *TaikoL1TokenCreditedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1730,7 +3079,7 @@ func (it *TaikoL1BlockVerifiedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockVerified)
+ it.Event = new(TaikoL1TokenCredited)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1745,7 +3094,7 @@ func (it *TaikoL1BlockVerifiedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockVerified)
+ it.Event = new(TaikoL1TokenCredited)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1761,61 +3110,42 @@ func (it *TaikoL1BlockVerifiedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BlockVerifiedIterator) Error() error {
+func (it *TaikoL1TokenCreditedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BlockVerifiedIterator) Close() error {
+func (it *TaikoL1TokenCreditedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BlockVerified represents a BlockVerified event raised by the TaikoL1 contract.
-type TaikoL1BlockVerified struct {
- BlockId *big.Int
- Prover common.Address
- BlockHash [32]byte
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1TokenCredited represents a TokenCredited event raised by the TaikoL1 contract.
+type TaikoL1TokenCredited struct {
+ To common.Address
+ Amount *big.Int
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBlockVerified is a free log retrieval operation binding the contract event 0xb2fa36cea736414fca28c5aca50d94c59d740984c4c878c3dd8ba26791309b1a.
+// FilterTokenCredited is a free log retrieval operation binding the contract event 0xcc91b0b567e69e32d26830c50d1078f0baec319d458fa847f2633c1c2f71dd74.
//
-// Solidity: event BlockVerified(uint256 indexed blockId, address indexed prover, bytes32 blockHash)
-func (_TaikoL1 *TaikoL1Filterer) FilterBlockVerified(opts *bind.FilterOpts, blockId []*big.Int, prover []common.Address) (*TaikoL1BlockVerifiedIterator, error) {
-
- var blockIdRule []interface{}
- for _, blockIdItem := range blockId {
- blockIdRule = append(blockIdRule, blockIdItem)
- }
- var proverRule []interface{}
- for _, proverItem := range prover {
- proverRule = append(proverRule, proverItem)
- }
+// Solidity: event TokenCredited(address to, uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) FilterTokenCredited(opts *bind.FilterOpts) (*TaikoL1TokenCreditedIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockVerified", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "TokenCredited")
if err != nil {
return nil, err
}
- return &TaikoL1BlockVerifiedIterator{contract: _TaikoL1.contract, event: "BlockVerified", logs: logs, sub: sub}, nil
+ return &TaikoL1TokenCreditedIterator{contract: _TaikoL1.contract, event: "TokenCredited", logs: logs, sub: sub}, nil
}
-// WatchBlockVerified is a free log subscription operation binding the contract event 0xb2fa36cea736414fca28c5aca50d94c59d740984c4c878c3dd8ba26791309b1a.
+// WatchTokenCredited is a free log subscription operation binding the contract event 0xcc91b0b567e69e32d26830c50d1078f0baec319d458fa847f2633c1c2f71dd74.
//
-// Solidity: event BlockVerified(uint256 indexed blockId, address indexed prover, bytes32 blockHash)
-func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockVerified, blockId []*big.Int, prover []common.Address) (event.Subscription, error) {
-
- var blockIdRule []interface{}
- for _, blockIdItem := range blockId {
- blockIdRule = append(blockIdRule, blockIdItem)
- }
- var proverRule []interface{}
- for _, proverItem := range prover {
- proverRule = append(proverRule, proverItem)
- }
+// Solidity: event TokenCredited(address to, uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) WatchTokenCredited(opts *bind.WatchOpts, sink chan<- *TaikoL1TokenCredited) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockVerified", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "TokenCredited")
if err != nil {
return nil, err
}
@@ -1825,8 +3155,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified(opts *bind.WatchOpts, sink c
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BlockVerified)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified", log); err != nil {
+ event := new(TaikoL1TokenCredited)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenCredited", log); err != nil {
return err
}
event.Raw = log
@@ -1847,21 +3177,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified(opts *bind.WatchOpts, sink c
}), nil
}
-// ParseBlockVerified is a log parse operation binding the contract event 0xb2fa36cea736414fca28c5aca50d94c59d740984c4c878c3dd8ba26791309b1a.
+// ParseTokenCredited is a log parse operation binding the contract event 0xcc91b0b567e69e32d26830c50d1078f0baec319d458fa847f2633c1c2f71dd74.
//
-// Solidity: event BlockVerified(uint256 indexed blockId, address indexed prover, bytes32 blockHash)
-func (_TaikoL1 *TaikoL1Filterer) ParseBlockVerified(log types.Log) (*TaikoL1BlockVerified, error) {
- event := new(TaikoL1BlockVerified)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified", log); err != nil {
+// Solidity: event TokenCredited(address to, uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) ParseTokenCredited(log types.Log) (*TaikoL1TokenCredited, error) {
+ event := new(TaikoL1TokenCredited)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenCredited", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1BlockVerified0Iterator is returned from FilterBlockVerified0 and is used to iterate over the raw logs and unpacked data for BlockVerified0 events raised by the TaikoL1 contract.
-type TaikoL1BlockVerified0Iterator struct {
- Event *TaikoL1BlockVerified0 // Event containing the contract specifics and raw log
+// TaikoL1TokenDebitedIterator is returned from FilterTokenDebited and is used to iterate over the raw logs and unpacked data for TokenDebited events raised by the TaikoL1 contract.
+type TaikoL1TokenDebitedIterator struct {
+ Event *TaikoL1TokenDebited // 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
@@ -1875,7 +3205,7 @@ type TaikoL1BlockVerified0Iterator struct {
// 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 *TaikoL1BlockVerified0Iterator) Next() bool {
+func (it *TaikoL1TokenDebitedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -1884,7 +3214,7 @@ func (it *TaikoL1BlockVerified0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockVerified0)
+ it.Event = new(TaikoL1TokenDebited)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1899,7 +3229,7 @@ func (it *TaikoL1BlockVerified0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1BlockVerified0)
+ it.Event = new(TaikoL1TokenDebited)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -1915,61 +3245,42 @@ func (it *TaikoL1BlockVerified0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1BlockVerified0Iterator) Error() error {
+func (it *TaikoL1TokenDebitedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1BlockVerified0Iterator) Close() error {
+func (it *TaikoL1TokenDebitedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1BlockVerified0 represents a BlockVerified0 event raised by the TaikoL1 contract.
-type TaikoL1BlockVerified0 struct {
- BlockId *big.Int
- Prover common.Address
- BlockHash [32]byte
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1TokenDebited represents a TokenDebited event raised by the TaikoL1 contract.
+type TaikoL1TokenDebited struct {
+ From common.Address
+ Amount *big.Int
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterBlockVerified0 is a free log retrieval operation binding the contract event 0xb2fa36cea736414fca28c5aca50d94c59d740984c4c878c3dd8ba26791309b1a.
+// FilterTokenDebited is a free log retrieval operation binding the contract event 0x9414c932608e522aea77e1b5fd1cdb441e5d57daf49d9a9a0b7409ef8d9e0070.
//
-// Solidity: event BlockVerified(uint256 indexed blockId, address indexed prover, bytes32 blockHash)
-func (_TaikoL1 *TaikoL1Filterer) FilterBlockVerified0(opts *bind.FilterOpts, blockId []*big.Int, prover []common.Address) (*TaikoL1BlockVerified0Iterator, error) {
+// Solidity: event TokenDebited(address from, uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) FilterTokenDebited(opts *bind.FilterOpts) (*TaikoL1TokenDebitedIterator, error) {
- var blockIdRule []interface{}
- for _, blockIdItem := range blockId {
- blockIdRule = append(blockIdRule, blockIdItem)
- }
- var proverRule []interface{}
- for _, proverItem := range prover {
- proverRule = append(proverRule, proverItem)
- }
-
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "BlockVerified0", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "TokenDebited")
if err != nil {
return nil, err
}
- return &TaikoL1BlockVerified0Iterator{contract: _TaikoL1.contract, event: "BlockVerified0", logs: logs, sub: sub}, nil
+ return &TaikoL1TokenDebitedIterator{contract: _TaikoL1.contract, event: "TokenDebited", logs: logs, sub: sub}, nil
}
-// WatchBlockVerified0 is a free log subscription operation binding the contract event 0xb2fa36cea736414fca28c5aca50d94c59d740984c4c878c3dd8ba26791309b1a.
+// WatchTokenDebited is a free log subscription operation binding the contract event 0x9414c932608e522aea77e1b5fd1cdb441e5d57daf49d9a9a0b7409ef8d9e0070.
//
-// Solidity: event BlockVerified(uint256 indexed blockId, address indexed prover, bytes32 blockHash)
-func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified0(opts *bind.WatchOpts, sink chan<- *TaikoL1BlockVerified0, blockId []*big.Int, prover []common.Address) (event.Subscription, error) {
-
- var blockIdRule []interface{}
- for _, blockIdItem := range blockId {
- blockIdRule = append(blockIdRule, blockIdItem)
- }
- var proverRule []interface{}
- for _, proverItem := range prover {
- proverRule = append(proverRule, proverItem)
- }
+// Solidity: event TokenDebited(address from, uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) WatchTokenDebited(opts *bind.WatchOpts, sink chan<- *TaikoL1TokenDebited) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "BlockVerified0", blockIdRule, proverRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "TokenDebited")
if err != nil {
return nil, err
}
@@ -1979,8 +3290,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified0(opts *bind.WatchOpts, sink
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1BlockVerified0)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified0", log); err != nil {
+ event := new(TaikoL1TokenDebited)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenDebited", log); err != nil {
return err
}
event.Raw = log
@@ -2001,21 +3312,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchBlockVerified0(opts *bind.WatchOpts, sink
}), nil
}
-// ParseBlockVerified0 is a log parse operation binding the contract event 0xb2fa36cea736414fca28c5aca50d94c59d740984c4c878c3dd8ba26791309b1a.
+// ParseTokenDebited is a log parse operation binding the contract event 0x9414c932608e522aea77e1b5fd1cdb441e5d57daf49d9a9a0b7409ef8d9e0070.
//
-// Solidity: event BlockVerified(uint256 indexed blockId, address indexed prover, bytes32 blockHash)
-func (_TaikoL1 *TaikoL1Filterer) ParseBlockVerified0(log types.Log) (*TaikoL1BlockVerified0, error) {
- event := new(TaikoL1BlockVerified0)
- if err := _TaikoL1.contract.UnpackLog(event, "BlockVerified0", log); err != nil {
+// Solidity: event TokenDebited(address from, uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) ParseTokenDebited(log types.Log) (*TaikoL1TokenDebited, error) {
+ event := new(TaikoL1TokenDebited)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenDebited", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1CrossChainSyncedIterator is returned from FilterCrossChainSynced and is used to iterate over the raw logs and unpacked data for CrossChainSynced events raised by the TaikoL1 contract.
-type TaikoL1CrossChainSyncedIterator struct {
- Event *TaikoL1CrossChainSynced // Event containing the contract specifics and raw log
+// TaikoL1TokenDepositedIterator is returned from FilterTokenDeposited and is used to iterate over the raw logs and unpacked data for TokenDeposited events raised by the TaikoL1 contract.
+type TaikoL1TokenDepositedIterator struct {
+ Event *TaikoL1TokenDeposited // 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
@@ -2029,7 +3340,7 @@ type TaikoL1CrossChainSyncedIterator struct {
// 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 *TaikoL1CrossChainSyncedIterator) Next() bool {
+func (it *TaikoL1TokenDepositedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2038,7 +3349,7 @@ func (it *TaikoL1CrossChainSyncedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1CrossChainSynced)
+ it.Event = new(TaikoL1TokenDeposited)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2053,7 +3364,7 @@ func (it *TaikoL1CrossChainSyncedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1CrossChainSynced)
+ it.Event = new(TaikoL1TokenDeposited)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2069,53 +3380,41 @@ func (it *TaikoL1CrossChainSyncedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1CrossChainSyncedIterator) Error() error {
+func (it *TaikoL1TokenDepositedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1CrossChainSyncedIterator) Close() error {
+func (it *TaikoL1TokenDepositedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1CrossChainSynced represents a CrossChainSynced event raised by the TaikoL1 contract.
-type TaikoL1CrossChainSynced struct {
- SrcHeight uint64
- BlockHash [32]byte
- SignalRoot [32]byte
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1TokenDeposited represents a TokenDeposited event raised by the TaikoL1 contract.
+type TaikoL1TokenDeposited struct {
+ Amount *big.Int
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterCrossChainSynced is a free log retrieval operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// FilterTokenDeposited is a free log retrieval operation binding the contract event 0x26a49ee784523ce049bcbe276a63c7c9dbd9f428b1aa53633e679c9c046e8858.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_TaikoL1 *TaikoL1Filterer) FilterCrossChainSynced(opts *bind.FilterOpts, srcHeight []uint64) (*TaikoL1CrossChainSyncedIterator, error) {
+// Solidity: event TokenDeposited(uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) FilterTokenDeposited(opts *bind.FilterOpts) (*TaikoL1TokenDepositedIterator, error) {
- var srcHeightRule []interface{}
- for _, srcHeightItem := range srcHeight {
- srcHeightRule = append(srcHeightRule, srcHeightItem)
- }
-
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "CrossChainSynced", srcHeightRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "TokenDeposited")
if err != nil {
return nil, err
}
- return &TaikoL1CrossChainSyncedIterator{contract: _TaikoL1.contract, event: "CrossChainSynced", logs: logs, sub: sub}, nil
+ return &TaikoL1TokenDepositedIterator{contract: _TaikoL1.contract, event: "TokenDeposited", logs: logs, sub: sub}, nil
}
-// WatchCrossChainSynced is a free log subscription operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// WatchTokenDeposited is a free log subscription operation binding the contract event 0x26a49ee784523ce049bcbe276a63c7c9dbd9f428b1aa53633e679c9c046e8858.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sink chan<- *TaikoL1CrossChainSynced, srcHeight []uint64) (event.Subscription, error) {
-
- var srcHeightRule []interface{}
- for _, srcHeightItem := range srcHeight {
- srcHeightRule = append(srcHeightRule, srcHeightItem)
- }
+// Solidity: event TokenDeposited(uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) WatchTokenDeposited(opts *bind.WatchOpts, sink chan<- *TaikoL1TokenDeposited) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "CrossChainSynced", srcHeightRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "TokenDeposited")
if err != nil {
return nil, err
}
@@ -2125,8 +3424,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sin
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1CrossChainSynced)
- if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced", log); err != nil {
+ event := new(TaikoL1TokenDeposited)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenDeposited", log); err != nil {
return err
}
event.Raw = log
@@ -2147,21 +3446,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sin
}), nil
}
-// ParseCrossChainSynced is a log parse operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// ParseTokenDeposited is a log parse operation binding the contract event 0x26a49ee784523ce049bcbe276a63c7c9dbd9f428b1aa53633e679c9c046e8858.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_TaikoL1 *TaikoL1Filterer) ParseCrossChainSynced(log types.Log) (*TaikoL1CrossChainSynced, error) {
- event := new(TaikoL1CrossChainSynced)
- if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced", log); err != nil {
+// Solidity: event TokenDeposited(uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) ParseTokenDeposited(log types.Log) (*TaikoL1TokenDeposited, error) {
+ event := new(TaikoL1TokenDeposited)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenDeposited", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1CrossChainSynced0Iterator is returned from FilterCrossChainSynced0 and is used to iterate over the raw logs and unpacked data for CrossChainSynced0 events raised by the TaikoL1 contract.
-type TaikoL1CrossChainSynced0Iterator struct {
- Event *TaikoL1CrossChainSynced0 // Event containing the contract specifics and raw log
+// TaikoL1TokenWithdrawnIterator is returned from FilterTokenWithdrawn and is used to iterate over the raw logs and unpacked data for TokenWithdrawn events raised by the TaikoL1 contract.
+type TaikoL1TokenWithdrawnIterator struct {
+ Event *TaikoL1TokenWithdrawn // 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
@@ -2175,7 +3474,7 @@ type TaikoL1CrossChainSynced0Iterator struct {
// 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 *TaikoL1CrossChainSynced0Iterator) Next() bool {
+func (it *TaikoL1TokenWithdrawnIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2184,7 +3483,7 @@ func (it *TaikoL1CrossChainSynced0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1CrossChainSynced0)
+ it.Event = new(TaikoL1TokenWithdrawn)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2199,7 +3498,7 @@ func (it *TaikoL1CrossChainSynced0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1CrossChainSynced0)
+ it.Event = new(TaikoL1TokenWithdrawn)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2215,53 +3514,41 @@ func (it *TaikoL1CrossChainSynced0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1CrossChainSynced0Iterator) Error() error {
+func (it *TaikoL1TokenWithdrawnIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1CrossChainSynced0Iterator) Close() error {
+func (it *TaikoL1TokenWithdrawnIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1CrossChainSynced0 represents a CrossChainSynced0 event raised by the TaikoL1 contract.
-type TaikoL1CrossChainSynced0 struct {
- SrcHeight uint64
- BlockHash [32]byte
- SignalRoot [32]byte
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1TokenWithdrawn represents a TokenWithdrawn event raised by the TaikoL1 contract.
+type TaikoL1TokenWithdrawn struct {
+ Amount *big.Int
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterCrossChainSynced0 is a free log retrieval operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// FilterTokenWithdrawn is a free log retrieval operation binding the contract event 0xc172f6497c150fc242267f743e8e4034b31b16ee123408d6d5f75a81128de114.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_TaikoL1 *TaikoL1Filterer) FilterCrossChainSynced0(opts *bind.FilterOpts, srcHeight []uint64) (*TaikoL1CrossChainSynced0Iterator, error) {
-
- var srcHeightRule []interface{}
- for _, srcHeightItem := range srcHeight {
- srcHeightRule = append(srcHeightRule, srcHeightItem)
- }
+// Solidity: event TokenWithdrawn(uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) FilterTokenWithdrawn(opts *bind.FilterOpts) (*TaikoL1TokenWithdrawnIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "CrossChainSynced0", srcHeightRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "TokenWithdrawn")
if err != nil {
return nil, err
}
- return &TaikoL1CrossChainSynced0Iterator{contract: _TaikoL1.contract, event: "CrossChainSynced0", logs: logs, sub: sub}, nil
+ return &TaikoL1TokenWithdrawnIterator{contract: _TaikoL1.contract, event: "TokenWithdrawn", logs: logs, sub: sub}, nil
}
-// WatchCrossChainSynced0 is a free log subscription operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// WatchTokenWithdrawn is a free log subscription operation binding the contract event 0xc172f6497c150fc242267f743e8e4034b31b16ee123408d6d5f75a81128de114.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced0(opts *bind.WatchOpts, sink chan<- *TaikoL1CrossChainSynced0, srcHeight []uint64) (event.Subscription, error) {
-
- var srcHeightRule []interface{}
- for _, srcHeightItem := range srcHeight {
- srcHeightRule = append(srcHeightRule, srcHeightItem)
- }
+// Solidity: event TokenWithdrawn(uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) WatchTokenWithdrawn(opts *bind.WatchOpts, sink chan<- *TaikoL1TokenWithdrawn) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "CrossChainSynced0", srcHeightRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "TokenWithdrawn")
if err != nil {
return nil, err
}
@@ -2271,8 +3558,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced0(opts *bind.WatchOpts, si
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1CrossChainSynced0)
- if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced0", log); err != nil {
+ event := new(TaikoL1TokenWithdrawn)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenWithdrawn", log); err != nil {
return err
}
event.Raw = log
@@ -2293,21 +3580,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchCrossChainSynced0(opts *bind.WatchOpts, si
}), nil
}
-// ParseCrossChainSynced0 is a log parse operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// ParseTokenWithdrawn is a log parse operation binding the contract event 0xc172f6497c150fc242267f743e8e4034b31b16ee123408d6d5f75a81128de114.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_TaikoL1 *TaikoL1Filterer) ParseCrossChainSynced0(log types.Log) (*TaikoL1CrossChainSynced0, error) {
- event := new(TaikoL1CrossChainSynced0)
- if err := _TaikoL1.contract.UnpackLog(event, "CrossChainSynced0", log); err != nil {
+// Solidity: event TokenWithdrawn(uint256 amount)
+func (_TaikoL1 *TaikoL1Filterer) ParseTokenWithdrawn(log types.Log) (*TaikoL1TokenWithdrawn, error) {
+ event := new(TaikoL1TokenWithdrawn)
+ if err := _TaikoL1.contract.UnpackLog(event, "TokenWithdrawn", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1EthDepositedIterator is returned from FilterEthDeposited and is used to iterate over the raw logs and unpacked data for EthDeposited events raised by the TaikoL1 contract.
-type TaikoL1EthDepositedIterator struct {
- Event *TaikoL1EthDeposited // Event containing the contract specifics and raw log
+// TaikoL1TransitionContestedIterator is returned from FilterTransitionContested and is used to iterate over the raw logs and unpacked data for TransitionContested events raised by the TaikoL1 contract.
+type TaikoL1TransitionContestedIterator struct {
+ Event *TaikoL1TransitionContested // 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
@@ -2321,7 +3608,7 @@ type TaikoL1EthDepositedIterator struct {
// 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 *TaikoL1EthDepositedIterator) Next() bool {
+func (it *TaikoL1TransitionContestedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2330,7 +3617,7 @@ func (it *TaikoL1EthDepositedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1EthDeposited)
+ it.Event = new(TaikoL1TransitionContested)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2345,7 +3632,7 @@ func (it *TaikoL1EthDepositedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1EthDeposited)
+ it.Event = new(TaikoL1TransitionContested)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2361,41 +3648,55 @@ func (it *TaikoL1EthDepositedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1EthDepositedIterator) Error() error {
+func (it *TaikoL1TransitionContestedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1EthDepositedIterator) Close() error {
+func (it *TaikoL1TransitionContestedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1EthDeposited represents a EthDeposited event raised by the TaikoL1 contract.
-type TaikoL1EthDeposited struct {
- Deposit TaikoDataEthDeposit
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1TransitionContested represents a TransitionContested event raised by the TaikoL1 contract.
+type TaikoL1TransitionContested struct {
+ BlockId *big.Int
+ Tran TaikoDataTransition
+ Contester common.Address
+ ContestBond *big.Int
+ Tier uint16
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterEthDeposited is a free log retrieval operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+// FilterTransitionContested is a free log retrieval operation binding the contract event 0xb4c0a86c1ff239277697775b1e91d3375fd3a5ef6b345aa4e2f6001c890558f6.
//
-// Solidity: event EthDeposited((address,uint96,uint64) deposit)
-func (_TaikoL1 *TaikoL1Filterer) FilterEthDeposited(opts *bind.FilterOpts) (*TaikoL1EthDepositedIterator, error) {
+// Solidity: event TransitionContested(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address contester, uint96 contestBond, uint16 tier)
+func (_TaikoL1 *TaikoL1Filterer) FilterTransitionContested(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1TransitionContestedIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "EthDeposited")
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "TransitionContested", blockIdRule)
if err != nil {
return nil, err
}
- return &TaikoL1EthDepositedIterator{contract: _TaikoL1.contract, event: "EthDeposited", logs: logs, sub: sub}, nil
+ return &TaikoL1TransitionContestedIterator{contract: _TaikoL1.contract, event: "TransitionContested", logs: logs, sub: sub}, nil
}
-// WatchEthDeposited is a free log subscription operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+// WatchTransitionContested is a free log subscription operation binding the contract event 0xb4c0a86c1ff239277697775b1e91d3375fd3a5ef6b345aa4e2f6001c890558f6.
//
-// Solidity: event EthDeposited((address,uint96,uint64) deposit)
-func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited(opts *bind.WatchOpts, sink chan<- *TaikoL1EthDeposited) (event.Subscription, error) {
+// Solidity: event TransitionContested(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address contester, uint96 contestBond, uint16 tier)
+func (_TaikoL1 *TaikoL1Filterer) WatchTransitionContested(opts *bind.WatchOpts, sink chan<- *TaikoL1TransitionContested, blockId []*big.Int) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "EthDeposited")
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
+
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "TransitionContested", blockIdRule)
if err != nil {
return nil, err
}
@@ -2405,8 +3706,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited(opts *bind.WatchOpts, sink ch
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1EthDeposited)
- if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited", log); err != nil {
+ event := new(TaikoL1TransitionContested)
+ if err := _TaikoL1.contract.UnpackLog(event, "TransitionContested", log); err != nil {
return err
}
event.Raw = log
@@ -2427,21 +3728,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited(opts *bind.WatchOpts, sink ch
}), nil
}
-// ParseEthDeposited is a log parse operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+// ParseTransitionContested is a log parse operation binding the contract event 0xb4c0a86c1ff239277697775b1e91d3375fd3a5ef6b345aa4e2f6001c890558f6.
//
-// Solidity: event EthDeposited((address,uint96,uint64) deposit)
-func (_TaikoL1 *TaikoL1Filterer) ParseEthDeposited(log types.Log) (*TaikoL1EthDeposited, error) {
- event := new(TaikoL1EthDeposited)
- if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited", log); err != nil {
+// Solidity: event TransitionContested(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address contester, uint96 contestBond, uint16 tier)
+func (_TaikoL1 *TaikoL1Filterer) ParseTransitionContested(log types.Log) (*TaikoL1TransitionContested, error) {
+ event := new(TaikoL1TransitionContested)
+ if err := _TaikoL1.contract.UnpackLog(event, "TransitionContested", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1EthDeposited0Iterator is returned from FilterEthDeposited0 and is used to iterate over the raw logs and unpacked data for EthDeposited0 events raised by the TaikoL1 contract.
-type TaikoL1EthDeposited0Iterator struct {
- Event *TaikoL1EthDeposited0 // Event containing the contract specifics and raw log
+// TaikoL1TransitionProvedIterator is returned from FilterTransitionProved and is used to iterate over the raw logs and unpacked data for TransitionProved events raised by the TaikoL1 contract.
+type TaikoL1TransitionProvedIterator struct {
+ Event *TaikoL1TransitionProved // 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
@@ -2455,7 +3756,7 @@ type TaikoL1EthDeposited0Iterator struct {
// 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 *TaikoL1EthDeposited0Iterator) Next() bool {
+func (it *TaikoL1TransitionProvedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2464,7 +3765,7 @@ func (it *TaikoL1EthDeposited0Iterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1EthDeposited0)
+ it.Event = new(TaikoL1TransitionProved)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2479,7 +3780,7 @@ func (it *TaikoL1EthDeposited0Iterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1EthDeposited0)
+ it.Event = new(TaikoL1TransitionProved)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2495,41 +3796,55 @@ func (it *TaikoL1EthDeposited0Iterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1EthDeposited0Iterator) Error() error {
+func (it *TaikoL1TransitionProvedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1EthDeposited0Iterator) Close() error {
+func (it *TaikoL1TransitionProvedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1EthDeposited0 represents a EthDeposited0 event raised by the TaikoL1 contract.
-type TaikoL1EthDeposited0 struct {
- Deposit TaikoDataEthDeposit
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1TransitionProved represents a TransitionProved event raised by the TaikoL1 contract.
+type TaikoL1TransitionProved struct {
+ BlockId *big.Int
+ Tran TaikoDataTransition
+ Prover common.Address
+ ValidityBond *big.Int
+ Tier uint16
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterEthDeposited0 is a free log retrieval operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+// FilterTransitionProved is a free log retrieval operation binding the contract event 0xc195e4be3b936845492b8be4b1cf604db687a4d79ad84d979499c136f8e6701f.
//
-// Solidity: event EthDeposited((address,uint96,uint64) deposit)
-func (_TaikoL1 *TaikoL1Filterer) FilterEthDeposited0(opts *bind.FilterOpts) (*TaikoL1EthDeposited0Iterator, error) {
+// Solidity: event TransitionProved(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address prover, uint96 validityBond, uint16 tier)
+func (_TaikoL1 *TaikoL1Filterer) FilterTransitionProved(opts *bind.FilterOpts, blockId []*big.Int) (*TaikoL1TransitionProvedIterator, error) {
+
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "EthDeposited0")
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "TransitionProved", blockIdRule)
if err != nil {
return nil, err
}
- return &TaikoL1EthDeposited0Iterator{contract: _TaikoL1.contract, event: "EthDeposited0", logs: logs, sub: sub}, nil
+ return &TaikoL1TransitionProvedIterator{contract: _TaikoL1.contract, event: "TransitionProved", logs: logs, sub: sub}, nil
}
-// WatchEthDeposited0 is a free log subscription operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+// WatchTransitionProved is a free log subscription operation binding the contract event 0xc195e4be3b936845492b8be4b1cf604db687a4d79ad84d979499c136f8e6701f.
//
-// Solidity: event EthDeposited((address,uint96,uint64) deposit)
-func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited0(opts *bind.WatchOpts, sink chan<- *TaikoL1EthDeposited0) (event.Subscription, error) {
+// Solidity: event TransitionProved(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address prover, uint96 validityBond, uint16 tier)
+func (_TaikoL1 *TaikoL1Filterer) WatchTransitionProved(opts *bind.WatchOpts, sink chan<- *TaikoL1TransitionProved, blockId []*big.Int) (event.Subscription, error) {
+
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
+ }
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "EthDeposited0")
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "TransitionProved", blockIdRule)
if err != nil {
return nil, err
}
@@ -2539,8 +3854,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited0(opts *bind.WatchOpts, sink c
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1EthDeposited0)
- if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited0", log); err != nil {
+ event := new(TaikoL1TransitionProved)
+ if err := _TaikoL1.contract.UnpackLog(event, "TransitionProved", log); err != nil {
return err
}
event.Raw = log
@@ -2561,21 +3876,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchEthDeposited0(opts *bind.WatchOpts, sink c
}), nil
}
-// ParseEthDeposited0 is a log parse operation binding the contract event 0x7120a3b075ad25974c5eed76dedb3a217c76c9c6d1f1e201caeba9b89de9a9d9.
+// ParseTransitionProved is a log parse operation binding the contract event 0xc195e4be3b936845492b8be4b1cf604db687a4d79ad84d979499c136f8e6701f.
//
-// Solidity: event EthDeposited((address,uint96,uint64) deposit)
-func (_TaikoL1 *TaikoL1Filterer) ParseEthDeposited0(log types.Log) (*TaikoL1EthDeposited0, error) {
- event := new(TaikoL1EthDeposited0)
- if err := _TaikoL1.contract.UnpackLog(event, "EthDeposited0", log); err != nil {
+// Solidity: event TransitionProved(uint256 indexed blockId, (bytes32,bytes32,bytes32,bytes32) tran, address prover, uint96 validityBond, uint16 tier)
+func (_TaikoL1 *TaikoL1Filterer) ParseTransitionProved(log types.Log) (*TaikoL1TransitionProved, error) {
+ event := new(TaikoL1TransitionProved)
+ if err := _TaikoL1.contract.UnpackLog(event, "TransitionProved", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1InitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the TaikoL1 contract.
-type TaikoL1InitializedIterator struct {
- Event *TaikoL1Initialized // Event containing the contract specifics and raw log
+// TaikoL1UnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the TaikoL1 contract.
+type TaikoL1UnpausedIterator struct {
+ Event *TaikoL1Unpaused // 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
@@ -2589,7 +3904,7 @@ type TaikoL1InitializedIterator struct {
// 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 *TaikoL1InitializedIterator) Next() bool {
+func (it *TaikoL1UnpausedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2598,7 +3913,7 @@ func (it *TaikoL1InitializedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1Initialized)
+ it.Event = new(TaikoL1Unpaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2613,7 +3928,7 @@ func (it *TaikoL1InitializedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1Initialized)
+ it.Event = new(TaikoL1Unpaused)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2629,41 +3944,41 @@ func (it *TaikoL1InitializedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1InitializedIterator) Error() error {
+func (it *TaikoL1UnpausedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1InitializedIterator) Close() error {
+func (it *TaikoL1UnpausedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1Initialized represents a Initialized event raised by the TaikoL1 contract.
-type TaikoL1Initialized struct {
- Version uint8
+// TaikoL1Unpaused represents a Unpaused event raised by the TaikoL1 contract.
+type TaikoL1Unpaused struct {
+ Account common.Address
Raw types.Log // Blockchain specific contextual infos
}
-// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
//
-// Solidity: event Initialized(uint8 version)
-func (_TaikoL1 *TaikoL1Filterer) FilterInitialized(opts *bind.FilterOpts) (*TaikoL1InitializedIterator, error) {
+// Solidity: event Unpaused(address account)
+func (_TaikoL1 *TaikoL1Filterer) FilterUnpaused(opts *bind.FilterOpts) (*TaikoL1UnpausedIterator, error) {
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "Initialized")
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "Unpaused")
if err != nil {
return nil, err
}
- return &TaikoL1InitializedIterator{contract: _TaikoL1.contract, event: "Initialized", logs: logs, sub: sub}, nil
+ return &TaikoL1UnpausedIterator{contract: _TaikoL1.contract, event: "Unpaused", logs: logs, sub: sub}, nil
}
-// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
//
-// Solidity: event Initialized(uint8 version)
-func (_TaikoL1 *TaikoL1Filterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *TaikoL1Initialized) (event.Subscription, error) {
+// Solidity: event Unpaused(address account)
+func (_TaikoL1 *TaikoL1Filterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *TaikoL1Unpaused) (event.Subscription, error) {
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "Initialized")
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "Unpaused")
if err != nil {
return nil, err
}
@@ -2673,8 +3988,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchInitialized(opts *bind.WatchOpts, sink cha
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1Initialized)
- if err := _TaikoL1.contract.UnpackLog(event, "Initialized", log); err != nil {
+ event := new(TaikoL1Unpaused)
+ if err := _TaikoL1.contract.UnpackLog(event, "Unpaused", log); err != nil {
return err
}
event.Raw = log
@@ -2695,21 +4010,21 @@ func (_TaikoL1 *TaikoL1Filterer) WatchInitialized(opts *bind.WatchOpts, sink cha
}), nil
}
-// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.
+// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
//
-// Solidity: event Initialized(uint8 version)
-func (_TaikoL1 *TaikoL1Filterer) ParseInitialized(log types.Log) (*TaikoL1Initialized, error) {
- event := new(TaikoL1Initialized)
- if err := _TaikoL1.contract.UnpackLog(event, "Initialized", log); err != nil {
+// Solidity: event Unpaused(address account)
+func (_TaikoL1 *TaikoL1Filterer) ParseUnpaused(log types.Log) (*TaikoL1Unpaused, error) {
+ event := new(TaikoL1Unpaused)
+ if err := _TaikoL1.contract.UnpackLog(event, "Unpaused", log); err != nil {
return nil, err
}
event.Raw = log
return event, nil
}
-// TaikoL1OwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TaikoL1 contract.
-type TaikoL1OwnershipTransferredIterator struct {
- Event *TaikoL1OwnershipTransferred // Event containing the contract specifics and raw log
+// TaikoL1UpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the TaikoL1 contract.
+type TaikoL1UpgradedIterator struct {
+ Event *TaikoL1Upgraded // 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
@@ -2723,7 +4038,7 @@ type TaikoL1OwnershipTransferredIterator struct {
// 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 *TaikoL1OwnershipTransferredIterator) Next() bool {
+func (it *TaikoL1UpgradedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -2732,7 +4047,7 @@ func (it *TaikoL1OwnershipTransferredIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL1OwnershipTransferred)
+ it.Event = new(TaikoL1Upgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2747,7 +4062,7 @@ func (it *TaikoL1OwnershipTransferredIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL1OwnershipTransferred)
+ it.Event = new(TaikoL1Upgraded)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -2763,60 +4078,51 @@ func (it *TaikoL1OwnershipTransferredIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL1OwnershipTransferredIterator) Error() error {
+func (it *TaikoL1UpgradedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL1OwnershipTransferredIterator) Close() error {
+func (it *TaikoL1UpgradedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL1OwnershipTransferred represents a OwnershipTransferred event raised by the TaikoL1 contract.
-type TaikoL1OwnershipTransferred struct {
- PreviousOwner common.Address
- NewOwner common.Address
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL1Upgraded represents a Upgraded event raised by the TaikoL1 contract.
+type TaikoL1Upgraded struct {
+ Implementation common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_TaikoL1 *TaikoL1Filterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TaikoL1OwnershipTransferredIterator, error) {
+// Solidity: event Upgraded(address indexed implementation)
+func (_TaikoL1 *TaikoL1Filterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*TaikoL1UpgradedIterator, error) {
- var previousOwnerRule []interface{}
- for _, previousOwnerItem := range previousOwner {
- previousOwnerRule = append(previousOwnerRule, previousOwnerItem)
- }
- var newOwnerRule []interface{}
- for _, newOwnerItem := range newOwner {
- newOwnerRule = append(newOwnerRule, newOwnerItem)
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
}
- logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+ logs, sub, err := _TaikoL1.contract.FilterLogs(opts, "Upgraded", implementationRule)
if err != nil {
return nil, err
}
- return &TaikoL1OwnershipTransferredIterator{contract: _TaikoL1.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil
+ return &TaikoL1UpgradedIterator{contract: _TaikoL1.contract, event: "Upgraded", logs: logs, sub: sub}, nil
}
-// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_TaikoL1 *TaikoL1Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TaikoL1OwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) {
+// Solidity: event Upgraded(address indexed implementation)
+func (_TaikoL1 *TaikoL1Filterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *TaikoL1Upgraded, implementation []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)
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
}
- logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule)
+ logs, sub, err := _TaikoL1.contract.WatchLogs(opts, "Upgraded", implementationRule)
if err != nil {
return nil, err
}
@@ -2826,8 +4132,8 @@ func (_TaikoL1 *TaikoL1Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts,
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL1OwnershipTransferred)
- if err := _TaikoL1.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+ event := new(TaikoL1Upgraded)
+ if err := _TaikoL1.contract.UnpackLog(event, "Upgraded", log); err != nil {
return err
}
event.Raw = log
@@ -2848,12 +4154,12 @@ func (_TaikoL1 *TaikoL1Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts,
}), nil
}
-// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.
+// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
//
-// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
-func (_TaikoL1 *TaikoL1Filterer) ParseOwnershipTransferred(log types.Log) (*TaikoL1OwnershipTransferred, error) {
- event := new(TaikoL1OwnershipTransferred)
- if err := _TaikoL1.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil {
+// Solidity: event Upgraded(address indexed implementation)
+func (_TaikoL1 *TaikoL1Filterer) ParseUpgraded(log types.Log) (*TaikoL1Upgraded, error) {
+ event := new(TaikoL1Upgraded)
+ if err := _TaikoL1.contract.UnpackLog(event, "Upgraded", log); err != nil {
return nil, err
}
event.Raw = log
diff --git a/packages/relayer/bindings/taikol2/TaikoL2.go b/packages/relayer/bindings/taikol2/TaikoL2.go
index 9c95149a3ea..6690f2f6ea6 100644
--- a/packages/relayer/bindings/taikol2/TaikoL2.go
+++ b/packages/relayer/bindings/taikol2/TaikoL2.go
@@ -29,25 +29,23 @@ var (
_ = abi.ConvertType
)
-// TaikoL2EIP1559Config is an auto generated low-level Go binding around an user-defined struct.
-type TaikoL2EIP1559Config struct {
- Yscale *big.Int
- Xscale uint64
- GasIssuedPerSecond uint32
+// ICrossChainSyncSnippet is an auto generated low-level Go binding around an user-defined struct.
+type ICrossChainSyncSnippet struct {
+ RemoteBlockId uint64
+ SyncedInBlock uint64
+ BlockHash [32]byte
+ SignalRoot [32]byte
}
-// TaikoL2EIP1559Params is an auto generated low-level Go binding around an user-defined struct.
-type TaikoL2EIP1559Params struct {
- Basefee uint64
- GasIssuedPerSecond uint32
- GasExcessMax uint64
- GasTarget uint64
- Ratio2x1x uint64
+// TaikoL2Config is an auto generated low-level Go binding around an user-defined struct.
+type TaikoL2Config struct {
+ GasTargetPerL1Block uint32
+ BasefeeAdjustmentQuotient uint8
}
// TaikoL2MetaData contains all meta data concerning the TaikoL2 contract.
var TaikoL2MetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[],\"name\":\"L2_1559_OUT_OF_STOCK\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_1559_OUT_OF_STOCK\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"expected\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"actual\",\"type\":\"uint64\"}],\"name\":\"L2_1559_UNEXPECTED_CHANGE\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"expected\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"actual\",\"type\":\"uint64\"}],\"name\":\"L2_1559_UNEXPECTED_CHANGE\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"expected\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"actual\",\"type\":\"uint64\"}],\"name\":\"L2_BASEFEE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_1559_PARAMS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_GOLDEN_TOUCH_K\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_SENDER\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"L2_PUBLIC_INPUT_HASH_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_TOO_LATE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Overflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addressManager\",\"type\":\"address\"}],\"name\":\"AddressManagerChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"number\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"basefee\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gaslimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"prevrandao\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"coinbase\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"chainid\",\"type\":\"uint32\"}],\"name\":\"Anchored\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"srcHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"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\":\"GOLDEN_TOUCH_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOLDEN_TOUCH_PRIVATEKEY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"l1SignalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"anchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasExcess\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"timeSinceParent\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getBasefee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_basefee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getCrossChainBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getCrossChainSignalRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getEIP1559Config\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"yscale\",\"type\":\"uint128\"},{\"internalType\":\"uint64\",\"name\":\"xscale\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasIssuedPerSecond\",\"type\":\"uint32\"}],\"internalType\":\"structTaikoL2.EIP1559Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"basefee\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"gasIssuedPerSecond\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"gasExcessMax\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"gasTarget\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"ratio2x1x\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoL2.EIP1559Params\",\"name\":\"_param1559\",\"type\":\"tuple\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSyncedL1Height\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"parentTimestamp\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"publicInputHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddressManager\",\"type\":\"address\"}],\"name\":\"setAddressManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"digest\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"k\",\"type\":\"uint8\"}],\"name\":\"signAnchor\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"r\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+ ABI: "[{\"inputs\":[],\"name\":\"EIP1559_INVALID_PARAMS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"INVALID_PAUSE_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_BASEFEE_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_GOLDEN_TOUCH_K\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_SENDER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_PUBLIC_INPUT_HASH_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_TOO_LATE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Overflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"REENTRANT_CALL\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_MANAGER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_UNEXPECTED_CHAINID\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"RESOLVER_ZERO_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"gasExcess\",\"type\":\"uint64\"}],\"name\":\"Anchored\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"syncedInBlock\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"name\":\"CrossChainSynced\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"GOLDEN_TOUCH_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GOLDEN_TOUCH_PRIVATEKEY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"l1BlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"l1SignalRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"anchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasExcess\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"l1Height\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"parentGasUsed\",\"type\":\"uint32\"}],\"name\":\"getBasefee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"basefee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"gasTargetPerL1Block\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"basefeeAdjustmentQuotient\",\"type\":\"uint8\"}],\"internalType\":\"structTaikoL2.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"blockId\",\"type\":\"uint64\"}],\"name\":\"getSyncedSnippet\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"remoteBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"syncedInBlock\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structICrossChainSync.Snippet\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_signalService\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_gasExcess\",\"type\":\"uint64\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"}],\"name\":\"l2Hashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSyncedL1Height\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"publicInputHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"chainId\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"addr\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"digest\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"k\",\"type\":\"uint8\"}],\"name\":\"signAnchor\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"r\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"signalService\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"skipFeeCheck\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"l1height\",\"type\":\"uint256\"}],\"name\":\"snippets\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"remoteBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"syncedInBlock\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"signalRoot\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]",
}
// TaikoL2ABI is the input ABI used to generate the binding from.
@@ -322,10 +320,10 @@ func (_TaikoL2 *TaikoL2CallerSession) GasExcess() (uint64, error) {
// GetBasefee is a free data retrieval call binding the contract method 0xa7e022d1.
//
-// Solidity: function getBasefee(uint64 timeSinceParent, uint32 parentGasUsed) view returns(uint256 _basefee)
-func (_TaikoL2 *TaikoL2Caller) GetBasefee(opts *bind.CallOpts, timeSinceParent uint64, parentGasUsed uint32) (*big.Int, error) {
+// Solidity: function getBasefee(uint64 l1Height, uint32 parentGasUsed) view returns(uint256 basefee)
+func (_TaikoL2 *TaikoL2Caller) GetBasefee(opts *bind.CallOpts, l1Height uint64, parentGasUsed uint32) (*big.Int, error) {
var out []interface{}
- err := _TaikoL2.contract.Call(opts, &out, "getBasefee", timeSinceParent, parentGasUsed)
+ err := _TaikoL2.contract.Call(opts, &out, "getBasefee", l1Height, parentGasUsed)
if err != nil {
return *new(*big.Int), err
@@ -339,16 +337,16 @@ func (_TaikoL2 *TaikoL2Caller) GetBasefee(opts *bind.CallOpts, timeSinceParent u
// GetBasefee is a free data retrieval call binding the contract method 0xa7e022d1.
//
-// Solidity: function getBasefee(uint64 timeSinceParent, uint32 parentGasUsed) view returns(uint256 _basefee)
-func (_TaikoL2 *TaikoL2Session) GetBasefee(timeSinceParent uint64, parentGasUsed uint32) (*big.Int, error) {
- return _TaikoL2.Contract.GetBasefee(&_TaikoL2.CallOpts, timeSinceParent, parentGasUsed)
+// Solidity: function getBasefee(uint64 l1Height, uint32 parentGasUsed) view returns(uint256 basefee)
+func (_TaikoL2 *TaikoL2Session) GetBasefee(l1Height uint64, parentGasUsed uint32) (*big.Int, error) {
+ return _TaikoL2.Contract.GetBasefee(&_TaikoL2.CallOpts, l1Height, parentGasUsed)
}
// GetBasefee is a free data retrieval call binding the contract method 0xa7e022d1.
//
-// Solidity: function getBasefee(uint64 timeSinceParent, uint32 parentGasUsed) view returns(uint256 _basefee)
-func (_TaikoL2 *TaikoL2CallerSession) GetBasefee(timeSinceParent uint64, parentGasUsed uint32) (*big.Int, error) {
- return _TaikoL2.Contract.GetBasefee(&_TaikoL2.CallOpts, timeSinceParent, parentGasUsed)
+// Solidity: function getBasefee(uint64 l1Height, uint32 parentGasUsed) view returns(uint256 basefee)
+func (_TaikoL2 *TaikoL2CallerSession) GetBasefee(l1Height uint64, parentGasUsed uint32) (*big.Int, error) {
+ return _TaikoL2.Contract.GetBasefee(&_TaikoL2.CallOpts, l1Height, parentGasUsed)
}
// GetBlockHash is a free data retrieval call binding the contract method 0x23ac7136.
@@ -382,97 +380,97 @@ func (_TaikoL2 *TaikoL2CallerSession) GetBlockHash(blockId uint64) ([32]byte, er
return _TaikoL2.Contract.GetBlockHash(&_TaikoL2.CallOpts, blockId)
}
-// GetCrossChainBlockHash is a free data retrieval call binding the contract method 0xbdd6bc36.
+// GetConfig is a free data retrieval call binding the contract method 0xc3f909d4.
//
-// Solidity: function getCrossChainBlockHash(uint64 blockId) view returns(bytes32)
-func (_TaikoL2 *TaikoL2Caller) GetCrossChainBlockHash(opts *bind.CallOpts, blockId uint64) ([32]byte, error) {
+// Solidity: function getConfig() view returns((uint32,uint8) config)
+func (_TaikoL2 *TaikoL2Caller) GetConfig(opts *bind.CallOpts) (TaikoL2Config, error) {
var out []interface{}
- err := _TaikoL2.contract.Call(opts, &out, "getCrossChainBlockHash", blockId)
+ err := _TaikoL2.contract.Call(opts, &out, "getConfig")
if err != nil {
- return *new([32]byte), err
+ return *new(TaikoL2Config), err
}
- out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+ out0 := *abi.ConvertType(out[0], new(TaikoL2Config)).(*TaikoL2Config)
return out0, err
}
-// GetCrossChainBlockHash is a free data retrieval call binding the contract method 0xbdd6bc36.
+// GetConfig is a free data retrieval call binding the contract method 0xc3f909d4.
//
-// Solidity: function getCrossChainBlockHash(uint64 blockId) view returns(bytes32)
-func (_TaikoL2 *TaikoL2Session) GetCrossChainBlockHash(blockId uint64) ([32]byte, error) {
- return _TaikoL2.Contract.GetCrossChainBlockHash(&_TaikoL2.CallOpts, blockId)
+// Solidity: function getConfig() view returns((uint32,uint8) config)
+func (_TaikoL2 *TaikoL2Session) GetConfig() (TaikoL2Config, error) {
+ return _TaikoL2.Contract.GetConfig(&_TaikoL2.CallOpts)
}
-// GetCrossChainBlockHash is a free data retrieval call binding the contract method 0xbdd6bc36.
+// GetConfig is a free data retrieval call binding the contract method 0xc3f909d4.
//
-// Solidity: function getCrossChainBlockHash(uint64 blockId) view returns(bytes32)
-func (_TaikoL2 *TaikoL2CallerSession) GetCrossChainBlockHash(blockId uint64) ([32]byte, error) {
- return _TaikoL2.Contract.GetCrossChainBlockHash(&_TaikoL2.CallOpts, blockId)
+// Solidity: function getConfig() view returns((uint32,uint8) config)
+func (_TaikoL2 *TaikoL2CallerSession) GetConfig() (TaikoL2Config, error) {
+ return _TaikoL2.Contract.GetConfig(&_TaikoL2.CallOpts)
}
-// GetCrossChainSignalRoot is a free data retrieval call binding the contract method 0x0599d294.
+// GetSyncedSnippet is a free data retrieval call binding the contract method 0x8cfb0459.
//
-// Solidity: function getCrossChainSignalRoot(uint64 blockId) view returns(bytes32)
-func (_TaikoL2 *TaikoL2Caller) GetCrossChainSignalRoot(opts *bind.CallOpts, blockId uint64) ([32]byte, error) {
+// Solidity: function getSyncedSnippet(uint64 blockId) view returns((uint64,uint64,bytes32,bytes32))
+func (_TaikoL2 *TaikoL2Caller) GetSyncedSnippet(opts *bind.CallOpts, blockId uint64) (ICrossChainSyncSnippet, error) {
var out []interface{}
- err := _TaikoL2.contract.Call(opts, &out, "getCrossChainSignalRoot", blockId)
+ err := _TaikoL2.contract.Call(opts, &out, "getSyncedSnippet", blockId)
if err != nil {
- return *new([32]byte), err
+ return *new(ICrossChainSyncSnippet), err
}
- out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
+ out0 := *abi.ConvertType(out[0], new(ICrossChainSyncSnippet)).(*ICrossChainSyncSnippet)
return out0, err
}
-// GetCrossChainSignalRoot is a free data retrieval call binding the contract method 0x0599d294.
+// GetSyncedSnippet is a free data retrieval call binding the contract method 0x8cfb0459.
//
-// Solidity: function getCrossChainSignalRoot(uint64 blockId) view returns(bytes32)
-func (_TaikoL2 *TaikoL2Session) GetCrossChainSignalRoot(blockId uint64) ([32]byte, error) {
- return _TaikoL2.Contract.GetCrossChainSignalRoot(&_TaikoL2.CallOpts, blockId)
+// Solidity: function getSyncedSnippet(uint64 blockId) view returns((uint64,uint64,bytes32,bytes32))
+func (_TaikoL2 *TaikoL2Session) GetSyncedSnippet(blockId uint64) (ICrossChainSyncSnippet, error) {
+ return _TaikoL2.Contract.GetSyncedSnippet(&_TaikoL2.CallOpts, blockId)
}
-// GetCrossChainSignalRoot is a free data retrieval call binding the contract method 0x0599d294.
+// GetSyncedSnippet is a free data retrieval call binding the contract method 0x8cfb0459.
//
-// Solidity: function getCrossChainSignalRoot(uint64 blockId) view returns(bytes32)
-func (_TaikoL2 *TaikoL2CallerSession) GetCrossChainSignalRoot(blockId uint64) ([32]byte, error) {
- return _TaikoL2.Contract.GetCrossChainSignalRoot(&_TaikoL2.CallOpts, blockId)
+// Solidity: function getSyncedSnippet(uint64 blockId) view returns((uint64,uint64,bytes32,bytes32))
+func (_TaikoL2 *TaikoL2CallerSession) GetSyncedSnippet(blockId uint64) (ICrossChainSyncSnippet, error) {
+ return _TaikoL2.Contract.GetSyncedSnippet(&_TaikoL2.CallOpts, blockId)
}
-// GetEIP1559Config is a free data retrieval call binding the contract method 0x4e755573.
+// L2Hashes is a free data retrieval call binding the contract method 0x8551f41e.
//
-// Solidity: function getEIP1559Config() view returns((uint128,uint64,uint32))
-func (_TaikoL2 *TaikoL2Caller) GetEIP1559Config(opts *bind.CallOpts) (TaikoL2EIP1559Config, error) {
+// Solidity: function l2Hashes(uint256 blockId) view returns(bytes32 blockHash)
+func (_TaikoL2 *TaikoL2Caller) L2Hashes(opts *bind.CallOpts, blockId *big.Int) ([32]byte, error) {
var out []interface{}
- err := _TaikoL2.contract.Call(opts, &out, "getEIP1559Config")
+ err := _TaikoL2.contract.Call(opts, &out, "l2Hashes", blockId)
if err != nil {
- return *new(TaikoL2EIP1559Config), err
+ return *new([32]byte), err
}
- out0 := *abi.ConvertType(out[0], new(TaikoL2EIP1559Config)).(*TaikoL2EIP1559Config)
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
-// GetEIP1559Config is a free data retrieval call binding the contract method 0x4e755573.
+// L2Hashes is a free data retrieval call binding the contract method 0x8551f41e.
//
-// Solidity: function getEIP1559Config() view returns((uint128,uint64,uint32))
-func (_TaikoL2 *TaikoL2Session) GetEIP1559Config() (TaikoL2EIP1559Config, error) {
- return _TaikoL2.Contract.GetEIP1559Config(&_TaikoL2.CallOpts)
+// Solidity: function l2Hashes(uint256 blockId) view returns(bytes32 blockHash)
+func (_TaikoL2 *TaikoL2Session) L2Hashes(blockId *big.Int) ([32]byte, error) {
+ return _TaikoL2.Contract.L2Hashes(&_TaikoL2.CallOpts, blockId)
}
-// GetEIP1559Config is a free data retrieval call binding the contract method 0x4e755573.
+// L2Hashes is a free data retrieval call binding the contract method 0x8551f41e.
//
-// Solidity: function getEIP1559Config() view returns((uint128,uint64,uint32))
-func (_TaikoL2 *TaikoL2CallerSession) GetEIP1559Config() (TaikoL2EIP1559Config, error) {
- return _TaikoL2.Contract.GetEIP1559Config(&_TaikoL2.CallOpts)
+// Solidity: function l2Hashes(uint256 blockId) view returns(bytes32 blockHash)
+func (_TaikoL2 *TaikoL2CallerSession) L2Hashes(blockId *big.Int) ([32]byte, error) {
+ return _TaikoL2.Contract.L2Hashes(&_TaikoL2.CallOpts, blockId)
}
// LatestSyncedL1Height is a free data retrieval call binding the contract method 0xc7b96908.
@@ -537,35 +535,66 @@ func (_TaikoL2 *TaikoL2CallerSession) Owner() (common.Address, error) {
return _TaikoL2.Contract.Owner(&_TaikoL2.CallOpts)
}
-// ParentTimestamp is a free data retrieval call binding the contract method 0x539b8ade.
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
//
-// Solidity: function parentTimestamp() view returns(uint64)
-func (_TaikoL2 *TaikoL2Caller) ParentTimestamp(opts *bind.CallOpts) (uint64, error) {
+// Solidity: function paused() view returns(bool)
+func (_TaikoL2 *TaikoL2Caller) Paused(opts *bind.CallOpts) (bool, error) {
var out []interface{}
- err := _TaikoL2.contract.Call(opts, &out, "parentTimestamp")
+ err := _TaikoL2.contract.Call(opts, &out, "paused")
if err != nil {
- return *new(uint64), err
+ return *new(bool), err
}
- out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_TaikoL2 *TaikoL2Session) Paused() (bool, error) {
+ return _TaikoL2.Contract.Paused(&_TaikoL2.CallOpts)
+}
+
+// Paused is a free data retrieval call binding the contract method 0x5c975abb.
+//
+// Solidity: function paused() view returns(bool)
+func (_TaikoL2 *TaikoL2CallerSession) Paused() (bool, error) {
+ return _TaikoL2.Contract.Paused(&_TaikoL2.CallOpts)
+}
+
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
+//
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_TaikoL2 *TaikoL2Caller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) {
+ var out []interface{}
+ err := _TaikoL2.contract.Call(opts, &out, "proxiableUUID")
+
+ if err != nil {
+ return *new([32]byte), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
-// ParentTimestamp is a free data retrieval call binding the contract method 0x539b8ade.
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
//
-// Solidity: function parentTimestamp() view returns(uint64)
-func (_TaikoL2 *TaikoL2Session) ParentTimestamp() (uint64, error) {
- return _TaikoL2.Contract.ParentTimestamp(&_TaikoL2.CallOpts)
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_TaikoL2 *TaikoL2Session) ProxiableUUID() ([32]byte, error) {
+ return _TaikoL2.Contract.ProxiableUUID(&_TaikoL2.CallOpts)
}
-// ParentTimestamp is a free data retrieval call binding the contract method 0x539b8ade.
+// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d.
//
-// Solidity: function parentTimestamp() view returns(uint64)
-func (_TaikoL2 *TaikoL2CallerSession) ParentTimestamp() (uint64, error) {
- return _TaikoL2.Contract.ParentTimestamp(&_TaikoL2.CallOpts)
+// Solidity: function proxiableUUID() view returns(bytes32)
+func (_TaikoL2 *TaikoL2CallerSession) ProxiableUUID() ([32]byte, error) {
+ return _TaikoL2.Contract.ProxiableUUID(&_TaikoL2.CallOpts)
}
// PublicInputHash is a free data retrieval call binding the contract method 0xdac5df78.
@@ -599,10 +628,10 @@ func (_TaikoL2 *TaikoL2CallerSession) PublicInputHash() ([32]byte, error) {
return _TaikoL2.Contract.PublicInputHash(&_TaikoL2.CallOpts)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_TaikoL2 *TaikoL2Caller) Resolve(opts *bind.CallOpts, chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_TaikoL2 *TaikoL2Caller) Resolve(opts *bind.CallOpts, chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
var out []interface{}
err := _TaikoL2.contract.Call(opts, &out, "resolve", chainId, name, allowZeroAddress)
@@ -616,17 +645,17 @@ func (_TaikoL2 *TaikoL2Caller) Resolve(opts *bind.CallOpts, chainId *big.Int, na
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_TaikoL2 *TaikoL2Session) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_TaikoL2 *TaikoL2Session) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _TaikoL2.Contract.Resolve(&_TaikoL2.CallOpts, chainId, name, allowZeroAddress)
}
-// Resolve is a free data retrieval call binding the contract method 0x6c6563f6.
+// Resolve is a free data retrieval call binding the contract method 0x3eb6b8cf.
//
-// Solidity: function resolve(uint256 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
-func (_TaikoL2 *TaikoL2CallerSession) Resolve(chainId *big.Int, name [32]byte, allowZeroAddress bool) (common.Address, error) {
+// Solidity: function resolve(uint64 chainId, bytes32 name, bool allowZeroAddress) view returns(address addr)
+func (_TaikoL2 *TaikoL2CallerSession) Resolve(chainId uint64, name [32]byte, allowZeroAddress bool) (common.Address, error) {
return _TaikoL2.Contract.Resolve(&_TaikoL2.CallOpts, chainId, name, allowZeroAddress)
}
@@ -711,46 +740,184 @@ func (_TaikoL2 *TaikoL2CallerSession) SignAnchor(digest [32]byte, k uint8) (stru
return _TaikoL2.Contract.SignAnchor(&_TaikoL2.CallOpts, digest, k)
}
+// SignalService is a free data retrieval call binding the contract method 0x62d09453.
+//
+// Solidity: function signalService() view returns(address)
+func (_TaikoL2 *TaikoL2Caller) SignalService(opts *bind.CallOpts) (common.Address, error) {
+ var out []interface{}
+ err := _TaikoL2.contract.Call(opts, &out, "signalService")
+
+ if err != nil {
+ return *new(common.Address), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
+
+ return out0, err
+
+}
+
+// SignalService is a free data retrieval call binding the contract method 0x62d09453.
+//
+// Solidity: function signalService() view returns(address)
+func (_TaikoL2 *TaikoL2Session) SignalService() (common.Address, error) {
+ return _TaikoL2.Contract.SignalService(&_TaikoL2.CallOpts)
+}
+
+// SignalService is a free data retrieval call binding the contract method 0x62d09453.
+//
+// Solidity: function signalService() view returns(address)
+func (_TaikoL2 *TaikoL2CallerSession) SignalService() (common.Address, error) {
+ return _TaikoL2.Contract.SignalService(&_TaikoL2.CallOpts)
+}
+
+// SkipFeeCheck is a free data retrieval call binding the contract method 0x2f980473.
+//
+// Solidity: function skipFeeCheck() pure returns(bool)
+func (_TaikoL2 *TaikoL2Caller) SkipFeeCheck(opts *bind.CallOpts) (bool, error) {
+ var out []interface{}
+ err := _TaikoL2.contract.Call(opts, &out, "skipFeeCheck")
+
+ if err != nil {
+ return *new(bool), err
+ }
+
+ out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
+
+ return out0, err
+
+}
+
+// SkipFeeCheck is a free data retrieval call binding the contract method 0x2f980473.
+//
+// Solidity: function skipFeeCheck() pure returns(bool)
+func (_TaikoL2 *TaikoL2Session) SkipFeeCheck() (bool, error) {
+ return _TaikoL2.Contract.SkipFeeCheck(&_TaikoL2.CallOpts)
+}
+
+// SkipFeeCheck is a free data retrieval call binding the contract method 0x2f980473.
+//
+// Solidity: function skipFeeCheck() pure returns(bool)
+func (_TaikoL2 *TaikoL2CallerSession) SkipFeeCheck() (bool, error) {
+ return _TaikoL2.Contract.SkipFeeCheck(&_TaikoL2.CallOpts)
+}
+
+// Snippets is a free data retrieval call binding the contract method 0xe8e2c5fb.
+//
+// Solidity: function snippets(uint256 l1height) view returns(uint64 remoteBlockId, uint64 syncedInBlock, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL2 *TaikoL2Caller) Snippets(opts *bind.CallOpts, l1height *big.Int) (struct {
+ RemoteBlockId uint64
+ SyncedInBlock uint64
+ BlockHash [32]byte
+ SignalRoot [32]byte
+}, error) {
+ var out []interface{}
+ err := _TaikoL2.contract.Call(opts, &out, "snippets", l1height)
+
+ outstruct := new(struct {
+ RemoteBlockId uint64
+ SyncedInBlock uint64
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ })
+ if err != nil {
+ return *outstruct, err
+ }
+
+ outstruct.RemoteBlockId = *abi.ConvertType(out[0], new(uint64)).(*uint64)
+ outstruct.SyncedInBlock = *abi.ConvertType(out[1], new(uint64)).(*uint64)
+ outstruct.BlockHash = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte)
+ outstruct.SignalRoot = *abi.ConvertType(out[3], new([32]byte)).(*[32]byte)
+
+ return *outstruct, err
+
+}
+
+// Snippets is a free data retrieval call binding the contract method 0xe8e2c5fb.
+//
+// Solidity: function snippets(uint256 l1height) view returns(uint64 remoteBlockId, uint64 syncedInBlock, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL2 *TaikoL2Session) Snippets(l1height *big.Int) (struct {
+ RemoteBlockId uint64
+ SyncedInBlock uint64
+ BlockHash [32]byte
+ SignalRoot [32]byte
+}, error) {
+ return _TaikoL2.Contract.Snippets(&_TaikoL2.CallOpts, l1height)
+}
+
+// Snippets is a free data retrieval call binding the contract method 0xe8e2c5fb.
+//
+// Solidity: function snippets(uint256 l1height) view returns(uint64 remoteBlockId, uint64 syncedInBlock, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL2 *TaikoL2CallerSession) Snippets(l1height *big.Int) (struct {
+ RemoteBlockId uint64
+ SyncedInBlock uint64
+ BlockHash [32]byte
+ SignalRoot [32]byte
+}, error) {
+ return _TaikoL2.Contract.Snippets(&_TaikoL2.CallOpts, l1height)
+}
+
// Anchor is a paid mutator transaction binding the contract method 0xda69d3db.
//
-// Solidity: function anchor(bytes32 l1Hash, bytes32 l1SignalRoot, uint64 l1Height, uint32 parentGasUsed) returns()
-func (_TaikoL2 *TaikoL2Transactor) Anchor(opts *bind.TransactOpts, l1Hash [32]byte, l1SignalRoot [32]byte, l1Height uint64, parentGasUsed uint32) (*types.Transaction, error) {
- return _TaikoL2.contract.Transact(opts, "anchor", l1Hash, l1SignalRoot, l1Height, parentGasUsed)
+// Solidity: function anchor(bytes32 l1BlockHash, bytes32 l1SignalRoot, uint64 l1Height, uint32 parentGasUsed) returns()
+func (_TaikoL2 *TaikoL2Transactor) Anchor(opts *bind.TransactOpts, l1BlockHash [32]byte, l1SignalRoot [32]byte, l1Height uint64, parentGasUsed uint32) (*types.Transaction, error) {
+ return _TaikoL2.contract.Transact(opts, "anchor", l1BlockHash, l1SignalRoot, l1Height, parentGasUsed)
}
// Anchor is a paid mutator transaction binding the contract method 0xda69d3db.
//
-// Solidity: function anchor(bytes32 l1Hash, bytes32 l1SignalRoot, uint64 l1Height, uint32 parentGasUsed) returns()
-func (_TaikoL2 *TaikoL2Session) Anchor(l1Hash [32]byte, l1SignalRoot [32]byte, l1Height uint64, parentGasUsed uint32) (*types.Transaction, error) {
- return _TaikoL2.Contract.Anchor(&_TaikoL2.TransactOpts, l1Hash, l1SignalRoot, l1Height, parentGasUsed)
+// Solidity: function anchor(bytes32 l1BlockHash, bytes32 l1SignalRoot, uint64 l1Height, uint32 parentGasUsed) returns()
+func (_TaikoL2 *TaikoL2Session) Anchor(l1BlockHash [32]byte, l1SignalRoot [32]byte, l1Height uint64, parentGasUsed uint32) (*types.Transaction, error) {
+ return _TaikoL2.Contract.Anchor(&_TaikoL2.TransactOpts, l1BlockHash, l1SignalRoot, l1Height, parentGasUsed)
}
// Anchor is a paid mutator transaction binding the contract method 0xda69d3db.
//
-// Solidity: function anchor(bytes32 l1Hash, bytes32 l1SignalRoot, uint64 l1Height, uint32 parentGasUsed) returns()
-func (_TaikoL2 *TaikoL2TransactorSession) Anchor(l1Hash [32]byte, l1SignalRoot [32]byte, l1Height uint64, parentGasUsed uint32) (*types.Transaction, error) {
- return _TaikoL2.Contract.Anchor(&_TaikoL2.TransactOpts, l1Hash, l1SignalRoot, l1Height, parentGasUsed)
+// Solidity: function anchor(bytes32 l1BlockHash, bytes32 l1SignalRoot, uint64 l1Height, uint32 parentGasUsed) returns()
+func (_TaikoL2 *TaikoL2TransactorSession) Anchor(l1BlockHash [32]byte, l1SignalRoot [32]byte, l1Height uint64, parentGasUsed uint32) (*types.Transaction, error) {
+ return _TaikoL2.Contract.Anchor(&_TaikoL2.TransactOpts, l1BlockHash, l1SignalRoot, l1Height, parentGasUsed)
+}
+
+// Init is a paid mutator transaction binding the contract method 0xb259f48b.
+//
+// Solidity: function init(address _signalService, uint64 _gasExcess) returns()
+func (_TaikoL2 *TaikoL2Transactor) Init(opts *bind.TransactOpts, _signalService common.Address, _gasExcess uint64) (*types.Transaction, error) {
+ return _TaikoL2.contract.Transact(opts, "init", _signalService, _gasExcess)
+}
+
+// Init is a paid mutator transaction binding the contract method 0xb259f48b.
+//
+// Solidity: function init(address _signalService, uint64 _gasExcess) returns()
+func (_TaikoL2 *TaikoL2Session) Init(_signalService common.Address, _gasExcess uint64) (*types.Transaction, error) {
+ return _TaikoL2.Contract.Init(&_TaikoL2.TransactOpts, _signalService, _gasExcess)
}
-// Init is a paid mutator transaction binding the contract method 0x5c82e9c2.
+// Init is a paid mutator transaction binding the contract method 0xb259f48b.
//
-// Solidity: function init(address _addressManager, (uint64,uint32,uint64,uint64,uint64) _param1559) returns()
-func (_TaikoL2 *TaikoL2Transactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _param1559 TaikoL2EIP1559Params) (*types.Transaction, error) {
- return _TaikoL2.contract.Transact(opts, "init", _addressManager, _param1559)
+// Solidity: function init(address _signalService, uint64 _gasExcess) returns()
+func (_TaikoL2 *TaikoL2TransactorSession) Init(_signalService common.Address, _gasExcess uint64) (*types.Transaction, error) {
+ return _TaikoL2.Contract.Init(&_TaikoL2.TransactOpts, _signalService, _gasExcess)
}
-// Init is a paid mutator transaction binding the contract method 0x5c82e9c2.
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
-// Solidity: function init(address _addressManager, (uint64,uint32,uint64,uint64,uint64) _param1559) returns()
-func (_TaikoL2 *TaikoL2Session) Init(_addressManager common.Address, _param1559 TaikoL2EIP1559Params) (*types.Transaction, error) {
- return _TaikoL2.Contract.Init(&_TaikoL2.TransactOpts, _addressManager, _param1559)
+// Solidity: function pause() returns()
+func (_TaikoL2 *TaikoL2Transactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _TaikoL2.contract.Transact(opts, "pause")
}
-// Init is a paid mutator transaction binding the contract method 0x5c82e9c2.
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
//
-// Solidity: function init(address _addressManager, (uint64,uint32,uint64,uint64,uint64) _param1559) returns()
-func (_TaikoL2 *TaikoL2TransactorSession) Init(_addressManager common.Address, _param1559 TaikoL2EIP1559Params) (*types.Transaction, error) {
- return _TaikoL2.Contract.Init(&_TaikoL2.TransactOpts, _addressManager, _param1559)
+// Solidity: function pause() returns()
+func (_TaikoL2 *TaikoL2Session) Pause() (*types.Transaction, error) {
+ return _TaikoL2.Contract.Pause(&_TaikoL2.TransactOpts)
+}
+
+// Pause is a paid mutator transaction binding the contract method 0x8456cb59.
+//
+// Solidity: function pause() returns()
+func (_TaikoL2 *TaikoL2TransactorSession) Pause() (*types.Transaction, error) {
+ return _TaikoL2.Contract.Pause(&_TaikoL2.TransactOpts)
}
// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.
@@ -774,27 +941,6 @@ func (_TaikoL2 *TaikoL2TransactorSession) RenounceOwnership() (*types.Transactio
return _TaikoL2.Contract.RenounceOwnership(&_TaikoL2.TransactOpts)
}
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_TaikoL2 *TaikoL2Transactor) SetAddressManager(opts *bind.TransactOpts, newAddressManager common.Address) (*types.Transaction, error) {
- return _TaikoL2.contract.Transact(opts, "setAddressManager", newAddressManager)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_TaikoL2 *TaikoL2Session) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _TaikoL2.Contract.SetAddressManager(&_TaikoL2.TransactOpts, newAddressManager)
-}
-
-// SetAddressManager is a paid mutator transaction binding the contract method 0x0652b57a.
-//
-// Solidity: function setAddressManager(address newAddressManager) returns()
-func (_TaikoL2 *TaikoL2TransactorSession) SetAddressManager(newAddressManager common.Address) (*types.Transaction, error) {
- return _TaikoL2.Contract.SetAddressManager(&_TaikoL2.TransactOpts, newAddressManager)
-}
-
// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.
//
// Solidity: function transferOwnership(address newOwner) returns()
@@ -816,9 +962,72 @@ func (_TaikoL2 *TaikoL2TransactorSession) TransferOwnership(newOwner common.Addr
return _TaikoL2.Contract.TransferOwnership(&_TaikoL2.TransactOpts, newOwner)
}
-// TaikoL2AddressManagerChangedIterator is returned from FilterAddressManagerChanged and is used to iterate over the raw logs and unpacked data for AddressManagerChanged events raised by the TaikoL2 contract.
-type TaikoL2AddressManagerChangedIterator struct {
- Event *TaikoL2AddressManagerChanged // Event containing the contract specifics and raw log
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_TaikoL2 *TaikoL2Transactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) {
+ return _TaikoL2.contract.Transact(opts, "unpause")
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_TaikoL2 *TaikoL2Session) Unpause() (*types.Transaction, error) {
+ return _TaikoL2.Contract.Unpause(&_TaikoL2.TransactOpts)
+}
+
+// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a.
+//
+// Solidity: function unpause() returns()
+func (_TaikoL2 *TaikoL2TransactorSession) Unpause() (*types.Transaction, error) {
+ return _TaikoL2.Contract.Unpause(&_TaikoL2.TransactOpts)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_TaikoL2 *TaikoL2Transactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) {
+ return _TaikoL2.contract.Transact(opts, "upgradeTo", newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_TaikoL2 *TaikoL2Session) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _TaikoL2.Contract.UpgradeTo(&_TaikoL2.TransactOpts, newImplementation)
+}
+
+// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
+//
+// Solidity: function upgradeTo(address newImplementation) returns()
+func (_TaikoL2 *TaikoL2TransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
+ return _TaikoL2.Contract.UpgradeTo(&_TaikoL2.TransactOpts, newImplementation)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_TaikoL2 *TaikoL2Transactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _TaikoL2.contract.Transact(opts, "upgradeToAndCall", newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_TaikoL2 *TaikoL2Session) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _TaikoL2.Contract.UpgradeToAndCall(&_TaikoL2.TransactOpts, newImplementation, data)
+}
+
+// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
+//
+// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
+func (_TaikoL2 *TaikoL2TransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
+ return _TaikoL2.Contract.UpgradeToAndCall(&_TaikoL2.TransactOpts, newImplementation, data)
+}
+
+// TaikoL2AdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the TaikoL2 contract.
+type TaikoL2AdminChangedIterator struct {
+ Event *TaikoL2AdminChanged // 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
@@ -832,7 +1041,7 @@ type TaikoL2AddressManagerChangedIterator struct {
// 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 *TaikoL2AddressManagerChangedIterator) Next() bool {
+func (it *TaikoL2AdminChangedIterator) Next() bool {
// If the iterator failed, stop iterating
if it.fail != nil {
return false
@@ -841,7 +1050,7 @@ func (it *TaikoL2AddressManagerChangedIterator) Next() bool {
if it.done {
select {
case log := <-it.logs:
- it.Event = new(TaikoL2AddressManagerChanged)
+ it.Event = new(TaikoL2AdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -856,7 +1065,7 @@ func (it *TaikoL2AddressManagerChangedIterator) Next() bool {
// Iterator still in progress, wait for either a data or an error event
select {
case log := <-it.logs:
- it.Event = new(TaikoL2AddressManagerChanged)
+ it.Event = new(TaikoL2AdminChanged)
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
it.fail = err
return false
@@ -872,51 +1081,42 @@ func (it *TaikoL2AddressManagerChangedIterator) Next() bool {
}
// Error returns any retrieval or parsing error occurred during filtering.
-func (it *TaikoL2AddressManagerChangedIterator) Error() error {
+func (it *TaikoL2AdminChangedIterator) Error() error {
return it.fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
-func (it *TaikoL2AddressManagerChangedIterator) Close() error {
+func (it *TaikoL2AdminChangedIterator) Close() error {
it.sub.Unsubscribe()
return nil
}
-// TaikoL2AddressManagerChanged represents a AddressManagerChanged event raised by the TaikoL2 contract.
-type TaikoL2AddressManagerChanged struct {
- AddressManager common.Address
- Raw types.Log // Blockchain specific contextual infos
+// TaikoL2AdminChanged represents a AdminChanged event raised by the TaikoL2 contract.
+type TaikoL2AdminChanged struct {
+ PreviousAdmin common.Address
+ NewAdmin common.Address
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterAddressManagerChanged is a free log retrieval operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_TaikoL2 *TaikoL2Filterer) FilterAddressManagerChanged(opts *bind.FilterOpts, addressManager []common.Address) (*TaikoL2AddressManagerChangedIterator, error) {
-
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
- }
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_TaikoL2 *TaikoL2Filterer) FilterAdminChanged(opts *bind.FilterOpts) (*TaikoL2AdminChangedIterator, error) {
- logs, sub, err := _TaikoL2.contract.FilterLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _TaikoL2.contract.FilterLogs(opts, "AdminChanged")
if err != nil {
return nil, err
}
- return &TaikoL2AddressManagerChangedIterator{contract: _TaikoL2.contract, event: "AddressManagerChanged", logs: logs, sub: sub}, nil
+ return &TaikoL2AdminChangedIterator{contract: _TaikoL2.contract, event: "AdminChanged", logs: logs, sub: sub}, nil
}
-// WatchAddressManagerChanged is a free log subscription operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_TaikoL2 *TaikoL2Filterer) WatchAddressManagerChanged(opts *bind.WatchOpts, sink chan<- *TaikoL2AddressManagerChanged, addressManager []common.Address) (event.Subscription, error) {
-
- var addressManagerRule []interface{}
- for _, addressManagerItem := range addressManager {
- addressManagerRule = append(addressManagerRule, addressManagerItem)
- }
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_TaikoL2 *TaikoL2Filterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *TaikoL2AdminChanged) (event.Subscription, error) {
- logs, sub, err := _TaikoL2.contract.WatchLogs(opts, "AddressManagerChanged", addressManagerRule)
+ logs, sub, err := _TaikoL2.contract.WatchLogs(opts, "AdminChanged")
if err != nil {
return nil, err
}
@@ -926,8 +1126,8 @@ func (_TaikoL2 *TaikoL2Filterer) WatchAddressManagerChanged(opts *bind.WatchOpts
select {
case log := <-logs:
// New log arrived, parse the event and forward to the user
- event := new(TaikoL2AddressManagerChanged)
- if err := _TaikoL2.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+ event := new(TaikoL2AdminChanged)
+ if err := _TaikoL2.contract.UnpackLog(event, "AdminChanged", log); err != nil {
return err
}
event.Raw = log
@@ -948,12 +1148,12 @@ func (_TaikoL2 *TaikoL2Filterer) WatchAddressManagerChanged(opts *bind.WatchOpts
}), nil
}
-// ParseAddressManagerChanged is a log parse operation binding the contract event 0x399ded90cb5ed8d89ef7e76ff4af65c373f06d3bf5d7eef55f4228e7b702a18b.
+// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
//
-// Solidity: event AddressManagerChanged(address indexed addressManager)
-func (_TaikoL2 *TaikoL2Filterer) ParseAddressManagerChanged(log types.Log) (*TaikoL2AddressManagerChanged, error) {
- event := new(TaikoL2AddressManagerChanged)
- if err := _TaikoL2.contract.UnpackLog(event, "AddressManagerChanged", log); err != nil {
+// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
+func (_TaikoL2 *TaikoL2Filterer) ParseAdminChanged(log types.Log) (*TaikoL2AdminChanged, error) {
+ event := new(TaikoL2AdminChanged)
+ if err := _TaikoL2.contract.UnpackLog(event, "AdminChanged", log); err != nil {
return nil, err
}
event.Raw = log
@@ -1029,20 +1229,14 @@ func (it *TaikoL2AnchoredIterator) Close() error {
// TaikoL2Anchored represents a Anchored event raised by the TaikoL2 contract.
type TaikoL2Anchored struct {
- Number uint64
- Basefee uint64
- Gaslimit uint32
- Timestamp uint64
ParentHash [32]byte
- Prevrandao *big.Int
- Coinbase common.Address
- Chainid uint32
+ GasExcess uint64
Raw types.Log // Blockchain specific contextual infos
}
-// FilterAnchored is a free log retrieval operation binding the contract event 0xf5e89a4a67ffebdbc23df567479d3096c1dba4169c6bbf20ffc6b24d7f6e6e70.
+// FilterAnchored is a free log retrieval operation binding the contract event 0x41c3f410f5c8ac36bb46b1dccef0de0f964087c9e688795fa02ecfa2c20b3fe4.
//
-// Solidity: event Anchored(uint64 number, uint64 basefee, uint32 gaslimit, uint64 timestamp, bytes32 parentHash, uint256 prevrandao, address coinbase, uint32 chainid)
+// Solidity: event Anchored(bytes32 parentHash, uint64 gasExcess)
func (_TaikoL2 *TaikoL2Filterer) FilterAnchored(opts *bind.FilterOpts) (*TaikoL2AnchoredIterator, error) {
logs, sub, err := _TaikoL2.contract.FilterLogs(opts, "Anchored")
@@ -1052,9 +1246,9 @@ func (_TaikoL2 *TaikoL2Filterer) FilterAnchored(opts *bind.FilterOpts) (*TaikoL2
return &TaikoL2AnchoredIterator{contract: _TaikoL2.contract, event: "Anchored", logs: logs, sub: sub}, nil
}
-// WatchAnchored is a free log subscription operation binding the contract event 0xf5e89a4a67ffebdbc23df567479d3096c1dba4169c6bbf20ffc6b24d7f6e6e70.
+// WatchAnchored is a free log subscription operation binding the contract event 0x41c3f410f5c8ac36bb46b1dccef0de0f964087c9e688795fa02ecfa2c20b3fe4.
//
-// Solidity: event Anchored(uint64 number, uint64 basefee, uint32 gaslimit, uint64 timestamp, bytes32 parentHash, uint256 prevrandao, address coinbase, uint32 chainid)
+// Solidity: event Anchored(bytes32 parentHash, uint64 gasExcess)
func (_TaikoL2 *TaikoL2Filterer) WatchAnchored(opts *bind.WatchOpts, sink chan<- *TaikoL2Anchored) (event.Subscription, error) {
logs, sub, err := _TaikoL2.contract.WatchLogs(opts, "Anchored")
@@ -1089,9 +1283,9 @@ func (_TaikoL2 *TaikoL2Filterer) WatchAnchored(opts *bind.WatchOpts, sink chan<-
}), nil
}
-// ParseAnchored is a log parse operation binding the contract event 0xf5e89a4a67ffebdbc23df567479d3096c1dba4169c6bbf20ffc6b24d7f6e6e70.
+// ParseAnchored is a log parse operation binding the contract event 0x41c3f410f5c8ac36bb46b1dccef0de0f964087c9e688795fa02ecfa2c20b3fe4.
//
-// Solidity: event Anchored(uint64 number, uint64 basefee, uint32 gaslimit, uint64 timestamp, bytes32 parentHash, uint256 prevrandao, address coinbase, uint32 chainid)
+// Solidity: event Anchored(bytes32 parentHash, uint64 gasExcess)
func (_TaikoL2 *TaikoL2Filterer) ParseAnchored(log types.Log) (*TaikoL2Anchored, error) {
event := new(TaikoL2Anchored)
if err := _TaikoL2.contract.UnpackLog(event, "Anchored", log); err != nil {
@@ -1101,6 +1295,150 @@ func (_TaikoL2 *TaikoL2Filterer) ParseAnchored(log types.Log) (*TaikoL2Anchored,
return event, nil
}
+// TaikoL2BeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the TaikoL2 contract.
+type TaikoL2BeaconUpgradedIterator struct {
+ Event *TaikoL2BeaconUpgraded // 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 *TaikoL2BeaconUpgradedIterator) 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(TaikoL2BeaconUpgraded)
+ 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(TaikoL2BeaconUpgraded)
+ 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 *TaikoL2BeaconUpgradedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *TaikoL2BeaconUpgradedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// TaikoL2BeaconUpgraded represents a BeaconUpgraded event raised by the TaikoL2 contract.
+type TaikoL2BeaconUpgraded struct {
+ Beacon common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
+//
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_TaikoL2 *TaikoL2Filterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*TaikoL2BeaconUpgradedIterator, error) {
+
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
+ }
+
+ logs, sub, err := _TaikoL2.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule)
+ if err != nil {
+ return nil, err
+ }
+ return &TaikoL2BeaconUpgradedIterator{contract: _TaikoL2.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil
+}
+
+// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
+//
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_TaikoL2 *TaikoL2Filterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *TaikoL2BeaconUpgraded, beacon []common.Address) (event.Subscription, error) {
+
+ var beaconRule []interface{}
+ for _, beaconItem := range beacon {
+ beaconRule = append(beaconRule, beaconItem)
+ }
+
+ logs, sub, err := _TaikoL2.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule)
+ 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(TaikoL2BeaconUpgraded)
+ if err := _TaikoL2.contract.UnpackLog(event, "BeaconUpgraded", 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
+}
+
+// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
+//
+// Solidity: event BeaconUpgraded(address indexed beacon)
+func (_TaikoL2 *TaikoL2Filterer) ParseBeaconUpgraded(log types.Log) (*TaikoL2BeaconUpgraded, error) {
+ event := new(TaikoL2BeaconUpgraded)
+ if err := _TaikoL2.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
// TaikoL2CrossChainSyncedIterator is returned from FilterCrossChainSynced and is used to iterate over the raw logs and unpacked data for CrossChainSynced events raised by the TaikoL2 contract.
type TaikoL2CrossChainSyncedIterator struct {
Event *TaikoL2CrossChainSynced // Event containing the contract specifics and raw log
@@ -1170,40 +1508,49 @@ func (it *TaikoL2CrossChainSyncedIterator) Close() error {
// TaikoL2CrossChainSynced represents a CrossChainSynced event raised by the TaikoL2 contract.
type TaikoL2CrossChainSynced struct {
- SrcHeight uint64
- BlockHash [32]byte
- SignalRoot [32]byte
- Raw types.Log // Blockchain specific contextual infos
+ SyncedInBlock uint64
+ BlockId uint64
+ BlockHash [32]byte
+ SignalRoot [32]byte
+ Raw types.Log // Blockchain specific contextual infos
}
-// FilterCrossChainSynced is a free log retrieval operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// FilterCrossChainSynced is a free log retrieval operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_TaikoL2 *TaikoL2Filterer) FilterCrossChainSynced(opts *bind.FilterOpts, srcHeight []uint64) (*TaikoL2CrossChainSyncedIterator, error) {
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL2 *TaikoL2Filterer) FilterCrossChainSynced(opts *bind.FilterOpts, syncedInBlock []uint64, blockId []uint64) (*TaikoL2CrossChainSyncedIterator, error) {
- var srcHeightRule []interface{}
- for _, srcHeightItem := range srcHeight {
- srcHeightRule = append(srcHeightRule, srcHeightItem)
+ var syncedInBlockRule []interface{}
+ for _, syncedInBlockItem := range syncedInBlock {
+ syncedInBlockRule = append(syncedInBlockRule, syncedInBlockItem)
+ }
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
}
- logs, sub, err := _TaikoL2.contract.FilterLogs(opts, "CrossChainSynced", srcHeightRule)
+ logs, sub, err := _TaikoL2.contract.FilterLogs(opts, "CrossChainSynced", syncedInBlockRule, blockIdRule)
if err != nil {
return nil, err
}
return &TaikoL2CrossChainSyncedIterator{contract: _TaikoL2.contract, event: "CrossChainSynced", logs: logs, sub: sub}, nil
}
-// WatchCrossChainSynced is a free log subscription operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// WatchCrossChainSynced is a free log subscription operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
-func (_TaikoL2 *TaikoL2Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sink chan<- *TaikoL2CrossChainSynced, srcHeight []uint64) (event.Subscription, error) {
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
+func (_TaikoL2 *TaikoL2Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sink chan<- *TaikoL2CrossChainSynced, syncedInBlock []uint64, blockId []uint64) (event.Subscription, error) {
- var srcHeightRule []interface{}
- for _, srcHeightItem := range srcHeight {
- srcHeightRule = append(srcHeightRule, srcHeightItem)
+ var syncedInBlockRule []interface{}
+ for _, syncedInBlockItem := range syncedInBlock {
+ syncedInBlockRule = append(syncedInBlockRule, syncedInBlockItem)
+ }
+ var blockIdRule []interface{}
+ for _, blockIdItem := range blockId {
+ blockIdRule = append(blockIdRule, blockIdItem)
}
- logs, sub, err := _TaikoL2.contract.WatchLogs(opts, "CrossChainSynced", srcHeightRule)
+ logs, sub, err := _TaikoL2.contract.WatchLogs(opts, "CrossChainSynced", syncedInBlockRule, blockIdRule)
if err != nil {
return nil, err
}
@@ -1235,9 +1582,9 @@ func (_TaikoL2 *TaikoL2Filterer) WatchCrossChainSynced(opts *bind.WatchOpts, sin
}), nil
}
-// ParseCrossChainSynced is a log parse operation binding the contract event 0x004ce985b8852a486571d0545799251fd671adcf33b7854a5f0f6a6a2431a555.
+// ParseCrossChainSynced is a log parse operation binding the contract event 0xf35ec3b262cf74881db1b8051c635496bccb1497a1e776dacb463d0e0e2b0f51.
//
-// Solidity: event CrossChainSynced(uint64 indexed srcHeight, bytes32 blockHash, bytes32 signalRoot)
+// Solidity: event CrossChainSynced(uint64 indexed syncedInBlock, uint64 indexed blockId, bytes32 blockHash, bytes32 signalRoot)
func (_TaikoL2 *TaikoL2Filterer) ParseCrossChainSynced(log types.Log) (*TaikoL2CrossChainSynced, error) {
event := new(TaikoL2CrossChainSynced)
if err := _TaikoL2.contract.UnpackLog(event, "CrossChainSynced", log); err != nil {
@@ -1533,3 +1880,415 @@ func (_TaikoL2 *TaikoL2Filterer) ParseOwnershipTransferred(log types.Log) (*Taik
event.Raw = log
return event, nil
}
+
+// TaikoL2PausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the TaikoL2 contract.
+type TaikoL2PausedIterator struct {
+ Event *TaikoL2Paused // 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 *TaikoL2PausedIterator) 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(TaikoL2Paused)
+ 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(TaikoL2Paused)
+ 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 *TaikoL2PausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *TaikoL2PausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// TaikoL2Paused represents a Paused event raised by the TaikoL2 contract.
+type TaikoL2Paused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_TaikoL2 *TaikoL2Filterer) FilterPaused(opts *bind.FilterOpts) (*TaikoL2PausedIterator, error) {
+
+ logs, sub, err := _TaikoL2.contract.FilterLogs(opts, "Paused")
+ if err != nil {
+ return nil, err
+ }
+ return &TaikoL2PausedIterator{contract: _TaikoL2.contract, event: "Paused", logs: logs, sub: sub}, nil
+}
+
+// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_TaikoL2 *TaikoL2Filterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *TaikoL2Paused) (event.Subscription, error) {
+
+ logs, sub, err := _TaikoL2.contract.WatchLogs(opts, "Paused")
+ 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(TaikoL2Paused)
+ if err := _TaikoL2.contract.UnpackLog(event, "Paused", 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
+}
+
+// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.
+//
+// Solidity: event Paused(address account)
+func (_TaikoL2 *TaikoL2Filterer) ParsePaused(log types.Log) (*TaikoL2Paused, error) {
+ event := new(TaikoL2Paused)
+ if err := _TaikoL2.contract.UnpackLog(event, "Paused", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// TaikoL2UnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the TaikoL2 contract.
+type TaikoL2UnpausedIterator struct {
+ Event *TaikoL2Unpaused // 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 *TaikoL2UnpausedIterator) 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(TaikoL2Unpaused)
+ 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(TaikoL2Unpaused)
+ 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 *TaikoL2UnpausedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *TaikoL2UnpausedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// TaikoL2Unpaused represents a Unpaused event raised by the TaikoL2 contract.
+type TaikoL2Unpaused struct {
+ Account common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_TaikoL2 *TaikoL2Filterer) FilterUnpaused(opts *bind.FilterOpts) (*TaikoL2UnpausedIterator, error) {
+
+ logs, sub, err := _TaikoL2.contract.FilterLogs(opts, "Unpaused")
+ if err != nil {
+ return nil, err
+ }
+ return &TaikoL2UnpausedIterator{contract: _TaikoL2.contract, event: "Unpaused", logs: logs, sub: sub}, nil
+}
+
+// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_TaikoL2 *TaikoL2Filterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *TaikoL2Unpaused) (event.Subscription, error) {
+
+ logs, sub, err := _TaikoL2.contract.WatchLogs(opts, "Unpaused")
+ 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(TaikoL2Unpaused)
+ if err := _TaikoL2.contract.UnpackLog(event, "Unpaused", 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
+}
+
+// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.
+//
+// Solidity: event Unpaused(address account)
+func (_TaikoL2 *TaikoL2Filterer) ParseUnpaused(log types.Log) (*TaikoL2Unpaused, error) {
+ event := new(TaikoL2Unpaused)
+ if err := _TaikoL2.contract.UnpackLog(event, "Unpaused", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
+
+// TaikoL2UpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the TaikoL2 contract.
+type TaikoL2UpgradedIterator struct {
+ Event *TaikoL2Upgraded // 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 *TaikoL2UpgradedIterator) 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(TaikoL2Upgraded)
+ 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(TaikoL2Upgraded)
+ 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 *TaikoL2UpgradedIterator) Error() error {
+ return it.fail
+}
+
+// Close terminates the iteration process, releasing any pending underlying
+// resources.
+func (it *TaikoL2UpgradedIterator) Close() error {
+ it.sub.Unsubscribe()
+ return nil
+}
+
+// TaikoL2Upgraded represents a Upgraded event raised by the TaikoL2 contract.
+type TaikoL2Upgraded struct {
+ Implementation common.Address
+ Raw types.Log // Blockchain specific contextual infos
+}
+
+// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_TaikoL2 *TaikoL2Filterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*TaikoL2UpgradedIterator, error) {
+
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
+ }
+
+ logs, sub, err := _TaikoL2.contract.FilterLogs(opts, "Upgraded", implementationRule)
+ if err != nil {
+ return nil, err
+ }
+ return &TaikoL2UpgradedIterator{contract: _TaikoL2.contract, event: "Upgraded", logs: logs, sub: sub}, nil
+}
+
+// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_TaikoL2 *TaikoL2Filterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *TaikoL2Upgraded, implementation []common.Address) (event.Subscription, error) {
+
+ var implementationRule []interface{}
+ for _, implementationItem := range implementation {
+ implementationRule = append(implementationRule, implementationItem)
+ }
+
+ logs, sub, err := _TaikoL2.contract.WatchLogs(opts, "Upgraded", implementationRule)
+ 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(TaikoL2Upgraded)
+ if err := _TaikoL2.contract.UnpackLog(event, "Upgraded", 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
+}
+
+// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
+//
+// Solidity: event Upgraded(address indexed implementation)
+func (_TaikoL2 *TaikoL2Filterer) ParseUpgraded(log types.Log) (*TaikoL2Upgraded, error) {
+ event := new(TaikoL2Upgraded)
+ if err := _TaikoL2.contract.UnpackLog(event, "Upgraded", log); err != nil {
+ return nil, err
+ }
+ event.Raw = log
+ return event, nil
+}
diff --git a/packages/relayer/bridge.go b/packages/relayer/bridge.go
index 7f2b40da95b..7b555b7fc8d 100644
--- a/packages/relayer/bridge.go
+++ b/packages/relayer/bridge.go
@@ -1,8 +1,6 @@
package relayer
import (
- "math/big"
-
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
@@ -16,9 +14,9 @@ type Bridge interface {
msgHash [][32]byte,
) (event.Subscription, error)
FilterMessageSent(opts *bind.FilterOpts, msgHash [][32]byte) (*bridge.BridgeMessageSentIterator, error)
- GetMessageStatus(opts *bind.CallOpts, msgHash [32]byte) (uint8, error)
+ MessageStatus(opts *bind.CallOpts, msgHash [32]byte) (uint8, error)
ProcessMessage(opts *bind.TransactOpts, message bridge.IBridgeMessage, proof []byte) (*types.Transaction, error)
- IsMessageReceived(opts *bind.CallOpts, msgHash [32]byte, srcChainId *big.Int, proof []byte) (bool, error) // nolint
+ ProveMessageReceived(opts *bind.CallOpts, message bridge.IBridgeMessage, proof []byte) (bool, error)
FilterMessageStatusChanged(
opts *bind.FilterOpts,
msgHash [][32]byte,
diff --git a/packages/relayer/cmd/flags/processor.go b/packages/relayer/cmd/flags/processor.go
index a2282b8fb54..fc913328d95 100644
--- a/packages/relayer/cmd/flags/processor.go
+++ b/packages/relayer/cmd/flags/processor.go
@@ -105,6 +105,27 @@ var (
Category: processorCategory,
EnvVars: []string{"ENABLE_TAIKO_L2"},
}
+ HopSignalServiceAddresses = &cli.StringSliceFlag{
+ Name: "hopSignalServiceAddresses",
+ Usage: "SignalService addresses for the intermediary chains",
+ Required: false,
+ Category: processorCategory,
+ EnvVars: []string{"HOP_SIGNAL_SERVICE_ADDRESSES"},
+ }
+ HopTaikoAddresses = &cli.StringSliceFlag{
+ Name: "hopTaikoAddresses",
+ Usage: "Taiko addresses for the intermediary chains",
+ Required: false,
+ Category: processorCategory,
+ EnvVars: []string{"HOP_TAIKO_ADDRESSES"},
+ }
+ HopRPCUrls = &cli.StringSliceFlag{
+ Name: "hopRpcUrls",
+ Usage: "RPC URL for the intermediary chains",
+ Required: false,
+ Category: processorCategory,
+ EnvVars: []string{"HOP_RPC_URLS"},
+ }
)
var ProcessorFlags = MergeFlags(CommonFlags, []cli.Flag{
@@ -123,4 +144,7 @@ var ProcessorFlags = MergeFlags(CommonFlags, []cli.Flag{
BackOffMaxRetrys,
QueuePrefetchCount,
EnableTaikoL2,
+ HopRPCUrls,
+ HopSignalServiceAddresses,
+ HopTaikoAddresses,
})
diff --git a/packages/relayer/encoding/signal_proof_test.go b/packages/relayer/encoding/signal_proof_test.go
index 40107b425f1..797cc76190b 100644
--- a/packages/relayer/encoding/signal_proof_test.go
+++ b/packages/relayer/encoding/signal_proof_test.go
@@ -1,7 +1,6 @@
package encoding
import (
- "math/big"
"testing"
"github.com/ethereum/go-ethereum/common/hexutil"
@@ -9,17 +8,17 @@ import (
)
func Test_EncodeSignalProof(t *testing.T) {
- height := new(big.Int).SetInt64(1)
// nolint: lll
storageProof := "0x00edb9377a94f02e691ea208a80a7bd13dcb51dfae3a389d3001a55c5fdf3f3ae70807df1d8ffcaeefa5dc56875a03dae3494d93bbf3074018fea52137a098433d9795f455fcfaf89b6456b970605bd0f70bec98418ef322fa5bba9874ab2277225a38c19f99275cd6d25d9cd4259c366c02b750056a6b71810034f95d34ae12c1298a95e6ba03de90dbbfacc5c8edbeb6ed93a0e01c08f3435b1ca944e9229a176804445432795c14dc315925fe2480084d6b0729c30fb1c2e50e481df5d7daa25769a0c74baf362ff02f2a934538cd11bf939f64377489255aa60a12628b130f4bddd30664d6b5f91d17cc110bee38a7ce5c629585e57d777bfbb2eaf09e15"
s := SignalProof{
- Height: height,
- Proof: hexutil.MustDecode(storageProof),
+ Height: uint64(1),
+ StorageProof: hexutil.MustDecode(storageProof),
+ Hops: []Hop{},
}
// nolint: lll
- want := "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000edb9377a94f02e691ea208a80a7bd13dcb51dfae3a389d3001a55c5fdf3f3ae70807df1d8ffcaeefa5dc56875a03dae3494d93bbf3074018fea52137a098433d9795f455fcfaf89b6456b970605bd0f70bec98418ef322fa5bba9874ab2277225a38c19f99275cd6d25d9cd4259c366c02b750056a6b71810034f95d34ae12c1298a95e6ba03de90dbbfacc5c8edbeb6ed93a0e01c08f3435b1ca944e9229a176804445432795c14dc315925fe2480084d6b0729c30fb1c2e50e481df5d7daa25769a0c74baf362ff02f2a934538cd11bf939f64377489255aa60a12628b130f4bddd30664d6b5f91d17cc110bee38a7ce5c629585e57d777bfbb2eaf09e15"
+ want := "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000010000edb9377a94f02e691ea208a80a7bd13dcb51dfae3a389d3001a55c5fdf3f3ae70807df1d8ffcaeefa5dc56875a03dae3494d93bbf3074018fea52137a098433d9795f455fcfaf89b6456b970605bd0f70bec98418ef322fa5bba9874ab2277225a38c19f99275cd6d25d9cd4259c366c02b750056a6b71810034f95d34ae12c1298a95e6ba03de90dbbfacc5c8edbeb6ed93a0e01c08f3435b1ca944e9229a176804445432795c14dc315925fe2480084d6b0729c30fb1c2e50e481df5d7daa25769a0c74baf362ff02f2a934538cd11bf939f64377489255aa60a12628b130f4bddd30664d6b5f91d17cc110bee38a7ce5c629585e57d777bfbb2eaf09e150000000000000000000000000000000000000000000000000000000000000000"
proof, err := EncodeSignalProof(s)
assert.Equal(t, nil, err)
assert.Equal(t, hexutil.Encode(proof), want)
diff --git a/packages/relayer/encoding/types.go b/packages/relayer/encoding/types.go
index 806b2500e14..81e4f31d048 100644
--- a/packages/relayer/encoding/types.go
+++ b/packages/relayer/encoding/types.go
@@ -33,17 +33,49 @@ type BlockHeader struct {
}
type SignalProof struct {
- Height *big.Int `abi:"height"`
- Proof []byte `abi:"proof"`
+ CrossChainSync common.Address `abi:"crossChainSync"`
+ Height uint64 `abi:"height"`
+ StorageProof []byte `abi:"storageProof"`
+ Hops []Hop `abi:"hops"`
+}
+
+type Hop struct {
+ SignalRootRelay common.Address `abi:"signalRootRelay"`
+ SignalRoot [32]byte `abi:"signalRoot"`
+ StorageProof []byte `abi:"storageProof"`
+}
+
+var hopComponents = []abi.ArgumentMarshaling{
+ {
+ Name: "signalRootRelay",
+ Type: "address",
+ },
+ {
+ Name: "signalRoot",
+ Type: "bytes32",
+ },
+ {
+ Name: "storageProof",
+ Type: "bytes",
+ },
}
var signalProofT, _ = abi.NewType("tuple", "", []abi.ArgumentMarshaling{
+ {
+ Name: "crossChainSync",
+ Type: "address",
+ },
{
Name: "height",
- Type: "uint256",
+ Type: "uint64",
},
{
- Name: "proof",
+ Name: "storageProof",
Type: "bytes",
},
+ {
+ Name: "hops",
+ Type: "tuple[]",
+ Components: hopComponents,
+ },
})
diff --git a/packages/relayer/header_syncer.go b/packages/relayer/header_syncer.go
index 662e54abb90..3b52ae8eacd 100644
--- a/packages/relayer/header_syncer.go
+++ b/packages/relayer/header_syncer.go
@@ -2,8 +2,12 @@ package relayer
import (
"github.com/ethereum/go-ethereum/accounts/abi/bind"
+ "github.com/taikoxyz/taiko-mono/packages/relayer/bindings/icrosschainsync"
)
type HeaderSyncer interface {
- GetCrossChainBlockHash(opts *bind.CallOpts, blockId uint64) ([32]byte, error)
+ GetSyncedSnippet(
+ opts *bind.CallOpts,
+ blockId uint64,
+ ) (icrosschainsync.ICrossChainSyncSnippet, error)
}
diff --git a/packages/relayer/indexer/handle_event.go b/packages/relayer/indexer/handle_event.go
index 8052cce0d3c..87d13933846 100644
--- a/packages/relayer/indexer/handle_event.go
+++ b/packages/relayer/indexer/handle_event.go
@@ -23,10 +23,10 @@ func (i *Indexer) handleEvent(
) error {
slog.Info("event found for msgHash", "msgHash", common.Hash(event.MsgHash).Hex(), "txHash", event.Raw.TxHash.Hex())
- if event.Message.DestChainId.Cmp(i.destChainId) != 0 {
+ if new(big.Int).SetUint64(event.Message.DestChainId).Cmp(i.destChainId) != 0 {
slog.Info("skipping event, wrong chainID",
"messageDestChainID",
- event.Message.DestChainId.Uint64(),
+ event.Message.DestChainId,
"indexerDestChainID",
i.destChainId.Uint64(),
)
@@ -66,7 +66,7 @@ func (i *Indexer) handleEvent(
EventType: eventType,
Amount: amount.String(),
MsgHash: common.Hash(event.MsgHash).Hex(),
- MessageOwner: event.Message.User.Hex(),
+ MessageOwner: event.Message.Owner.Hex(),
Event: relayer.EventNameMessageSent,
}
@@ -110,7 +110,7 @@ func (i *Indexer) eventStatusFromMsgHash(
defer cancel()
- messageStatus, err := i.destBridge.GetMessageStatus(&bind.CallOpts{
+ messageStatus, err := i.destBridge.MessageStatus(&bind.CallOpts{
Context: ctx,
}, signal)
if err != nil {
diff --git a/packages/relayer/indexer/set_initial_processing_block_by_mode.go b/packages/relayer/indexer/set_initial_processing_block_by_mode.go
index 2f04576485c..2df25e038a3 100644
--- a/packages/relayer/indexer/set_initial_processing_block_by_mode.go
+++ b/packages/relayer/indexer/set_initial_processing_block_by_mode.go
@@ -21,7 +21,7 @@ func (i *Indexer) setInitialProcessingBlockByMode(
return errors.Wrap(err, "svc.taikoL1.GetStateVariables")
}
- startingBlock = stateVars.GenesisHeight
+ startingBlock = stateVars.A.GenesisHeight
}
switch mode {
diff --git a/packages/relayer/mock/blocker.go b/packages/relayer/mock/blocker.go
index 6ab6198c5e0..040e5a3b136 100644
--- a/packages/relayer/mock/blocker.go
+++ b/packages/relayer/mock/blocker.go
@@ -41,3 +41,7 @@ func (b *Blocker) BlockByHash(ctx context.Context, hash common.Hash) (*types.Blo
return types.NewBlockWithHeader(Header), nil
}
+
+func (b *Blocker) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) {
+ return types.NewBlockWithHeader(Header), nil
+}
diff --git a/packages/relayer/mock/bridge.go b/packages/relayer/mock/bridge.go
index 5b198241db9..83217f03891 100644
--- a/packages/relayer/mock/bridge.go
+++ b/packages/relayer/mock/bridge.go
@@ -15,6 +15,7 @@ import (
var (
SuccessMsgHash = [32]byte{0x1}
+ SuccessId = big.NewInt(1)
FailSignal = [32]byte{0x2}
)
@@ -60,8 +61,8 @@ func (b *Bridge) WatchMessageSent(
sink <- &bridge.BridgeMessageSent{
Message: bridge.IBridgeMessage{
- SrcChainId: big.NewInt(1),
- DestChainId: MockChainID,
+ SrcChainId: 1,
+ DestChainId: MockChainID.Uint64(),
},
}
b.MessagesSent++
@@ -121,7 +122,7 @@ func (b *Bridge) FilterMessageStatusChanged(
return &bridge.BridgeMessageStatusChangedIterator{}, nil
}
-func (b *Bridge) GetMessageStatus(opts *bind.CallOpts, msgHash [32]byte) (uint8, error) {
+func (b *Bridge) MessageStatus(opts *bind.CallOpts, msgHash [32]byte) (uint8, error) {
if msgHash == SuccessMsgHash {
return uint8(relayer.EventStatusNew), nil
}
@@ -141,8 +142,8 @@ func (b *Bridge) ProcessMessage(
return ProcessMessageTx, nil
}
-func (b *Bridge) IsMessageReceived(opts *bind.CallOpts, signal [32]byte, srcChainId *big.Int, proof []byte) (bool, error) { // nolint
- if signal == SuccessMsgHash {
+func (b *Bridge) ProveMessageReceived(opts *bind.CallOpts, message bridge.IBridgeMessage, proof []byte) (bool, error) {
+ if message.Id.Uint64() == SuccessId.Uint64() {
return true, nil
}
diff --git a/packages/relayer/mock/eth_client.go b/packages/relayer/mock/eth_client.go
index 3c5fb4a80c2..65ff42892ef 100644
--- a/packages/relayer/mock/eth_client.go
+++ b/packages/relayer/mock/eth_client.go
@@ -47,6 +47,10 @@ func (c *EthClient) HeaderByNumber(ctx context.Context, number *big.Int) (*types
}, nil
}
+func (c *EthClient) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error) {
+ return &types.Block{}, nil
+}
+
func (c *EthClient) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) {
if number == nil {
number = LatestBlockNumber
diff --git a/packages/relayer/mock/header_syncer.go b/packages/relayer/mock/header_syncer.go
index fe204c9b42c..a5b4688022f 100644
--- a/packages/relayer/mock/header_syncer.go
+++ b/packages/relayer/mock/header_syncer.go
@@ -4,17 +4,24 @@ import (
"errors"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
+ "github.com/taikoxyz/taiko-mono/packages/relayer/bindings/icrosschainsync"
)
-var SuccessHeader = [32]byte{0x1}
+var SuccessHeader = icrosschainsync.ICrossChainSyncSnippet{
+ BlockHash: [32]byte{0x1},
+ SignalRoot: [32]byte{0x2},
+}
type HeaderSyncer struct {
Fail bool
}
-func (h *HeaderSyncer) GetCrossChainBlockHash(opts *bind.CallOpts, blockId uint64) ([32]byte, error) {
+func (h *HeaderSyncer) GetSyncedSnippet(
+ opts *bind.CallOpts,
+ blockId uint64,
+) (icrosschainsync.ICrossChainSyncSnippet, error) {
if h.Fail {
- return [32]byte{}, errors.New("fail")
+ return icrosschainsync.ICrossChainSyncSnippet{}, errors.New("fail")
}
return SuccessHeader, nil
diff --git a/packages/relayer/mock/signalservice.go b/packages/relayer/mock/signalservice.go
new file mode 100644
index 00000000000..04da17f84fa
--- /dev/null
+++ b/packages/relayer/mock/signalservice.go
@@ -0,0 +1,18 @@
+package mock
+
+import (
+ "github.com/ethereum/go-ethereum/accounts/abi/bind"
+ "github.com/ethereum/go-ethereum/common"
+)
+
+type SignalService struct {
+}
+
+func (s *SignalService) GetSignalSlot(
+ opts *bind.CallOpts,
+ chainId uint64,
+ app common.Address,
+ signal [32]byte,
+) ([32]byte, error) {
+ return [32]byte{0xff}, nil
+}
diff --git a/packages/relayer/processor/config.go b/packages/relayer/processor/config.go
index bf3171f6b1d..58a4b8c5aa7 100644
--- a/packages/relayer/processor/config.go
+++ b/packages/relayer/processor/config.go
@@ -16,6 +16,11 @@ import (
"gorm.io/gorm/logger"
)
+type hopConfig struct {
+ signalServiceAddress common.Address
+ taikoAddress common.Address
+ rpcURL string
+}
type Config struct {
// address configs
SrcSignalServiceAddress common.Address
@@ -59,6 +64,8 @@ type Config struct {
ETHClientTimeout uint64
OpenQueueFunc func() (queue.Queue, error)
OpenDBFunc func() (DB, error)
+
+ hopConfigs []hopConfig
}
// NewConfigFromCliContext creates a new config instance from command line flags.
@@ -70,7 +77,27 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) {
return nil, fmt.Errorf("invalid processorPrivateKey: %w", err)
}
+ hopSignalServiceAddresses := c.StringSlice(flags.HopSignalServiceAddresses.Name)
+ hopTaikoAddresses := c.StringSlice(flags.HopTaikoAddresses.Name)
+ hopRPCUrls := c.StringSlice(flags.HopRPCUrls.Name)
+
+ if len(hopSignalServiceAddresses) != len(hopTaikoAddresses) ||
+ len(hopSignalServiceAddresses) != len(hopRPCUrls) ||
+ len(hopTaikoAddresses) != len(hopRPCUrls) {
+ return nil, fmt.Errorf("all hop parameters must be of same length")
+ }
+
+ hopConfigs := []hopConfig{}
+ for i, hopSignalServiceAddress := range hopSignalServiceAddresses {
+ hopConfigs = append(hopConfigs, hopConfig{
+ signalServiceAddress: common.HexToAddress(hopSignalServiceAddress),
+ rpcURL: hopRPCUrls[i],
+ taikoAddress: common.HexToAddress(hopTaikoAddresses[i]),
+ })
+ }
+
return &Config{
+ hopConfigs: hopConfigs,
ProcessorPrivateKey: processorPrivateKey,
SrcSignalServiceAddress: common.HexToAddress(c.String(flags.SrcSignalServiceAddress.Name)),
DestTaikoAddress: common.HexToAddress(c.String(flags.DestTaikoAddress.Name)),
diff --git a/packages/relayer/processor/estimate_gas.go b/packages/relayer/processor/estimate_gas.go
index 28763ab94a1..5743b44049c 100644
--- a/packages/relayer/processor/estimate_gas.go
+++ b/packages/relayer/processor/estimate_gas.go
@@ -3,6 +3,7 @@ package processor
import (
"context"
"log/slog"
+ "math/big"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/pkg/errors"
@@ -15,7 +16,7 @@ var (
func (p *Processor) estimateGas(
ctx context.Context, message bridge.IBridgeMessage, proof []byte) (uint64, error) {
- auth, err := bind.NewKeyedTransactorWithChainID(p.ecdsaKey, message.DestChainId)
+ auth, err := bind.NewKeyedTransactorWithChainID(p.ecdsaKey, new(big.Int).SetUint64(message.DestChainId))
if err != nil {
return 0, errors.Wrap(err, "bind.NewKeyedTransactorWithChainID")
}
diff --git a/packages/relayer/processor/is_profitable_test.go b/packages/relayer/processor/is_profitable_test.go
index 4c137fe6f2b..bae4415c71d 100644
--- a/packages/relayer/processor/is_profitable_test.go
+++ b/packages/relayer/processor/is_profitable_test.go
@@ -40,7 +40,7 @@ func Test_isProfitable(t *testing.T) {
"lowProcessingFeeHighCost",
bridge.IBridgeMessage{
Fee: new(big.Int).Sub(mock.ProcessMessageTx.Cost(), big.NewInt(1)),
- DestChainId: big.NewInt(167001),
+ DestChainId: 167001,
},
big.NewInt(1000000),
false,
@@ -50,7 +50,7 @@ func Test_isProfitable(t *testing.T) {
"profitableProcessingFee",
bridge.IBridgeMessage{
Fee: new(big.Int).Add(mock.ProcessMessageTx.Cost(), big.NewInt(1)),
- DestChainId: big.NewInt(167001),
+ DestChainId: 167001,
},
big.NewInt(1),
true,
diff --git a/packages/relayer/processor/process_message.go b/packages/relayer/processor/process_message.go
index 2a0b0ceb86e..41400e07ee0 100644
--- a/packages/relayer/processor/process_message.go
+++ b/packages/relayer/processor/process_message.go
@@ -16,11 +16,12 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/consensus/misc/eip1559"
"github.com/ethereum/go-ethereum/core/types"
- "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/params"
"github.com/pkg/errors"
"github.com/taikoxyz/taiko-mono/packages/relayer"
"github.com/taikoxyz/taiko-mono/packages/relayer/bindings/bridge"
+ "github.com/taikoxyz/taiko-mono/packages/relayer/bindings/icrosschainsync"
+ "github.com/taikoxyz/taiko-mono/packages/relayer/proof"
"github.com/taikoxyz/taiko-mono/packages/relayer/queue"
)
@@ -39,11 +40,11 @@ func (p *Processor) eventStatusFromMsgHash(
defer cancel()
- messageStatus, err := p.destBridge.GetMessageStatus(&bind.CallOpts{
+ messageStatus, err := p.destBridge.MessageStatus(&bind.CallOpts{
Context: ctx,
}, signal)
if err != nil {
- return 0, errors.Wrap(err, "svc.destBridge.GetMessageStatus")
+ return 0, errors.Wrap(err, "svc.destBridge.MessageStatus")
}
eventStatus = relayer.EventStatus(messageStatus)
@@ -57,7 +58,7 @@ func (p *Processor) eventStatusFromMsgHash(
return eventStatus, nil
}
-// Process prepares and calls `processMessage` on the bridge.
+// processMessage prepares and calls `processMessage` on the bridge.
// the proof must be generated from the gethclient's eth_getProof via the Prover,
// then rlp-encoded and combined as a singular byte slice,
// then abi encoded into a SignalProof struct as the contract
@@ -80,7 +81,7 @@ func (p *Processor) processMessage(
return errors.Wrap(err, "p.eventStatusFromMsgHash")
}
- if !canProcessMessage(ctx, eventStatus, msgBody.Event.Message.User, p.relayerAddr) {
+ if !canProcessMessage(ctx, eventStatus, msgBody.Event.Message.Owner, p.relayerAddr) {
return errUnprocessable
}
@@ -88,33 +89,132 @@ func (p *Processor) processMessage(
return errors.Wrap(err, "p.waitForConfirmations")
}
- if err := p.waitHeaderSynced(ctx, msgBody.Event); err != nil {
- return errors.Wrap(err, "p.waitHeaderSynced")
+ var blockNum uint64 = msgBody.Event.Raw.BlockNumber
+
+ // wait for srcChain => destChain header to sync if no hops,
+ // or srcChain => hopChain => hopChain => hopChain => destChain if hops exist.
+ if p.hops != nil {
+ var hopEthClient ethClient = p.srcEthClient
+
+ for _, hop := range p.hops {
+ hop.blockNum = blockNum
+
+ _, err := p.waitHeaderSynced(ctx, hop.headerSyncer, hopEthClient, blockNum)
+
+ if err != nil {
+ return errors.Wrap(err, "p.waitHeaderSynced")
+ }
+
+ // todo: instead of latest, need way to find out which block num on the hop chain
+ // the previous blockHash was synced in, and then wait for that header to be synced
+ // on the next hop chain.
+ snippet, err := hop.headerSyncer.GetSyncedSnippet(&bind.CallOpts{
+ Context: ctx,
+ },
+ hop.blockNum,
+ )
+
+ slog.Info("hop synced snippet",
+ "syncedInBlock", snippet.SyncedInBlock,
+ "blockNum", hop.blockNum,
+ "blockHash", common.Bytes2Hex(snippet.BlockHash[:]),
+ )
+
+ if err != nil {
+ return errors.Wrap(err, "hop.headerSyncer.GetSyncedSnippet")
+ }
+
+ blockNum = snippet.SyncedInBlock
+
+ hopEthClient = hop.ethClient
+ }
+
+ blockNum, err = p.waitHeaderSynced(ctx, p.destHeaderSyncer, hopEthClient, blockNum)
+ if err != nil {
+ return errors.Wrap(err, "p.waitHeaderSynced")
+ }
+ } else {
+ if _, err := p.waitHeaderSynced(ctx, p.destHeaderSyncer, p.srcEthClient, msgBody.Event.Raw.BlockNumber); err != nil {
+ return errors.Wrap(err, "p.waitHeaderSynced")
+ }
}
- // get latest synced header since not every header is synced from L1 => L2,
- // and later blocks still have the storage trie proof from previous blocks.
- latestSyncedHeader, err := p.destHeaderSyncer.GetCrossChainBlockHash(&bind.CallOpts{}, 0)
+ key, err := p.srcSignalService.GetSignalSlot(&bind.CallOpts{},
+ msgBody.Event.Message.SrcChainId,
+ msgBody.Event.Raw.Address,
+ msgBody.Event.MsgHash,
+ )
+
if err != nil {
- return errors.Wrap(err, "taiko.GetSyncedHeader")
+ return errors.Wrap(err, "p.srcSignalService.GetSignalSlot")
}
- hashed := crypto.Keccak256(
- msgBody.Event.Raw.Address.Bytes(),
- msgBody.Event.MsgHash[:],
- )
+ hops := []proof.HopParams{}
+
+ var encodedSignalProof []byte
+
+ var latestSyncedSnippet icrosschainsync.ICrossChainSyncSnippet
+
+ // if a hop is set, the proof service needs to generate an additional proof
+ // for the signal service intermediary chain in between the source chain
+ // and the destination chain.
+ for _, hop := range p.hops {
+ slog.Info(
+ "adding hop",
+ "hopChainId", hop.chainID.Uint64(),
+ "hopSignalServiceAddress", hop.signalServiceAddress.Hex(),
+ )
+
+ hops = append(hops, proof.HopParams{
+ ChainID: hop.chainID,
+ SignalServiceAddress: hop.signalServiceAddress,
+ Blocker: hop.ethClient,
+ Caller: hop.caller,
+ SignalService: hop.signalService,
+ TaikoAddress: hop.taikoAddress,
+ BlockNumber: blockNum,
+ })
+ }
- key := hex.EncodeToString(hashed)
+ if len(hops) != 0 {
+ encodedSignalProof, _, err = p.prover.EncodedSignalProofWithHops(
+ ctx,
+ p.srcCaller,
+ p.srcSignalServiceAddress,
+ p.destHeaderSyncAddress,
+ hops,
+ common.Bytes2Hex(key[:]),
+ msgBody.Event.Raw.BlockHash,
+ blockNum,
+ )
+ } else {
+ // get latest synced header since not every header is synced from L1 => L2,
+ // and later blocks still have the storage trie proof from previous blocks.
+ latestSyncedSnippet, err = p.destHeaderSyncer.GetSyncedSnippet(&bind.CallOpts{}, 0)
+ if err != nil {
+ return errors.Wrap(err, "taiko.GetSyncedSnippet")
+ }
+
+ encodedSignalProof, err = p.prover.EncodedSignalProof(
+ ctx,
+ p.srcCaller,
+ p.srcSignalServiceAddress,
+ p.destHeaderSyncAddress,
+ common.Bytes2Hex(key[:]),
+ latestSyncedSnippet.BlockHash,
+ )
+ }
- encodedSignalProof, err := p.prover.EncodedSignalProof(ctx, p.rpc, p.srcSignalServiceAddress, key, latestSyncedHeader)
if err != nil {
- slog.Error("srcChainID: %v, destChainID: %v, txHash: %v: msgHash: %v, from: %v encountered signalProofError %v",
- msgBody.Event.Message.SrcChainId.String(),
- msgBody.Event.Message.DestChainId.String(),
- msgBody.Event.Raw.TxHash.Hex(),
- common.Hash(msgBody.Event.MsgHash).Hex(),
- msgBody.Event.Message.User.Hex(),
- err,
+ slog.Error("error encoding signal proof",
+ "srcChainID", msgBody.Event.Message.SrcChainId,
+ "destChainID", msgBody.Event.Message.DestChainId,
+ "txHash", msgBody.Event.Raw.TxHash.Hex(),
+ "msgHash", common.Hash(msgBody.Event.MsgHash).Hex(),
+ "from", msgBody.Event.Message.From.Hex(),
+ "owner", msgBody.Event.Message.Owner.Hex(),
+ "error", err,
+ "hopsLength", len(hops),
)
return errors.Wrap(err, "p.prover.GetEncodedSignalProof")
@@ -123,18 +223,18 @@ func (p *Processor) processMessage(
// check if message is received first. if not, it will definitely fail,
// so we can exit early on this one. there is most likely
// an issue with the signal generation.
- received, err := p.destBridge.IsMessageReceived(&bind.CallOpts{
+ received, err := p.destBridge.ProveMessageReceived(&bind.CallOpts{
Context: ctx,
- }, msgBody.Event.MsgHash, msgBody.Event.Message.SrcChainId, encodedSignalProof)
+ }, msgBody.Event.Message, encodedSignalProof)
if err != nil {
- return errors.Wrap(err, "p.destBridge.IsMessageReceived")
+ return errors.Wrap(err, "p.destBridge.ProveMessageReceived")
}
// message will fail when we try to process it
if !received {
slog.Warn("Message not received on dest chain",
"msgHash", common.Hash(msgBody.Event.MsgHash).Hex(),
- "srcChainId", msgBody.Event.Message.SrcChainId.String(),
+ "srcChainId", msgBody.Event.Message.SrcChainId,
)
relayer.MessagesNotReceivedOnDestChain.Inc()
@@ -181,7 +281,7 @@ func (p *Processor) processMessage(
slog.Info("Mined tx", "txHash", hex.EncodeToString(tx.Hash().Bytes()))
- messageStatus, err := p.destBridge.GetMessageStatus(&bind.CallOpts{}, msgBody.Event.MsgHash)
+ messageStatus, err := p.destBridge.MessageStatus(&bind.CallOpts{}, msgBody.Event.MsgHash)
if err != nil {
return errors.Wrap(err, "p.destBridge.GetMessageStatus")
}
@@ -212,7 +312,7 @@ func (p *Processor) sendProcessMessageCall(
event *bridge.BridgeMessageSent,
proof []byte,
) (*types.Transaction, error) {
- auth, err := bind.NewKeyedTransactorWithChainID(p.ecdsaKey, event.Message.DestChainId)
+ auth, err := bind.NewKeyedTransactorWithChainID(p.ecdsaKey, new(big.Int).SetUint64(event.Message.DestChainId))
if err != nil {
return nil, errors.Wrap(err, "bind.NewKeyedTransactorWithChainID")
}
@@ -304,7 +404,7 @@ func (p *Processor) needsContractDeployment(
var err error
- chainID := canonicalToken.ChainID()
+ chainID := new(big.Int).SetUint64(canonicalToken.ChainID())
addr := canonicalToken.Address()
ctx, cancel := context.WithTimeout(ctx, p.ethClientTimeout)
@@ -314,17 +414,18 @@ func (p *Processor) needsContractDeployment(
Context: ctx,
}
- if eventType == relayer.EventTypeSendERC20 && event.Message.DestChainId.Cmp(chainID) != 0 {
+ destChainID := new(big.Int).SetUint64(event.Message.DestChainId)
+ if eventType == relayer.EventTypeSendERC20 && destChainID.Cmp(chainID) != 0 {
// determine whether the canonical token is bridged or not on this chain
bridgedAddress, err = p.destERC20Vault.CanonicalToBridged(opts, chainID, addr)
}
- if eventType == relayer.EventTypeSendERC721 && event.Message.DestChainId.Cmp(chainID) != 0 {
+ if eventType == relayer.EventTypeSendERC721 && destChainID.Cmp(chainID) != 0 {
// determine whether the canonical token is bridged or not on this chain
bridgedAddress, err = p.destERC721Vault.CanonicalToBridged(opts, chainID, addr)
}
- if eventType == relayer.EventTypeSendERC1155 && event.Message.DestChainId.Cmp(chainID) != 0 {
+ if eventType == relayer.EventTypeSendERC1155 && destChainID.Cmp(chainID) != 0 {
// determine whether the canonical token is bridged or not on this chain
bridgedAddress, err = p.destERC1155Vault.CanonicalToBridged(opts, chainID, addr)
}
@@ -361,7 +462,7 @@ func (p *Processor) hardcodeGasLimit(
// determine whether the canonical token is bridged or not on this chain
bridgedAddress, err = p.destERC20Vault.CanonicalToBridged(
nil,
- canonicalToken.ChainID(),
+ new(big.Int).SetUint64(canonicalToken.ChainID()),
canonicalToken.Address(),
)
if err != nil {
@@ -371,7 +472,7 @@ func (p *Processor) hardcodeGasLimit(
// determine whether the canonical token is bridged or not on this chain
bridgedAddress, err = p.destERC721Vault.CanonicalToBridged(
nil,
- canonicalToken.ChainID(),
+ new(big.Int).SetUint64(canonicalToken.ChainID()),
canonicalToken.Address(),
)
if err != nil {
@@ -381,7 +482,7 @@ func (p *Processor) hardcodeGasLimit(
// determine whether the canonical token is bridged or not on this chain
bridgedAddress, err = p.destERC1155Vault.CanonicalToBridged(
nil,
- canonicalToken.ChainID(),
+ new(big.Int).SetUint64(canonicalToken.ChainID()),
canonicalToken.Address(),
)
if err != nil {
@@ -439,10 +540,10 @@ func (p *Processor) saveMessageStatusChangedEvent(
_, err = p.eventRepo.Save(ctx, relayer.SaveEventOpts{
Name: relayer.EventNameMessageStatusChanged,
Data: data,
- ChainID: event.Message.DestChainId,
+ ChainID: new(big.Int).SetUint64(event.Message.DestChainId),
Status: relayer.EventStatus(m["status"].(uint8)),
MsgHash: common.Hash(event.MsgHash).Hex(),
- MessageOwner: event.Message.User.Hex(),
+ MessageOwner: event.Message.Owner.Hex(),
Event: relayer.EventNameMessageStatusChanged,
})
if err != nil {
diff --git a/packages/relayer/processor/process_message_test.go b/packages/relayer/processor/process_message_test.go
index 42d51081155..f0ce5c0d3d3 100644
--- a/packages/relayer/processor/process_message_test.go
+++ b/packages/relayer/processor/process_message_test.go
@@ -25,7 +25,9 @@ func Test_sendProcessMessageCall(t *testing.T) {
context.Background(),
&bridge.BridgeMessageSent{
Message: bridge.IBridgeMessage{
- DestChainId: mock.MockChainID,
+ DestChainId: mock.MockChainID.Uint64(),
+ SrcChainId: mock.MockChainID.Uint64(),
+ Id: big.NewInt(1),
Fee: new(big.Int).Add(mock.ProcessMessageTx.Cost(), big.NewInt(1)),
},
Raw: types.Log{
@@ -47,7 +49,9 @@ func Test_ProcessMessage_messageUnprocessable(t *testing.T) {
body := &queue.QueueMessageBody{
Event: &bridge.BridgeMessageSent{
Message: bridge.IBridgeMessage{
- GasLimit: big.NewInt(1),
+ GasLimit: big.NewInt(1),
+ SrcChainId: mock.MockChainID.Uint64(),
+ Id: big.NewInt(1),
},
Raw: types.Log{
Address: relayer.ZeroAddress,
@@ -77,7 +81,9 @@ func Test_ProcessMessage_gasLimit0(t *testing.T) {
body := queue.QueueMessageBody{
Event: &bridge.BridgeMessageSent{
Message: bridge.IBridgeMessage{
- GasLimit: big.NewInt(0),
+ GasLimit: big.NewInt(0),
+ SrcChainId: mock.MockChainID.Uint64(),
+ Id: big.NewInt(1),
},
Raw: types.Log{
Address: relayer.ZeroAddress,
@@ -107,7 +113,9 @@ func Test_ProcessMessage_noChainId(t *testing.T) {
body := queue.QueueMessageBody{
Event: &bridge.BridgeMessageSent{
Message: bridge.IBridgeMessage{
- GasLimit: big.NewInt(1),
+ SrcChainId: mock.MockChainID.Uint64(),
+ GasLimit: big.NewInt(1),
+ Id: big.NewInt(0),
},
MsgHash: mock.SuccessMsgHash,
Raw: types.Log{
@@ -129,7 +137,7 @@ func Test_ProcessMessage_noChainId(t *testing.T) {
}
err = p.processMessage(context.Background(), msg)
- assert.EqualError(t, err, "bind.NewKeyedTransactorWithChainID: no chain id specified")
+ assert.EqualError(t, err, "message not received")
}
func Test_ProcessMessage(t *testing.T) {
@@ -139,9 +147,10 @@ func Test_ProcessMessage(t *testing.T) {
Event: &bridge.BridgeMessageSent{
Message: bridge.IBridgeMessage{
GasLimit: big.NewInt(1),
- DestChainId: mock.MockChainID,
+ DestChainId: mock.MockChainID.Uint64(),
Fee: big.NewInt(1000000000),
- SrcChainId: mock.MockChainID,
+ SrcChainId: mock.MockChainID.Uint64(),
+ Id: big.NewInt(1),
},
MsgHash: mock.SuccessMsgHash,
Raw: types.Log{
@@ -176,7 +185,7 @@ func Test_ProcessMessage(t *testing.T) {
// err := p.ProcessMessage(context.Background(), &bridge.BridgeMessageSent{
// Message: bridge.IBridgeMessage{
// GasLimit: big.NewInt(1),
-// DestChainId: mock.MockChainID,
+// DestChainId: mock.MockChainID.Uint64(),
// },
// Signal: mock.SuccessMsgHash,
// }, &relayer.Event{})
diff --git a/packages/relayer/processor/processor.go b/packages/relayer/processor/processor.go
index 59cff33c4a6..beeba0cf4e3 100644
--- a/packages/relayer/processor/processor.go
+++ b/packages/relayer/processor/processor.go
@@ -26,6 +26,7 @@ import (
"github.com/taikoxyz/taiko-mono/packages/relayer/bindings/erc20vault"
"github.com/taikoxyz/taiko-mono/packages/relayer/bindings/erc721vault"
"github.com/taikoxyz/taiko-mono/packages/relayer/bindings/icrosschainsync"
+ "github.com/taikoxyz/taiko-mono/packages/relayer/bindings/signalservice"
"github.com/taikoxyz/taiko-mono/packages/relayer/bindings/taikol2"
"github.com/taikoxyz/taiko-mono/packages/relayer/proof"
"github.com/taikoxyz/taiko-mono/packages/relayer/queue"
@@ -42,12 +43,24 @@ type ethClient interface {
TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
BlockNumber(ctx context.Context) (uint64, error)
BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
+ BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
HeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
SuggestGasPrice(ctx context.Context) (*big.Int, error)
SuggestGasTipCap(ctx context.Context) (*big.Int, error)
ChainID(ctx context.Context) (*big.Int, error)
}
+type hop struct {
+ chainID *big.Int
+ signalServiceAddress common.Address
+ signalService relayer.SignalService
+ headerSyncer relayer.HeaderSyncer
+ taikoAddress common.Address
+ ethClient ethClient
+ caller relayer.Caller
+ blockNum uint64
+}
+
type Processor struct {
cancel context.CancelFunc
@@ -55,12 +68,16 @@ type Processor struct {
queue queue.Queue
+ hops []hop
+
srcEthClient ethClient
destEthClient ethClient
- rpc relayer.Caller
+ srcCaller relayer.Caller
ecdsaKey *ecdsa.PrivateKey
+ srcSignalService relayer.SignalService
+
destBridge relayer.Bridge
destHeaderSyncer relayer.HeaderSyncer
destERC20Vault relayer.TokenVault
@@ -74,7 +91,9 @@ type Processor struct {
destNonce uint64
relayerAddr common.Address
srcSignalServiceAddress common.Address
- confirmations uint64
+ destHeaderSyncAddress common.Address
+
+ confirmations uint64
profitableOnly bool
headerSyncIntervalSeconds int64
@@ -131,11 +150,76 @@ func InitFromConfig(ctx context.Context, p *Processor, cfg *Config) error {
return err
}
+ hops := []hop{}
+
+ for _, hopConfig := range cfg.hopConfigs {
+ var hopEthClient *ethclient.Client
+
+ var hopChainID *big.Int
+
+ var hopHeaderSyncer *icrosschainsync.ICrossChainSync
+
+ var hopRpcClient *rpc.Client
+
+ var hopSignalService *signalservice.SignalService
+
+ hopEthClient, err = ethclient.Dial(hopConfig.rpcURL)
+ if err != nil {
+ return err
+ }
+
+ hopChainID, err = hopEthClient.ChainID(context.Background())
+ if err != nil {
+ return err
+ }
+
+ hopHeaderSyncer, err = icrosschainsync.NewICrossChainSync(
+ hopConfig.taikoAddress,
+ hopEthClient,
+ )
+ if err != nil {
+ return err
+ }
+
+ hopSignalService, err = signalservice.NewSignalService(
+ hopConfig.signalServiceAddress,
+ hopEthClient,
+ )
+ if err != nil {
+ return err
+ }
+
+ hopRpcClient, err = rpc.Dial(hopConfig.rpcURL)
+ if err != nil {
+ return err
+ }
+
+ // only support one hop rn, add in array configs
+ // to support more.
+ hops = append(hops, hop{
+ caller: hopRpcClient,
+ signalServiceAddress: hopConfig.signalServiceAddress,
+ taikoAddress: hopConfig.taikoAddress,
+ chainID: hopChainID,
+ headerSyncer: hopHeaderSyncer,
+ signalService: hopSignalService,
+ ethClient: hopEthClient,
+ })
+ }
+
q, err := cfg.OpenQueueFunc()
if err != nil {
return err
}
+ srcSignalService, err := signalservice.NewSignalService(
+ cfg.SrcSignalServiceAddress,
+ srcEthClient,
+ )
+ if err != nil {
+ return err
+ }
+
destHeaderSyncer, err := icrosschainsync.NewICrossChainSync(
cfg.DestTaikoAddress,
destEthClient,
@@ -210,12 +294,15 @@ func InitFromConfig(ctx context.Context, p *Processor, cfg *Config) error {
p.taikoL2 = taikoL2
}
+ p.hops = hops
p.prover = prover
p.eventRepo = eventRepository
p.srcEthClient = srcEthClient
p.destEthClient = destEthClient
+ p.srcSignalService = srcSignalService
+
p.destBridge = destBridge
p.destERC1155Vault = destERC1155Vault
p.destERC20Vault = destERC20Vault
@@ -237,11 +324,12 @@ func InitFromConfig(ctx context.Context, p *Processor, cfg *Config) error {
p.confirmations = cfg.Confirmations
p.srcSignalServiceAddress = cfg.SrcSignalServiceAddress
+ p.destHeaderSyncAddress = cfg.DestTaikoAddress
p.msgCh = make(chan queue.Message)
p.wg = &sync.WaitGroup{}
p.mu = &sync.Mutex{}
- p.rpc = srcRpcClient
+ p.srcCaller = srcRpcClient
p.backOffRetryInterval = time.Duration(cfg.BackoffRetryInterval) * time.Second
p.backOffMaxRetries = cfg.BackOffMaxRetrys
diff --git a/packages/relayer/processor/processor_test.go b/packages/relayer/processor/processor_test.go
index 8c11790646c..77ee697fce2 100644
--- a/packages/relayer/processor/processor_test.go
+++ b/packages/relayer/processor/processor_test.go
@@ -24,11 +24,12 @@ func newTestProcessor(profitableOnly bool) *Processor {
srcEthClient: &mock.EthClient{},
destEthClient: &mock.EthClient{},
destERC20Vault: &mock.TokenVault{},
+ srcSignalService: &mock.SignalService{},
mu: &sync.Mutex{},
ecdsaKey: privateKey,
destHeaderSyncer: &mock.HeaderSyncer{},
prover: prover,
- rpc: &mock.Caller{},
+ srcCaller: &mock.Caller{},
profitableOnly: profitableOnly,
headerSyncIntervalSeconds: 1,
confTimeoutInSeconds: 900,
diff --git a/packages/relayer/processor/wait_header_synced.go b/packages/relayer/processor/wait_header_synced.go
index 2c8465546ec..e402c05343c 100644
--- a/packages/relayer/processor/wait_header_synced.go
+++ b/packages/relayer/processor/wait_header_synced.go
@@ -8,51 +8,57 @@ import (
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/pkg/errors"
- "github.com/taikoxyz/taiko-mono/packages/relayer/bindings/bridge"
+ "github.com/taikoxyz/taiko-mono/packages/relayer"
)
-func (p *Processor) waitHeaderSynced(ctx context.Context, event *bridge.BridgeMessageSent) error {
+func (p *Processor) waitHeaderSynced(
+ ctx context.Context,
+ headerSyncer relayer.HeaderSyncer,
+ ethClient ethClient,
+ blockNum uint64,
+) (uint64, error) {
ticker := time.NewTicker(time.Duration(p.headerSyncIntervalSeconds) * time.Second)
defer ticker.Stop()
for {
select {
case <-ctx.Done():
- return ctx.Err()
+ return 0, ctx.Err()
case <-ticker.C:
slog.Info("waitHeaderSynced checking if tx is processable",
- "msgHash", common.Hash(event.MsgHash).Hex(),
- "txHash", event.Raw.TxHash.Hex(),
- "blockNumber", event.Raw.BlockNumber,
+ "blockNumber", blockNum,
)
- // get latest synced header since not every header is synced from L1 => L2,
+ // get latest synced block has via snippet since not every header is synced from L1 => L2,
// and later blocks still have the storage trie proof from previous blocks.
- latestSyncedHeader, err := p.destHeaderSyncer.GetCrossChainBlockHash(&bind.CallOpts{}, 0)
+ latestSyncedSnippet, err := headerSyncer.GetSyncedSnippet(&bind.CallOpts{
+ Context: ctx,
+ }, 0)
if err != nil {
- return errors.Wrap(err, "p.destHeaderSyncer.GetCrossChainBlockHash")
+ return 0, errors.Wrap(err, "p.destHeaderSyncer.GetSyncedSnippet")
}
- header, err := p.srcEthClient.HeaderByHash(ctx, latestSyncedHeader)
+ slog.Info("latestSyncedSnippet",
+ "blockHash", common.Bytes2Hex(latestSyncedSnippet.BlockHash[:]),
+ "signalRoot", common.Bytes2Hex(latestSyncedSnippet.SignalRoot[:]),
+ )
+
+ header, err := ethClient.HeaderByHash(ctx, latestSyncedSnippet.BlockHash)
if err != nil {
- return errors.Wrap(err, "p.destHeaderSyncer.GetCrossChainBlockHash")
+ return 0, errors.Wrap(err, "ethClient.HeaderByHash")
}
- // header is caught up and processible
- if header.Number.Uint64() >= event.Raw.BlockNumber {
- slog.Info("waitHeaderSynced processable",
- "msgHash", common.Hash(event.MsgHash).Hex(),
- "txHash", event.Raw.TxHash.Hex(),
- "eventBlockNum", event.Raw.BlockNumber,
+ // header is caught up
+ if header.Number.Uint64() >= blockNum {
+ slog.Info("waitHeaderSynced caughtUp",
+ "blockNum", blockNum,
"latestSyncedBlockNum", header.Number.Uint64(),
)
- return nil
+ return header.Number.Uint64(), nil
}
- slog.Info("waitHeaderSynced waiting to be processable",
- "msgHash", common.Hash(event.MsgHash).Hex(),
- "txHash", event.Raw.TxHash.Hex(),
- "eventBlockNum", event.Raw.BlockNumber,
+ slog.Info("waitHeaderSynced waiting to be caughtUp",
+ "blockNum", blockNum,
"latestSyncedBlockNum", header.Number.Uint64(),
)
}
diff --git a/packages/relayer/processor/wait_header_synced_test.go b/packages/relayer/processor/wait_header_synced_test.go
index 6ab4f2072dd..8ed94de93d0 100644
--- a/packages/relayer/processor/wait_header_synced_test.go
+++ b/packages/relayer/processor/wait_header_synced_test.go
@@ -4,18 +4,13 @@ import (
"context"
"testing"
- "github.com/ethereum/go-ethereum/core/types"
"github.com/stretchr/testify/assert"
- "github.com/taikoxyz/taiko-mono/packages/relayer/bindings/bridge"
+ "github.com/taikoxyz/taiko-mono/packages/relayer/mock"
)
func Test_waitHeaderSynced(t *testing.T) {
p := newTestProcessor(true)
- err := p.waitHeaderSynced(context.TODO(), &bridge.BridgeMessageSent{
- Raw: types.Log{
- BlockNumber: 1,
- },
- })
+ _, err := p.waitHeaderSynced(context.TODO(), &mock.HeaderSyncer{}, &mock.EthClient{}, 1)
assert.Nil(t, err)
}
diff --git a/packages/relayer/proof/block_header.go b/packages/relayer/proof/block_header.go
index 00a8d842687..49ae9511298 100644
--- a/packages/relayer/proof/block_header.go
+++ b/packages/relayer/proof/block_header.go
@@ -4,17 +4,33 @@ import (
"context"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/core/types"
"github.com/pkg/errors"
"github.com/taikoxyz/taiko-mono/packages/relayer/encoding"
)
// blockHeader fetches block via rpc, then converts an ethereum block to the BlockHeader type that LibBridgeData
// uses in our contracts
-func (p *Prover) blockHeader(ctx context.Context, blockHash common.Hash) (encoding.BlockHeader, error) {
- h, err := p.blocker.BlockByHash(ctx, blockHash)
- if err != nil {
- return encoding.BlockHeader{}, errors.Wrap(err, "p.ethClient.GetBlockByNumber")
+func (p *Prover) blockHeader(
+ ctx context.Context,
+ blocker blocker,
+ blockHash common.Hash,
+) (encoding.BlockHeader, error) {
+ var b *types.Block
+
+ var err error
+
+ if blockHash == (common.Hash{}) {
+ b, err = blocker.BlockByNumber(ctx, nil)
+ if err != nil {
+ return encoding.BlockHeader{}, errors.Wrap(err, "blocker.BlockByNumber")
+ }
+ } else {
+ b, err = blocker.BlockByHash(ctx, blockHash)
+ if err != nil {
+ return encoding.BlockHeader{}, errors.Wrap(err, "blocker.BlockByHash")
+ }
}
- return encoding.BlockToBlockHeader(h), nil
+ return encoding.BlockToBlockHeader(b), nil
}
diff --git a/packages/relayer/proof/block_header_test.go b/packages/relayer/proof/block_header_test.go
index c1c70c217b8..6f2f96da432 100644
--- a/packages/relayer/proof/block_header_test.go
+++ b/packages/relayer/proof/block_header_test.go
@@ -14,14 +14,14 @@ import (
func Test_blockHeader(t *testing.T) {
p := newTestProver()
- header, err := p.blockHeader(context.Background(), common.HexToHash("0x123"))
+ header, err := p.blockHeader(context.Background(), p.blocker, common.HexToHash("0x123"))
assert.Equal(t, err, nil)
assert.Equal(t, header, encoding.BlockToBlockHeader(types.NewBlockWithHeader(mock.Header)))
}
-func Test_blockHeader_cantFindBlock(t *testing.T) {
+func Test_blockHeader_noHash(t *testing.T) {
p := newTestProver()
- _, err := p.blockHeader(context.Background(), common.HexToHash("0x"))
- assert.NotEqual(t, err, nil)
+ _, err := p.blockHeader(context.Background(), p.blocker, common.HexToHash("0x"))
+ assert.Equal(t, err, nil)
}
diff --git a/packages/relayer/proof/encoded_signal_proof.go b/packages/relayer/proof/encoded_signal_proof.go
index 8a1730d0640..1742692ca80 100644
--- a/packages/relayer/proof/encoded_signal_proof.go
+++ b/packages/relayer/proof/encoded_signal_proof.go
@@ -9,34 +9,57 @@ import (
"github.com/taikoxyz/taiko-mono/packages/relayer"
"github.com/taikoxyz/taiko-mono/packages/relayer/encoding"
+ "github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/rlp"
"github.com/pkg/errors"
)
-// EncodedSignalProof rlp and abi encodes the SignalProof struct expected by LibBridgeSignal
-// in our contracts
+type HopParams struct {
+ ChainID *big.Int
+ SignalServiceAddress common.Address
+ SignalService relayer.SignalService
+ TaikoAddress common.Address
+ Blocker blocker
+ Caller relayer.Caller
+ BlockNumber uint64
+}
+
+// EncodedSignalProof rlp and abi encodes the SignalProof struct expected by SignalService
+// in our contracts. If there is no intermediary chain, and no `hops` are in between,
+// it needs just a proof of the source SignalService having sent the signal.
+// If it needs hops (ie: L1 => L3, L2A => L2B), it needs to generate proof calls for the hops
+// as well, and we call `EncodedSignalProofWithHops` instead
func (p *Prover) EncodedSignalProof(
ctx context.Context,
caller relayer.Caller,
signalServiceAddress common.Address,
+ crossChainSyncAddress common.Address,
key string,
blockHash common.Hash,
) ([]byte, error) {
- blockHeader, err := p.blockHeader(ctx, blockHash)
+ blockHeader, err := p.blockHeader(ctx, p.blocker, blockHash)
if err != nil {
return nil, errors.Wrap(err, "p.blockHeader")
}
- encodedStorageProof, err := p.encodedStorageProof(ctx, caller, signalServiceAddress, key, blockHeader.Height.Int64())
+ encodedStorageProof, _, err := p.encodedStorageProof(
+ ctx,
+ caller,
+ signalServiceAddress,
+ key,
+ blockHeader.Height.Int64(),
+ )
if err != nil {
return nil, errors.Wrap(err, "p.getEncodedStorageProof")
}
signalProof := encoding.SignalProof{
- Height: blockHeader.Height,
- Proof: encodedStorageProof,
+ CrossChainSync: crossChainSyncAddress,
+ Height: blockHeader.Height.Uint64(),
+ StorageProof: encodedStorageProof,
+ Hops: []encoding.Hop{},
}
encodedSignalProof, err := encoding.EncodeSignalProof(signalProof)
@@ -47,16 +70,94 @@ func (p *Prover) EncodedSignalProof(
return encodedSignalProof, nil
}
-// getEncodedStorageProof rlp and abi encodes a proof for LibBridgeSignal,
-// where `proof` is an rlp and abi encoded (bytes, bytes) consisting of the accountProof and storageProof.Proofs[0]
-// response from `eth_getProof`
+func (p *Prover) EncodedSignalProofWithHops(
+ ctx context.Context,
+ caller relayer.Caller,
+ signalServiceAddress common.Address,
+ crossChainSyncAddress common.Address,
+ hopParams []HopParams,
+ key string,
+ blockHash common.Hash,
+ blockNum uint64,
+) ([]byte, uint64, error) {
+ blockHeader, err := p.blockHeader(ctx, p.blocker, blockHash)
+ if err != nil {
+ return nil, 0, errors.Wrap(err, "p.blockHeader")
+ }
+
+ encodedStorageProof, signalRoot, err := p.encodedStorageProof(
+ ctx,
+ caller,
+ signalServiceAddress,
+ key,
+ blockHeader.Height.Int64(),
+ )
+
+ if err != nil {
+ return nil, 0, errors.Wrap(err, "p.encodedStorageProof")
+ }
+
+ slog.Info("successfully generated main storage proof")
+
+ hops := []encoding.Hop{}
+
+ for _, hop := range hopParams {
+ hopStorageSlotKey, err := hop.SignalService.GetSignalSlot(&bind.CallOpts{},
+ hop.ChainID.Uint64(),
+ hop.TaikoAddress,
+ signalRoot,
+ )
+ if err != nil {
+ return nil, 0, errors.Wrap(err, "hopSignalService.GetSignalSlot")
+ }
+
+ encodedHopStorageProof, nextSignalRoot, err := p.encodedStorageProof(
+ ctx,
+ hop.Caller,
+ hop.SignalServiceAddress,
+ common.Bytes2Hex(hopStorageSlotKey[:]),
+ int64(hop.BlockNumber),
+ )
+ if err != nil {
+ return nil, 0, errors.Wrap(err, "hop p.getEncodedStorageProof")
+ }
+
+ hops = append(hops, encoding.Hop{
+ SignalRootRelay: hop.TaikoAddress,
+ SignalRoot: signalRoot,
+ StorageProof: encodedHopStorageProof,
+ })
+
+ signalRoot = nextSignalRoot
+ }
+
+ signalProof := encoding.SignalProof{
+ CrossChainSync: crossChainSyncAddress,
+ Height: blockNum,
+ StorageProof: encodedStorageProof,
+ Hops: hops,
+ }
+
+ encodedSignalProof, err := encoding.EncodeSignalProof(signalProof)
+ if err != nil {
+ return nil, 0, errors.Wrap(err, "enoding.EncodeSignalProof")
+ }
+
+ slog.Info("blockNum", "blockNUm", blockNum)
+
+ return encodedSignalProof, blockHeader.Height.Uint64(), nil
+}
+
+// getEncodedStorageProof rlp and abi encodes a proof for SignalService,
+// where `proof` is an rlp and abi encoded (bytes, bytes) consisting of storageProof.Proofs[0]
+// response from `eth_getProof`, and returns the storageHash to be used as the signalRoot.
func (p *Prover) encodedStorageProof(
ctx context.Context,
c relayer.Caller,
signalServiceAddress common.Address,
key string,
blockNumber int64,
-) ([]byte, error) {
+) ([]byte, common.Hash, error) {
var ethProof StorageProof
slog.Info("getting proof",
@@ -73,19 +174,19 @@ func (p *Prover) encodedStorageProof(
hexutil.EncodeBig(new(big.Int).SetInt64(blockNumber)),
)
if err != nil {
- return nil, errors.Wrap(err, "c.CallContext")
+ return nil, common.Hash{}, errors.Wrap(err, "c.CallContext")
}
slog.Info("proof generated", "value", new(big.Int).SetBytes(ethProof.StorageProof[0].Value).Int64())
if new(big.Int).SetBytes(ethProof.StorageProof[0].Value).Int64() != int64(1) {
- return nil, errors.New("proof will not be valid, expected storageProof to be 1 but was not")
+ return nil, common.Hash{}, errors.New("proof will not be valid, expected storageProof to be 1 but was not")
}
rlpEncodedStorageProof, err := rlp.EncodeToBytes(ethProof.StorageProof[0].Proof)
if err != nil {
- return nil, errors.Wrap(err, "rlp.EncodeToBytes(proof.StorageProof[0].Proof")
+ return nil, common.Hash{}, errors.Wrap(err, "rlp.EncodeToBytes(proof.StorageProof[0].Proof")
}
- return rlpEncodedStorageProof, nil
+ return rlpEncodedStorageProof, ethProof.StorageHash, nil
}
diff --git a/packages/relayer/proof/encoded_signal_proof_test.go b/packages/relayer/proof/encoded_signal_proof_test.go
index 3d700cbfbe7..36d57e2ae6a 100644
--- a/packages/relayer/proof/encoded_signal_proof_test.go
+++ b/packages/relayer/proof/encoded_signal_proof_test.go
@@ -12,13 +12,20 @@ import (
var (
// nolint: lll
- wantEncoded = "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000"
+ wantEncoded = "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
)
func Test_EncodedSignalProof(t *testing.T) {
p := newTestProver()
- encoded, err := p.EncodedSignalProof(context.Background(), &mock.Caller{}, common.Address{}, "1", mock.Header.TxHash)
+ encoded, err := p.EncodedSignalProof(
+ context.Background(),
+ &mock.Caller{},
+ common.Address{},
+ common.Address{},
+ "1",
+ mock.Header.TxHash,
+ )
assert.Nil(t, err)
assert.Equal(t, hexutil.Encode(encoded), wantEncoded)
}
diff --git a/packages/relayer/proof/prover.go b/packages/relayer/proof/prover.go
index 18ec735e3da..bccab7e7855 100644
--- a/packages/relayer/proof/prover.go
+++ b/packages/relayer/proof/prover.go
@@ -2,6 +2,7 @@ package proof
import (
"context"
+ "math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
@@ -10,6 +11,7 @@ import (
type blocker interface {
BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
+ BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
}
type Prover struct {
blocker blocker
diff --git a/packages/relayer/scripts/abigen.sh b/packages/relayer/scripts/abigen.sh
index 6344eb4ca6f..64a6268263b 100755
--- a/packages/relayer/scripts/abigen.sh
+++ b/packages/relayer/scripts/abigen.sh
@@ -5,9 +5,9 @@ if [ ! -d "../protocol/out" ]; then
exit 1
fi
-paths=("ERC1155Vault.sol" "ERC721Vault.sol" "ERC20Vault.sol" "Bridge.sol" "ICrossChainSync.sol" "TaikoL2.sol" "TaikoL1.sol")
+paths=("ERC1155Vault.sol" "ERC721Vault.sol" "ERC20Vault.sol" "Bridge.sol" "ICrossChainSync.sol" "TaikoL2.sol" "TaikoL1.sol" "SignalService.sol")
-names=("ERC1155Vault" "ERC721Vault" "ERC20Vault" "Bridge" "ICrossChainSync" "TaikoL2" "TaikoL1")
+names=("ERC1155Vault" "ERC721Vault" "ERC20Vault" "Bridge" "ICrossChainSync" "TaikoL2" "TaikoL1" "SignalService")
for (( i = 0; i < ${#paths[@]}; ++i ));
do
diff --git a/packages/relayer/signalservice.go b/packages/relayer/signalservice.go
new file mode 100644
index 00000000000..37c7aa42f10
--- /dev/null
+++ b/packages/relayer/signalservice.go
@@ -0,0 +1,10 @@
+package relayer
+
+import (
+ "github.com/ethereum/go-ethereum/accounts/abi/bind"
+ "github.com/ethereum/go-ethereum/common"
+)
+
+type SignalService interface {
+ GetSignalSlot(opts *bind.CallOpts, chainId uint64, app common.Address, signal [32]byte) ([32]byte, error)
+}
diff --git a/packages/relayer/types.go b/packages/relayer/types.go
index e394464b53c..50784bec6b6 100644
--- a/packages/relayer/types.go
+++ b/packages/relayer/types.go
@@ -129,9 +129,9 @@ func DecodeMessageSentData(event *bridge.BridgeMessageSent) (EventType, Canonica
var amount *big.Int = big.NewInt(0)
- erc20ReceiveTokensFunctionSig := "cb03d23c"
- erc721ReceiveTokensFunctionSig := "a9976baf"
- erc1155ReceiveTokensFunctionSig := "20b81559"
+ erc20ReceiveTokensFunctionSig := "240f6a5f"
+ erc721ReceiveTokensFunctionSig := "300536b5"
+ erc1155ReceiveTokensFunctionSig := "079312bf"
// try to see if its an ERC20
if event.Message.Data != nil && common.BytesToHash(event.Message.Data) != ZeroHash {
@@ -164,7 +164,7 @@ func DecodeMessageSentData(event *bridge.BridgeMessageSent) (EventType, Canonica
// have to unpack to anonymous struct first due to abi limitation
t := inputsMap["ctoken"].(struct {
// nolint
- ChainId *big.Int `json:"chainId"`
+ ChainId uint64 `json:"chainId"`
Addr common.Address `json:"addr"`
Decimals uint8 `json:"decimals"`
Symbol string `json:"symbol"`
@@ -209,7 +209,7 @@ func DecodeMessageSentData(event *bridge.BridgeMessageSent) (EventType, Canonica
t := inputsMap["ctoken"].(struct {
// nolint
- ChainId *big.Int `json:"chainId"`
+ ChainId uint64 `json:"chainId"`
Addr common.Address `json:"addr"`
Symbol string `json:"symbol"`
Name string `json:"name"`
@@ -252,7 +252,7 @@ func DecodeMessageSentData(event *bridge.BridgeMessageSent) (EventType, Canonica
t := inputsMap["ctoken"].(struct {
// nolint
- ChainId *big.Int `json:"chainId"`
+ ChainId uint64 `json:"chainId"`
Addr common.Address `json:"addr"`
Symbol string `json:"symbol"`
Name string `json:"name"`
@@ -280,7 +280,7 @@ func DecodeMessageSentData(event *bridge.BridgeMessageSent) (EventType, Canonica
}
type CanonicalToken interface {
- ChainID() *big.Int
+ ChainID() uint64
Address() common.Address
ContractName() string
TokenDecimals() uint8
@@ -289,14 +289,14 @@ type CanonicalToken interface {
type CanonicalERC20 struct {
// nolint
- ChainId *big.Int `json:"chainId"`
+ ChainId uint64 `json:"chainId"`
Addr common.Address `json:"addr"`
Decimals uint8 `json:"decimals"`
Symbol string `json:"symbol"`
Name string `json:"name"`
}
-func (c CanonicalERC20) ChainID() *big.Int {
+func (c CanonicalERC20) ChainID() uint64 {
return c.ChainId
}
@@ -318,13 +318,13 @@ func (c CanonicalERC20) TokenDecimals() uint8 {
type CanonicalNFT struct {
// nolint
- ChainId *big.Int `json:"chainId"`
+ ChainId uint64 `json:"chainId"`
Addr common.Address `json:"addr"`
Symbol string `json:"symbol"`
Name string `json:"name"`
}
-func (c CanonicalNFT) ChainID() *big.Int {
+func (c CanonicalNFT) ChainID() uint64 {
return c.ChainId
}
diff --git a/packages/relayer/types_test.go b/packages/relayer/types_test.go
index 188e5286668..a8942f90940 100644
--- a/packages/relayer/types_test.go
+++ b/packages/relayer/types_test.go
@@ -160,13 +160,13 @@ func Test_DecodeMessageSentData(t *testing.T) {
&bridge.BridgeMessageSent{
Message: bridge.IBridgeMessage{
// nolint lll
- Data: common.Hex2Bytes("cb03d23c00000000000000000000000000000000000000000000000000000000000000800000000000000000000000004ec242468812b6ffc8be8ff423af7bd23108d9910000000000000000000000004ec242468812b6ffc8be8ff423af7bd23108d99100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000007a68000000000000000000000000e4337137828c93d0046212ebda8a82a24356b67b000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000004544553540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000095465737445524332300000000000000000000000000000000000000000000000"),
+ Data: common.Hex2Bytes("240f6a5f000000000000000000000000000000000000000000000000000000000000008000000000000000000000000015d34aaf54267db7d7c367839aaf71a00a2c6a650000000000000000000000009965507d1a55bcc2695c58ba16fb37d819b0a4dc00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000028c590000000000000000000000006e7cfe3fd749f6e1c53bc1065fc702eb6c22f600000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000004544553540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000095465737445524332300000000000000000000000000000000000000000000000"),
},
},
EventTypeSendERC20,
CanonicalERC20{
- ChainId: big.NewInt(31336),
- Addr: common.HexToAddress("0xe4337137828c93D0046212ebDa8a82a24356b67B"),
+ ChainId: 167001,
+ Addr: common.HexToAddress("0x6e7cfe3fd749F6E1C53BC1065fc702eb6c22F600"),
Decimals: uint8(18),
Symbol: "TEST",
Name: "TestERC20",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 425beffd81a..0432ea5174d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -9,11 +9,11 @@ importers:
.:
devDependencies:
lefthook:
- specifier: ^1.4.7
+ specifier: ^1.5.2
version: 1.5.2
prettier:
- specifier: ^2.8.8
- version: 2.8.8
+ specifier: ^3.0.3
+ version: 3.0.3
packages/branding: {}
@@ -163,7 +163,13 @@ importers:
packages/fork-diff: {}
+ packages/guardian-prover-health-check: {}
+
packages/protocol:
+ dependencies:
+ merkletreejs:
+ specifier: ^0.3.11
+ version: 0.3.11
devDependencies:
'@defi-wonderland/smock':
specifier: ^2.3.4
@@ -172,10 +178,10 @@ importers:
specifier: ^0.1.17
version: 0.1.17(@nomiclabs/hardhat-ethers@2.2.3)(ethereum-waffle@3.4.4)(ethers@5.7.2)(hardhat@2.18.2)
'@nomicfoundation/hardhat-foundry':
- specifier: ^1.0.1
+ specifier: ^1.1.1
version: 1.1.1(hardhat@2.18.2)
'@nomicfoundation/hardhat-network-helpers':
- specifier: ^1.0.8
+ specifier: ^1.0.9
version: 1.0.9(hardhat@2.18.2)
'@nomiclabs/hardhat-ethers':
specifier: ^2.2.3
@@ -184,83 +190,83 @@ importers:
specifier: ^3.1.7
version: 3.1.7(hardhat@2.18.2)
'@nomiclabs/hardhat-waffle':
- specifier: ^2.0.5
+ specifier: ^2.0.6
version: 2.0.6(@nomiclabs/hardhat-ethers@2.2.3)(@types/sinon-chai@3.2.12)(ethereum-waffle@3.4.4)(ethers@5.7.2)(hardhat@2.18.2)
'@openzeppelin/hardhat-upgrades':
- specifier: ^1.22.1
- version: 1.28.0(@nomiclabs/hardhat-ethers@2.2.3)(@nomiclabs/hardhat-etherscan@3.1.7)(ethers@5.7.2)(hardhat@2.18.2)
+ specifier: ^2.3.3
+ version: 2.4.3(@nomicfoundation/hardhat-ethers@3.0.5)(ethers@5.7.2)(hardhat@2.18.2)
'@typechain/ethers-v5':
- specifier: ^7.2.0
- version: 7.2.0(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@5.2.0)(typescript@4.9.5)
+ specifier: ^11.1.2
+ version: 11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.2.2)
'@typechain/hardhat':
- specifier: ^2.3.1
- version: 2.3.1(hardhat@2.18.2)(lodash@4.17.21)(typechain@5.2.0)
+ specifier: ^9.1.0
+ version: 9.1.0(@typechain/ethers-v6@0.5.1)(ethers@5.7.2)(hardhat@2.18.2)(typechain@8.3.2)
'@types/chai':
- specifier: ^4.3.4
- version: 4.3.9
+ specifier: ^4.3.8
+ version: 4.3.10
'@types/glob':
specifier: ^8.1.0
version: 8.1.0
'@types/mocha':
- specifier: ^9.1.1
- version: 9.1.1
+ specifier: ^10.0.2
+ version: 10.0.6
'@types/node':
- specifier: ^12.20.55
- version: 12.20.55
+ specifier: ^20.8.6
+ version: 20.9.0
'@typescript-eslint/eslint-plugin':
- specifier: ^6.6.0
- version: 6.8.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@4.9.5)
+ specifier: ^6.7.5
+ version: 6.10.0(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)(typescript@5.2.2)
'@typescript-eslint/parser':
- specifier: ^4.33.0
- version: 4.33.0(eslint@7.32.0)(typescript@4.9.5)
+ specifier: ^6.7.5
+ version: 6.10.0(eslint@8.53.0)(typescript@5.2.2)
chai:
- specifier: ^4.3.7
+ specifier: ^4.3.10
version: 4.3.10
chalk:
- specifier: 4.1.2
- version: 4.1.2
+ specifier: 5.3.0
+ version: 5.3.0
dotenv:
- specifier: ^10.0.0
- version: 10.0.0
+ specifier: ^16.3.1
+ version: 16.3.1
eslint:
- specifier: ^7.32.0
- version: 7.32.0
+ specifier: ^8.51.0
+ version: 8.53.0
eslint-config-prettier:
- specifier: ^8.8.0
- version: 8.10.0(eslint@7.32.0)
+ specifier: ^9.0.0
+ version: 9.0.0(eslint@8.53.0)
eslint-config-standard:
- specifier: ^16.0.3
- version: 16.0.3(eslint-plugin-import@2.28.1)(eslint-plugin-node@11.1.0)(eslint-plugin-promise@6.1.1)(eslint@7.32.0)
+ specifier: ^17.1.0
+ version: 17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.3.1)(eslint-plugin-promise@6.1.1)(eslint@8.53.0)
eslint-plugin-import:
- specifier: ^2.27.5
- version: 2.28.1(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)
+ specifier: ^2.28.1
+ version: 2.28.1(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)
eslint-plugin-node:
specifier: ^11.1.0
- version: 11.1.0(eslint@7.32.0)
+ version: 11.1.0(eslint@8.53.0)
eslint-plugin-prettier:
- specifier: ^3.4.1
- version: 3.4.1(eslint-config-prettier@8.10.0)(eslint@7.32.0)(prettier@2.8.8)
+ specifier: ^5.0.1
+ version: 5.0.1(eslint-config-prettier@9.0.0)(eslint@8.53.0)(prettier@3.0.3)
eslint-plugin-promise:
specifier: ^6.1.1
- version: 6.1.1(eslint@7.32.0)
+ version: 6.1.1(eslint@8.53.0)
ethers:
specifier: ^5.7.2
version: 5.7.2
glob:
- specifier: ^8.1.0
- version: 8.1.0
+ specifier: ^10.3.10
+ version: 10.3.10
hardhat:
- specifier: ^2.14.0
- version: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ specifier: ^2.18.1
+ version: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
hardhat-abi-exporter:
specifier: ^2.10.1
version: 2.10.1(hardhat@2.18.2)
hardhat-contract-sizer:
- specifier: ^2.8.0
+ specifier: ^2.10.0
version: 2.10.0(hardhat@2.18.2)
hardhat-docgen:
specifier: ^1.3.0
- version: 1.3.0(hardhat@2.18.2)(lodash@4.17.21)(prettier@2.8.8)
+ version: 1.3.0(hardhat@2.18.2)(prettier@3.0.3)
hardhat-gas-reporter:
specifier: ^1.0.9
version: 1.0.9(hardhat@2.18.2)
@@ -271,29 +277,29 @@ importers:
specifier: ^4.2.4
version: 4.2.4
prettier:
- specifier: ^2.8.8
- version: 2.8.8
+ specifier: ^3.0.3
+ version: 3.0.3
rlp:
specifier: ^3.0.0
version: 3.0.0
solhint:
- specifier: ^3.4.1
- version: 3.6.2(typescript@4.9.5)
+ specifier: ^3.6.2
+ version: 3.6.2(typescript@5.2.2)
solidity-coverage:
specifier: github:taikoxyz/solidity-coverage
version: github.com/taikoxyz/solidity-coverage/ceb49fd1f6041e4fcd26079dfb0d3b0f58c812e5(hardhat@2.18.2)
solidity-docgen:
- specifier: 0.6.0-beta.35
- version: 0.6.0-beta.35(hardhat@2.18.2)
+ specifier: 0.6.0-beta.36
+ version: 0.6.0-beta.36(hardhat@2.18.2)
ts-node:
specifier: ^10.9.1
- version: 10.9.1(@types/node@12.20.55)(typescript@4.9.5)
+ version: 10.9.1(@types/node@20.9.0)(typescript@5.2.2)
typechain:
- specifier: ^5.2.0
- version: 5.2.0(typescript@4.9.5)
+ specifier: ^8.3.2
+ version: 8.3.2(typescript@5.2.2)
typescript:
- specifier: ^4.9.5
- version: 4.9.5
+ specifier: ^5.2.2
+ version: 5.2.2
packages/relayer: {}
@@ -359,7 +365,7 @@ importers:
version: 2.14.7
'@types/sanitize-html':
specifier: ^2.9.5
- version: 2.9.5
+ version: 2.11.0
'@typescript-eslint/eslint-plugin':
specifier: ^6.6.0
version: 6.8.0(@typescript-eslint/parser@5.62.0)(eslint@8.53.0)(typescript@4.9.5)
@@ -503,12 +509,6 @@ packages:
tslib: 2.6.2
dev: true
- /@babel/code-frame@7.12.11:
- resolution: {integrity: sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==}
- dependencies:
- '@babel/highlight': 7.22.20
- dev: true
-
/@babel/code-frame@7.22.13:
resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==}
engines: {node: '>=6.9.0'}
@@ -1981,7 +1981,7 @@ packages:
'@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2)(hardhat@2.18.2)
diff: 5.1.0
ethers: 5.7.2
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
lodash.isequal: 4.5.0
lodash.isequalwith: 4.4.0
rxjs: 7.8.1
@@ -2618,16 +2618,6 @@ packages:
dev: false
optional: true
- /@eslint-community/eslint-utils@4.4.0(eslint@7.32.0):
- resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- peerDependencies:
- eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
- dependencies:
- eslint: 7.32.0
- eslint-visitor-keys: 3.4.3
- dev: true
-
/@eslint-community/eslint-utils@4.4.0(eslint@8.53.0):
resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -2648,23 +2638,6 @@ packages:
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
dev: true
- /@eslint/eslintrc@0.4.3:
- resolution: {integrity: sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==}
- engines: {node: ^10.12.0 || >=12.0.0}
- dependencies:
- ajv: 6.12.6
- debug: 4.3.4(supports-color@8.1.1)
- espree: 7.3.1
- globals: 13.23.0
- ignore: 4.0.6
- import-fresh: 3.3.0
- js-yaml: 3.14.1
- minimatch: 3.1.2
- strip-json-comments: 3.1.1
- transitivePeerDependencies:
- - supports-color
- dev: true
-
/@eslint/eslintrc@2.1.3:
resolution: {integrity: sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -2700,7 +2673,7 @@ packages:
- utf-8-validate
dev: true
- /@ethereum-waffle/compiler@3.4.4(typescript@4.9.5):
+ /@ethereum-waffle/compiler@3.4.4(typescript@5.2.2):
resolution: {integrity: sha512-RUK3axJ8IkD5xpWjWoJgyHclOeEzDLQFga6gKpeGxiS/zBu+HB0W2FvsrrLalTFIaPw/CGYACRBSIxqiCqwqTQ==}
engines: {node: '>=10.0'}
dependencies:
@@ -2714,7 +2687,7 @@ packages:
node-fetch: 2.7.0
solc: 0.6.12
ts-generator: 0.1.1
- typechain: 3.0.0(typescript@4.9.5)
+ typechain: 3.0.0(typescript@5.2.2)
transitivePeerDependencies:
- bufferutil
- encoding
@@ -2766,7 +2739,6 @@ packages:
resolution: {integrity: sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==}
engines: {node: '>=14'}
hasBin: true
- dev: true
/@ethereumjs/util@8.1.0:
resolution: {integrity: sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==}
@@ -2775,7 +2747,6 @@ packages:
'@ethereumjs/rlp': 4.0.1
ethereum-cryptography: 2.1.2
micro-ftch: 0.3.1
- dev: true
/@ethersproject/abi@5.0.0-beta.153:
resolution: {integrity: sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg==}
@@ -3150,11 +3121,11 @@ packages:
'@types/web3': 1.0.19
camelcase-keys: 7.0.2
debug: 4.3.4(supports-color@8.1.1)
- ethereum-waffle: 3.4.4(typescript@4.9.5)
+ ethereum-waffle: 3.4.4(typescript@5.2.2)
ethers: 5.7.2
fs-extra: 10.1.0
glob: 7.2.3
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
true-case-path: 2.2.1
ts-interface-checker: 0.1.13
transitivePeerDependencies:
@@ -3176,30 +3147,27 @@ packages:
- supports-color
dev: true
- /@humanwhocodes/config-array@0.5.0:
- resolution: {integrity: sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==}
- engines: {node: '>=10.10.0'}
- dependencies:
- '@humanwhocodes/object-schema': 1.2.1
- debug: 4.3.4(supports-color@8.1.1)
- minimatch: 3.1.2
- transitivePeerDependencies:
- - supports-color
- dev: true
-
/@humanwhocodes/module-importer@1.0.1:
resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==}
engines: {node: '>=12.22'}
dev: true
- /@humanwhocodes/object-schema@1.2.1:
- resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==}
- dev: true
-
/@humanwhocodes/object-schema@2.0.1:
resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==}
dev: true
+ /@isaacs/cliui@8.0.2:
+ resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
+ engines: {node: '>=12'}
+ dependencies:
+ string-width: 5.1.2
+ string-width-cjs: /string-width@4.2.3
+ strip-ansi: 7.1.0
+ strip-ansi-cjs: /strip-ansi@6.0.1
+ wrap-ansi: 8.1.0
+ wrap-ansi-cjs: /wrap-ansi@7.0.0
+ dev: true
+
/@istanbuljs/load-nyc-config@1.1.0:
resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==}
engines: {node: '>=8'}
@@ -3221,7 +3189,7 @@ packages:
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dependencies:
'@jest/types': 27.5.1
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
chalk: 4.1.2
jest-message-util: 27.5.1
jest-util: 27.5.1
@@ -3242,7 +3210,7 @@ packages:
'@jest/test-result': 27.5.1
'@jest/transform': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
ansi-escapes: 4.3.2
chalk: 4.1.2
emittery: 0.8.1
@@ -3279,7 +3247,7 @@ packages:
dependencies:
'@jest/fake-timers': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
jest-mock: 27.5.1
dev: true
@@ -3289,7 +3257,7 @@ packages:
dependencies:
'@jest/types': 27.5.1
'@sinonjs/fake-timers': 8.1.0
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
jest-message-util: 27.5.1
jest-mock: 27.5.1
jest-util: 27.5.1
@@ -3318,7 +3286,7 @@ packages:
'@jest/test-result': 27.5.1
'@jest/transform': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
chalk: 4.1.2
collect-v8-coverage: 1.0.2
exit: 0.1.2
@@ -3409,7 +3377,7 @@ packages:
dependencies:
'@types/istanbul-lib-coverage': 2.0.5
'@types/istanbul-reports': 3.0.3
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
'@types/yargs': 16.0.7
chalk: 4.1.2
dev: true
@@ -3458,7 +3426,7 @@ packages:
deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
dependencies:
'@json-rpc-tools/utils': 1.7.6
- axios: 0.21.4(debug@4.3.4)
+ axios: 0.21.4
safe-json-utils: 1.1.1
ws: 7.5.9
transitivePeerDependencies:
@@ -3595,7 +3563,6 @@ packages:
resolution: {integrity: sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==}
dependencies:
'@noble/hashes': 1.3.1
- dev: true
/@noble/curves@1.2.0:
resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==}
@@ -3609,7 +3576,6 @@ packages:
/@noble/hashes@1.3.1:
resolution: {integrity: sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==}
engines: {node: '>= 16'}
- dev: true
/@noble/hashes@1.3.2:
resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==}
@@ -3937,13 +3903,27 @@ packages:
- utf-8-validate
dev: true
+ /@nomicfoundation/hardhat-ethers@3.0.5(ethers@5.7.2)(hardhat@2.18.2):
+ resolution: {integrity: sha512-RNFe8OtbZK6Ila9kIlHp0+S80/0Bu/3p41HUpaRIoHLm6X3WekTd83vob3rE54Duufu1edCiBDxspBzi2rxHHw==}
+ peerDependencies:
+ ethers: ^6.1.0
+ hardhat: ^2.0.0
+ dependencies:
+ debug: 4.3.4(supports-color@8.1.1)
+ ethers: 5.7.2
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
+ lodash.isequal: 4.5.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@nomicfoundation/hardhat-foundry@1.1.1(hardhat@2.18.2):
resolution: {integrity: sha512-cXGCBHAiXas9Pg9MhMOpBVQCkWRYoRFG7GJJAph+sdQsfd22iRs5U5Vs9XmpGEQd1yEvYISQZMeE68Nxj65iUQ==}
peerDependencies:
hardhat: ^2.17.2
dependencies:
chalk: 2.4.2
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
dev: true
/@nomicfoundation/hardhat-network-helpers@1.0.9(hardhat@2.18.2):
@@ -3952,7 +3932,7 @@ packages:
hardhat: ^2.9.5
dependencies:
ethereumjs-util: 7.1.5
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
dev: true
/@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1:
@@ -4068,7 +4048,7 @@ packages:
hardhat: ^2.0.0
dependencies:
ethers: 5.7.2
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
dev: true
/@nomiclabs/hardhat-etherscan@3.1.7(hardhat@2.18.2):
@@ -4082,7 +4062,7 @@ packages:
chalk: 2.4.2
debug: 4.3.4(supports-color@8.1.1)
fs-extra: 7.0.1
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
lodash: 4.17.21
semver: 6.3.1
table: 6.8.1
@@ -4102,9 +4082,9 @@ packages:
dependencies:
'@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2)(hardhat@2.18.2)
'@types/sinon-chai': 3.2.11
- ethereum-waffle: 3.4.4(typescript@4.9.5)
+ ethereum-waffle: 3.4.4(typescript@5.2.2)
ethers: 5.7.2
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
dev: true
/@nomiclabs/hardhat-waffle@2.0.6(@nomiclabs/hardhat-ethers@2.2.3)(@types/sinon-chai@3.2.12)(ethereum-waffle@3.4.4)(ethers@5.7.2)(hardhat@2.18.2):
@@ -4118,9 +4098,9 @@ packages:
dependencies:
'@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2)(hardhat@2.18.2)
'@types/sinon-chai': 3.2.12
- ethereum-waffle: 3.4.4(typescript@4.9.5)
+ ethereum-waffle: 3.4.4(typescript@5.2.2)
ethers: 5.7.2
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
dev: true
/@npmcli/fs@1.1.1:
@@ -4139,8 +4119,23 @@ packages:
rimraf: 3.0.2
dev: true
- /@openzeppelin/defender-base-client@1.49.0(debug@4.3.4):
- resolution: {integrity: sha512-nG2jslaAUbo2ZW9yBStstxTPscAchN/vRdJ16M34whuZRtUp1bccCBVLdv3oiPOdjwFaa1OBXJkheN+eF8alzA==}
+ /@openzeppelin/defender-admin-client@1.52.0(debug@4.3.4):
+ resolution: {integrity: sha512-CKs5mMLL7+nXyugsHaAw0aPfLwFNA+vq7ftuJ3sWUKdbQRZsJ+/189HAwp2/BJC64yUbarEeWqOh3jNpaKRJLw==}
+ dependencies:
+ '@openzeppelin/defender-base-client': 1.52.0(debug@4.3.4)
+ axios: 1.6.1(debug@4.3.4)
+ ethers: 5.7.2
+ lodash: 4.17.21
+ node-fetch: 2.7.0
+ transitivePeerDependencies:
+ - bufferutil
+ - debug
+ - encoding
+ - utf-8-validate
+ dev: true
+
+ /@openzeppelin/defender-base-client@1.52.0(debug@4.3.4):
+ resolution: {integrity: sha512-VFNu/pjVpAnFKIfuKT1cn9dRpbcO8FO8EAmVZ2XrrAsKXEWDZ3TNBtACxmj7fAu0ad/TzRkb66o5rMts7Fv7jw==}
dependencies:
amazon-cognito-identity-js: 6.3.6
async-retry: 1.3.3
@@ -4152,50 +4147,61 @@ packages:
- encoding
dev: true
- /@openzeppelin/hardhat-upgrades@1.28.0(@nomiclabs/hardhat-ethers@2.2.3)(@nomiclabs/hardhat-etherscan@3.1.7)(ethers@5.7.2)(hardhat@2.18.2):
- resolution: {integrity: sha512-7sb/Jf+X+uIufOBnmHR0FJVWuxEs2lpxjJnLNN6eCJCP8nD0v+Ot5lTOW2Qb/GFnh+fLvJtEkhkowz4ZQ57+zQ==}
+ /@openzeppelin/defender-sdk-base-client@1.6.0:
+ resolution: {integrity: sha512-LUhSVdmN4XapWzrfdl5+38IOtwVoBQL+9Nq/4bLfx7IwTDB9fwGYSGhGTDETkVQPN4zqJ7m8I7CNowilL4Ta6A==}
+ dependencies:
+ amazon-cognito-identity-js: 6.3.6
+ async-retry: 1.3.3
+ transitivePeerDependencies:
+ - encoding
+ dev: true
+
+ /@openzeppelin/defender-sdk-deploy-client@1.6.0(debug@4.3.4):
+ resolution: {integrity: sha512-JTcy97ZktnkhBmPdSYmF8qB5OpWRDm0thKz98JDOJA/qeT/t8uJOnmRzpG2u5LypCOL9fRfL2HzhvmTy6qhGEQ==}
+ dependencies:
+ '@ethersproject/abi': 5.7.0
+ '@openzeppelin/defender-sdk-base-client': 1.6.0
+ axios: 1.6.1(debug@4.3.4)
+ lodash: 4.17.21
+ transitivePeerDependencies:
+ - debug
+ - encoding
+ dev: true
+
+ /@openzeppelin/hardhat-upgrades@2.4.3(@nomicfoundation/hardhat-ethers@3.0.5)(ethers@5.7.2)(hardhat@2.18.2):
+ resolution: {integrity: sha512-MYLbG6E3llFOOfphDSrFtjGmSRelfWc1hW0wcK1ANR2t0ZEetahGx4dAARPKev5R4WsckKT1wlxb8pmabczc2Q==}
hasBin: true
peerDependencies:
- '@nomiclabs/hardhat-ethers': ^2.0.0
- '@nomiclabs/hardhat-etherscan': ^3.1.0
- '@nomiclabs/harhdat-etherscan': '*'
- ethers: ^5.0.5
+ '@nomicfoundation/hardhat-ethers': ^3.0.0
+ '@nomicfoundation/hardhat-verify': ^1.1.0
+ ethers: ^6.6.0
hardhat: ^2.0.2
peerDependenciesMeta:
- '@nomiclabs/harhdat-etherscan':
+ '@nomicfoundation/hardhat-verify':
optional: true
dependencies:
- '@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2)(hardhat@2.18.2)
- '@nomiclabs/hardhat-etherscan': 3.1.7(hardhat@2.18.2)
- '@openzeppelin/defender-base-client': 1.49.0(debug@4.3.4)
- '@openzeppelin/platform-deploy-client': 0.8.0(debug@4.3.4)
- '@openzeppelin/upgrades-core': 1.30.1
+ '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@5.7.2)(hardhat@2.18.2)
+ '@openzeppelin/defender-admin-client': 1.52.0(debug@4.3.4)
+ '@openzeppelin/defender-base-client': 1.52.0(debug@4.3.4)
+ '@openzeppelin/defender-sdk-base-client': 1.6.0
+ '@openzeppelin/defender-sdk-deploy-client': 1.6.0(debug@4.3.4)
+ '@openzeppelin/upgrades-core': 1.31.3
chalk: 4.1.2
debug: 4.3.4(supports-color@8.1.1)
+ ethereumjs-util: 7.1.5
ethers: 5.7.2
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
proper-lockfile: 4.1.2
+ undici: 5.26.5
transitivePeerDependencies:
+ - bufferutil
- encoding
- supports-color
+ - utf-8-validate
dev: true
- /@openzeppelin/platform-deploy-client@0.8.0(debug@4.3.4):
- resolution: {integrity: sha512-POx3AsnKwKSV/ZLOU/gheksj0Lq7Is1q2F3pKmcFjGZiibf+4kjGxr4eSMrT+2qgKYZQH1ZLQZ+SkbguD8fTvA==}
- deprecated: '@openzeppelin/platform-deploy-client is deprecated. Please use @openzeppelin/defender-sdk-deploy-client'
- dependencies:
- '@ethersproject/abi': 5.7.0
- '@openzeppelin/defender-base-client': 1.49.0(debug@4.3.4)
- axios: 0.21.4(debug@4.3.4)
- lodash: 4.17.21
- node-fetch: 2.7.0
- transitivePeerDependencies:
- - debug
- - encoding
- dev: true
-
- /@openzeppelin/upgrades-core@1.30.1:
- resolution: {integrity: sha512-mFUsZibpiWJv1DR2K89cjbFIseTc2CUV4D2kvPPK5xYke6m7+M87qcr/Xk24mMrdCmG7RWNxQohhVnzESI6Eeg==}
+ /@openzeppelin/upgrades-core@1.31.3:
+ resolution: {integrity: sha512-i7q0IuItKS4uO0clJwm4CARmt98aA9dLfKh38HFRbX+aFLGXwF0sOvB2iwr6f87ShH7d3DNuLrVgnnXUrYb7CA==}
hasBin: true
dependencies:
cbor: 9.0.1
@@ -4214,6 +4220,25 @@ packages:
resolution: {integrity: sha512-HaW78NszGzRZd9SeoI3JD11JqY+lubnaOx7Pewj5pfjqWXOEATpeKIFb9Z4t2WBUK2iryiXX3lzWwmYWgUL0Ug==}
dev: false
+ /@pkgjs/parseargs@0.11.0:
+ resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
+ engines: {node: '>=14'}
+ requiresBuild: true
+ dev: true
+ optional: true
+
+ /@pkgr/utils@2.4.2:
+ resolution: {integrity: sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==}
+ engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
+ dependencies:
+ cross-spawn: 7.0.3
+ fast-glob: 3.3.2
+ is-glob: 4.0.3
+ open: 9.1.0
+ picocolors: 1.0.0
+ tslib: 2.6.2
+ dev: true
+
/@playwright/test@1.39.0:
resolution: {integrity: sha512-3u1iFqgzl7zr004bGPYiN/5EZpRUSFddQBra8Rqll5N0/vfpqlP9I9EXqAoGacuAbX6c9Ulg/Cjqglp5VkK6UQ==}
engines: {node: '>=16'}
@@ -4344,7 +4369,6 @@ packages:
'@noble/curves': 1.1.0
'@noble/hashes': 1.3.2
'@scure/base': 1.1.3
- dev: true
/@scure/bip32@1.3.2:
resolution: {integrity: sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA==}
@@ -4784,6 +4808,24 @@ packages:
resolution: {integrity: sha512-BRbo1fOtyVbhfLyuCWw6wAWp+U8UQle+ZXu84MYYWzYSEB28dyfnRBIE99eoG+qdAC0po6L2ScIEivcT07UaMA==}
dev: true
+ /@typechain/ethers-v5@11.1.2(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.2.2):
+ resolution: {integrity: sha512-ID6pqWkao54EuUQa0P5RgjvfA3MYqxUQKpbGKERbsjBW5Ra7EIXvbMlPp2pcP5IAdUkyMCFYsP2SN5q7mPdLDQ==}
+ peerDependencies:
+ '@ethersproject/abi': ^5.0.0
+ '@ethersproject/providers': ^5.0.0
+ ethers: ^5.1.3
+ typechain: ^8.3.2
+ typescript: '>=4.3.0'
+ dependencies:
+ '@ethersproject/abi': 5.7.0
+ '@ethersproject/providers': 5.7.2
+ ethers: 5.7.2
+ lodash: 4.17.21
+ ts-essentials: 7.0.3(typescript@5.2.2)
+ typechain: 8.3.2(typescript@5.2.2)
+ typescript: 5.2.2
+ dev: true
+
/@typechain/ethers-v5@2.0.0(ethers@5.7.2)(typechain@3.0.0):
resolution: {integrity: sha512-0xdCkyGOzdqh4h5JSf+zoWx85IusEjDcPIwNEHP8mrWSnCae4rvrqB+/gtpdNfX7zjlFlZiMeePn2r63EI3Lrw==}
peerDependencies:
@@ -4791,40 +4833,36 @@ packages:
typechain: ^3.0.0
dependencies:
ethers: 5.7.2
- typechain: 3.0.0(typescript@4.9.5)
+ typechain: 3.0.0(typescript@5.2.2)
dev: true
- /@typechain/ethers-v5@7.2.0(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@5.2.0)(typescript@4.9.5):
- resolution: {integrity: sha512-jfcmlTvaaJjng63QsT49MT6R1HFhtO/TBMWbyzPFSzMmVIqb2tL6prnKBs4ZJrSvmgIXWy+ttSjpaxCTq8D/Tw==}
+ /@typechain/ethers-v6@0.5.1(ethers@5.7.2)(typechain@8.3.2)(typescript@5.2.2):
+ resolution: {integrity: sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA==}
peerDependencies:
- '@ethersproject/abi': ^5.0.0
- '@ethersproject/bytes': ^5.0.0
- '@ethersproject/providers': ^5.0.0
- ethers: ^5.1.3
- typechain: ^5.0.0
- typescript: '>=4.0.0'
+ ethers: 6.x
+ typechain: ^8.3.2
+ typescript: '>=4.7.0'
dependencies:
- '@ethersproject/abi': 5.7.0
- '@ethersproject/bytes': 5.7.0
- '@ethersproject/providers': 5.7.2
ethers: 5.7.2
lodash: 4.17.21
- ts-essentials: 7.0.3(typescript@4.9.5)
- typechain: 5.2.0(typescript@4.9.5)
- typescript: 4.9.5
+ ts-essentials: 7.0.3(typescript@5.2.2)
+ typechain: 8.3.2(typescript@5.2.2)
+ typescript: 5.2.2
dev: true
- /@typechain/hardhat@2.3.1(hardhat@2.18.2)(lodash@4.17.21)(typechain@5.2.0):
- resolution: {integrity: sha512-BQV8OKQi0KAzLXCdsPO0pZBNQQ6ra8A2ucC26uFX/kquRBtJu1yEyWnVSmtr07b5hyRoJRpzUeINLnyqz4/MAw==}
+ /@typechain/hardhat@9.1.0(@typechain/ethers-v6@0.5.1)(ethers@5.7.2)(hardhat@2.18.2)(typechain@8.3.2):
+ resolution: {integrity: sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA==}
peerDependencies:
- hardhat: ^2.0.10
- lodash: ^4.17.15
- typechain: ^5.1.2
+ '@typechain/ethers-v6': ^0.5.1
+ ethers: ^6.1.0
+ hardhat: ^2.9.9
+ typechain: ^8.3.2
dependencies:
+ '@typechain/ethers-v6': 0.5.1(ethers@5.7.2)(typechain@8.3.2)(typescript@5.2.2)
+ ethers: 5.7.2
fs-extra: 9.1.0
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
- lodash: 4.17.21
- typechain: 5.2.0(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
+ typechain: 8.3.2(typescript@5.2.2)
dev: true
/@types/abstract-leveldown@7.2.4:
@@ -4869,13 +4907,13 @@ packages:
/@types/bn.js@4.11.6:
resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
dev: true
/@types/bn.js@5.1.3:
resolution: {integrity: sha512-wT1B4iIO82ecXkdN6waCK8Ou7E71WU+mP1osDA5Q8c6Ur+ozU2vIKUIhSpUr6uE5L2YHocKS1Z2jG2fBC1YVeg==}
dependencies:
- '@types/node': 12.20.55
+ '@types/node': 20.9.0
dev: true
/@types/cacheable-request@6.0.3:
@@ -4884,7 +4922,7 @@ packages:
dependencies:
'@types/http-cache-semantics': 4.0.4
'@types/keyv': 3.1.4
- '@types/node': 12.20.55
+ '@types/node': 20.9.0
'@types/responselike': 1.0.3
dev: true
optional: true
@@ -4899,20 +4937,16 @@ packages:
resolution: {integrity: sha512-of+ICnbqjmFCiixUnqRulbylyXQrPqIGf/B3Jax1wIF3DvSheysQxAWvqHhZiW3IQrycvokcLcFQlveGp+vyNg==}
dev: true
- /@types/chai@4.3.9:
- resolution: {integrity: sha512-69TtiDzu0bcmKQv3yg1Zx409/Kd7r0b5F1PfpYJfSHzLGtB53547V4u+9iqKYsTu/O2ai6KTb0TInNpvuQ3qmg==}
- dev: true
-
/@types/concat-stream@1.6.1:
resolution: {integrity: sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
dev: true
/@types/connect@3.4.37:
resolution: {integrity: sha512-zBUSRqkfZ59OcwXon4HVxhx5oWCJmc0OtBTK05M+p0dYjgN6iTwIL2T/WbsQZrEsdnwaF9cWQ+azOnpPvIqY3Q==}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
/@types/cookie@0.5.4:
resolution: {integrity: sha512-7z/eR6O859gyWIAjuvBWFzNURmf2oPBmJlfVWkwehU5nzIyjwBsTh7WMmEEV4JFnHuQ3ex4oyTvfKzcyJVDBNA==}
@@ -4957,27 +4991,27 @@ packages:
/@types/form-data@0.0.33:
resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
dev: true
/@types/glob@7.2.0:
resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==}
dependencies:
'@types/minimatch': 5.1.2
- '@types/node': 12.20.55
+ '@types/node': 20.9.0
dev: true
/@types/glob@8.1.0:
resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==}
dependencies:
'@types/minimatch': 5.1.2
- '@types/node': 12.20.55
+ '@types/node': 20.9.0
dev: true
/@types/graceful-fs@4.1.8:
resolution: {integrity: sha512-NhRH7YzWq8WiNKVavKPBmtLYZHxNY19Hh+az28O/phfp68CF45pMFud+ZzJ8ewnxnC5smIdF3dqFeiSUQ5I+pw==}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
dev: true
/@types/html-minifier-terser@6.1.0:
@@ -5033,7 +5067,7 @@ packages:
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
requiresBuild: true
dependencies:
- '@types/node': 12.20.55
+ '@types/node': 20.9.0
dev: true
optional: true
@@ -5046,7 +5080,7 @@ packages:
dependencies:
'@types/abstract-leveldown': 7.2.4
'@types/level-errors': 3.0.1
- '@types/node': 12.20.55
+ '@types/node': 20.9.0
dev: true
/@types/lru-cache@5.1.1:
@@ -5068,11 +5102,11 @@ packages:
/@types/mkdirp@0.5.2:
resolution: {integrity: sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==}
dependencies:
- '@types/node': 12.20.55
+ '@types/node': 20.9.0
dev: true
- /@types/mocha@9.1.1:
- resolution: {integrity: sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==}
+ /@types/mocha@10.0.6:
+ resolution: {integrity: sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==}
dev: true
/@types/ms@0.7.34:
@@ -5081,7 +5115,7 @@ packages:
/@types/node-fetch@2.6.9:
resolution: {integrity: sha512-bQVlnMLFJ2d35DkPNjEPmd9ueO/rh5EiaZt2bhqiSarPjZIuIV6bPQVqcrEyvNo+AfTrRGVazle1tl597w3gfA==}
dependencies:
- '@types/node': 12.20.55
+ '@types/node': 20.9.0
form-data: 4.0.0
dev: true
@@ -5092,16 +5126,10 @@ packages:
/@types/node@12.20.55:
resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==}
- /@types/node@20.8.7:
- resolution: {integrity: sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==}
- dependencies:
- undici-types: 5.25.3
-
/@types/node@20.9.0:
resolution: {integrity: sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==}
dependencies:
undici-types: 5.26.5
- dev: true
/@types/node@8.10.66:
resolution: {integrity: sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==}
@@ -5118,7 +5146,7 @@ packages:
/@types/pbkdf2@3.1.1:
resolution: {integrity: sha512-4HCoGwR3221nOc7G0Z/6KgTNGgaaFGkbGrtUJsB+zlKX2LBVjFHHIUkieMBgHHXgBH5Gq6dZHJKdBYdtlhBQvw==}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
dev: true
/@types/prettier@2.7.3:
@@ -5140,26 +5168,26 @@ packages:
/@types/readable-stream@2.3.15:
resolution: {integrity: sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==}
dependencies:
- '@types/node': 12.20.55
+ '@types/node': 20.9.0
safe-buffer: 5.1.2
dev: true
/@types/resolve@0.0.8:
resolution: {integrity: sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==}
dependencies:
- '@types/node': 12.20.55
+ '@types/node': 20.9.0
dev: true
/@types/responselike@1.0.3:
resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==}
requiresBuild: true
dependencies:
- '@types/node': 12.20.55
+ '@types/node': 20.9.0
dev: true
optional: true
- /@types/sanitize-html@2.9.5:
- resolution: {integrity: sha512-2Sr1vd8Dw+ypsg/oDDfZ57OMSG2Befs+l2CMyCC5bVSK3CpE7lTB2aNlbbWzazgVA+Qqfuholwom6x/mWd1qmw==}
+ /@types/sanitize-html@2.11.0:
+ resolution: {integrity: sha512-7oxPGNQHXLHE48r/r/qjn7q0hlrs3kL7oZnGj0Wf/h9tj/6ibFyRkNbsDxaBBZ4XUZ0Dx5LGCyDJ04ytSofacQ==}
dependencies:
htmlparser2: 8.0.2
dev: true
@@ -5174,7 +5202,7 @@ packages:
/@types/secp256k1@4.0.5:
resolution: {integrity: sha512-aIonTBMErtE3T9MxDvTZRzcrT/mCqpEZBw3CCY/i+oG9n57N/+7obBkhFgavUAIrX21bU0LHg1XRgtaLdelBhA==}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
dev: true
/@types/semver@7.5.4:
@@ -5188,7 +5216,7 @@ packages:
/@types/sinon-chai@3.2.11:
resolution: {integrity: sha512-1C5SBFzwn9hjiMr1xfqbULcSI9qXVpkGZT/LYbbd3jWiTo2MSvA+iFfwODlSoAXGeCgBw6S509dxy8zSIacr3Q==}
dependencies:
- '@types/chai': 4.3.9
+ '@types/chai': 4.3.10
'@types/sinon': 10.0.20
dev: true
@@ -5240,7 +5268,7 @@ packages:
/@types/ws@7.4.7:
resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
/@types/yargs-parser@21.0.2:
resolution: {integrity: sha512-5qcvofLPbfjmBfKaLfj/+f+Sbd6pN4zl7w7VSVI5uz7m9QZTuB2aZAa2uo1wHFBNN2x6g/SoTkXmd8mQnQF2Cw==}
@@ -5281,35 +5309,6 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/eslint-plugin@6.8.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@4.9.5):
- resolution: {integrity: sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==}
- engines: {node: ^16.0.0 || >=18.0.0}
- peerDependencies:
- '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha
- eslint: ^7.0.0 || ^8.0.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
- dependencies:
- '@eslint-community/regexpp': 4.9.1
- '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@4.9.5)
- '@typescript-eslint/scope-manager': 6.8.0
- '@typescript-eslint/type-utils': 6.8.0(eslint@7.32.0)(typescript@4.9.5)
- '@typescript-eslint/utils': 6.8.0(eslint@7.32.0)(typescript@4.9.5)
- '@typescript-eslint/visitor-keys': 6.8.0
- debug: 4.3.4(supports-color@8.1.1)
- eslint: 7.32.0
- graphemer: 1.4.0
- ignore: 5.2.4
- natural-compare: 1.4.0
- semver: 7.5.4
- ts-api-utils: 1.0.3(typescript@4.9.5)
- typescript: 4.9.5
- transitivePeerDependencies:
- - supports-color
- dev: true
-
/@typescript-eslint/eslint-plugin@6.8.0(@typescript-eslint/parser@5.62.0)(eslint@8.53.0)(typescript@4.9.5):
resolution: {integrity: sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==}
engines: {node: ^16.0.0 || >=18.0.0}
@@ -5339,26 +5338,6 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/parser@4.33.0(eslint@7.32.0)(typescript@4.9.5):
- resolution: {integrity: sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==}
- engines: {node: ^10.12.0 || >=12.0.0}
- peerDependencies:
- eslint: ^5.0.0 || ^6.0.0 || ^7.0.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
- dependencies:
- '@typescript-eslint/scope-manager': 4.33.0
- '@typescript-eslint/types': 4.33.0
- '@typescript-eslint/typescript-estree': 4.33.0(typescript@4.9.5)
- debug: 4.3.4(supports-color@8.1.1)
- eslint: 7.32.0
- typescript: 4.9.5
- transitivePeerDependencies:
- - supports-color
- dev: true
-
/@typescript-eslint/parser@5.62.0(eslint@8.53.0)(typescript@4.9.5):
resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -5400,14 +5379,6 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/scope-manager@4.33.0:
- resolution: {integrity: sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==}
- engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
- dependencies:
- '@typescript-eslint/types': 4.33.0
- '@typescript-eslint/visitor-keys': 4.33.0
- dev: true
-
/@typescript-eslint/scope-manager@5.62.0:
resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -5452,26 +5423,6 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/type-utils@6.8.0(eslint@7.32.0)(typescript@4.9.5):
- resolution: {integrity: sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==}
- engines: {node: ^16.0.0 || >=18.0.0}
- peerDependencies:
- eslint: ^7.0.0 || ^8.0.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
- dependencies:
- '@typescript-eslint/typescript-estree': 6.8.0(typescript@4.9.5)
- '@typescript-eslint/utils': 6.8.0(eslint@7.32.0)(typescript@4.9.5)
- debug: 4.3.4(supports-color@8.1.1)
- eslint: 7.32.0
- ts-api-utils: 1.0.3(typescript@4.9.5)
- typescript: 4.9.5
- transitivePeerDependencies:
- - supports-color
- dev: true
-
/@typescript-eslint/type-utils@6.8.0(eslint@8.53.0)(typescript@4.9.5):
resolution: {integrity: sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==}
engines: {node: ^16.0.0 || >=18.0.0}
@@ -5492,11 +5443,6 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/types@4.33.0:
- resolution: {integrity: sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==}
- engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
- dev: true
-
/@typescript-eslint/types@5.62.0:
resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -5512,27 +5458,6 @@ packages:
engines: {node: ^16.0.0 || >=18.0.0}
dev: true
- /@typescript-eslint/typescript-estree@4.33.0(typescript@4.9.5):
- resolution: {integrity: sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==}
- engines: {node: ^10.12.0 || >=12.0.0}
- peerDependencies:
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
- dependencies:
- '@typescript-eslint/types': 4.33.0
- '@typescript-eslint/visitor-keys': 4.33.0
- debug: 4.3.4(supports-color@8.1.1)
- globby: 11.1.0
- is-glob: 4.0.3
- semver: 7.5.4
- tsutils: 3.21.0(typescript@4.9.5)
- typescript: 4.9.5
- transitivePeerDependencies:
- - supports-color
- dev: true
-
/@typescript-eslint/typescript-estree@5.62.0(typescript@4.9.5):
resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -5615,25 +5540,6 @@ packages:
- typescript
dev: true
- /@typescript-eslint/utils@6.8.0(eslint@7.32.0)(typescript@4.9.5):
- resolution: {integrity: sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==}
- engines: {node: ^16.0.0 || >=18.0.0}
- peerDependencies:
- eslint: ^7.0.0 || ^8.0.0
- dependencies:
- '@eslint-community/eslint-utils': 4.4.0(eslint@7.32.0)
- '@types/json-schema': 7.0.14
- '@types/semver': 7.5.4
- '@typescript-eslint/scope-manager': 6.8.0
- '@typescript-eslint/types': 6.8.0
- '@typescript-eslint/typescript-estree': 6.8.0(typescript@4.9.5)
- eslint: 7.32.0
- semver: 7.5.4
- transitivePeerDependencies:
- - supports-color
- - typescript
- dev: true
-
/@typescript-eslint/utils@6.8.0(eslint@8.53.0)(typescript@4.9.5):
resolution: {integrity: sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==}
engines: {node: ^16.0.0 || >=18.0.0}
@@ -5653,14 +5559,6 @@ packages:
- typescript
dev: true
- /@typescript-eslint/visitor-keys@4.33.0:
- resolution: {integrity: sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg==}
- engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
- dependencies:
- '@typescript-eslint/types': 4.33.0
- eslint-visitor-keys: 2.1.0
- dev: true
-
/@typescript-eslint/visitor-keys@5.62.0:
resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -5756,10 +5654,10 @@ packages:
source-map: 0.6.1
dev: true
- /@vue/component-compiler-utils@3.3.0(lodash@4.17.21):
+ /@vue/component-compiler-utils@3.3.0:
resolution: {integrity: sha512-97sfH2mYNU+2PzGrmK2haqffDpVASuib9/w2/noxiFi31Z54hW+q3izKQXXQZSNhtiUpAI36uSuYepeBe4wpHQ==}
dependencies:
- consolidate: 0.15.1(lodash@4.17.21)
+ consolidate: 0.15.1
hash-sum: 1.0.2
lru-cache: 4.1.5
merge-source-map: 1.1.0
@@ -5768,7 +5666,7 @@ packages:
source-map: 0.6.1
vue-template-es2015-compiler: 1.9.1
optionalDependencies:
- prettier: 2.8.8
+ prettier: 2.7.1
transitivePeerDependencies:
- arc-templates
- atpl
@@ -6842,14 +6740,6 @@ packages:
acorn: 8.10.0
dev: true
- /acorn-jsx@5.3.2(acorn@7.4.1):
- resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
- peerDependencies:
- acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
- dependencies:
- acorn: 7.4.1
- dev: true
-
/acorn-jsx@5.3.2(acorn@8.11.2):
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
peerDependencies:
@@ -7041,6 +6931,11 @@ packages:
engines: {node: '>=10'}
dev: true
+ /ansi-styles@6.2.1:
+ resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==}
+ engines: {node: '>=12'}
+ dev: true
+
/antlr4@4.13.1:
resolution: {integrity: sha512-kiXTspaRYvnIArgE97z5YVVf/cDVQABr3abFRR6mE7yesLMkgu4ujuyV/sgxafQ8wgve0DJQUJ38Z8tkgA2izA==}
engines: {node: '>=16'}
@@ -7134,6 +7029,16 @@ packages:
typical: 2.6.1
dev: true
+ /array-back@3.1.0:
+ resolution: {integrity: sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==}
+ engines: {node: '>=6'}
+ dev: true
+
+ /array-back@4.0.2:
+ resolution: {integrity: sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==}
+ engines: {node: '>=8'}
+ dev: true
+
/array-buffer-byte-length@1.0.0:
resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==}
dependencies:
@@ -7373,12 +7278,13 @@ packages:
resolution: {integrity: sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==}
dev: true
- /axios@0.21.4(debug@4.3.4):
+ /axios@0.21.4:
resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==}
dependencies:
follow-redirects: 1.15.3(debug@4.3.4)
transitivePeerDependencies:
- debug
+ dev: false
/axios@1.5.1:
resolution: {integrity: sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==}
@@ -8122,6 +8028,11 @@ packages:
/bech32@1.1.4:
resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==}
+ /big-integer@1.6.52:
+ resolution: {integrity: sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==}
+ engines: {node: '>=0.6'}
+ dev: true
+
/big.js@5.2.2:
resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==}
dev: true
@@ -8141,8 +8052,6 @@ packages:
/bignumber.js@9.1.2:
resolution: {integrity: sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==}
requiresBuild: true
- dev: true
- optional: true
/binary-extensions@2.2.0:
resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==}
@@ -8191,7 +8100,6 @@ packages:
/bn.js@4.11.6:
resolution: {integrity: sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==}
- dev: true
/bn.js@4.11.8:
resolution: {integrity: sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==}
@@ -8258,6 +8166,13 @@ packages:
bs58: 4.0.1
text-encoding-utf-8: 1.0.2
+ /bplist-parser@0.2.0:
+ resolution: {integrity: sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==}
+ engines: {node: '>= 5.10.0'}
+ dependencies:
+ big-integer: 1.6.52
+ dev: true
+
/brace-expansion@1.1.11:
resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
dependencies:
@@ -8444,6 +8359,10 @@ packages:
/buffer-from@1.1.2:
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
+ /buffer-reverse@1.0.1:
+ resolution: {integrity: sha512-M87YIUBsZ6N924W57vDwT/aOu8hw7ZgdByz6ijksLjmHJELBASmYTTlNHRgjE+pTsT9oJXGaDSgqqwfdHotDUg==}
+ dev: false
+
/buffer-to-arraybuffer@0.0.5:
resolution: {integrity: sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ==}
requiresBuild: true
@@ -8487,6 +8406,24 @@ packages:
dependencies:
node-gyp-build: 4.6.1
+ /builtin-modules@3.3.0:
+ resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==}
+ engines: {node: '>=6'}
+ dev: true
+
+ /builtins@5.0.1:
+ resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==}
+ dependencies:
+ semver: 7.5.4
+ dev: true
+
+ /bundle-name@3.0.0:
+ resolution: {integrity: sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==}
+ engines: {node: '>=12'}
+ dependencies:
+ run-applescript: 5.0.0
+ dev: true
+
/bundle-require@3.1.2(esbuild@0.16.17):
resolution: {integrity: sha512-Of6l6JBAxiyQ5axFxUM6dYeP/W7X2Sozeo/4EYB9sJhL+dqL7TKjg+shwxp6jlu/6ZSERfsYtIpSJ1/x3XkAEA==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -9121,6 +9058,26 @@ packages:
typical: 2.6.1
dev: true
+ /command-line-args@5.2.1:
+ resolution: {integrity: sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==}
+ engines: {node: '>=4.0.0'}
+ dependencies:
+ array-back: 3.1.0
+ find-replace: 3.0.0
+ lodash.camelcase: 4.3.0
+ typical: 4.0.0
+ dev: true
+
+ /command-line-usage@6.1.3:
+ resolution: {integrity: sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==}
+ engines: {node: '>=8.0.0'}
+ dependencies:
+ array-back: 4.0.2
+ chalk: 2.4.2
+ table-layout: 1.0.2
+ typical: 5.2.0
+ dev: true
+
/commander@10.0.1:
resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==}
engines: {node: '>=14'}
@@ -9169,7 +9126,7 @@ packages:
resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==}
dev: true
- /consolidate@0.15.1(lodash@4.17.21):
+ /consolidate@0.15.1:
resolution: {integrity: sha512-DW46nrsMJgy9kqAbPt5rKaCr7uFtpo4mSUvLHIUbJEjm0vo+aY5QLwBUq3FK4tRnJr/X0Psc0C4jf/h+HtXSMw==}
engines: {node: '>= 0.10.0'}
deprecated: Please upgrade to consolidate v1.0.0+ as it has been modernized with several long-awaited fixes implemented. Maintenance is supported by Forward Email at https://forwardemail.net ; follow/watch https://github.com/ladjs/consolidate for updates and release changelog
@@ -9336,7 +9293,6 @@ packages:
optional: true
dependencies:
bluebird: 3.7.2
- lodash: 4.17.21
dev: true
/constant-case@3.0.4:
@@ -9474,6 +9430,22 @@ packages:
typescript: 4.9.5
dev: true
+ /cosmiconfig@8.3.6(typescript@5.2.2):
+ resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==}
+ engines: {node: '>=14'}
+ peerDependencies:
+ typescript: '>=4.9.5'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ import-fresh: 3.3.0
+ js-yaml: 4.1.0
+ parse-json: 5.2.0
+ path-type: 4.0.0
+ typescript: 5.2.2
+ dev: true
+
/crc-32@1.2.2:
resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==}
engines: {node: '>=0.8'}
@@ -9572,6 +9544,10 @@ packages:
resolution: {integrity: sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==}
dev: true
+ /crypto-js@4.2.0:
+ resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==}
+ dev: false
+
/css-loader@6.8.1(webpack@5.89.0):
resolution: {integrity: sha512-xDAXtEVGlD0gJ07iclwWVkLoZOpEvAWaSyf6W18S2pOC//K8+qUDIx8IIT3D+HjnmkJPQeesOPv5aiUaJsCM2g==}
engines: {node: '>= 12.13.0'}
@@ -9826,6 +9802,11 @@ packages:
regexp.prototype.flags: 1.5.1
dev: true
+ /deep-extend@0.6.0:
+ resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==}
+ engines: {node: '>=4.0.0'}
+ dev: true
+
/deep-is@0.1.4:
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
dev: true
@@ -9834,6 +9815,24 @@ packages:
resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==}
engines: {node: '>=0.10.0'}
+ /default-browser-id@3.0.0:
+ resolution: {integrity: sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==}
+ engines: {node: '>=12'}
+ dependencies:
+ bplist-parser: 0.2.0
+ untildify: 4.0.0
+ dev: true
+
+ /default-browser@4.0.0:
+ resolution: {integrity: sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==}
+ engines: {node: '>=14.16'}
+ dependencies:
+ bundle-name: 3.0.0
+ default-browser-id: 3.0.0
+ execa: 7.2.0
+ titleize: 3.0.0
+ dev: true
+
/defaults@1.0.4:
resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==}
dependencies:
@@ -9889,6 +9888,11 @@ packages:
gopd: 1.0.1
has-property-descriptors: 1.0.1
+ /define-lazy-prop@3.0.0:
+ resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==}
+ engines: {node: '>=12'}
+ dev: true
+
/define-properties@1.2.1:
resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==}
engines: {node: '>= 0.4'}
@@ -10182,11 +10186,6 @@ packages:
engines: {node: '>=12'}
dev: true
- /dotenv@10.0.0:
- resolution: {integrity: sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==}
- engines: {node: '>=10'}
- dev: true
-
/dotenv@16.3.1:
resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==}
engines: {node: '>=12'}
@@ -10213,6 +10212,10 @@ packages:
readable-stream: 3.6.2
stream-shift: 1.0.1
+ /eastasianwidth@0.2.0:
+ resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
+ dev: true
+
/ecc-jsbn@0.1.2:
resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==}
dependencies:
@@ -10267,6 +10270,10 @@ packages:
/emoji-regex@8.0.0:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
+ /emoji-regex@9.2.2:
+ resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
+ dev: true
+
/emojis-list@3.0.0:
resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==}
engines: {node: '>= 4'}
@@ -10841,17 +10848,17 @@ packages:
eslint: 8.53.0
dev: true
- /eslint-config-prettier@8.10.0(eslint@7.32.0):
+ /eslint-config-prettier@8.10.0(eslint@8.53.0):
resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==}
hasBin: true
peerDependencies:
eslint: '>=7.0.0'
dependencies:
- eslint: 7.32.0
+ eslint: 8.53.0
dev: true
- /eslint-config-prettier@8.10.0(eslint@8.53.0):
- resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==}
+ /eslint-config-prettier@9.0.0(eslint@8.53.0):
+ resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==}
hasBin: true
peerDependencies:
eslint: '>=7.0.0'
@@ -10859,18 +10866,19 @@ packages:
eslint: 8.53.0
dev: true
- /eslint-config-standard@16.0.3(eslint-plugin-import@2.28.1)(eslint-plugin-node@11.1.0)(eslint-plugin-promise@6.1.1)(eslint@7.32.0):
- resolution: {integrity: sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==}
+ /eslint-config-standard@17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.3.1)(eslint-plugin-promise@6.1.1)(eslint@8.53.0):
+ resolution: {integrity: sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==}
+ engines: {node: '>=12.0.0'}
peerDependencies:
- eslint: ^7.12.1
- eslint-plugin-import: ^2.22.1
- eslint-plugin-node: ^11.1.0
- eslint-plugin-promise: ^4.2.1 || ^5.0.0
+ eslint: ^8.0.1
+ eslint-plugin-import: ^2.25.2
+ eslint-plugin-n: '^15.0.0 || ^16.0.0 '
+ eslint-plugin-promise: ^6.0.0
dependencies:
- eslint: 7.32.0
- eslint-plugin-import: 2.28.1(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)
- eslint-plugin-node: 11.1.0(eslint@7.32.0)
- eslint-plugin-promise: 6.1.1(eslint@7.32.0)
+ eslint: 8.53.0
+ eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)
+ eslint-plugin-n: 16.3.1(eslint@8.53.0)
+ eslint-plugin-promise: 6.1.1(eslint@8.53.0)
dev: true
/eslint-import-resolver-node@0.3.9:
@@ -10883,7 +10891,7 @@ packages:
- supports-color
dev: true
- /eslint-module-utils@2.8.0(@typescript-eslint/parser@4.33.0)(eslint-import-resolver-node@0.3.9)(eslint@7.32.0):
+ /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-node@0.3.9)(eslint@8.53.0):
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'}
peerDependencies:
@@ -10904,26 +10912,38 @@ packages:
eslint-import-resolver-webpack:
optional: true
dependencies:
- '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@4.9.5)
+ '@typescript-eslint/parser': 6.10.0(eslint@8.53.0)(typescript@5.2.2)
debug: 3.2.7
- eslint: 7.32.0
+ eslint: 8.53.0
eslint-import-resolver-node: 0.3.9
transitivePeerDependencies:
- supports-color
dev: true
- /eslint-plugin-es@3.0.1(eslint@7.32.0):
+ /eslint-plugin-es-x@7.5.0(eslint@8.53.0):
+ resolution: {integrity: sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==}
+ engines: {node: ^14.18.0 || >=16.0.0}
+ peerDependencies:
+ eslint: '>=8'
+ dependencies:
+ '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0)
+ '@eslint-community/regexpp': 4.10.0
+ eslint: 8.53.0
+ eslint-compat-utils: 0.1.2(eslint@8.53.0)
+ dev: true
+
+ /eslint-plugin-es@3.0.1(eslint@8.53.0):
resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==}
engines: {node: '>=8.10.0'}
peerDependencies:
eslint: '>=4.19.1'
dependencies:
- eslint: 7.32.0
+ eslint: 8.53.0
eslint-utils: 2.1.0
regexpp: 3.2.0
dev: true
- /eslint-plugin-import@2.28.1(@typescript-eslint/parser@4.33.0)(eslint@7.32.0):
+ /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.10.0)(eslint@8.53.0):
resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==}
engines: {node: '>=4'}
peerDependencies:
@@ -10933,16 +10953,16 @@ packages:
'@typescript-eslint/parser':
optional: true
dependencies:
- '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@4.9.5)
+ '@typescript-eslint/parser': 6.10.0(eslint@8.53.0)(typescript@5.2.2)
array-includes: 3.1.7
array.prototype.findlastindex: 1.2.3
array.prototype.flat: 1.3.2
array.prototype.flatmap: 1.3.2
debug: 3.2.7
doctrine: 2.1.0
- eslint: 7.32.0
+ eslint: 8.53.0
eslint-import-resolver-node: 0.3.9
- eslint-module-utils: 2.8.0(@typescript-eslint/parser@4.33.0)(eslint-import-resolver-node@0.3.9)(eslint@7.32.0)
+ eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.10.0)(eslint-import-resolver-node@0.3.9)(eslint@8.53.0)
has: 1.0.4
is-core-module: 2.13.1
is-glob: 4.0.3
@@ -10958,14 +10978,33 @@ packages:
- supports-color
dev: true
- /eslint-plugin-node@11.1.0(eslint@7.32.0):
+ /eslint-plugin-n@16.3.1(eslint@8.53.0):
+ resolution: {integrity: sha512-w46eDIkxQ2FaTHcey7G40eD+FhTXOdKudDXPUO2n9WNcslze/i/HT2qJ3GXjHngYSGDISIgPNhwGtgoix4zeOw==}
+ engines: {node: '>=16.0.0'}
+ peerDependencies:
+ eslint: '>=7.0.0'
+ dependencies:
+ '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0)
+ builtins: 5.0.1
+ eslint: 8.53.0
+ eslint-plugin-es-x: 7.5.0(eslint@8.53.0)
+ get-tsconfig: 4.7.2
+ ignore: 5.2.4
+ is-builtin-module: 3.2.1
+ is-core-module: 2.13.1
+ minimatch: 3.1.2
+ resolve: 1.22.8
+ semver: 7.5.4
+ dev: true
+
+ /eslint-plugin-node@11.1.0(eslint@8.53.0):
resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==}
engines: {node: '>=8.10.0'}
peerDependencies:
eslint: '>=5.16.0'
dependencies:
- eslint: 7.32.0
- eslint-plugin-es: 3.0.1(eslint@7.32.0)
+ eslint: 8.53.0
+ eslint-plugin-es: 3.0.1(eslint@8.53.0)
eslint-utils: 2.1.0
ignore: 5.2.4
minimatch: 3.1.2
@@ -10973,30 +11012,34 @@ packages:
semver: 6.3.1
dev: true
- /eslint-plugin-prettier@3.4.1(eslint-config-prettier@8.10.0)(eslint@7.32.0)(prettier@2.8.8):
- resolution: {integrity: sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==}
- engines: {node: '>=6.0.0'}
+ /eslint-plugin-prettier@5.0.1(eslint-config-prettier@9.0.0)(eslint@8.53.0)(prettier@3.0.3):
+ resolution: {integrity: sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==}
+ engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
- eslint: '>=5.0.0'
+ '@types/eslint': '>=8.0.0'
+ eslint: '>=8.0.0'
eslint-config-prettier: '*'
- prettier: '>=1.13.0'
+ prettier: '>=3.0.0'
peerDependenciesMeta:
+ '@types/eslint':
+ optional: true
eslint-config-prettier:
optional: true
dependencies:
- eslint: 7.32.0
- eslint-config-prettier: 8.10.0(eslint@7.32.0)
- prettier: 2.8.8
+ eslint: 8.53.0
+ eslint-config-prettier: 9.0.0(eslint@8.53.0)
+ prettier: 3.0.3
prettier-linter-helpers: 1.0.0
+ synckit: 0.8.5
dev: true
- /eslint-plugin-promise@6.1.1(eslint@7.32.0):
+ /eslint-plugin-promise@6.1.1(eslint@8.53.0):
resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
dependencies:
- eslint: 7.32.0
+ eslint: 8.53.0
dev: true
/eslint-plugin-simple-import-sort@10.0.0(eslint@8.53.0):
@@ -11056,71 +11099,17 @@ packages:
resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==}
engines: {node: '>=6'}
dependencies:
- eslint-visitor-keys: 1.3.0
- dev: true
-
- /eslint-visitor-keys@1.3.0:
- resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==}
- engines: {node: '>=4'}
- dev: true
-
- /eslint-visitor-keys@2.1.0:
- resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==}
- engines: {node: '>=10'}
- dev: true
-
- /eslint-visitor-keys@3.4.3:
- resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- dev: true
-
- /eslint@7.32.0:
- resolution: {integrity: sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==}
- engines: {node: ^10.12.0 || >=12.0.0}
- hasBin: true
- dependencies:
- '@babel/code-frame': 7.12.11
- '@eslint/eslintrc': 0.4.3
- '@humanwhocodes/config-array': 0.5.0
- ajv: 6.12.6
- chalk: 4.1.2
- cross-spawn: 7.0.3
- debug: 4.3.4(supports-color@8.1.1)
- doctrine: 3.0.0
- enquirer: 2.4.1
- escape-string-regexp: 4.0.0
- eslint-scope: 5.1.1
- eslint-utils: 2.1.0
- eslint-visitor-keys: 2.1.0
- espree: 7.3.1
- esquery: 1.5.0
- esutils: 2.0.3
- fast-deep-equal: 3.1.3
- file-entry-cache: 6.0.1
- functional-red-black-tree: 1.0.1
- glob-parent: 5.1.2
- globals: 13.23.0
- ignore: 4.0.6
- import-fresh: 3.3.0
- imurmurhash: 0.1.4
- is-glob: 4.0.3
- js-yaml: 3.14.1
- json-stable-stringify-without-jsonify: 1.0.1
- levn: 0.4.1
- lodash.merge: 4.6.2
- minimatch: 3.1.2
- natural-compare: 1.4.0
- optionator: 0.9.3
- progress: 2.0.3
- regexpp: 3.2.0
- semver: 7.5.4
- strip-ansi: 6.0.1
- strip-json-comments: 3.1.1
- table: 6.8.1
- text-table: 0.2.0
- v8-compile-cache: 2.4.0
- transitivePeerDependencies:
- - supports-color
+ eslint-visitor-keys: 1.3.0
+ dev: true
+
+ /eslint-visitor-keys@1.3.0:
+ resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==}
+ engines: {node: '>=4'}
+ dev: true
+
+ /eslint-visitor-keys@3.4.3:
+ resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/eslint@8.53.0:
@@ -11174,15 +11163,6 @@ packages:
resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==}
dev: true
- /espree@7.3.1:
- resolution: {integrity: sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==}
- engines: {node: ^10.12.0 || >=12.0.0}
- dependencies:
- acorn: 7.4.1
- acorn-jsx: 5.3.2(acorn@7.4.1)
- eslint-visitor-keys: 1.3.0
- dev: true
-
/espree@9.6.1:
resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -11401,7 +11381,7 @@ packages:
resolution: {integrity: sha512-iNZ576iTOGcfllftB73cPB5AN+XUQAT/T8xzsILsghXC1o8gJUqe3RHlcDqagu+biFpYQ61KQrZZJza8eRSYqw==}
deprecated: Deprecated in favor of '@metamask/eth-sig-util'
dependencies:
- ethereumjs-abi: git@github.com+ethereumjs/ethereumjs-abi/ee3994657fa7a427238e6ba92a84d0b529bbcde0
+ ethereumjs-abi: github.com/ethereumjs/ethereumjs-abi/ee3994657fa7a427238e6ba92a84d0b529bbcde0
ethereumjs-util: 5.2.1
dev: true
@@ -11453,7 +11433,6 @@ packages:
resolution: {integrity: sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==}
dependencies:
js-sha3: 0.8.0
- dev: true
/ethereum-common@0.0.18:
resolution: {integrity: sha512-EoltVQTRNg2Uy4o84qpa2aXymXDJhxm7eos/ACOg0DG4baAbMjhbdAEsx9GeE8sC3XCxnYvrrzZDH8D8MtA2iQ==}
@@ -11499,15 +11478,14 @@ packages:
'@noble/hashes': 1.3.1
'@scure/bip32': 1.3.1
'@scure/bip39': 1.2.1
- dev: true
- /ethereum-waffle@3.4.4(typescript@4.9.5):
+ /ethereum-waffle@3.4.4(typescript@5.2.2):
resolution: {integrity: sha512-PA9+jCjw4WC3Oc5ocSMBj5sXvueWQeAbvCA+hUlb6oFgwwKyq5ka3bWQ7QZcjzIX+TdFkxP4IbFmoY2D8Dkj9Q==}
engines: {node: '>=10.0'}
hasBin: true
dependencies:
'@ethereum-waffle/chai': 3.4.4
- '@ethereum-waffle/compiler': 3.4.4(typescript@4.9.5)
+ '@ethereum-waffle/compiler': 3.4.4(typescript@5.2.2)
'@ethereum-waffle/mock-contract': 3.4.4
'@ethereum-waffle/provider': 3.4.4
ethers: 5.7.2
@@ -11751,7 +11729,6 @@ packages:
dependencies:
bn.js: 4.11.6
number-to-bn: 1.7.0
- dev: true
/ethjs-util@0.1.6:
resolution: {integrity: sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==}
@@ -11760,6 +11737,7 @@ packages:
is-hex-prefixed: 1.0.0
strip-hex-prefix: 1.0.0
dev: true
+ bundledDependencies: false
/event-emitter@0.3.5:
resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==}
@@ -11823,6 +11801,21 @@ packages:
strip-final-newline: 3.0.0
dev: true
+ /execa@7.2.0:
+ resolution: {integrity: sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==}
+ engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0}
+ dependencies:
+ cross-spawn: 7.0.3
+ get-stream: 6.0.1
+ human-signals: 4.3.1
+ is-stream: 3.0.0
+ merge-stream: 2.0.0
+ npm-run-path: 5.1.0
+ onetime: 6.0.0
+ signal-exit: 3.0.7
+ strip-final-newline: 3.0.0
+ dev: true
+
/exit@0.1.2:
resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==}
engines: {node: '>= 0.8.0'}
@@ -12087,6 +12080,13 @@ packages:
test-value: 2.1.0
dev: true
+ /find-replace@3.0.0:
+ resolution: {integrity: sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==}
+ engines: {node: '>=4.0.0'}
+ dependencies:
+ array-back: 3.1.0
+ dev: true
+
/find-up@1.1.2:
resolution: {integrity: sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==}
engines: {node: '>=0.10.0'}
@@ -12206,6 +12206,14 @@ packages:
resolution: {integrity: sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==}
dev: true
+ /foreground-child@3.1.1:
+ resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==}
+ engines: {node: '>=14'}
+ dependencies:
+ cross-spawn: 7.0.3
+ signal-exit: 4.1.0
+ dev: true
+
/forever-agent@0.6.1:
resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==}
dev: true
@@ -12333,7 +12341,7 @@ packages:
at-least-node: 1.0.0
graceful-fs: 4.2.11
jsonfile: 6.1.0
- universalify: 2.0.0
+ universalify: 2.0.1
dev: true
/fs-minipass@1.2.7:
@@ -12567,6 +12575,12 @@ packages:
get-intrinsic: 1.2.2
dev: true
+ /get-tsconfig@4.7.2:
+ resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==}
+ dependencies:
+ resolve-pkg-maps: 1.0.0
+ dev: true
+
/get-value@2.0.6:
resolution: {integrity: sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==}
engines: {node: '>=0.10.0'}
@@ -12604,6 +12618,18 @@ packages:
resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==}
dev: true
+ /glob@10.3.10:
+ resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==}
+ engines: {node: '>=16 || 14 >=14.17'}
+ hasBin: true
+ dependencies:
+ foreground-child: 3.1.1
+ jackspeak: 2.3.6
+ minimatch: 9.0.3
+ minipass: 5.0.0
+ path-scurry: 1.10.1
+ dev: true
+
/glob@5.0.15:
resolution: {integrity: sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==}
dependencies:
@@ -12750,7 +12776,7 @@ packages:
dependencies:
array-union: 2.1.0
dir-glob: 3.0.1
- fast-glob: 3.3.1
+ fast-glob: 3.3.2
ignore: 5.2.4
merge2: 1.4.1
slash: 3.0.0
@@ -12877,7 +12903,7 @@ packages:
dependencies:
'@ethersproject/abi': 5.7.0
delete-empty: 3.0.0
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
dev: true
/hardhat-contract-sizer@2.10.0(hardhat@2.18.2):
@@ -12887,21 +12913,21 @@ packages:
dependencies:
chalk: 4.1.2
cli-table3: 0.6.3
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
strip-ansi: 6.0.1
dev: true
- /hardhat-docgen@1.3.0(hardhat@2.18.2)(lodash@4.17.21)(prettier@2.8.8):
+ /hardhat-docgen@1.3.0(hardhat@2.18.2)(prettier@3.0.3):
resolution: {integrity: sha512-paaiOHjJFLCLz2/qM1TQ7ZEG+Vy+LBvJL+SW4A64ZhBnVnyoZ/zv9DvEuawaWhqP5P7AOM6r22reVz4ecWgW7A==}
engines: {node: '>=14.14.0'}
peerDependencies:
hardhat: ^2.0.0
dependencies:
css-loader: 6.8.1(webpack@5.89.0)
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
html-webpack-plugin: 5.5.3(webpack@5.89.0)
vue: 2.7.14
- vue-loader: 15.11.1(css-loader@6.8.1)(lodash@4.17.21)(prettier@2.8.8)(vue-template-compiler@2.7.14)(webpack@5.89.0)
+ vue-loader: 15.11.1(css-loader@6.8.1)(prettier@3.0.3)(vue-template-compiler@2.7.14)(webpack@5.89.0)
vue-router: 3.6.5(vue@2.7.14)
vue-template-compiler: 2.7.14
webpack: 5.89.0
@@ -12975,7 +13001,7 @@ packages:
dependencies:
array-uniq: 1.0.3
eth-gas-reporter: 0.2.27
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
sha1: 1.1.1
transitivePeerDependencies:
- '@codechecks/client'
@@ -12989,11 +13015,11 @@ packages:
peerDependencies:
hardhat: ^2.0.5
dependencies:
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
murmur-128: 0.2.1
dev: true
- /hardhat@2.18.2(ts-node@10.9.1)(typescript@4.9.5):
+ /hardhat@2.18.2(ts-node@10.9.1)(typescript@5.2.2):
resolution: {integrity: sha512-lUVmJg7DsKcUCDpqv57CJl6vHqo/1PeHSfM3+WIa8UtRKmXyVTj1qQK01TDiuetkZBVg9Dn52qU+ZwaJQynaKA==}
hasBin: true
peerDependencies:
@@ -13049,10 +13075,10 @@ packages:
solc: 0.7.3(debug@4.3.4)
source-map-support: 0.5.21
stacktrace-parser: 0.1.10
- ts-node: 10.9.1(@types/node@12.20.55)(typescript@4.9.5)
+ ts-node: 10.9.1(@types/node@20.9.0)(typescript@5.2.2)
tsort: 0.0.1
- typescript: 4.9.5
- undici: 5.26.4
+ typescript: 5.2.2
+ undici: 5.26.5
uuid: 8.3.2
ws: 7.5.9
transitivePeerDependencies:
@@ -13381,6 +13407,11 @@ packages:
engines: {node: '>=12.20.0'}
dev: true
+ /human-signals@4.3.1:
+ resolution: {integrity: sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==}
+ engines: {node: '>=14.18.0'}
+ dev: true
+
/humanize-ms@1.2.1:
resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==}
dependencies:
@@ -13428,11 +13459,6 @@ packages:
/ieee754@1.2.1:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
- /ignore@4.0.6:
- resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==}
- engines: {node: '>= 4'}
- dev: true
-
/ignore@5.2.4:
resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==}
engines: {node: '>= 4'}
@@ -13637,6 +13663,13 @@ packages:
engines: {node: '>=4'}
dev: true
+ /is-builtin-module@3.2.1:
+ resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==}
+ engines: {node: '>=6'}
+ dependencies:
+ builtin-modules: 3.3.0
+ dev: true
+
/is-callable@1.2.7:
resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==}
engines: {node: '>= 0.4'}
@@ -13695,6 +13728,12 @@ packages:
hasBin: true
dev: true
+ /is-docker@3.0.0:
+ resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==}
+ engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
+ hasBin: true
+ dev: true
+
/is-extendable@0.1.1:
resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==}
engines: {node: '>=0.10.0'}
@@ -13762,6 +13801,13 @@ packages:
/is-hex-prefixed@1.0.0:
resolution: {integrity: sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==}
engines: {node: '>=6.5.0', npm: '>=3'}
+
+ /is-inside-container@1.0.0:
+ resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==}
+ engines: {node: '>=14.16'}
+ hasBin: true
+ dependencies:
+ is-docker: 3.0.0
dev: true
/is-interactive@2.0.0:
@@ -14037,6 +14083,15 @@ packages:
istanbul-lib-report: 3.0.1
dev: true
+ /jackspeak@2.3.6:
+ resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==}
+ engines: {node: '>=14'}
+ dependencies:
+ '@isaacs/cliui': 8.0.2
+ optionalDependencies:
+ '@pkgjs/parseargs': 0.11.0
+ dev: true
+
/jayson@4.1.0:
resolution: {integrity: sha512-R6JlbyLN53Mjku329XoRT2zJAE6ZgOQ8f91ucYdMCD4nkGCF9kZSrcGXpHIU4jeKj58zUZke2p+cdQchU7Ly7A==}
engines: {node: '>=8'}
@@ -14074,7 +14129,7 @@ packages:
'@jest/environment': 27.5.1
'@jest/test-result': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
chalk: 4.1.2
co: 4.6.0
dedent: 0.7.0
@@ -14199,7 +14254,7 @@ packages:
'@jest/environment': 27.5.1
'@jest/fake-timers': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
jest-mock: 27.5.1
jest-util: 27.5.1
jsdom: 16.7.0
@@ -14217,7 +14272,7 @@ packages:
'@jest/environment': 27.5.1
'@jest/fake-timers': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
jest-mock: 27.5.1
jest-util: 27.5.1
dev: true
@@ -14233,7 +14288,7 @@ packages:
dependencies:
'@jest/types': 27.5.1
'@types/graceful-fs': 4.1.8
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
anymatch: 3.1.3
fb-watchman: 2.0.2
graceful-fs: 4.2.11
@@ -14255,7 +14310,7 @@ packages:
'@jest/source-map': 27.5.1
'@jest/test-result': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
chalk: 4.1.2
co: 4.6.0
expect: 27.5.1
@@ -14310,7 +14365,7 @@ packages:
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dependencies:
'@jest/types': 27.5.1
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
dev: true
/jest-pnp-resolver@1.2.3(jest-resolve@27.5.1):
@@ -14366,7 +14421,7 @@ packages:
'@jest/test-result': 27.5.1
'@jest/transform': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
chalk: 4.1.2
emittery: 0.8.1
graceful-fs: 4.2.11
@@ -14423,7 +14478,7 @@ packages:
resolution: {integrity: sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
graceful-fs: 4.2.11
dev: true
@@ -14462,7 +14517,7 @@ packages:
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dependencies:
'@jest/types': 27.5.1
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
chalk: 4.1.2
ci-info: 3.9.0
graceful-fs: 4.2.11
@@ -14487,7 +14542,7 @@ packages:
dependencies:
'@jest/test-result': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
ansi-escapes: 4.3.2
chalk: 4.1.2
jest-util: 27.5.1
@@ -14498,7 +14553,7 @@ packages:
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
engines: {node: '>= 10.13.0'}
dependencies:
- '@types/node': 20.8.7
+ '@types/node': 20.9.0
merge-stream: 2.0.0
supports-color: 8.1.1
dev: true
@@ -14598,7 +14653,7 @@ packages:
optional: true
dependencies:
abab: 2.0.6
- acorn: 8.10.0
+ acorn: 8.11.2
acorn-globals: 6.0.0
cssom: 0.4.4
cssstyle: 2.3.0
@@ -15408,6 +15463,10 @@ packages:
resolution: {integrity: sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw==}
dev: true
+ /lodash.camelcase@4.3.0:
+ resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==}
+ dev: true
+
/lodash.debounce@4.0.8:
resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==}
dev: true
@@ -15516,6 +15575,11 @@ packages:
dev: true
optional: true
+ /lru-cache@10.1.0:
+ resolution: {integrity: sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==}
+ engines: {node: 14 || >=16.14}
+ dev: true
+
/lru-cache@3.2.0:
resolution: {integrity: sha512-91gyOKTc2k66UG6kHiH4h3S2eltcPwE1STVfMYC/NG+nZwf8IIuiamfmpGZjpbbxzSyEJaLC0tNSmhjlQUTJow==}
dependencies:
@@ -15813,6 +15877,17 @@ packages:
semaphore-async-await: 1.5.1
dev: true
+ /merkletreejs@0.3.11:
+ resolution: {integrity: sha512-LJKTl4iVNTndhL+3Uz/tfkjD0klIWsHlUzgtuNnNrsf7bAlXR30m+xYB7lHr5Z/l6e/yAIsr26Dabx6Buo4VGQ==}
+ engines: {node: '>= 7.6.0'}
+ dependencies:
+ bignumber.js: 9.1.2
+ buffer-reverse: 1.0.1
+ crypto-js: 4.2.0
+ treeify: 1.1.0
+ web3-utils: 1.10.3
+ dev: false
+
/methods@1.1.2:
resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==}
engines: {node: '>= 0.6'}
@@ -15822,7 +15897,6 @@ packages:
/micro-ftch@0.3.1:
resolution: {integrity: sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==}
- dev: true
/micromatch@3.1.10:
resolution: {integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==}
@@ -15959,6 +16033,13 @@ packages:
brace-expansion: 2.0.1
dev: true
+ /minimatch@9.0.3:
+ resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==}
+ engines: {node: '>=16 || 14 >=14.17'}
+ dependencies:
+ brace-expansion: 2.0.1
+ dev: true
+
/minimist-options@4.1.0:
resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==}
engines: {node: '>= 6'}
@@ -16589,7 +16670,6 @@ packages:
dependencies:
bn.js: 4.11.6
strip-hex-prefix: 1.0.0
- dev: true
/nwsapi@2.2.7:
resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==}
@@ -16777,6 +16857,16 @@ packages:
is-wsl: 2.2.0
dev: true
+ /open@9.1.0:
+ resolution: {integrity: sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==}
+ engines: {node: '>=14.16'}
+ dependencies:
+ default-browser: 4.0.0
+ define-lazy-prop: 3.0.0
+ is-inside-container: 1.0.0
+ is-wsl: 2.2.0
+ dev: true
+
/optionator@0.8.3:
resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==}
engines: {node: '>= 0.8.0'}
@@ -17106,6 +17196,14 @@ packages:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
dev: true
+ /path-scurry@1.10.1:
+ resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==}
+ engines: {node: '>=16 || 14 >=14.17'}
+ dependencies:
+ lru-cache: 10.1.0
+ minipass: 5.0.0
+ dev: true
+
/path-starts-with@2.0.1:
resolution: {integrity: sha512-wZ3AeiRBRlNwkdUxvBANh0+esnt38DLffHDujZyRHkqkaKHTglnY2EP5UX3b8rdeiSutgO4y9NEJwXezNP5vHg==}
engines: {node: '>=8'}
@@ -17614,11 +17712,6 @@ packages:
engines: {node: '>= 0.6.0'}
dev: true
- /progress@2.0.3:
- resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==}
- engines: {node: '>=0.4.0'}
- dev: true
-
/promise-inflight@1.0.1:
resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==}
peerDependencies:
@@ -18057,6 +18150,11 @@ packages:
strip-indent: 3.0.0
dev: true
+ /reduce-flatten@2.0.0:
+ resolution: {integrity: sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==}
+ engines: {node: '>=6'}
+ dev: true
+
/regenerate-unicode-properties@10.1.1:
resolution: {integrity: sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==}
engines: {node: '>=4'}
@@ -18280,6 +18378,10 @@ packages:
engines: {node: '>=8'}
dev: true
+ /resolve-pkg-maps@1.0.0:
+ resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
+ dev: true
+
/resolve-url@0.2.1:
resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==}
deprecated: https://github.com/lydell/resolve-url#deprecated
@@ -18435,6 +18537,13 @@ packages:
resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==}
dev: true
+ /run-applescript@5.0.0:
+ resolution: {integrity: sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==}
+ engines: {node: '>=12'}
+ dependencies:
+ execa: 5.1.1
+ dev: true
+
/run-parallel-limit@1.1.0:
resolution: {integrity: sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==}
dependencies:
@@ -18843,6 +18952,11 @@ packages:
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
dev: true
+ /signal-exit@4.1.0:
+ resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
+ engines: {node: '>=14'}
+ dev: true
+
/simple-concat@1.0.1:
resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==}
requiresBuild: true
@@ -19008,7 +19122,7 @@ packages:
- debug
dev: true
- /solhint@3.6.2(typescript@4.9.5):
+ /solhint@3.6.2(typescript@5.2.2):
resolution: {integrity: sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ==}
hasBin: true
dependencies:
@@ -19018,7 +19132,7 @@ packages:
ast-parents: 0.0.1
chalk: 4.1.2
commander: 10.0.1
- cosmiconfig: 8.3.6(typescript@4.9.5)
+ cosmiconfig: 8.3.6(typescript@5.2.2)
fast-diff: 1.3.0
glob: 8.1.0
ignore: 5.2.4
@@ -19041,13 +19155,13 @@ packages:
array.prototype.findlast: 1.2.3
dev: true
- /solidity-docgen@0.6.0-beta.35(hardhat@2.18.2):
- resolution: {integrity: sha512-9QdwK1THk/MWIdq1PEW/6dvtND0pUqpFTsbKwwU9YQIMYuRhH1lek9SsgnsGGYtdJ0VTrXXcVT30q20a8Y610A==}
+ /solidity-docgen@0.6.0-beta.36(hardhat@2.18.2):
+ resolution: {integrity: sha512-f/I5G2iJgU1h0XrrjRD0hHMr7C10u276vYvm//rw1TzFcYQ4xTOyAoi9oNAHRU0JU4mY9eTuxdVc2zahdMuhaQ==}
peerDependencies:
hardhat: ^2.8.0
dependencies:
handlebars: 4.7.8
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
solidity-ast: 0.4.52
dev: true
@@ -19284,6 +19398,10 @@ packages:
resolution: {integrity: sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==}
engines: {node: '>=4'}
+ /string-format@2.0.0:
+ resolution: {integrity: sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==}
+ dev: true
+
/string-length@4.0.2:
resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==}
engines: {node: '>=10'}
@@ -19329,6 +19447,15 @@ packages:
is-fullwidth-code-point: 3.0.0
strip-ansi: 6.0.1
+ /string-width@5.1.2:
+ resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==}
+ engines: {node: '>=12'}
+ dependencies:
+ eastasianwidth: 0.2.0
+ emoji-regex: 9.2.2
+ strip-ansi: 7.1.0
+ dev: true
+
/string.prototype.trim@1.2.8:
resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==}
engines: {node: '>= 0.4'}
@@ -19434,7 +19561,6 @@ packages:
engines: {node: '>=6.5.0', npm: '>=3'}
dependencies:
is-hex-prefixed: 1.0.0
- dev: true
/strip-indent@3.0.0:
resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==}
@@ -19545,8 +19671,8 @@ packages:
picocolors: 1.0.0
sade: 1.8.1
svelte: 3.59.2
- svelte-preprocess: 4.10.7(@babel/core@7.23.3)(node-sass@7.0.3)(postcss@8.4.31)(svelte@3.59.2)(typescript@4.9.5)
- typescript: 4.9.5
+ svelte-preprocess: 4.10.7(@babel/core@7.23.3)(node-sass@7.0.3)(postcss@8.4.31)(svelte@3.59.2)(typescript@5.2.2)
+ typescript: 5.2.2
transitivePeerDependencies:
- '@babel/core'
- coffeescript
@@ -19753,6 +19879,60 @@ packages:
typescript: 4.9.5
dev: true
+ /svelte-preprocess@4.10.7(@babel/core@7.23.3)(node-sass@7.0.3)(postcss@8.4.31)(svelte@3.59.2)(typescript@5.2.2):
+ resolution: {integrity: sha512-sNPBnqYD6FnmdBrUmBCaqS00RyCsCpj2BG58A1JBswNF7b0OKviwxqVrOL/CKyJrLSClrSeqQv5BXNg2RUbPOw==}
+ engines: {node: '>= 9.11.2'}
+ requiresBuild: true
+ peerDependencies:
+ '@babel/core': ^7.10.2
+ coffeescript: ^2.5.1
+ less: ^3.11.3 || ^4.0.0
+ node-sass: '*'
+ postcss: ^7 || ^8
+ postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0
+ pug: ^3.0.0
+ sass: ^1.26.8
+ stylus: ^0.55.0
+ sugarss: ^2.0.0
+ svelte: ^3.23.0
+ typescript: ^3.9.5 || ^4.0.0
+ peerDependenciesMeta:
+ '@babel/core':
+ optional: true
+ coffeescript:
+ optional: true
+ less:
+ optional: true
+ node-sass:
+ optional: true
+ postcss:
+ optional: true
+ postcss-load-config:
+ optional: true
+ pug:
+ optional: true
+ sass:
+ optional: true
+ stylus:
+ optional: true
+ sugarss:
+ optional: true
+ typescript:
+ optional: true
+ dependencies:
+ '@babel/core': 7.23.3
+ '@types/pug': 2.0.8
+ '@types/sass': 1.45.0
+ detect-indent: 6.1.0
+ magic-string: 0.25.9
+ node-sass: 7.0.3
+ postcss: 8.4.31
+ sorcery: 0.10.0
+ strip-indent: 3.0.0
+ svelte: 3.59.2
+ typescript: 5.2.2
+ dev: true
+
/svelte-preprocess@5.1.0(postcss@8.4.31)(svelte@4.2.3)(typescript@5.2.2):
resolution: {integrity: sha512-EkErPiDzHAc0k2MF5m6vBNmRUh338h2myhinUw/xaqsLs7/ZvsgREiLGj03VrSzbY/TB5ZXgBOsKraFee5yceA==}
engines: {node: '>= 14.10.0'}
@@ -19870,6 +20050,24 @@ packages:
get-port: 3.2.0
dev: true
+ /synckit@0.8.5:
+ resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==}
+ engines: {node: ^14.18.0 || >=16.0.0}
+ dependencies:
+ '@pkgr/utils': 2.4.2
+ tslib: 2.6.2
+ dev: true
+
+ /table-layout@1.0.2:
+ resolution: {integrity: sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==}
+ engines: {node: '>=8.0.0'}
+ dependencies:
+ array-back: 4.0.2
+ deep-extend: 0.6.0
+ typical: 5.2.0
+ wordwrapjs: 4.0.1
+ dev: true
+
/table@6.8.1:
resolution: {integrity: sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==}
engines: {node: '>=10.0.0'}
@@ -20156,6 +20354,11 @@ packages:
engines: {node: '>=14.0.0'}
dev: true
+ /titleize@3.0.0:
+ resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==}
+ engines: {node: '>=12'}
+ dev: true
+
/tmp@0.0.33:
resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==}
engines: {node: '>=0.6.0'}
@@ -20271,6 +20474,11 @@ packages:
punycode: 2.3.1
dev: true
+ /treeify@1.1.0:
+ resolution: {integrity: sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==}
+ engines: {node: '>=0.6'}
+ dev: false
+
/trim-newlines@3.0.1:
resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==}
engines: {node: '>=8'}
@@ -20309,24 +20517,34 @@ packages:
typescript: 5.2.2
dev: true
+ /ts-command-line-args@2.5.1:
+ resolution: {integrity: sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==}
+ hasBin: true
+ dependencies:
+ chalk: 4.1.2
+ command-line-args: 5.2.1
+ command-line-usage: 6.1.3
+ string-format: 2.0.0
+ dev: true
+
/ts-essentials@1.0.4:
resolution: {integrity: sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ==}
dev: true
- /ts-essentials@6.0.7(typescript@4.9.5):
+ /ts-essentials@6.0.7(typescript@5.2.2):
resolution: {integrity: sha512-2E4HIIj4tQJlIHuATRHayv0EfMGK3ris/GRk1E3CFnsZzeNV+hUmelbaTZHLtXaZppM5oLhHRtO04gINC4Jusw==}
peerDependencies:
typescript: '>=3.7.0'
dependencies:
- typescript: 4.9.5
+ typescript: 5.2.2
dev: true
- /ts-essentials@7.0.3(typescript@4.9.5):
+ /ts-essentials@7.0.3(typescript@5.2.2):
resolution: {integrity: sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==}
peerDependencies:
typescript: '>=3.7.0'
dependencies:
- typescript: 4.9.5
+ typescript: 5.2.2
dev: true
/ts-generator@0.1.1:
@@ -20339,7 +20557,7 @@ packages:
chalk: 2.4.2
glob: 7.2.3
mkdirp: 0.5.6
- prettier: 2.8.8
+ prettier: 2.7.1
resolve: 1.22.8
ts-essentials: 1.0.4
dev: true
@@ -20415,7 +20633,7 @@ packages:
code-block-writer: 12.0.0
dev: true
- /ts-node@10.9.1(@types/node@12.20.55)(typescript@4.9.5):
+ /ts-node@10.9.1(@types/node@20.9.0)(typescript@5.2.2):
resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
hasBin: true
peerDependencies:
@@ -20434,14 +20652,14 @@ packages:
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
- '@types/node': 12.20.55
+ '@types/node': 20.9.0
acorn: 8.10.0
acorn-walk: 8.2.0
arg: 4.1.3
create-require: 1.1.1
diff: 4.0.2
make-error: 1.3.6
- typescript: 4.9.5
+ typescript: 5.2.2
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
dev: true
@@ -20576,7 +20794,7 @@ packages:
/type@2.7.2:
resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==}
- /typechain@3.0.0(typescript@4.9.5):
+ /typechain@3.0.0(typescript@5.2.2):
resolution: {integrity: sha512-ft4KVmiN3zH4JUFu2WJBrwfHeDf772Tt2d8bssDTo/YcckKW2D+OwFrHXRC6hJvO3mHjFQTihoMV6fJOi0Hngg==}
hasBin: true
dependencies:
@@ -20585,30 +20803,30 @@ packages:
fs-extra: 7.0.1
js-sha3: 0.8.0
lodash: 4.17.21
- ts-essentials: 6.0.7(typescript@4.9.5)
+ ts-essentials: 6.0.7(typescript@5.2.2)
ts-generator: 0.1.1
transitivePeerDependencies:
- supports-color
- typescript
dev: true
- /typechain@5.2.0(typescript@4.9.5):
- resolution: {integrity: sha512-0INirvQ+P+MwJOeMct+WLkUE4zov06QxC96D+i3uGFEHoiSkZN70MKDQsaj8zkL86wQwByJReI2e7fOUwECFuw==}
+ /typechain@8.3.2(typescript@5.2.2):
+ resolution: {integrity: sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==}
hasBin: true
peerDependencies:
- typescript: '>=4.1.0'
+ typescript: '>=4.3.0'
dependencies:
'@types/prettier': 2.7.3
- command-line-args: 4.0.7
debug: 4.3.4(supports-color@8.1.1)
fs-extra: 7.0.1
- glob: 7.2.3
+ glob: 7.1.7
js-sha3: 0.8.0
lodash: 4.17.21
mkdirp: 1.0.4
- prettier: 2.8.8
- ts-essentials: 7.0.3(typescript@4.9.5)
- typescript: 4.9.5
+ prettier: 2.7.1
+ ts-command-line-args: 2.5.1
+ ts-essentials: 7.0.3(typescript@5.2.2)
+ typescript: 5.2.2
transitivePeerDependencies:
- supports-color
dev: true
@@ -20692,6 +20910,16 @@ packages:
resolution: {integrity: sha512-ofhi8kjIje6npGozTip9Fr8iecmYfEbS06i0JnIg+rh51KakryWF4+jX8lLKZVhy6N+ID45WYSFCxPOdTWCzNg==}
dev: true
+ /typical@4.0.0:
+ resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==}
+ engines: {node: '>=8'}
+ dev: true
+
+ /typical@5.2.0:
+ resolution: {integrity: sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==}
+ engines: {node: '>=8'}
+ dev: true
+
/ufo@1.3.1:
resolution: {integrity: sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==}
dev: true
@@ -20730,12 +20958,8 @@ packages:
dev: true
optional: true
- /undici-types@5.25.3:
- resolution: {integrity: sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==}
-
/undici-types@5.26.5:
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
- dev: true
/undici@5.26.4:
resolution: {integrity: sha512-OG+QOf0fTLtazL9P9X7yqWxQ+Z0395Wk6DSkyTxtaq3wQEjIroVe7Y4asCX/vcCxYpNGMnwz8F0qbRYUoaQVMw==}
@@ -20810,11 +21034,6 @@ packages:
engines: {node: '>= 4.0.0'}
dev: true
- /universalify@2.0.0:
- resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==}
- engines: {node: '>= 10.0.0'}
- dev: true
-
/universalify@2.0.1:
resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==}
engines: {node: '>= 10.0.0'}
@@ -20838,6 +21057,11 @@ packages:
isobject: 3.0.1
dev: true
+ /untildify@4.0.0:
+ resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==}
+ engines: {node: '>=8'}
+ dev: true
+
/update-browserslist-db@1.0.13(browserslist@4.22.1):
resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==}
hasBin: true
@@ -20922,7 +21146,6 @@ packages:
/utf8@3.0.0:
resolution: {integrity: sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==}
- dev: true
/util-deprecate@1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
@@ -20981,10 +21204,6 @@ packages:
resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==}
dev: true
- /v8-compile-cache@2.4.0:
- resolution: {integrity: sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==}
- dev: true
-
/v8-to-istanbul@8.1.1:
resolution: {integrity: sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==}
engines: {node: '>=10.12.0'}
@@ -21323,7 +21542,7 @@ packages:
resolution: {integrity: sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==}
dev: true
- /vue-loader@15.11.1(css-loader@6.8.1)(lodash@4.17.21)(prettier@2.8.8)(vue-template-compiler@2.7.14)(webpack@5.89.0):
+ /vue-loader@15.11.1(css-loader@6.8.1)(prettier@3.0.3)(vue-template-compiler@2.7.14)(webpack@5.89.0):
resolution: {integrity: sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==}
peerDependencies:
'@vue/compiler-sfc': ^3.0.8
@@ -21342,11 +21561,11 @@ packages:
vue-template-compiler:
optional: true
dependencies:
- '@vue/component-compiler-utils': 3.3.0(lodash@4.17.21)
+ '@vue/component-compiler-utils': 3.3.0
css-loader: 6.8.1(webpack@5.89.0)
hash-sum: 1.0.2
loader-utils: 1.4.2
- prettier: 2.8.8
+ prettier: 3.0.3
vue-hot-reload-api: 2.3.4
vue-style-loader: 4.1.3
vue-template-compiler: 2.7.14
@@ -21802,7 +22021,6 @@ packages:
number-to-bn: 1.7.0
randombytes: 2.1.0
utf8: 3.0.0
- dev: true
/web3-utils@1.2.11:
resolution: {integrity: sha512-3Tq09izhD+ThqHEaWYX4VOT7dNPdZiO+c/1QMA0s5X2lDFKK/xHJb7cyTRRVzN2LvlHbR7baS1tmQhSua51TcQ==}
@@ -22043,6 +22261,14 @@ packages:
resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==}
dev: true
+ /wordwrapjs@4.0.1:
+ resolution: {integrity: sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==}
+ engines: {node: '>=8.0.0'}
+ dependencies:
+ reduce-flatten: 2.0.0
+ typical: 5.2.0
+ dev: true
+
/workerpool@6.2.1:
resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==}
dev: true
@@ -22080,6 +22306,15 @@ packages:
strip-ansi: 6.0.1
dev: true
+ /wrap-ansi@8.1.0:
+ resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==}
+ engines: {node: '>=12'}
+ dependencies:
+ ansi-styles: 6.2.1
+ string-width: 5.1.2
+ strip-ansi: 7.1.0
+ dev: true
+
/wrappy@1.0.2:
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
@@ -22491,8 +22726,8 @@ packages:
react: 18.2.0
use-sync-external-store: 1.2.0(react@18.2.0)
- git@github.com+ethereumjs/ethereumjs-abi/ee3994657fa7a427238e6ba92a84d0b529bbcde0:
- resolution: {commit: ee3994657fa7a427238e6ba92a84d0b529bbcde0, repo: git@github.com:ethereumjs/ethereumjs-abi.git, type: git}
+ github.com/ethereumjs/ethereumjs-abi/ee3994657fa7a427238e6ba92a84d0b529bbcde0:
+ resolution: {tarball: https://codeload.github.com/ethereumjs/ethereumjs-abi/tar.gz/ee3994657fa7a427238e6ba92a84d0b529bbcde0}
name: ethereumjs-abi
version: 0.6.8
dependencies:
@@ -22519,7 +22754,7 @@ packages:
ghost-testrpc: 0.0.2
global-modules: 2.0.0
globby: 10.0.2
- hardhat: 2.18.2(ts-node@10.9.1)(typescript@4.9.5)
+ hardhat: 2.18.2(ts-node@10.9.1)(typescript@5.2.2)
jsonschema: 1.4.1
lodash: 4.17.21
mocha: 7.1.2