2021-02-19 10:48:45 +00:00
|
|
|
package standard
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest"
|
|
|
|
)
|
|
|
|
|
2022-10-26 18:23:12 +00:00
|
|
|
// Nep11Payable contains NEP-11's onNEP11Payment method definition.
|
|
|
|
var Nep11Payable = &Standard{
|
2021-02-19 10:48:45 +00:00
|
|
|
Manifest: manifest.Manifest{
|
|
|
|
ABI: manifest.ABI{
|
|
|
|
Methods: []manifest.Method{{
|
|
|
|
Name: manifest.MethodOnNEP11Payment,
|
|
|
|
Parameters: []manifest.Parameter{
|
|
|
|
{Name: "from", Type: smartcontract.Hash160Type},
|
|
|
|
{Name: "amount", Type: smartcontract.IntegerType},
|
|
|
|
{Name: "tokenid", Type: smartcontract.ByteArrayType},
|
2021-05-05 10:22:26 +00:00
|
|
|
{Name: "data", Type: smartcontract.AnyType},
|
2021-02-19 10:48:45 +00:00
|
|
|
},
|
|
|
|
ReturnType: smartcontract.VoidType,
|
|
|
|
}},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2022-10-26 18:23:12 +00:00
|
|
|
// Nep17Payable contains NEP-17's onNEP17Payment method definition.
|
|
|
|
var Nep17Payable = &Standard{
|
2021-02-19 10:48:45 +00:00
|
|
|
Manifest: manifest.Manifest{
|
|
|
|
ABI: manifest.ABI{
|
|
|
|
Methods: []manifest.Method{{
|
|
|
|
Name: manifest.MethodOnNEP17Payment,
|
|
|
|
Parameters: []manifest.Parameter{
|
|
|
|
{Name: "from", Type: smartcontract.Hash160Type},
|
|
|
|
{Name: "amount", Type: smartcontract.IntegerType},
|
|
|
|
{Name: "data", Type: smartcontract.AnyType},
|
|
|
|
},
|
|
|
|
ReturnType: smartcontract.VoidType,
|
|
|
|
}},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|