From 74e8b0af58f5bf964965a0fabd1a5054334a2fba Mon Sep 17 00:00:00 2001 From: David Date: Fri, 19 Jan 2024 21:33:54 +0800 Subject: [PATCH] feat(bindings): update `assigmentHook` signing based on protocol updates --- bindings/encoding/input.go | 6 ++++++ bindings/encoding/struct.go | 15 ++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/bindings/encoding/input.go b/bindings/encoding/input.go index ef7e73345..486f70af6 100644 --- a/bindings/encoding/input.go +++ b/bindings/encoding/input.go @@ -168,6 +168,10 @@ var ( Name: "metaHash", Type: "bytes32", }, + { + Name: "parentMetaHash", + Type: "bytes32", + }, { Name: "tierFees", Type: "tuple[]", @@ -246,6 +250,7 @@ var ( {Name: "taikoAddress", Type: addressType}, {Name: "assignmentHookAddress", Type: addressType}, {Name: "metaHash", Type: bytes32Type}, + {Name: "parentMetaHash", Type: bytes32Type}, {Name: "blobHash", Type: bytes32Type}, {Name: "assignment.feeToken", Type: addressType}, {Name: "assignment.expiry", Type: uint64Type}, @@ -335,6 +340,7 @@ func EncodeProverAssignmentPayload( taikoAddress, assignmentHookAddress, common.Hash{}, + common.Hash{}, txListHash, feeToken, expiry, diff --git a/bindings/encoding/struct.go b/bindings/encoding/struct.go index f882ee1fd..0da33ffb5 100644 --- a/bindings/encoding/struct.go +++ b/bindings/encoding/struct.go @@ -65,13 +65,14 @@ type TierFee struct { // ProverAssignment should be same with TaikoData.ProverAssignment. type ProverAssignment struct { - FeeToken common.Address - Expiry uint64 - MaxBlockId uint64 // nolint: revive,stylecheck - MaxProposedIn uint64 - MetaHash [32]byte - TierFees []TierFee - Signature []byte + FeeToken common.Address + Expiry uint64 + MaxBlockId uint64 // nolint: revive,stylecheck + MaxProposedIn uint64 + MetaHash [32]byte + ParentMetaHash [32]byte + TierFees []TierFee + Signature []byte } // AssignmentHookInput should be same as AssignmentHook.Input