From 6f5a42facf441ef6ce108ee1555d07ea3eea366f Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 24 Jun 2020 00:05:27 +0300 Subject: [PATCH] smartcontract: correctly encode/decode AnyType It might get emitted with notifications. --- pkg/smartcontract/parameter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/smartcontract/parameter.go b/pkg/smartcontract/parameter.go index c4dfe7fc5..56072d16a 100644 --- a/pkg/smartcontract/parameter.go +++ b/pkg/smartcontract/parameter.go @@ -212,7 +212,7 @@ func (p *Parameter) EncodeBinary(w *io.BinWriter) { w.WriteBytes(p.Value.(util.Uint160).BytesBE()) case Hash256Type: w.WriteBytes(p.Value.(util.Uint256).BytesBE()) - case InteropInterfaceType: + case InteropInterfaceType, AnyType: default: w.Err = fmt.Errorf("unknown type: %x", p.Type) } @@ -251,7 +251,7 @@ func (p *Parameter) DecodeBinary(r *io.BinReader) { var u util.Uint256 r.ReadBytes(u[:]) p.Value = u - case InteropInterfaceType: + case InteropInterfaceType, AnyType: default: r.Err = fmt.Errorf("unknown type: %x", p.Type) }