diff --git a/pkg/core/native/native_neo.go b/pkg/core/native/native_neo.go index 2dfd4b2f6..65024ee12 100644 --- a/pkg/core/native/native_neo.go +++ b/pkg/core/native/native_neo.go @@ -77,30 +77,30 @@ func NewNEO() *NEO { desc := newDescriptor("unclaimedGas", smartcontract.IntegerType, manifest.NewParameter("account", smartcontract.Hash160Type), manifest.NewParameter("end", smartcontract.IntegerType)) - md := newMethodAndPrice(n.unclaimedGas, 1, smartcontract.NoneFlag) + md := newMethodAndPrice(n.unclaimedGas, 1, smartcontract.AllowStates) n.AddMethod(md, desc, true) desc = newDescriptor("registerValidator", smartcontract.BoolType, manifest.NewParameter("pubkey", smartcontract.PublicKeyType)) - md = newMethodAndPrice(n.registerValidator, 1, smartcontract.NoneFlag) + md = newMethodAndPrice(n.registerValidator, 1, smartcontract.AllowModifyStates) n.AddMethod(md, desc, false) desc = newDescriptor("vote", smartcontract.BoolType, manifest.NewParameter("account", smartcontract.Hash160Type), manifest.NewParameter("pubkeys", smartcontract.ArrayType)) - md = newMethodAndPrice(n.vote, 1, smartcontract.NoneFlag) + md = newMethodAndPrice(n.vote, 1, smartcontract.AllowModifyStates) n.AddMethod(md, desc, false) desc = newDescriptor("getRegisteredValidators", smartcontract.ArrayType) - md = newMethodAndPrice(n.getRegisteredValidatorsCall, 1, smartcontract.NoneFlag) + md = newMethodAndPrice(n.getRegisteredValidatorsCall, 1, smartcontract.AllowStates) n.AddMethod(md, desc, true) desc = newDescriptor("getValidators", smartcontract.ArrayType) - md = newMethodAndPrice(n.getValidators, 1, smartcontract.NoneFlag) + md = newMethodAndPrice(n.getValidators, 1, smartcontract.AllowStates) n.AddMethod(md, desc, true) desc = newDescriptor("getNextBlockValidators", smartcontract.ArrayType) - md = newMethodAndPrice(n.getNextBlockValidators, 1, smartcontract.NoneFlag) + md = newMethodAndPrice(n.getNextBlockValidators, 1, smartcontract.AllowStates) n.AddMethod(md, desc, true) return n diff --git a/pkg/core/native/native_nep5.go b/pkg/core/native/native_nep5.go index 66d9fbd3d..ada5bbf43 100644 --- a/pkg/core/native/native_nep5.go +++ b/pkg/core/native/native_nep5.go @@ -61,12 +61,12 @@ func newNEP5Native(name string) *nep5TokenNative { n.AddMethod(md, desc, true) desc = newDescriptor("totalSupply", smartcontract.IntegerType) - md = newMethodAndPrice(n.TotalSupply, 1, smartcontract.NoneFlag) + md = newMethodAndPrice(n.TotalSupply, 1, smartcontract.AllowStates) n.AddMethod(md, desc, true) desc = newDescriptor("balanceOf", smartcontract.IntegerType, manifest.NewParameter("account", smartcontract.Hash160Type)) - md = newMethodAndPrice(n.balanceOf, 1, smartcontract.NoneFlag) + md = newMethodAndPrice(n.balanceOf, 1, smartcontract.AllowStates) n.AddMethod(md, desc, true) desc = newDescriptor("transfer", smartcontract.BoolType, @@ -74,7 +74,7 @@ func newNEP5Native(name string) *nep5TokenNative { manifest.NewParameter("to", smartcontract.Hash160Type), manifest.NewParameter("amount", smartcontract.IntegerType), ) - md = newMethodAndPrice(n.Transfer, 1, smartcontract.NoneFlag) + md = newMethodAndPrice(n.Transfer, 1, smartcontract.AllowModifyStates) n.AddMethod(md, desc, false) n.AddEvent("Transfer", desc.Parameters...)