Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SysAPITransfer : deal with transfer type transaction. SysAPITransfer = "transfer" // SysAPIDeposit : deal with deposit type transaction. SysAPIDeposit = "deposit" // SysAPIWithdraw : deal with withdraw type transaction. SysAPIWithdraw = "withdraw" // SysAPIReward : deal with reward type transaction. SysAPIReward = "reward" // SysAPIDeploy : deal with deploy type transaction. SysAPIDeploy = "deploy" // SysAPIBinding : deal with binding type transaction. SysAPIBinding = "binding" )
Variables ¶
View Source
var ( // MinerRewardAmount proposes block reward. MinerRewardAmount = new(big.Int).SetUint64(5e18) // StorageRewardAmount node service reward. StorageRewardAmount = new(big.Int).SetUint64(3e18) // SysAPIAddress is should be immutable. SysAPIAddress = multivacaddress.GenerateAddress(signature.PublicKey([]byte{}), multivacaddress.SystemContractAddress) )
Functions ¶
This section is empty.
Types ¶
type BindingParams ¶
type BindingParams struct { *TransferParams BindingAddress multivacaddress.Address }
BindingParams is the params of binding trasaction See docs.md to get more details of binding transaction
type DeployParams ¶
type DeployParams struct { APIList []string // Store the init code , it will be builded by VM and create shard data outputs which index is 1 Init []byte // Store the smart contract code, it will be builded by VM Code []byte }
DeployParams is the parameter of a smart contract deployment.
type DepositParams ¶
type DepositParams struct { *TransferParams BindingAddress multivacaddress.Address }
DepositParams is the parameter of deposit transaction.
type RewardParams ¶
type RewardParams struct { To multivacaddress.Address Amount *big.Int }
RewardParams is the parameter of reward transaction.
type TransferParams ¶
TransferParams is the parameter of normal transaction.
func (TransferParams) GetAmount ¶
func (tp TransferParams) GetAmount() *big.Int
GetAmount get tp's amount.
func (TransferParams) GetShard ¶
func (tp TransferParams) GetShard() shard.Index
GetShard get the shard of tp.
func (TransferParams) GetTo ¶
func (tp TransferParams) GetTo() multivacaddress.Address
GetTo get the To address.
type TxParameter ¶
type TxParameter interface { GetTo() multivacaddress.Address GetShard() shard.Index GetAmount() *big.Int }
TxParameter specifies the parameter of a transaction.
type WithdrawParams ¶
type WithdrawParams struct {
*TransferParams
}
WithdrawParams is the parameter of withdraw transaction.
Click to show internal directories.
Click to hide internal directories.