From 98580ae9b44430a821f46ea75bfa28ab1f4aca78 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Thu, 18 Feb 2021 17:26:24 +0300 Subject: [PATCH] transaction: always JSONize all contract fields for Publish tx --- pkg/core/transaction/publish.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/core/transaction/publish.go b/pkg/core/transaction/publish.go index 1cd89fa96..f9811e759 100644 --- a/pkg/core/transaction/publish.go +++ b/pkg/core/transaction/publish.go @@ -67,18 +67,18 @@ func (tx *PublishTX) EncodeBinary(bw *io.BinWriter) { // publishedContract is a JSON wrapper for PublishTransaction type publishedContract struct { Code publishedCode `json:"code"` - NeedStorage bool `json:"needstorage,omitempty"` - Name string `json:"name,omitempty"` - CodeVersion string `json:"version,omitempty"` - Author string `json:"author,omitempty"` - Email string `json:"email,omitempty"` - Description string `json:"description,omitempty"` + NeedStorage bool `json:"needstorage"` + Name string `json:"name"` + CodeVersion string `json:"version"` + Author string `json:"author"` + Email string `json:"email"` + Description string `json:"description"` } // publishedCode is a JSON wrapper for PublishTransaction Code type publishedCode struct { - Hash util.Uint160 `json:"hash,omitempty"` - Script string `json:"script,omitempty"` - ParamList []smartcontract.ParamType `json:"parameters,omitempty"` - ReturnType smartcontract.ParamType `json:"returntype,omitempty"` + Hash util.Uint160 `json:"hash"` + Script string `json:"script"` + ParamList []smartcontract.ParamType `json:"parameters"` + ReturnType smartcontract.ParamType `json:"returntype"` }