public class PolicyContract extends ContractInterface
| Constructor and Description |
|---|
PolicyContract() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
blockAccount(byte[] scriptHash)
Blocks the account with the given script hash.
|
static int |
getExecFeeFactor()
Gets the fee factor used to calculate the GAS cost of contract executions.
|
static int |
getFeePerByte()
Gets the GAS cost per transaction byte, i.e.
|
static int |
getMaxBlockSize()
Gets the maximum block size.
|
static int |
getMaxBlockSystemFee()
Gets the maximum allowed system fee of all transactions in a block.
|
static int |
getMaxTransactionsPerBlock()
Gets the maximum allowed number of transactions per block.
|
static int |
getStoragePrice()
Gets the GAS price per byte of contract storage.
|
static boolean |
isBlocked(byte[] scriptHash)
Checks if the given account is blocked.
|
static boolean |
setExecFeeFactor(int factor)
Sets the fee factor used to calculate the GAS cost of contract executions.
|
static boolean |
setFeePerByte(long fee)
Sets the fee to be paid per transaction byte.
|
static boolean |
setMaxBlockSize(int size)
Sets the maximum block size to the given value.
|
static boolean |
setMaxBlockSystemFee(int fee)
Sets the maximum allowed system fee of all transactions in a block.
|
static boolean |
setMaxTransactionsPerBlock(int size)
Sets the maximum number of transactions per block.
|
static boolean |
setStoragePrice(int price)
Sets the GAS price per byte of contract storage.
|
static boolean |
unblockAccount(byte[] scriptHash)
Unblocks the account with the given script hash.
|
getHashpublic static int getMaxTransactionsPerBlock()
public static int getMaxBlockSize()
public static int getMaxBlockSystemFee()
public static int getFeePerByte()
public static boolean setMaxBlockSize(int size)
size - The desired block size.public static boolean setMaxTransactionsPerBlock(int size)
size - The desired number of transactions.public static boolean setMaxBlockSystemFee(int fee)
fee - The desired maximum fee.public static boolean setFeePerByte(long fee)
fee - The desired fee per bytepublic static boolean blockAccount(byte[] scriptHash)
scriptHash - The account to block.public static boolean unblockAccount(byte[] scriptHash)
scriptHash - The account to unblock.public static boolean isBlocked(byte[] scriptHash)
scriptHash - the script hash of the account.public static int getExecFeeFactor()
Each neo-vm instruction has a relative cost that is multiplied with this fee factor to result in the actual GAS cost.
public static boolean setExecFeeFactor(int factor)
Each neo-vm instruction has a relative cost that is multiplied with this fee factor to result in the actual GAS cost.
factor - The desired factor.public static int getStoragePrice()
public static boolean setStoragePrice(int price)
price - The desired price for one byte of storage.