native: use proper types in manifest
This commit is contained in:
parent
75ec20b8bd
commit
1cb25d3190
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)
|
||||
|
|
|
@ -20,10 +20,10 @@ var nep11Base = &Standard{
|
|||
},
|
||||
{
|
||||
Name: "tokensOf",
|
||||
ReturnType: smartcontract.AnyType, // Iterator
|
||||
Parameters: []manifest.Parameter{
|
||||
{Name: "owner", Type: smartcontract.Hash160Type},
|
||||
},
|
||||
ReturnType: smartcontract.InteropInterfaceType,
|
||||
Safe: true,
|
||||
},
|
||||
{
|
||||
|
@ -59,7 +59,7 @@ var nep11Base = &Standard{
|
|||
},
|
||||
{
|
||||
Name: "tokens",
|
||||
ReturnType: smartcontract.AnyType,
|
||||
ReturnType: smartcontract.InteropInterfaceType,
|
||||
Safe: true,
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue