public class NeoToken extends Nep17Token
| Modifier and Type | Class and Description |
|---|---|
static class |
NeoToken.Candidate
Represents a validator candidate.
|
| Constructor and Description |
|---|
NeoToken() |
| Modifier and Type | Method and Description |
|---|---|
static NeoToken.Candidate[] |
getCandidates()
Gets the registered candidates.
|
static java.lang.String[] |
getCommittee()
Gets the public keys of the current committee members.
|
static int |
getGasPerBlock()
Gets the amount of GAS that is minted per newly generated block.
|
static java.lang.String[] |
getNextBlockValidators()
Gets the public keys of the validators that will validate the upcoming block.
|
static boolean |
registerCandidate(byte[] publicKey)
Registers the given public key as a validator candidate.
|
static boolean |
setGasPerBlock(int gasPerBlock)
Sets the amount of GAS that should be minted per newly generated block.
|
static int |
unclaimedGas(byte[] scriptHash,
int blockHeight)
Gets the amount of unclaimed GAS for the given account up the the given block number.
|
static boolean |
unregisterCandidate(byte[] publicKey)
Unregisters the given public key from the list of validator candidates.
|
static boolean |
vote(byte[] scriptHash,
byte[] candidatePubKey)
Casts a vote for the candidate with the given public key.
|
balanceOf, decimals, symbol, totalSupply, transfergetHashpublic static int unclaimedGas(byte[] scriptHash,
int blockHeight)
scriptHash - The script hash of the account to get the unclaimed GAS amount for.blockHeight - The block height up to which the GAS amount will be fetched.public static boolean registerCandidate(byte[] publicKey)
publicKey - The public key of the candidate.public static boolean unregisterCandidate(byte[] publicKey)
publicKey - The public key of the candidate.public static boolean vote(byte[] scriptHash,
byte[] candidatePubKey)
Note, that a witness (signature) of the account corresponding to the public key has to be available for this to work.
scriptHash - The script hash of the account that is used to cast the vote.candidatePubKey - The public key of the candidate to vote for.public static NeoToken.Candidate[] getCandidates()
public static java.lang.String[] getCommittee()
public static java.lang.String[] getNextBlockValidators()
public static int getGasPerBlock()
public static boolean setGasPerBlock(int gasPerBlock)
gasPerBlock - The desired amount of GAS per block.