From 4f1c50373f89f90ea1de50b49601d81522d98c72 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Mon, 17 May 2021 20:12:19 +0300 Subject: [PATCH] core: detalize errors during contract.LoadToken and contract.Call --- pkg/core/interop/contract/call.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/core/interop/contract/call.go b/pkg/core/interop/contract/call.go index 45963931b..620f849fc 100644 --- a/pkg/core/interop/contract/call.go +++ b/pkg/core/interop/contract/call.go @@ -32,7 +32,7 @@ func LoadToken(ic *interop.Context) func(id int32) error { } cs, err := ic.GetContract(tok.Hash) if err != nil { - return fmt.Errorf("contract not found: %w", err) + return fmt.Errorf("token contract %s not found: %w", tok.Hash.StringLE(), err) } return callInternal(ic, cs, tok.Method, tok.CallFlag, tok.HasReturn, args) } @@ -53,7 +53,7 @@ func Call(ic *interop.Context) error { } cs, err := ic.GetContract(u) if err != nil { - return fmt.Errorf("contract not found: %w", err) + return fmt.Errorf("called contract %s not found: %w", u.StringLE(), err) } if strings.HasPrefix(method, "_") { return errors.New("invalid method name (starts with '_')")