Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterCodec(cdc *amino.Codec)
- type TxDeposit
- func (tx TxDeposit) CalcGas() btypes.BigInt
- func (tx TxDeposit) Exec(ctx context.Context) (result btypes.Result, crossTxQcp *txs.TxQcp)
- func (tx TxDeposit) GetGasPayer() btypes.Address
- func (tx TxDeposit) GetSignData() (ret []byte)
- func (tx TxDeposit) GetSigner() []btypes.Address
- func (tx TxDeposit) ValidateData(ctx context.Context) error
- type TxModifyInflation
- func (tx TxModifyInflation) CalcGas() btypes.BigInt
- func (tx TxModifyInflation) Exec(ctx context.Context) (result btypes.Result, crossTxQcp *txs.TxQcp)
- func (tx TxModifyInflation) GetGasPayer() btypes.Address
- func (tx TxModifyInflation) GetSignData() (ret []byte)
- func (tx TxModifyInflation) GetSigner() []btypes.Address
- func (tx TxModifyInflation) ValidateData(ctx context.Context) error
- type TxParameterChange
- func (tx TxParameterChange) CalcGas() btypes.BigInt
- func (tx TxParameterChange) Exec(ctx context.Context) (result btypes.Result, crossTxQcp *txs.TxQcp)
- func (tx TxParameterChange) GetGasPayer() btypes.Address
- func (tx TxParameterChange) GetSignData() (ret []byte)
- func (tx TxParameterChange) GetSigner() []btypes.Address
- func (tx TxParameterChange) ValidateData(ctx context.Context) error
- type TxProposal
- func (tx TxProposal) CalcGas() btypes.BigInt
- func (tx TxProposal) Exec(ctx context.Context) (result btypes.Result, crossTxQcp *txs.TxQcp)
- func (tx TxProposal) GetGasPayer() btypes.Address
- func (tx TxProposal) GetSignData() (ret []byte)
- func (tx TxProposal) GetSigner() []btypes.Address
- func (tx TxProposal) ValidateData(ctx context.Context) error
- type TxSoftwareUpgrade
- func (tx TxSoftwareUpgrade) CalcGas() btypes.BigInt
- func (tx TxSoftwareUpgrade) Exec(ctx context.Context) (result btypes.Result, crossTxQcp *txs.TxQcp)
- func (tx TxSoftwareUpgrade) GetGasPayer() btypes.Address
- func (tx TxSoftwareUpgrade) GetSignData() (ret []byte)
- func (tx TxSoftwareUpgrade) GetSigner() []btypes.Address
- func (tx TxSoftwareUpgrade) ValidateData(ctx context.Context) error
- type TxTaxUsage
- func (tx TxTaxUsage) CalcGas() btypes.BigInt
- func (tx TxTaxUsage) Exec(ctx context.Context) (result btypes.Result, crossTxQcp *txs.TxQcp)
- func (tx TxTaxUsage) GetGasPayer() btypes.Address
- func (tx TxTaxUsage) GetSignData() (ret []byte)
- func (tx TxTaxUsage) GetSigner() []btypes.Address
- func (tx TxTaxUsage) ValidateData(ctx context.Context) error
- type TxVote
- func (tx TxVote) CalcGas() btypes.BigInt
- func (tx TxVote) Exec(ctx context.Context) (result btypes.Result, crossTxQcp *txs.TxQcp)
- func (tx TxVote) GetGasPayer() btypes.Address
- func (tx TxVote) GetSignData() (ret []byte)
- func (tx TxVote) GetSigner() []btypes.Address
- func (tx TxVote) ValidateData(ctx context.Context) error
Constants ¶
View Source
const ( MaxTitleLen = 200 MaxDescriptionLen = 1000 )
Variables ¶
View Source
var Cdc = baseabci.MakeQBaseCodec()
Functions ¶
func RegisterCodec ¶
Types ¶
type TxDeposit ¶
type TxDeposit struct {
ProposalID uint64 `json:"proposal_id"` // ID of the proposal
Depositor btypes.Address `json:"depositor"` // Address of the depositor
Amount uint64 `json:"amount"` // Percent of QOS to add to the proposal's deposit
}
func NewTxDeposit ¶
func (TxDeposit) GetGasPayer ¶
func (TxDeposit) GetSignData ¶
type TxModifyInflation ¶
type TxModifyInflation struct {
TxProposal
TotalAmount uint64 `json:"total_amount"` // 总发行量
InflationPhrases mint.InflationPhrases `json:"inflation_phrases"` // 通胀阶段
}
func NewTxModifyInflation ¶
func NewTxModifyInflation(title, description string, proposer btypes.Address, deposit uint64, totalAmount uint64, phrases []mint.InflationPhrase) *TxModifyInflation
func (TxModifyInflation) CalcGas ¶
func (tx TxModifyInflation) CalcGas() btypes.BigInt
func (TxModifyInflation) GetGasPayer ¶
func (tx TxModifyInflation) GetGasPayer() btypes.Address
func (TxModifyInflation) GetSignData ¶
func (tx TxModifyInflation) GetSignData() (ret []byte)
func (TxModifyInflation) GetSigner ¶
func (tx TxModifyInflation) GetSigner() []btypes.Address
func (TxModifyInflation) ValidateData ¶
func (tx TxModifyInflation) ValidateData(ctx context.Context) error
type TxParameterChange ¶
type TxParameterChange struct {
TxProposal
Params []types.Param `json:"params"`
}
func NewTxParameterChange ¶
func (TxParameterChange) CalcGas ¶
func (tx TxParameterChange) CalcGas() btypes.BigInt
func (TxParameterChange) GetGasPayer ¶
func (tx TxParameterChange) GetGasPayer() btypes.Address
func (TxParameterChange) GetSignData ¶
func (tx TxParameterChange) GetSignData() (ret []byte)
func (TxParameterChange) GetSigner ¶
func (tx TxParameterChange) GetSigner() []btypes.Address
func (TxParameterChange) ValidateData ¶
func (tx TxParameterChange) ValidateData(ctx context.Context) error
type TxProposal ¶
type TxProposal struct {
Title string `json:"title"` // Title of the proposal
Description string `json:"description"` // Description of the proposal
ProposalType types.ProposalType `json:"proposal_type"` // Type of proposal. Initial set {PlainTextProposal, SoftwareUpgradeProposal}
Proposer btypes.Address `json:"proposer"` // Address of the proposer
InitialDeposit uint64 `json:"initial_deposit"` // Initial deposit paid by sender. Must be strictly positive.
}
func NewTxProposal ¶
func NewTxProposal(title, description string, proposer btypes.Address, deposit uint64) *TxProposal
func (TxProposal) CalcGas ¶
func (tx TxProposal) CalcGas() btypes.BigInt
func (TxProposal) GetGasPayer ¶
func (tx TxProposal) GetGasPayer() btypes.Address
func (TxProposal) GetSignData ¶
func (tx TxProposal) GetSignData() (ret []byte)
func (TxProposal) GetSigner ¶
func (tx TxProposal) GetSigner() []btypes.Address
func (TxProposal) ValidateData ¶
func (tx TxProposal) ValidateData(ctx context.Context) error
type TxSoftwareUpgrade ¶
type TxSoftwareUpgrade struct {
TxProposal
Version string `json:"version"` // qosd version
DataHeight uint64 `json:"data_height"` // data version
GenesisFile string `json:"genesis_file"` // url of genesis file
GenesisMD5 string `json:"genesis_md5"` // signature of genesis.json
ForZeroHeight bool `json:"for_zero_height"` // restart from zero height
}
func NewTxSoftwareUpgrade ¶
func (TxSoftwareUpgrade) CalcGas ¶
func (tx TxSoftwareUpgrade) CalcGas() btypes.BigInt
func (TxSoftwareUpgrade) GetGasPayer ¶
func (tx TxSoftwareUpgrade) GetGasPayer() btypes.Address
func (TxSoftwareUpgrade) GetSignData ¶
func (tx TxSoftwareUpgrade) GetSignData() (ret []byte)
func (TxSoftwareUpgrade) GetSigner ¶
func (tx TxSoftwareUpgrade) GetSigner() []btypes.Address
func (TxSoftwareUpgrade) ValidateData ¶
func (tx TxSoftwareUpgrade) ValidateData(ctx context.Context) error
type TxTaxUsage ¶
type TxTaxUsage struct {
TxProposal
DestAddress btypes.Address `json:"dest_address"`
Percent qtypes.Dec `json:"percent"`
}
func NewTxTaxUsage ¶
func (TxTaxUsage) CalcGas ¶
func (tx TxTaxUsage) CalcGas() btypes.BigInt
func (TxTaxUsage) GetGasPayer ¶
func (tx TxTaxUsage) GetGasPayer() btypes.Address
func (TxTaxUsage) GetSignData ¶
func (tx TxTaxUsage) GetSignData() (ret []byte)
func (TxTaxUsage) GetSigner ¶
func (tx TxTaxUsage) GetSigner() []btypes.Address
func (TxTaxUsage) ValidateData ¶
func (tx TxTaxUsage) ValidateData(ctx context.Context) error
type TxVote ¶
type TxVote struct {
ProposalID uint64 `json:"proposal_id"` // ID of the proposal
Voter btypes.Address `json:"voter"` // address of the voter
Option types.VoteOption `json:"option"` // option from OptionSet chosen by the voter
}
func (TxVote) GetGasPayer ¶
func (TxVote) GetSignData ¶
Click to show internal directories.
Click to hide internal directories.