From f057d35b0b11c23c1541e2ba9cc923e2e035ddc7 Mon Sep 17 00:00:00 2001 From: Masanori Yoshida Date: Thu, 25 Apr 2024 16:07:20 +0900 Subject: [PATCH] TEST ONLY COMMIT --- pkg/relay/ethereum/chain.go | 11 +++++++++++ pkg/relay/ethereum/error_parse.go | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pkg/relay/ethereum/chain.go b/pkg/relay/ethereum/chain.go index 32dddef..70f68a2 100644 --- a/pkg/relay/ethereum/chain.go +++ b/pkg/relay/ethereum/chain.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "math/big" + "os" "time" "github.com/avast/retry-go" @@ -85,6 +86,16 @@ func NewChain(config ChainConfig) (*Chain, error) { if err != nil { return nil, fmt.Errorf("failed to create error repository: %v", err) } + + pwd, err := os.Getwd() + if err != nil { + panic(err) + } + fmt.Printf("!+!+! NewChain !+!+! pwd=%s\n", pwd) + for sel, errABI := range errorRepository { + fmt.Printf("!!!!! NewChain !!!!! known ABI: sel=%x, name=%s\n", sel, errABI.Name) + } + return &Chain{ config: config, client: client, diff --git a/pkg/relay/ethereum/error_parse.go b/pkg/relay/ethereum/error_parse.go index 459bb46..43403a0 100644 --- a/pkg/relay/ethereum/error_parse.go +++ b/pkg/relay/ethereum/error_parse.go @@ -77,7 +77,10 @@ func (r ErrorRepository) Get(errorData []byte) (abi.Error, error) { copy(sel[:], errorData[:4]) errABI, ok := r[sel] if !ok { - return abi.Error{}, fmt.Errorf("error ABI not found") + for sel, errABI := range r { + fmt.Printf("!!!!! Error ABI Not found !!!!! known ABI: sel=%x, name=%s\n", sel, errABI.Name) + } + return abi.Error{}, fmt.Errorf("error ABI not found: errorData=%x", errorData) } return errABI, nil }