Documentation ¶
Index ¶
- Constants
- Variables
- func ErrInputOutputMismatch(codespace sdk.CodespaceType) sdk.Error
- func ErrNoBalanceToWithdraw(codespace sdk.CodespaceType) sdk.Error
- func ErrNoInputs(codespace sdk.CodespaceType) sdk.Error
- func ErrNoOutputs(codespace sdk.CodespaceType) sdk.Error
- func ErrNoValidatorTopup(codespace sdk.CodespaceType) sdk.Error
- func ErrSendDisabled(codespace sdk.CodespaceType) sdk.Error
- func RegisterCodec(cdc *codec.Codec)
- func RegisterPulp(pulp *authTypes.Pulp)
- func ValidateGenesis(data GenesisState) error
- type GenesisState
- type MsgTopup
- type MsgWithdrawFee
- type QuerySequenceParams
Constants ¶
const ( CodeSendDisabled sdk.CodeType = 101 CodeInvalidInputsOutputs sdk.CodeType = 102 CodeNoValidatorTopup sdk.CodeType = 103 CodeNoBalanceToWithdraw sdk.CodeType = 104 )
Bank errors reserve 100 ~ 199.
const ( EventTypeTopup = "topup" EventTypeFeeWithdraw = "fee-withdraw" EventTypeTransfer = "transfer" AttributeKeyRecipient = "recipient" AttributeKeySender = "sender" AttributeKeyValidatorID = "validator-id" AttributeKeyValidatorSigner = "validator-siger" AttributeKeyTopupAmount = "topup-amount" AttributeKeyFeeWithdrawAmount = "fee-withdraw-amount" AttributeValueCategory = ModuleName )
bank module event types
const ( // ModuleName is the name of the module ModuleName = "topup" // StoreKey is the store key string for bor StoreKey = ModuleName // RouterKey is the message route for bor RouterKey = ModuleName // QuerierRoute is the querier route for bor QuerierRoute = ModuleName // DefaultParamspace default name for parameter store DefaultParamspace = ModuleName // DefaultCodespace default code space DefaultCodespace sdk.CodespaceType = ModuleName )
const (
QuerySequence = "sequence"
)
Variables ¶
var ModuleCdc = codec.New()
ModuleCdc module cdc
Functions ¶
func ErrInputOutputMismatch ¶
func ErrInputOutputMismatch(codespace sdk.CodespaceType) sdk.Error
ErrInputOutputMismatch is an error
func ErrNoBalanceToWithdraw ¶
func ErrNoBalanceToWithdraw(codespace sdk.CodespaceType) sdk.Error
ErrNoBalanceToWithdraw is an error for validator topup withdraw
func ErrNoOutputs ¶
func ErrNoOutputs(codespace sdk.CodespaceType) sdk.Error
ErrNoOutputs is an error
func ErrNoValidatorTopup ¶
func ErrNoValidatorTopup(codespace sdk.CodespaceType) sdk.Error
ErrNoValidatorTopup is an error for validator topup
func ErrSendDisabled ¶
func ErrSendDisabled(codespace sdk.CodespaceType) sdk.Error
ErrSendDisabled is an error
func RegisterCodec ¶
RegisterCodec registers concrete types on codec codec
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis performs basic validation of topup genesis data returning an error for any failed validation criteria.
Types ¶
type GenesisState ¶
type GenesisState struct {
TopupSequences []string `json:"tx_sequences" yaml:"tx_sequences"`
}
GenesisState is the bank state that must be provided at genesis.
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState returns a default genesis state
func NewGenesisState ¶
func NewGenesisState(topupSequence []string) GenesisState
NewGenesisState creates a new genesis state.
type MsgTopup ¶
type MsgTopup struct { FromAddress types.HeimdallAddress `json:"from_address"` ID types.ValidatorID `json:"id"` TxHash types.HeimdallHash `json:"tx_hash"` LogIndex uint64 `json:"log_index"` }
MsgTopup - high level transaction of the fee coin module
func NewMsgTopup ¶
func NewMsgTopup( fromAddr types.HeimdallAddress, id uint64, txhash types.HeimdallHash, logIndex uint64, ) MsgTopup
NewMsgTopup - construct arbitrary multi-in, multi-out send msg.
func (MsgTopup) GetLogIndex ¶
GetLogIndex Returns log index
func (MsgTopup) GetSignBytes ¶
GetSignBytes Implements Msg.
func (MsgTopup) GetSigners ¶
func (msg MsgTopup) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgTopup) GetTxHash ¶
func (msg MsgTopup) GetTxHash() types.HeimdallHash
GetTxHash Returns tx hash
func (MsgTopup) ValidateBasic ¶
ValidateBasic Implements Msg.
type MsgWithdrawFee ¶
type MsgWithdrawFee struct { ValidatorAddress types.HeimdallAddress `json:"from_address"` Amount types.Int `json:"amount"` }
MsgWithdrawFee - high level transaction of the fee coin withdrawal module
func NewMsgWithdrawFee ¶
func NewMsgWithdrawFee( fromAddr types.HeimdallAddress, amount types.Int, ) MsgWithdrawFee
NewMsgWithdrawFee - construct arbitrary fee withdraw msg
func (MsgWithdrawFee) GetSignBytes ¶
func (msg MsgWithdrawFee) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgWithdrawFee) GetSigners ¶
func (msg MsgWithdrawFee) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgWithdrawFee) ValidateBasic ¶
func (msg MsgWithdrawFee) ValidateBasic() sdk.Error
ValidateBasic Implements Msg.
type QuerySequenceParams ¶
QuerySequenceParams defines the params for querying an account Sequence.
func NewQuerySequenceParams ¶
func NewQuerySequenceParams(txHash string, logIndex uint64) QuerySequenceParams
NewQuerySequenceParams creates a new instance of QuerySequenceParams.