Documentation ¶
Index ¶
Constants ¶
const ( // ModuleName is the name of the module ModuleName = "bond" // StoreKey to be used when creating the KVStore StoreKey = ModuleName )
const (
DefaultMaxBondAmount string = "100000000000stake"
)
Default parameter values.
const (
DefaultParamspace = ModuleName
)
Default parameter namespace.
const RouterKey = ModuleName // this was defined in your key.go file
RouterKey is the module name router key
Variables ¶
var (
ErrInvalid = sdkerrors.Register(ModuleName, 1, "custom error message")
)
var (
KeyMaxBondAmount = []byte("MaxBondAmount")
)
Keys for parameter access
var ModuleCdc = codec.New()
ModuleCdc is the codec for the module
Functions ¶
func ParamKeyTable ¶
ParamKeyTable - ParamTable for bond module.
func RegisterCodec ¶
RegisterCodec registers concrete types on the Amino codec
Types ¶
type Bond ¶
type Bond struct { ID ID `json:"id,omitempty"` Owner string `json:"owner,omitempty"` Balance sdk.Coins `json:"balance"` }
Bond represents funds deposited by an account for record rent payments.
type BondUsageKeeper ¶
BondUsageKeeper keep track of bond usage in other modules. Used to, for example, prevent deletion of a bond that's in use.
type MsgCancelBond ¶
type MsgCancelBond struct { ID ID `json:"id"` Signer sdk.AccAddress `json:"signer"` }
MsgCancelBond defines a cancel bond message.
func NewMsgCancelBond ¶
func NewMsgCancelBond(id string, signer sdk.AccAddress) MsgCancelBond
NewMsgCancelBond is the constructor function for MsgCancelBond.
func (MsgCancelBond) GetSignBytes ¶
func (msg MsgCancelBond) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgCancelBond) GetSigners ¶
func (msg MsgCancelBond) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgCancelBond) ValidateBasic ¶
func (msg MsgCancelBond) ValidateBasic() error
ValidateBasic Implements Msg.
type MsgCreateBond ¶
type MsgCreateBond struct { Coins sdk.Coins `json:"coins"` Signer sdk.AccAddress `json:"signer"` }
MsgCreateBond defines a create bond message.
func NewMsgCreateBond ¶
func NewMsgCreateBond(coins sdk.Coins, signer sdk.AccAddress) MsgCreateBond
NewMsgCreateBond is the constructor function for MsgCreateBond.
func (MsgCreateBond) GetSignBytes ¶
func (msg MsgCreateBond) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgCreateBond) GetSigners ¶
func (msg MsgCreateBond) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgCreateBond) ValidateBasic ¶
func (msg MsgCreateBond) ValidateBasic() error
ValidateBasic Implements Msg.
type MsgRefillBond ¶
type MsgRefillBond struct { ID ID `json:"id"` Coins sdk.Coins `json:"coins"` Signer sdk.AccAddress `json:"signer"` }
MsgRefillBond defines a refill bond message.
func NewMsgRefillBond ¶
func NewMsgRefillBond(id string, denom string, amount int64, signer sdk.AccAddress) MsgRefillBond
NewMsgRefillBond is the constructor function for MsgRefillBond.
func (MsgRefillBond) GetSignBytes ¶
func (msg MsgRefillBond) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgRefillBond) GetSigners ¶
func (msg MsgRefillBond) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgRefillBond) ValidateBasic ¶
func (msg MsgRefillBond) ValidateBasic() error
ValidateBasic Implements Msg.
type MsgWithdrawBond ¶
type MsgWithdrawBond struct { ID ID `json:"id"` Coins sdk.Coins `json:"coins"` Signer sdk.AccAddress `json:"signer"` }
MsgWithdrawBond defines a withdraw (funds from) bond message.
func NewMsgWithdrawBond ¶
func NewMsgWithdrawBond(id string, denom string, amount int64, signer sdk.AccAddress) MsgWithdrawBond
NewMsgWithdrawBond is the constructor function for MsgWithdrawBond.
func (MsgWithdrawBond) GetSignBytes ¶
func (msg MsgWithdrawBond) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgWithdrawBond) GetSigners ¶
func (msg MsgWithdrawBond) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgWithdrawBond) ValidateBasic ¶
func (msg MsgWithdrawBond) ValidateBasic() error
ValidateBasic Implements Msg.
type Params ¶
type Params struct {
MaxBondAmount string `json:"max_bond_amount" yaml:"max_bond_amount"`
}
Params defines the high level settings for the bond module.
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() subspace.ParamSetPairs
ParamSetPairs - implements params.ParamSet