types

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeSendDisabled         sdk.CodeType = 101
	CodeInvalidInputsOutputs sdk.CodeType = 102
	CodeNoValidatorTopup     sdk.CodeType = 103
	CodeNoBalanceToWithdraw  sdk.CodeType = 104
)

Bank errors reserve 100 ~ 199.

View Source
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

View Source
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
)
View Source
const (
	QuerySequence = "sequence"
)

Variables

View Source
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 ErrNoInputs

func ErrNoInputs(codespace sdk.CodespaceType) sdk.Error

ErrNoInputs is an error

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

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on codec codec

func RegisterPulp

func RegisterPulp(pulp *authTypes.Pulp)

RegisterPulp register pulp

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

func (msg MsgTopup) GetLogIndex() uint64

GetLogIndex Returns log index

func (MsgTopup) GetSignBytes

func (msg MsgTopup) GetSignBytes() []byte

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) Route

func (msg MsgTopup) Route() string

Route Implements Msg.

func (MsgTopup) Type

func (msg MsgTopup) Type() string

Type Implements Msg.

func (MsgTopup) ValidateBasic

func (msg MsgTopup) ValidateBasic() sdk.Error

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) Route

func (msg MsgWithdrawFee) Route() string

Route Implements Msg.

func (MsgWithdrawFee) Type

func (msg MsgWithdrawFee) Type() string

Type Implements Msg.

func (MsgWithdrawFee) ValidateBasic

func (msg MsgWithdrawFee) ValidateBasic() sdk.Error

ValidateBasic Implements Msg.

type QuerySequenceParams

type QuerySequenceParams struct {
	TxHash   string
	LogIndex uint64
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL