public abstract class Nep17Token extends ContractInterface
ContractHash annotation to create an "interface" to a NEP-17 token contract on the Neo
blockchain. Examples are the NeoToken and GasToken contracts.| Constructor and Description |
|---|
Nep17Token() |
| Modifier and Type | Method and Description |
|---|---|
static int |
balanceOf(byte[] scriptHash)
Gets the token balance of the given account.
|
static int |
decimals()
Gets the number of decimals of this token.
|
static java.lang.String |
symbol()
Gets the symbol of this token.
|
static int |
totalSupply()
Gets the total supply of this token.
|
static boolean |
transfer(byte[] from,
byte[] to,
int amount,
java.lang.Object data)
Transfers the token
amount from the from account to the to account. |
getHashpublic static java.lang.String symbol()
public static int decimals()
public static int totalSupply()
public static int balanceOf(byte[] scriptHash)
scriptHash - The script hash of the account to get the balance for.public static boolean transfer(byte[] from,
byte[] to,
int amount,
java.lang.Object data)
amount from the from account to the to account.
The data is passed along with the call. For example, if the to account is a
contract it is provided as an argument to the contract's onPayment method.from - The hash of the payment originator.to - The hash of the receiver.amount - The token amount to transfer.data - The data to pass along with the transfer.