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 ParamKeyTable() subspace.KeyTable
- func RegisterCodec(cdc *codec.Codec)
- func ValidateGenesis(data GenesisState) error
- type GenesisState
- type MsgSend
- type QueryBalanceParams
Constants ¶
const ( CodeSendDisabled sdk.CodeType = 101 CodeInvalidInputsOutputs sdk.CodeType = 102 CodeNoValidatorTopup sdk.CodeType = 103 CodeNoBalanceToWithdraw sdk.CodeType = 104 )
Bank errors reserve 100 ~ 199.
const ( EventTypeTransfer = "transfer" AttributeKeyRecipient = "recipient" AttributeKeySender = "sender" AttributeValueCategory = ModuleName )
bank module event types
const ( // ModuleName is the name of the module ModuleName = "bank" // 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 ( // DefaultSendEnabled enabled DefaultSendEnabled = true )
const (
QueryBalance = "balances"
)
Variables ¶
var ModuleCdc = codec.New()
ModuleCdc module cdc
var ParamStoreKeySendEnabled = []byte("sendenabled")
ParamStoreKeySendEnabled is store's key for SendEnabled
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 ParamKeyTable ¶
ParamKeyTable type declaration for parameters
func RegisterCodec ¶
RegisterCodec registers concrete types on codec codec
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis performs basic validation of bank genesis data returning an error for any failed validation criteria.
Types ¶
type GenesisState ¶
type GenesisState struct {
SendEnabled bool `json:"send_enabled" yaml:"send_enabled"`
}
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(sendEnabled bool) GenesisState
NewGenesisState creates a new genesis state.
type MsgSend ¶
type MsgSend struct { FromAddress types.HeimdallAddress `json:"from_address"` ToAddress types.HeimdallAddress `json:"to_address"` Amount sdk.Coins `json:"amount"` }
MsgSend - high level transaction of the coin module
func NewMsgSend ¶
func NewMsgSend(fromAddr, toAddr types.HeimdallAddress, amount sdk.Coins) MsgSend
NewMsgSend - construct arbitrary multi-in, multi-out send msg.
func (MsgSend) GetSigners ¶
func (msg MsgSend) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgSend) ValidateBasic ¶
ValidateBasic Implements Msg.
type QueryBalanceParams ¶
type QueryBalanceParams struct {
Address hmTyps.HeimdallAddress
}
QueryBalanceParams defines the params for querying an account balance.
func NewQueryBalanceParams ¶
func NewQueryBalanceParams(addr hmTyps.HeimdallAddress) QueryBalanceParams
NewQueryBalanceParams creates a new instance of QueryBalanceParams.