From d5a9af5860af39034bde47ddbb2c42c1af2a6c16 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Mon, 21 Mar 2022 14:28:28 +0300 Subject: [PATCH] Revert "Revert "interop: use All flags for management deploy and update calls"" This reverts commit 526c423a615299533d59d6419134c1eee42b172e, heading to 3.2.0. --- pkg/core/native/management.go | 8 ++++---- pkg/interop/native/management/management.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/core/native/management.go b/pkg/core/native/management.go index a4b11a6f7..6e0d3c836 100644 --- a/pkg/core/native/management.go +++ b/pkg/core/native/management.go @@ -80,27 +80,27 @@ func newManagement() *Management { desc = newDescriptor("deploy", smartcontract.ArrayType, manifest.NewParameter("nefFile", smartcontract.ByteArrayType), manifest.NewParameter("manifest", smartcontract.ByteArrayType)) - md = newMethodAndPrice(m.deploy, 0, callflag.States|callflag.AllowNotify) + md = newMethodAndPrice(m.deploy, 0, callflag.All) m.AddMethod(md, desc) desc = newDescriptor("deploy", smartcontract.ArrayType, manifest.NewParameter("nefFile", smartcontract.ByteArrayType), manifest.NewParameter("manifest", smartcontract.ByteArrayType), manifest.NewParameter("data", smartcontract.AnyType)) - md = newMethodAndPrice(m.deployWithData, 0, callflag.States|callflag.AllowNotify) + md = newMethodAndPrice(m.deployWithData, 0, callflag.All) m.AddMethod(md, desc) desc = newDescriptor("update", smartcontract.VoidType, manifest.NewParameter("nefFile", smartcontract.ByteArrayType), manifest.NewParameter("manifest", smartcontract.ByteArrayType)) - md = newMethodAndPrice(m.update, 0, callflag.States|callflag.AllowNotify) + md = newMethodAndPrice(m.update, 0, callflag.All) m.AddMethod(md, desc) desc = newDescriptor("update", smartcontract.VoidType, manifest.NewParameter("nefFile", smartcontract.ByteArrayType), manifest.NewParameter("manifest", smartcontract.ByteArrayType), manifest.NewParameter("data", smartcontract.AnyType)) - md = newMethodAndPrice(m.updateWithData, 0, callflag.States|callflag.AllowNotify) + md = newMethodAndPrice(m.updateWithData, 0, callflag.All) m.AddMethod(md, desc) desc = newDescriptor("destroy", smartcontract.VoidType) diff --git a/pkg/interop/native/management/management.go b/pkg/interop/native/management/management.go index 617e153fd..ff967c77b 100644 --- a/pkg/interop/native/management/management.go +++ b/pkg/interop/native/management/management.go @@ -16,13 +16,13 @@ const Hash = "\xfd\xa3\xfa\x43\x46\xea\x53\x2a\x25\x8f\xc4\x97\xdd\xad\xdb\x64\x // Deploy represents `deploy` method of Management native contract. func Deploy(script, manifest []byte) *Contract { return neogointernal.CallWithToken(Hash, "deploy", - int(contract.States|contract.AllowNotify), script, manifest).(*Contract) + int(contract.All), script, manifest).(*Contract) } // DeployWithData represents `deploy` method of Management native contract. func DeployWithData(script, manifest []byte, data interface{}) *Contract { return neogointernal.CallWithToken(Hash, "deploy", - int(contract.States|contract.AllowNotify), script, manifest, data).(*Contract) + int(contract.All), script, manifest, data).(*Contract) } // Destroy represents `destroy` method of Management native contract. @@ -48,11 +48,11 @@ func SetMinimumDeploymentFee(value int) { // Update represents `update` method of Management native contract. func Update(script, manifest []byte) { neogointernal.CallWithTokenNoRet(Hash, "update", - int(contract.States|contract.AllowNotify), script, manifest) + int(contract.All), script, manifest) } // UpdateWithData represents `update` method of Management native contract. func UpdateWithData(script, manifest []byte, data interface{}) { neogointernal.CallWithTokenNoRet(Hash, "update", - int(contract.States|contract.AllowNotify), script, manifest, data) + int(contract.All), script, manifest, data) }