forked from TrueCloudLab/neoneo-go
d89f055697
It can be annoying to use parameter names as specified by standard, so a separate `CheckABI` is supported.
44 lines
1.1 KiB
Go
44 lines
1.1 KiB
Go
package standard
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest"
|
|
)
|
|
|
|
var nep17 = &Standard{
|
|
Base: decimalTokenBase,
|
|
Manifest: manifest.Manifest{
|
|
ABI: manifest.ABI{
|
|
Methods: []manifest.Method{
|
|
{
|
|
Name: "balanceOf",
|
|
Parameters: []manifest.Parameter{
|
|
{Name: "account", Type: smartcontract.Hash160Type},
|
|
},
|
|
ReturnType: smartcontract.IntegerType,
|
|
Safe: true,
|
|
},
|
|
{
|
|
Name: "transfer",
|
|
Parameters: []manifest.Parameter{
|
|
{Name: "from", Type: smartcontract.Hash160Type},
|
|
{Name: "to", Type: smartcontract.Hash160Type},
|
|
{Name: "amount", Type: smartcontract.IntegerType},
|
|
{Name: "data", Type: smartcontract.AnyType},
|
|
},
|
|
ReturnType: smartcontract.BoolType,
|
|
},
|
|
},
|
|
Events: []manifest.Event{
|
|
{
|
|
Name: "Transfer",
|
|
Parameters: []manifest.Parameter{
|
|
{Name: "from", Type: smartcontract.Hash160Type},
|
|
{Name: "to", Type: smartcontract.Hash160Type},
|
|
{Name: "amount", Type: smartcontract.IntegerType},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|