github.com/nspcc-dev/neo-go@v0.105.2-0.20240517133400-6be757af3eba/pkg/smartcontract/manifest/standard/nep17.go (about)

     1  package standard
     2  
     3  import (
     4  	"github.com/nspcc-dev/neo-go/pkg/smartcontract"
     5  	"github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest"
     6  )
     7  
     8  // Nep17 is a NEP-17 Standard.
     9  var Nep17 = &Standard{
    10  	Base: DecimalTokenBase,
    11  	Manifest: manifest.Manifest{
    12  		ABI: manifest.ABI{
    13  			Methods: []manifest.Method{
    14  				{
    15  					Name: "balanceOf",
    16  					Parameters: []manifest.Parameter{
    17  						{Name: "account", Type: smartcontract.Hash160Type},
    18  					},
    19  					ReturnType: smartcontract.IntegerType,
    20  					Safe:       true,
    21  				},
    22  				{
    23  					Name: "transfer",
    24  					Parameters: []manifest.Parameter{
    25  						{Name: "from", Type: smartcontract.Hash160Type},
    26  						{Name: "to", Type: smartcontract.Hash160Type},
    27  						{Name: "amount", Type: smartcontract.IntegerType},
    28  						{Name: "data", Type: smartcontract.AnyType},
    29  					},
    30  					ReturnType: smartcontract.BoolType,
    31  				},
    32  			},
    33  			Events: []manifest.Event{
    34  				{
    35  					Name: "Transfer",
    36  					Parameters: []manifest.Parameter{
    37  						{Name: "from", Type: smartcontract.Hash160Type},
    38  						{Name: "to", Type: smartcontract.Hash160Type},
    39  						{Name: "amount", Type: smartcontract.IntegerType},
    40  					},
    41  				},
    42  			},
    43  		},
    44  	},
    45  }