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.AccAddress
- func (tx TxDeposit) GetSignData() (ret []byte)
- func (tx TxDeposit) GetSigner() []btypes.AccAddress
- 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.AccAddress
- func (tx TxModifyInflation) GetSignData() (ret []byte)
- func (tx TxModifyInflation) GetSigner() []btypes.AccAddress
- func (tx TxModifyInflation) ValidateData(ctx context.Context) error
- func (tx TxModifyInflation) ValidateInputs() 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.AccAddress
- func (tx TxParameterChange) GetSignData() (ret []byte)
- func (tx TxParameterChange) GetSigner() []btypes.AccAddress
- 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.AccAddress
- func (tx TxProposal) GetSignData() (ret []byte)
- func (tx TxProposal) GetSigner() []btypes.AccAddress
- func (tx TxProposal) ValidateData(ctx context.Context) error
- func (tx TxProposal) ValidateInputs() 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.AccAddress
- func (tx TxSoftwareUpgrade) GetSignData() (ret []byte)
- func (tx TxSoftwareUpgrade) GetSigner() []btypes.AccAddress
- func (tx TxSoftwareUpgrade) ValidateData(ctx context.Context) error
- func (tx TxSoftwareUpgrade) ValidateInputs() 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.AccAddress
- func (tx TxTaxUsage) GetSignData() (ret []byte)
- func (tx TxTaxUsage) GetSigner() []btypes.AccAddress
- func (tx TxTaxUsage) ValidateData(ctx context.Context) error
- func (tx TxTaxUsage) ValidateInputs() 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.AccAddress
- func (tx TxVote) GetSignData() (ret []byte)
- func (tx TxVote) GetSigner() []btypes.AccAddress
- func (tx TxVote) ValidateData(ctx context.Context) error
- func (tx TxVote) ValidateInputs() error
Constants ¶
View Source
const ( MaxTitleLen = 200 MaxDescriptionLen = 1000 )
Variables ¶
View Source
var Cdc = baseabci.MakeQBaseCodec()
Functions ¶
func RegisterCodec ¶
func RegisterCodec(cdc *amino.Codec)
Types ¶
type TxDeposit ¶
type TxDeposit struct { ProposalID int64 `json:"proposal_id"` // ID of the proposal Depositor btypes.AccAddress `json:"depositor"` // Address of the depositor Amount btypes.BigInt `json:"amount"` // Amount of QOS to add to the proposal's deposit }
提议质押
func NewTxDeposit ¶
func (TxDeposit) GetGasPayer ¶
func (tx TxDeposit) GetGasPayer() btypes.AccAddress
Gas payer, Depositor
type TxModifyInflation ¶
type TxModifyInflation struct { TxProposal TotalAmount btypes.BigInt `json:"total_amount"` // 总发行量 InflationPhrases mint.InflationPhrases `json:"inflation_phrases"` // 通胀阶段 }
修改通胀提议,已结束和当前通胀阶段不可更改
func NewTxModifyInflation ¶
func NewTxModifyInflation(title, description string, proposer btypes.AccAddress, deposit btypes.BigInt, totalAmount btypes.BigInt, phrases []mint.InflationPhrase) *TxModifyInflation
func (TxModifyInflation) GetGasPayer ¶
func (tx TxModifyInflation) GetGasPayer() btypes.AccAddress
Gas payer
func (TxModifyInflation) GetSigner ¶
func (tx TxModifyInflation) GetSigner() []btypes.AccAddress
签名账户, Proposer
func (TxModifyInflation) ValidateData ¶
func (tx TxModifyInflation) ValidateData(ctx context.Context) error
数据检验
func (TxModifyInflation) ValidateInputs ¶ added in v0.0.8
func (tx TxModifyInflation) ValidateInputs() error
基础数据检验
type TxParameterChange ¶
type TxParameterChange struct { TxProposal // 基础数据 Params []types.Param `json:"params"` // 参数变更 }
参数修改提议
func NewTxParameterChange ¶
func NewTxParameterChange(title, description string, proposer btypes.AccAddress, deposit btypes.BigInt, params []types.Param) *TxParameterChange
func (TxParameterChange) GetGasPayer ¶
func (tx TxParameterChange) GetGasPayer() btypes.AccAddress
Gas payer
func (TxParameterChange) GetSigner ¶
func (tx TxParameterChange) GetSigner() []btypes.AccAddress
签名账户, Proposer
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.AccAddress `json:"proposer"` // Address of the proposer InitialDeposit btypes.BigInt `json:"initial_deposit"` // Initial deposit paid by sender. Must be strictly positive. }
文本提议
func NewTxProposal ¶
func NewTxProposal(title, description string, proposer btypes.AccAddress, deposit btypes.BigInt) *TxProposal
func (TxProposal) GetGasPayer ¶
func (tx TxProposal) GetGasPayer() btypes.AccAddress
Gas payer, Proposal
func (TxProposal) ValidateInputs ¶ added in v0.0.8
func (tx TxProposal) ValidateInputs() error
基础数据校验
type TxSoftwareUpgrade ¶
type TxSoftwareUpgrade struct { TxProposal Version string `json:"version"` // qosd version DataHeight int64 `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) GetGasPayer ¶
func (tx TxSoftwareUpgrade) GetGasPayer() btypes.AccAddress
Gas payer, Proposer
func (TxSoftwareUpgrade) GetSigner ¶
func (tx TxSoftwareUpgrade) GetSigner() []btypes.AccAddress
签名账户, Proposer
func (TxSoftwareUpgrade) ValidateData ¶
func (tx TxSoftwareUpgrade) ValidateData(ctx context.Context) error
数据校验
func (TxSoftwareUpgrade) ValidateInputs ¶ added in v0.0.8
func (tx TxSoftwareUpgrade) ValidateInputs() error
基础数据校验
type TxTaxUsage ¶
type TxTaxUsage struct { TxProposal // 基础提议信息 DestAddress btypes.AccAddress `json:"dest_address"` // 接收账户 Percent qtypes.Dec `json:"percent"` // 提取比例 }
提取社区费池,从社区非池中提取QOS到指定账户,仅guardian账户可提交此提议
func NewTxTaxUsage ¶
func NewTxTaxUsage(title, description string, proposer btypes.AccAddress, deposit btypes.BigInt, destAddress btypes.AccAddress, percent qtypes.Dec) *TxTaxUsage
type TxVote ¶
type TxVote struct { ProposalID int64 `json:"proposal_id"` // ID of the proposal Voter btypes.AccAddress `json:"voter"` // address of the voter Option types.VoteOption `json:"option"` // option from OptionSet chosen by the voter }
提议投票
func NewTxVote ¶
func NewTxVote(proposalID int64, voter btypes.AccAddress, option types.VoteOption) *TxVote
Click to show internal directories.
Click to hide internal directories.