From 9d500b86fc5227b500dd03a3cb5d4a465dbd413b Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 12 Mar 2021 13:10:24 +0300 Subject: [PATCH] context: s/hex/data/ for JSON See neo-project/neo#2394. --- pkg/smartcontract/context/context.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/smartcontract/context/context.go b/pkg/smartcontract/context/context.go index 55fa39aa4..560b60639 100644 --- a/pkg/smartcontract/context/context.go +++ b/pkg/smartcontract/context/context.go @@ -36,7 +36,7 @@ type ParameterContext struct { type paramContext struct { Type string `json:"type"` Net uint32 `json:"network"` - Hex []byte `json:"hex"` + Data []byte `json:"data"` Items map[string]json.RawMessage `json:"items"` } @@ -170,7 +170,7 @@ func (c ParameterContext) MarshalJSON() ([]byte, error) { pc := ¶mContext{ Type: c.Type, Net: uint32(c.Network), - Hex: verif, + Data: verif, Items: items, } return json.Marshal(pc) @@ -192,7 +192,7 @@ func (c *ParameterContext) UnmarshalJSON(data []byte) error { default: return fmt.Errorf("unsupported type: %s", c.Type) } - err := verif.DecodeSignedPart(pc.Hex) + err := verif.DecodeSignedPart(pc.Data) if err != nil { return err }