Skip to content

Commit

Permalink
feat(taiko-client): integrate ProverSet in client (#17253)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Wang <[email protected]>
Co-authored-by: Daniel Wang <[email protected]>
Co-authored-by: dantaik <[email protected]>
Co-authored-by: Gavin Yu <[email protected]>
  • Loading branch information
5 people authored May 21, 2024
1 parent fbdb7c0 commit f086850
Show file tree
Hide file tree
Showing 41 changed files with 2,457 additions and 1,699 deletions.
2 changes: 1 addition & 1 deletion packages/taiko-client/bindings/.githead
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b90b932f29e6a933625d973bc32c2f0a1c6908e4
e36d5b7708b11b14e811f066fb7302a15fd7c24a
9 changes: 4 additions & 5 deletions packages/taiko-client/bindings/encoding/custom_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,10 @@ func getErrorData(err error) string {
return errData
}
}

// Hardhat node custom errors, example:
// "VM Exception while processing transaction: reverted with an unrecognized custom error (return data: 0xb6d363fd)"
if strings.Contains(err.Error(), "reverted with an unrecognized custom error") {
return err.Error()[len(err.Error())-11 : len(err.Error())-1]
// Anvil node custom errors, example:
// "execution reverted: custom error 712eb087:"
if strings.Contains(err.Error(), "custom error") {
return "0x" + err.Error()[len(err.Error())-9:len(err.Error())-1]
}

return err.Error()
Expand Down
6 changes: 6 additions & 0 deletions packages/taiko-client/bindings/encoding/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ var (
AssignmentHookABI *abi.ABI
SGXVerifierABI *abi.ABI
GuardianVerifierABI *abi.ABI
ProverSetABI *abi.ABI

customErrorMaps []map[string]abi.Error
)
Expand Down Expand Up @@ -301,6 +302,10 @@ func init() {
log.Crit("Get GuardianVerifier ABI error", "error", err)
}

if ProverSetABI, err = bindings.ProverSetMetaData.GetAbi(); err != nil {
log.Crit("Get ProverSet ABI error", "error", err)
}

customErrorMaps = []map[string]abi.Error{
TaikoL1ABI.Errors,
TaikoL2ABI.Errors,
Expand All @@ -312,6 +317,7 @@ func init() {
AssignmentHookABI.Errors,
SGXVerifierABI.Errors,
GuardianVerifierABI.Errors,
ProverSetABI.Errors,
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/taiko-client/bindings/gen_address_manager.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f086850

Please sign in to comment.