mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 23:25:22 +00:00
Merge pull request #1820 from nspcc-dev/fix/nativetypes
native: use proper types in manifest
This commit is contained in:
commit
096f48caf0
3 changed files with 9 additions and 9 deletions
|
@ -123,18 +123,18 @@ func newNEO() *NEO {
|
|||
n.AddMethod(md, desc)
|
||||
|
||||
desc = newDescriptor("registerCandidate", smartcontract.BoolType,
|
||||
manifest.NewParameter("pubkey", smartcontract.ByteArrayType))
|
||||
manifest.NewParameter("pubkey", smartcontract.PublicKeyType))
|
||||
md = newMethodAndPrice(n.registerCandidate, 0, callflag.States)
|
||||
n.AddMethod(md, desc)
|
||||
|
||||
desc = newDescriptor("unregisterCandidate", smartcontract.BoolType,
|
||||
manifest.NewParameter("pubkey", smartcontract.ByteArrayType))
|
||||
manifest.NewParameter("pubkey", smartcontract.PublicKeyType))
|
||||
md = newMethodAndPrice(n.unregisterCandidate, 1<<16, callflag.States)
|
||||
n.AddMethod(md, desc)
|
||||
|
||||
desc = newDescriptor("vote", smartcontract.BoolType,
|
||||
manifest.NewParameter("account", smartcontract.Hash160Type),
|
||||
manifest.NewParameter("voteTo", smartcontract.ByteArrayType))
|
||||
manifest.NewParameter("voteTo", smartcontract.PublicKeyType))
|
||||
md = newMethodAndPrice(n.vote, 1<<16, callflag.States)
|
||||
n.AddMethod(md, desc)
|
||||
|
||||
|
|
|
@ -95,11 +95,11 @@ func newNonFungible(name string, id int32, symbol string, decimals byte) *nonfun
|
|||
md = newMethodAndPrice(n.Properties, 1<<15, callflag.ReadStates)
|
||||
n.AddMethod(md, desc)
|
||||
|
||||
desc = newDescriptor("tokens", smartcontract.AnyType)
|
||||
desc = newDescriptor("tokens", smartcontract.InteropInterfaceType)
|
||||
md = newMethodAndPrice(n.tokens, 1<<15, callflag.ReadStates)
|
||||
n.AddMethod(md, desc)
|
||||
|
||||
desc = newDescriptor("tokensOf", smartcontract.AnyType,
|
||||
desc = newDescriptor("tokensOf", smartcontract.InteropInterfaceType,
|
||||
manifest.NewParameter("owner", smartcontract.Hash160Type))
|
||||
md = newMethodAndPrice(n.tokensOf, 1<<15, callflag.ReadStates)
|
||||
n.AddMethod(md, desc)
|
||||
|
|
|
@ -19,12 +19,12 @@ var nep11Base = &Standard{
|
|||
Safe: true,
|
||||
},
|
||||
{
|
||||
Name: "tokensOf",
|
||||
ReturnType: smartcontract.AnyType, // Iterator
|
||||
Name: "tokensOf",
|
||||
Parameters: []manifest.Parameter{
|
||||
{Name: "owner", Type: smartcontract.Hash160Type},
|
||||
},
|
||||
Safe: true,
|
||||
ReturnType: smartcontract.InteropInterfaceType,
|
||||
Safe: true,
|
||||
},
|
||||
{
|
||||
Name: "transfer",
|
||||
|
@ -59,7 +59,7 @@ var nep11Base = &Standard{
|
|||
},
|
||||
{
|
||||
Name: "tokens",
|
||||
ReturnType: smartcontract.AnyType,
|
||||
ReturnType: smartcontract.InteropInterfaceType,
|
||||
Safe: true,
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue