Documentation ¶
Index ¶
- Variables
- func GetChainContractName(addr types.Address, methodSelector []byte) (string, bool, error)
- func IsChainContract(addr types.Address) bool
- type AirdropRewords
- func (ar *AirdropRewords) DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error)
- func (ar *AirdropRewords) DoReceive(ctx *vmstore.VMContext, block *types.StateBlock, input *types.StateBlock) ([]*ContractBlock, error)
- func (ar *AirdropRewords) DoSend(ctx *vmstore.VMContext, block *types.StateBlock) error
- func (ar *AirdropRewords) GetFee(ctx *vmstore.VMContext, block *types.StateBlock) (types.Balance, error)
- func (*AirdropRewords) GetRefundData() []byte
- type ChainContract
- type ConfidantRewards
- func (ar *ConfidantRewards) DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error)
- func (*ConfidantRewards) DoReceive(ctx *vmstore.VMContext, block *types.StateBlock, input *types.StateBlock) ([]*ContractBlock, error)
- func (*ConfidantRewards) DoSend(ctx *vmstore.VMContext, block *types.StateBlock) error
- func (*ConfidantRewards) GetFee(ctx *vmstore.VMContext, block *types.StateBlock) (types.Balance, error)
- func (*ConfidantRewards) GetRefundData() []byte
- type ContractBlock
- type MinerReward
- func (m *MinerReward) DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error)
- func (m *MinerReward) DoReceive(ctx *vmstore.VMContext, block, input *types.StateBlock) ([]*ContractBlock, error)
- func (m *MinerReward) DoSend(ctx *vmstore.VMContext, block *types.StateBlock) (err error)
- func (m *MinerReward) GetAllRewardInfos(ctx *vmstore.VMContext, coinbase types.Address) ([]*cabi.MinerRewardInfo, error)
- func (m *MinerReward) GetAvailRewardInfo(ctx *vmstore.VMContext, coinbase types.Address) (*cabi.MinerRewardInfo, error)
- func (m *MinerReward) GetFee(ctx *vmstore.VMContext, block *types.StateBlock) (types.Balance, error)
- func (m *MinerReward) GetMaxRewardInfo(ctx *vmstore.VMContext, coinbase types.Address) (*cabi.MinerRewardInfo, error)
- func (m *MinerReward) GetNodeRewardHeight(ctx *vmstore.VMContext) (uint64, error)
- func (m *MinerReward) GetRefundData() []byte
- type Mintage
- func (m *Mintage) DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error)
- func (m *Mintage) DoReceive(ctx *vmstore.VMContext, block *types.StateBlock, input *types.StateBlock) ([]*ContractBlock, error)
- func (m *Mintage) DoSend(ctx *vmstore.VMContext, block *types.StateBlock) error
- func (m *Mintage) GetFee(ctx *vmstore.VMContext, block *types.StateBlock) (types.Balance, error)
- func (m *Mintage) GetRefundData() []byte
- type Nep5Pledge
- func (*Nep5Pledge) DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error)
- func (*Nep5Pledge) DoReceive(ctx *vmstore.VMContext, block, input *types.StateBlock) ([]*ContractBlock, error)
- func (*Nep5Pledge) DoSend(ctx *vmstore.VMContext, block *types.StateBlock) error
- func (p *Nep5Pledge) GetFee(ctx *vmstore.VMContext, block *types.StateBlock) (types.Balance, error)
- func (*Nep5Pledge) GetRefundData() []byte
- type WithdrawMintage
- func (m *WithdrawMintage) DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error)
- func (m *WithdrawMintage) DoReceive(ctx *vmstore.VMContext, block, input *types.StateBlock) ([]*ContractBlock, error)
- func (m *WithdrawMintage) DoSend(ctx *vmstore.VMContext, block *types.StateBlock) error
- func (m *WithdrawMintage) GetFee(ctx *vmstore.VMContext, block *types.StateBlock) (types.Balance, error)
- func (m *WithdrawMintage) GetRefundData() []byte
- type WithdrawNep5Pledge
- func (m *WithdrawNep5Pledge) DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error)
- func (*WithdrawNep5Pledge) DoReceive(ctx *vmstore.VMContext, block, input *types.StateBlock) ([]*ContractBlock, error)
- func (*WithdrawNep5Pledge) DoSend(ctx *vmstore.VMContext, block *types.StateBlock) (err error)
- func (*WithdrawNep5Pledge) GetFee(ctx *vmstore.VMContext, block *types.StateBlock) (types.Balance, error)
- func (*WithdrawNep5Pledge) GetRefundData() []byte
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MinPledgeAmount = big.NewInt(5 * 1e13) // 50K QLC
)
Functions ¶
func GetChainContractName ¶ added in v1.2.0
func IsChainContract ¶
Types ¶
type AirdropRewords ¶ added in v1.2.0
type AirdropRewords struct { }
func (*AirdropRewords) DoPending ¶ added in v1.2.0
func (ar *AirdropRewords) DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error)
func (*AirdropRewords) DoReceive ¶ added in v1.2.0
func (ar *AirdropRewords) DoReceive(ctx *vmstore.VMContext, block *types.StateBlock, input *types.StateBlock) ([]*ContractBlock, error)
func (*AirdropRewords) DoSend ¶ added in v1.2.0
func (ar *AirdropRewords) DoSend(ctx *vmstore.VMContext, block *types.StateBlock) error
func (*AirdropRewords) GetFee ¶ added in v1.2.0
func (ar *AirdropRewords) GetFee(ctx *vmstore.VMContext, block *types.StateBlock) (types.Balance, error)
func (*AirdropRewords) GetRefundData ¶ added in v1.2.0
func (*AirdropRewords) GetRefundData() []byte
type ChainContract ¶
type ChainContract interface { GetFee(ctx *vmstore.VMContext, block *types.StateBlock) (types.Balance, error) // DoSend verify or update StateBlock.Data DoSend(ctx *vmstore.VMContext, block *types.StateBlock) error // DoPending generate pending info from send block DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error) // check status, update state DoReceive(ctx *vmstore.VMContext, block *types.StateBlock, input *types.StateBlock) ([]*ContractBlock, error) // refund data at receive error GetRefundData() []byte }
func GetChainContract ¶
type ConfidantRewards ¶ added in v1.2.0
type ConfidantRewards struct { }
func (*ConfidantRewards) DoPending ¶ added in v1.2.0
func (ar *ConfidantRewards) DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error)
func (*ConfidantRewards) DoReceive ¶ added in v1.2.0
func (*ConfidantRewards) DoReceive(ctx *vmstore.VMContext, block *types.StateBlock, input *types.StateBlock) ([]*ContractBlock, error)
func (*ConfidantRewards) DoSend ¶ added in v1.2.0
func (*ConfidantRewards) DoSend(ctx *vmstore.VMContext, block *types.StateBlock) error
func (*ConfidantRewards) GetFee ¶ added in v1.2.0
func (*ConfidantRewards) GetFee(ctx *vmstore.VMContext, block *types.StateBlock) (types.Balance, error)
func (*ConfidantRewards) GetRefundData ¶ added in v1.2.0
func (*ConfidantRewards) GetRefundData() []byte
type ContractBlock ¶
type ContractBlock struct { VMContext *vmstore.VMContext Block *types.StateBlock ToAddress types.Address BlockType types.BlockType Amount types.Balance Token types.Hash Data []byte }
ContractBlock generated by contract
type MinerReward ¶ added in v1.2.3
type MinerReward struct{}
func (*MinerReward) DoPending ¶ added in v1.2.3
func (m *MinerReward) DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error)
func (*MinerReward) DoReceive ¶ added in v1.2.3
func (m *MinerReward) DoReceive(ctx *vmstore.VMContext, block, input *types.StateBlock) ([]*ContractBlock, error)
func (*MinerReward) DoSend ¶ added in v1.2.3
func (m *MinerReward) DoSend(ctx *vmstore.VMContext, block *types.StateBlock) (err error)
func (*MinerReward) GetAllRewardInfos ¶ added in v1.2.3
func (m *MinerReward) GetAllRewardInfos(ctx *vmstore.VMContext, coinbase types.Address) ([]*cabi.MinerRewardInfo, error)
func (*MinerReward) GetAvailRewardInfo ¶ added in v1.2.3
func (m *MinerReward) GetAvailRewardInfo(ctx *vmstore.VMContext, coinbase types.Address) (*cabi.MinerRewardInfo, error)
func (*MinerReward) GetFee ¶ added in v1.2.3
func (m *MinerReward) GetFee(ctx *vmstore.VMContext, block *types.StateBlock) (types.Balance, error)
func (*MinerReward) GetMaxRewardInfo ¶ added in v1.2.3
func (m *MinerReward) GetMaxRewardInfo(ctx *vmstore.VMContext, coinbase types.Address) (*cabi.MinerRewardInfo, error)
func (*MinerReward) GetNodeRewardHeight ¶ added in v1.2.3
func (m *MinerReward) GetNodeRewardHeight(ctx *vmstore.VMContext) (uint64, error)
func (*MinerReward) GetRefundData ¶ added in v1.2.3
func (m *MinerReward) GetRefundData() []byte
type Mintage ¶
type Mintage struct{}
func (*Mintage) DoPending ¶ added in v1.2.0
func (m *Mintage) DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error)
func (*Mintage) DoReceive ¶
func (m *Mintage) DoReceive(ctx *vmstore.VMContext, block *types.StateBlock, input *types.StateBlock) ([]*ContractBlock, error)
TODO: verify input block timestamp
func (*Mintage) GetRefundData ¶
type Nep5Pledge ¶ added in v1.1.0
type Nep5Pledge struct { }
func (*Nep5Pledge) DoPending ¶ added in v1.2.0
func (*Nep5Pledge) DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error)
func (*Nep5Pledge) DoReceive ¶ added in v1.1.0
func (*Nep5Pledge) DoReceive(ctx *vmstore.VMContext, block, input *types.StateBlock) ([]*ContractBlock, error)
func (*Nep5Pledge) DoSend ¶ added in v1.1.0
func (*Nep5Pledge) DoSend(ctx *vmstore.VMContext, block *types.StateBlock) error
check pledge chain coin - address is normal user address - small than min pledge amount transfer quota to beneficial address
func (*Nep5Pledge) GetFee ¶ added in v1.1.0
func (p *Nep5Pledge) GetFee(ctx *vmstore.VMContext, block *types.StateBlock) (types.Balance, error)
func (*Nep5Pledge) GetRefundData ¶ added in v1.1.0
func (*Nep5Pledge) GetRefundData() []byte
type WithdrawMintage ¶
type WithdrawMintage struct{}
func (*WithdrawMintage) DoPending ¶ added in v1.2.0
func (m *WithdrawMintage) DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error)
func (*WithdrawMintage) DoReceive ¶
func (m *WithdrawMintage) DoReceive(ctx *vmstore.VMContext, block, input *types.StateBlock) ([]*ContractBlock, error)
func (*WithdrawMintage) DoSend ¶
func (m *WithdrawMintage) DoSend(ctx *vmstore.VMContext, block *types.StateBlock) error
func (*WithdrawMintage) GetFee ¶
func (m *WithdrawMintage) GetFee(ctx *vmstore.VMContext, block *types.StateBlock) (types.Balance, error)
func (*WithdrawMintage) GetRefundData ¶
func (m *WithdrawMintage) GetRefundData() []byte
type WithdrawNep5Pledge ¶ added in v1.1.0
type WithdrawNep5Pledge struct { }
func (*WithdrawNep5Pledge) DoPending ¶ added in v1.2.0
func (m *WithdrawNep5Pledge) DoPending(block *types.StateBlock) (*types.PendingKey, *types.PendingInfo, error)
func (*WithdrawNep5Pledge) DoReceive ¶ added in v1.1.0
func (*WithdrawNep5Pledge) DoReceive(ctx *vmstore.VMContext, block, input *types.StateBlock) ([]*ContractBlock, error)
func (*WithdrawNep5Pledge) DoSend ¶ added in v1.1.0
func (*WithdrawNep5Pledge) DoSend(ctx *vmstore.VMContext, block *types.StateBlock) (err error)
func (*WithdrawNep5Pledge) GetFee ¶ added in v1.1.0
func (*WithdrawNep5Pledge) GetFee(ctx *vmstore.VMContext, block *types.StateBlock) (types.Balance, error)
func (*WithdrawNep5Pledge) GetRefundData ¶ added in v1.1.0
func (*WithdrawNep5Pledge) GetRefundData() []byte
Source Files ¶
Click to show internal directories.
Click to hide internal directories.