Skip to content

Commit

Permalink
feat(eventindexer): bindings update (#16714)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey authored Apr 12, 2024
1 parent 3cd7cce commit a9df68c
Show file tree
Hide file tree
Showing 6 changed files with 361 additions and 209 deletions.
186 changes: 88 additions & 98 deletions packages/eventindexer/TaikoL1.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,63 +80,6 @@
"internalType": "uint32"
}
]
},
{
"name": "ts_",
"type": "tuple",
"internalType": "struct TaikoData.TransitionState",
"components": [
{
"name": "key",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "blockHash",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "stateRoot",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "prover",
"type": "address",
"internalType": "address"
},
{
"name": "validityBond",
"type": "uint96",
"internalType": "uint96"
},
{
"name": "contester",
"type": "address",
"internalType": "address"
},
{
"name": "contestBond",
"type": "uint96",
"internalType": "uint96"
},
{
"name": "timestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "tier",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "contestations",
"type": "uint8",
"internalType": "uint8"
}
]
}
],
"stateMutability": "view"
Expand Down Expand Up @@ -268,6 +211,82 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getTransition",
"inputs": [
{
"name": "_blockId",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "_tid",
"type": "uint32",
"internalType": "uint32"
}
],
"outputs": [
{
"name": "",
"type": "tuple",
"internalType": "struct TaikoData.TransitionState",
"components": [
{
"name": "key",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "blockHash",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "stateRoot",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "prover",
"type": "address",
"internalType": "address"
},
{
"name": "validityBond",
"type": "uint96",
"internalType": "uint96"
},
{
"name": "contester",
"type": "address",
"internalType": "address"
},
{
"name": "contestBond",
"type": "uint96",
"internalType": "uint96"
},
{
"name": "timestamp",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "tier",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "__reserved1",
"type": "uint8",
"internalType": "uint8"
}
]
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getTransition",
Expand Down Expand Up @@ -335,7 +354,7 @@
"internalType": "uint16"
},
{
"name": "contestations",
"name": "__reserved1",
"type": "uint8",
"internalType": "uint8"
}
Expand Down Expand Up @@ -1180,12 +1199,6 @@
"indexed": true,
"internalType": "uint256"
},
{
"name": "assignedProver",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "prover",
"type": "address",
Expand All @@ -1209,12 +1222,6 @@
"type": "uint16",
"indexed": false,
"internalType": "uint16"
},
{
"name": "contestations",
"type": "uint8",
"indexed": false,
"internalType": "uint8"
}
],
"anonymous": false
Expand All @@ -1229,12 +1236,6 @@
"indexed": true,
"internalType": "uint256"
},
{
"name": "assignedProver",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "prover",
"type": "address",
Expand All @@ -1258,12 +1259,6 @@
"type": "uint16",
"indexed": false,
"internalType": "uint16"
},
{
"name": "contestations",
"type": "uint8",
"indexed": false,
"internalType": "uint8"
}
],
"anonymous": false
Expand Down Expand Up @@ -1780,16 +1775,6 @@
"name": "L1_ALREADY_PROVED",
"inputs": []
},
{
"type": "error",
"name": "L1_ASSIGNED_PROVER_NOT_ALLOWED",
"inputs": []
},
{
"type": "error",
"name": "L1_ASSIGNED_PROVER_NOT_ALLOWED",
"inputs": []
},
{
"type": "error",
"name": "L1_BLOB_NOT_AVAILABLE",
Expand Down Expand Up @@ -1827,7 +1812,7 @@
},
{
"type": "error",
"name": "L1_BLOCK_MISMATCH",
"name": "L1_CANNOT_CONTEST",
"inputs": []
},
{
Expand Down Expand Up @@ -1860,6 +1845,16 @@
"name": "L1_INVALID_CONFIG",
"inputs": []
},
{
"type": "error",
"name": "L1_INVALID_GENESIS_HASH",
"inputs": []
},
{
"type": "error",
"name": "L1_INVALID_GENESIS_HASH",
"inputs": []
},
{
"type": "error",
"name": "L1_INVALID_HOOK",
Expand Down Expand Up @@ -1975,11 +1970,6 @@
"name": "L1_TOO_MANY_BLOCKS",
"inputs": []
},
{
"type": "error",
"name": "L1_TOO_MANY_TIERS",
"inputs": []
},
{
"type": "error",
"name": "L1_TRANSITION_ID_ZERO",
Expand Down
26 changes: 13 additions & 13 deletions packages/eventindexer/contracts/assignmenthook/AssignmentHook.go

Large diffs are not rendered by default.

167 changes: 166 additions & 1 deletion packages/eventindexer/contracts/bridge/Bridge.go

Large diffs are not rendered by default.

187 changes: 92 additions & 95 deletions packages/eventindexer/contracts/taikol1/TaikoL1.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/eventindexer/indexer/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func filterFunc(
})

wg.Go(func() error {
blockVerifiedEvents, err := i.taikol1.FilterBlockVerified(filterOpts, nil, nil, nil)
blockVerifiedEvents, err := i.taikol1.FilterBlockVerified(filterOpts, nil, nil)
if err != nil {
return errors.Wrap(err, "i.taikol1.FilterBlockVerified")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (i *Indexer) updateAverageProofTime(ctx context.Context, event *taikol1.Tai
return errors.Wrap(err, "i.statRepo.Find")
}

proposedAt := block.Blk.ProposedAt
proposedAt := block.ProposedAt

provenAt := eventBlock.Time()

Expand Down

0 comments on commit a9df68c

Please sign in to comment.