core: rename call flags

Also new States flag is added and ReadOnly flag is adjusted.
This commit is contained in:
Anna Shaleva 2020-12-11 10:34:01 +03:00
parent 3bbf7642ea
commit fadbae8997
16 changed files with 95 additions and 91 deletions

View file

@ -111,11 +111,11 @@ func newOracle() *Oracle {
manifest.NewParameter("callback", smartcontract.StringType),
manifest.NewParameter("userData", smartcontract.AnyType),
manifest.NewParameter("gasForResponse", smartcontract.IntegerType))
md := newMethodAndPrice(o.request, oracleRequestPrice, smartcontract.AllowModifyStates)
md := newMethodAndPrice(o.request, oracleRequestPrice, smartcontract.WriteStates)
o.AddMethod(md, desc)
desc = newDescriptor("finish", smartcontract.VoidType)
md = newMethodAndPrice(o.finish, 0, smartcontract.AllowModifyStates)
md = newMethodAndPrice(o.finish, 0, smartcontract.WriteStates)
o.AddMethod(md, desc)
desc = newDescriptor("verify", smartcontract.BoolType)
@ -124,11 +124,11 @@ func newOracle() *Oracle {
pp := chainOnPersist(postPersistBase, o.PostPersist)
desc = newDescriptor("postPersist", smartcontract.VoidType)
md = newMethodAndPrice(getOnPersistWrapper(pp), 0, smartcontract.AllowModifyStates)
md = newMethodAndPrice(getOnPersistWrapper(pp), 0, smartcontract.WriteStates)
o.AddMethod(md, desc)
desc = newDescriptor("onPersist", smartcontract.VoidType)
md = newMethodAndPrice(getOnPersistWrapper(onPersistBase), 0, smartcontract.AllowModifyStates)
md = newMethodAndPrice(getOnPersistWrapper(onPersistBase), 0, smartcontract.WriteStates)
o.AddMethod(md, desc)
o.AddEvent("OracleRequest", manifest.NewParameter("Id", smartcontract.IntegerType),