mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-11 05:30:07 +00:00
64b603b056
Make Comply* functions useful and expose standard definitions for some reuse.
45 lines
1.1 KiB
Go
45 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"
|
|
)
|
|
|
|
// Nep17 is a NEP-17 Standard.
|
|
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},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|