Skip to content

Commit

Permalink
native: fix ContractManagement's call flags for update/deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-khimov committed Jan 31, 2022
1 parent 37ca96c commit 9b5f699
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/mr-tron/base58 v1.2.0
github.com/nspcc-dev/dbft v0.0.0-20210721160347-1b03241391ac
github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220120102126-25583f9aeb13
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220131192108-37ca96c20bf7
github.com/nspcc-dev/neofs-sdk-go v0.0.0-20220113123743-7f3162110659
github.com/nspcc-dev/rfc6979 v0.2.0
github.com/pierrec/lz4 v2.6.1+incompatible
Expand Down
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,8 @@ github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y=
github.com/nspcc-dev/hrw v1.0.9/go.mod h1:l/W2vx83vMQo6aStyx2AuZrJ+07lGv2JQGlVkPG06MU=
github.com/nspcc-dev/neo-go v0.73.1-pre.0.20200303142215-f5a1b928ce09/go.mod h1:pPYwPZ2ks+uMnlRLUyXOpLieaDQSEaf4NM3zHVbRjmg=
github.com/nspcc-dev/neo-go v0.98.0/go.mod h1:E3cc1x6RXSXrJb2nDWXTXjnXk3rIqVN8YdFyWv+FrqM=
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220120102126-25583f9aeb13 h1:BxsNxxydtTVG8CsD5vc+h5w+ir0YMmoNOjX0MpvmAy8=
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220120102126-25583f9aeb13/go.mod h1:/zA6GVDzpSkwq8/HQJxPWDcvfn2BbZnahUO9A1wAevM=
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220120102126-25583f9aeb13/go.mod h1:/zA6GVDzpSkwq8/HQJxPWDcvfn2BbZnahUO9A1wAevM=
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220131192108-37ca96c20bf7 h1:8PxWk/d0NKfv5vU2Q0hdaDpocQvR7qxPDsIHQwFR79M=
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220131192108-37ca96c20bf7/go.mod h1:QBE0I30F2kOAISNpT5oks82yF4wkkUq3SCfI3Hqgx/Y=
github.com/nspcc-dev/neofs-api-go/v2 v2.11.0-pre.0.20211201134523-3604d96f3fe1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs=
github.com/nspcc-dev/neofs-api-go/v2 v2.11.1 h1:SVqc523pZsSaS9vnPS1mm3VV6b6xY0gvdA0uYJ/GWZQ=
github.com/nspcc-dev/neofs-api-go/v2 v2.11.1/go.mod h1:oS8dycEh8PPf2Jjp6+8dlwWyEv2Dy77h/XhhcdxYEFs=
Expand Down
8 changes: 4 additions & 4 deletions pkg/core/native/management.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9b5f699

Please sign in to comment.