types

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: GPL-3.0 Imports: 4 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 (
	EventTypeTransfer = "transfer"

	AttributeKeyRecipient = "recipient"
	AttributeKeySender    = "sender"

	AttributeValueCategory = ModuleName
)

bank module event types

View Source
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
)
View Source
const (
	// DefaultSendEnabled enabled
	DefaultSendEnabled = true
)
View Source
const (
	QueryBalance = "balances"
)

Variables

View Source
var ModuleCdc = codec.New()

ModuleCdc module cdc

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

func ParamKeyTable() subspace.KeyTable

ParamKeyTable type declaration for parameters

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

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

func (msg MsgSend) GetSignBytes() []byte

GetSignBytes Implements Msg.

func (MsgSend) GetSigners

func (msg MsgSend) GetSigners() []sdk.AccAddress

GetSigners Implements Msg.

func (MsgSend) Route

func (msg MsgSend) Route() string

Route Implements Msg.

func (MsgSend) Type

func (msg MsgSend) Type() string

Type Implements Msg.

func (MsgSend) ValidateBasic

func (msg MsgSend) ValidateBasic() sdk.Error

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.

Jump to

Keyboard shortcuts

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