Documentation ¶
Index ¶
- Constants
- Variables
- func ErrInputOutputMismatch(msg string) sdk.Error
- func ErrInsufficientCETForActivatingFee() sdk.Error
- func ErrInvalidActivatingFee() sdk.Error
- func ErrInvalidLockCoinsFee() sdk.Error
- func ErrInvalidLockCoinsFreeTime() sdk.Error
- func ErrInvalidOperation() sdk.Error
- func ErrLockedCoinNotFound() sdk.Error
- func ErrMemoMissing() sdk.Error
- func ErrNoInputs() sdk.Error
- func ErrNoOutputs() sdk.Error
- func ErrRewardExceedsAmount() sdk.Error
- func ErrTokenForbiddenByOwner() sdk.Error
- func ErrUnlockTime(msg string) sdk.Error
- func ParamKeyTable() params.KeyTable
- func RegisterCodec(cdc *codec.Codec)
- func ValidateInputsOutputs(inputs []bank.Input, outputs []bank.Output) sdk.Error
- type ExpectedAccountXKeeper
- type ExpectedAssetStatusKeeper
- type LockedSendMsg
- type MsgMultiSend
- type MsgSend
- type MsgSetMemoRequired
- func (msg MsgSetMemoRequired) GetSignBytes() []byte
- func (msg MsgSetMemoRequired) GetSigners() []sdk.AccAddress
- func (msg MsgSetMemoRequired) Route() string
- func (msg *MsgSetMemoRequired) SetAccAddress(addr sdk.AccAddress)
- func (msg MsgSetMemoRequired) Type() string
- func (msg MsgSetMemoRequired) ValidateBasic() sdk.Error
- type MsgSupervisedSend
- func (msg MsgSupervisedSend) GetSignBytes() []byte
- func (msg MsgSupervisedSend) GetSigners() []sdk.AccAddress
- func (msg MsgSupervisedSend) Route() string
- func (msg *MsgSupervisedSend) SetAccAddress(addr sdk.AccAddress)
- func (msg MsgSupervisedSend) Type() string
- func (msg MsgSupervisedSend) ValidateBasic() sdk.Error
- type Params
- type SupplyKeeper
Constants ¶
View Source
const ( CodeSpaceBankx sdk.CodespaceType = ModuleName // 301 ~ 399 CodeMemoMissing sdk.CodeType = 301 CodeInsufficientCETForActivationFee sdk.CodeType = 302 CodeInvalidActivationFee sdk.CodeType = 303 CodeInvalidUnlockTime sdk.CodeType = 304 CodeTokenForbiddenByOwner sdk.CodeType = 305 CodeInvalidLockCoinsFee sdk.CodeType = 306 CodeNoInputs sdk.CodeType = 307 CodeNoOutputs sdk.CodeType = 308 CodeInputOutputMismatch sdk.CodeType = 309 CodeInvalidLockCoinsFreeTime sdk.CodeType = 310 CodeInvalidOperation sdk.CodeType = 311 CodeRewardExceedsAmount sdk.CodeType = 312 CodeLockedCoinNotFound sdk.CodeType = 313 )
View Source
const ( EventTypeTransfer = "transfer" AttributeKeyRecipient = "recipient" AttributeKeySender = "sender" AttributeKeyAmount = "amount" AttributeValueCategory = ModuleName )
View Source
const ( ModuleName = "bankx" StoreKey = ModuleName DefaultParamspace = ModuleName RouterKey = ModuleName AttributeKeyAddr = "address" AttributeKeyMemoRequired = "memo-required" Topic = ModuleName )
View Source
const ( Create byte = 0 Return byte = 1 EarlierUnlockBySender byte = 2 EarlierUnlockBySupervisor byte = 3 )
Variables ¶
View Source
var ( KeyActivationFee = []byte("ActivationFee") KeyLockCoinsFreeTime = []byte("LockCoinsFreeTime") KeyLockCoinsFeePerDay = []byte("LockCoinsFeePerDay") )
View Source
var ModuleCdc = codec.New()
Functions ¶
func ErrInputOutputMismatch ¶
func ErrInsufficientCETForActivatingFee ¶ added in v0.0.19
func ErrInvalidActivatingFee ¶ added in v0.0.19
func ErrInvalidLockCoinsFee ¶ added in v0.0.19
func ErrInvalidLockCoinsFreeTime ¶ added in v0.0.19
func ErrInvalidOperation ¶ added in v0.0.19
func ErrLockedCoinNotFound ¶ added in v0.0.19
func ErrMemoMissing ¶
func ErrNoInputs ¶
func ErrNoOutputs ¶
func ErrRewardExceedsAmount ¶ added in v0.0.19
func ErrUnlockTime ¶
func ParamKeyTable ¶
ParamKeyTable type declaration for parameters
func RegisterCodec ¶
RegisterCodec registers concrete types on the codec
Types ¶
type ExpectedAccountXKeeper ¶
type ExpectedAccountXKeeper interface { GetOrCreateAccountX(ctx sdk.Context, addr sdk.AccAddress) authx.AccountX GetAccountX(ctx sdk.Context, addr sdk.AccAddress) (ax authx.AccountX, ok bool) SetAccountX(ctx sdk.Context, ax authx.AccountX) IterateAccounts(ctx sdk.Context, process func(authx.AccountX) (stop bool)) InsertUnlockedCoinsQueue(ctx sdk.Context, unlockedTime int64, address sdk.AccAddress) RemoveFromUnlockedCoinsQueue(ctx sdk.Context, unlockedTime int64, address sdk.AccAddress) }
type LockedSendMsg ¶ added in v0.0.18
type LockedSendMsg struct { FromAddress sdk.AccAddress `json:"from_address"` ToAddress sdk.AccAddress `json:"to_address"` Amount sdk.Coins `json:"amount"` UnlockTime int64 `json:"unlock_time"` Supervisor sdk.AccAddress `json:"supervisor,omitempty"` Reward int64 `json:"reward,omitempty"` }
func NewLockedSendMsg ¶ added in v0.0.18
func NewLockedSendMsg(fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amount sdk.Coins, unlockTime int64) LockedSendMsg
func NewSupervisedSendMsg ¶ added in v0.0.18
func NewSupervisedSendMsg(fromAddr, toAddr, supervisor sdk.AccAddress, amount sdk.Coin, unlockTime int64, reward int64) LockedSendMsg
type MsgMultiSend ¶
type MsgMultiSend struct { Inputs []bank.Input `json:"inputs" yaml:"inputs"` Outputs []bank.Output `json:"outputs" yaml:"outputs"` }
MsgMultiSend - high level transaction of the coin module
func NewMsgMultiSend ¶
func NewMsgMultiSend(in []bank.Input, out []bank.Output) MsgMultiSend
NewMsgMultiSend - construct arbitrary multi-in, multi-out send msg.
func (MsgMultiSend) GetSignBytes ¶
func (msg MsgMultiSend) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgMultiSend) GetSigners ¶
func (msg MsgMultiSend) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgMultiSend) ValidateBasic ¶
func (msg MsgMultiSend) ValidateBasic() sdk.Error
ValidateBasic Implements Msg.
type MsgSend ¶
type MsgSend struct { FromAddress sdk.AccAddress `json:"from_address"` ToAddress sdk.AccAddress `json:"to_address"` Amount sdk.Coins `json:"amount"` UnlockTime int64 `json:"unlock_time"` }
func NewMsgSend ¶
func (MsgSend) GetSignBytes ¶
func (MsgSend) GetSigners ¶
func (msg MsgSend) GetSigners() []sdk.AccAddress
func (*MsgSend) SetAccAddress ¶ added in v0.0.15
func (msg *MsgSend) SetAccAddress(addr sdk.AccAddress)
func (MsgSend) ValidateBasic ¶
type MsgSetMemoRequired ¶
type MsgSetMemoRequired struct { Address sdk.AccAddress `json:"address"` Required bool `json:"required"` }
func NewMsgSetTransferMemoRequired ¶
func NewMsgSetTransferMemoRequired(addr sdk.AccAddress, required bool) MsgSetMemoRequired
func (MsgSetMemoRequired) GetSignBytes ¶
func (msg MsgSetMemoRequired) GetSignBytes() []byte
func (MsgSetMemoRequired) GetSigners ¶
func (msg MsgSetMemoRequired) GetSigners() []sdk.AccAddress
func (MsgSetMemoRequired) Route ¶
func (msg MsgSetMemoRequired) Route() string
func (*MsgSetMemoRequired) SetAccAddress ¶ added in v0.0.15
func (msg *MsgSetMemoRequired) SetAccAddress(addr sdk.AccAddress)
func (MsgSetMemoRequired) Type ¶
func (msg MsgSetMemoRequired) Type() string
func (MsgSetMemoRequired) ValidateBasic ¶
func (msg MsgSetMemoRequired) ValidateBasic() sdk.Error
type MsgSupervisedSend ¶ added in v0.0.18
type MsgSupervisedSend struct { FromAddress sdk.AccAddress `json:"from_address"` Supervisor sdk.AccAddress `json:"supervisor,omitempty"` ToAddress sdk.AccAddress `json:"to_address"` Amount sdk.Coin `json:"amount"` UnlockTime int64 `json:"unlock_time"` Reward int64 `json:"reward"` Operation byte `json:"operation"` }
MsgSupervisedSend
func NewMsgSupervisedSend ¶ added in v0.0.18
func NewMsgSupervisedSend(fromAddress sdk.AccAddress, supervisor sdk.AccAddress, toAddress sdk.AccAddress, amount sdk.Coin, unlockTime int64, reward int64, operation byte) MsgSupervisedSend
NewMsgSupervisedSend
func (MsgSupervisedSend) GetSignBytes ¶ added in v0.0.18
func (msg MsgSupervisedSend) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgSupervisedSend) GetSigners ¶ added in v0.0.18
func (msg MsgSupervisedSend) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgSupervisedSend) Route ¶ added in v0.0.18
func (msg MsgSupervisedSend) Route() string
Route Implements Msg
func (*MsgSupervisedSend) SetAccAddress ¶ added in v0.0.18
func (msg *MsgSupervisedSend) SetAccAddress(addr sdk.AccAddress)
func (MsgSupervisedSend) Type ¶ added in v0.0.18
func (msg MsgSupervisedSend) Type() string
Type Implements Msg
func (MsgSupervisedSend) ValidateBasic ¶ added in v0.0.18
func (msg MsgSupervisedSend) ValidateBasic() sdk.Error
ValidateBasic Implements Msg.
type Params ¶
type Params struct { ActivationFee int64 `json:"activation_fee"` LockCoinsFreeTime int64 `json:"lock_coins_free_time"` LockCoinsFeePerDay int64 `json:"lock_coins_fee_per_day"` }
func DefaultParams ¶
func DefaultParams() Params
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() params.ParamSetPairs
type SupplyKeeper ¶
type SupplyKeeper interface { SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) sdk.Error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) sdk.Error }
SupplyKeeper defines the expected supply keeper
Click to show internal directories.
Click to hide internal directories.