Documentation ¶
Index ¶
- Constants
- Variables
- func ErrAccountNotExist(reason string) error
- func ErrBindAssetHash(reason string) error
- func ErrBurnCoins(reason string) error
- func ErrCreateCoins(reason string) error
- func ErrCreateDenom(reason string) error
- func ErrInvalidChainId(chainId uint64) error
- func ErrLock(reason string) error
- func ErrMintCoins(reason string) error
- func ErrMsgBindAssetHash(reason string) error
- func ErrMsgCreateDenom(reason string) error
- func ErrMsgLock(reason string) error
- func ErrUnLock(reason string) error
- func RegisterCodec(cdc *codec.Codec)
- type AccountKeeper
- type BankKeeper
- type CrossChainManager
- type DenomCrossChainInfo
- type DenomInfo
- type MsgBindAssetHash
- type MsgCreateCoins
- type MsgCreateDenom
- type MsgLock
- type QueryDenomCrossChainInfoParam
- type QueryDenomInfoParam
- type SupplyKeeper
- type TxArgs
Constants ¶
View Source
const ( AttributeValueCategory = ModuleName EventTypeCreateCoins = "create_coins" AttributeKeyToChainId = "to_chain_id" EventTypeBindAsset = "bind_asset_hash" AttributeKeySourceAssetDenom = "source_asset_denom" AttributeKeyCreator = "creator" AttributeKeyFromAssetHash = "from_asset_hash" AttributeKeyToChainAssetHash = "to_chain_asset_hash" EventTypeLock = "lock" AttributeKeyFromAddress = "from_address" AttributeKeyToAddress = "to_address" AttributeKeyAmount = "amount" AttributeKeyFromChainId = "from_chain_id" EventTypeUnlock = "unlock" AttributeKeyFromContractHash = "from_contract_hash" AttributeKeyToAssetHash = "to_asset_hash" EventTypeSetRedeemScript = "set_redeem_script" AttributeKeyRedeemKey = "redeem_key" AttributeKeyRedeemScript = "redeem_script" )
Minting module event types
View Source
const ( // module name ModuleName = "ft" // default paramspace for params keeper DefaultParamspace = ModuleName // StoreKey is the default store key for mint StoreKey = ModuleName // QuerierRoute is the querier route for the minting store. QuerierRoute = StoreKey // RouterKey is the message route for gov RouterKey = ModuleName // Query endpoints supported by the minting querier QueryParameters = "parameters" )
nolint
View Source
const ( TypeMsgCreateDenom = "create_denom" TypeMsgBindAssetHash = "bind_asset_hash" TypeMsgLock = "lock" )
Governance message types and routes
View Source
const ( QueryDenomInfo = "denom_info" QueryDenomCrossChainInfo = "denom_cc_info" )
Variables ¶
View Source
var ( ErrInvalidChainIdType = sdkerrors.Register(ModuleName, 1, "ErrInvalidChainIdType") ErrMsgBindAssetHashType = sdkerrors.Register(ModuleName, 2, "ErrMsgBindAssetHashType") ErrBindAssetHashType = sdkerrors.Register(ModuleName, 3, "ErrBindAssetHashType") ErrAccountNotExistType = sdkerrors.Register(ModuleName, 4, "ErrAccountNotExistType") ErrCreateCoinsType = sdkerrors.Register(ModuleName, 5, "ErrCreateCoinsType") ErrMsgCreateDenomType = sdkerrors.Register(ModuleName, 7, "ErrMsgCreateDenomType") ErrCreateDenomType = sdkerrors.Register(ModuleName, 8, "ErrCreateDenomType") ErrBurnCoinsType = sdkerrors.Register(ModuleName, 9, "ErrBurnCoinsType") ErrMintCoinsType = sdkerrors.Register(ModuleName, 10, "ErrMintCoinsType") ErrMsgLockType = sdkerrors.Register(ModuleName, 11, "ErrMsgLockType") ErrLockType = sdkerrors.Register(ModuleName, 12, "ErrLockType") ErrUnLockType = sdkerrors.Register(ModuleName, 13, "ErrUnLockType") )
View Source
var ModuleCdc *codec.Codec
generic sealed codec to be used throughout this module
Functions ¶
func ErrAccountNotExist ¶
func ErrBindAssetHash ¶
func ErrBurnCoins ¶
func ErrCreateCoins ¶
func ErrCreateDenom ¶
func ErrInvalidChainId ¶
func ErrMintCoins ¶
func ErrMsgBindAssetHash ¶
func ErrMsgCreateDenom ¶
func ErrMsgLock ¶
func RegisterCodec ¶
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authexported.Account GetAccount(ctx sdk.Context, addr sdk.AccAddress) authexported.Account GetAllAccounts(ctx sdk.Context) []authexported.Account SetAccount(ctx sdk.Context, acc authexported.Account) IterateAccounts(ctx sdk.Context, process func(authexported.Account) bool) }
type BankKeeper ¶
type BankKeeper interface { SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error DelegateCoins(ctx sdk.Context, fromAdd, toAddr sdk.AccAddress, amt sdk.Coins) error UndelegateCoins(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error SubtractCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, error) AddCoins(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coins) (sdk.Coins, error) }
BankKeeper defines the expected bank keeper (noalias)
type CrossChainManager ¶
type CrossChainManager interface { CreateCrossChainTx(ctx sdk.Context, fromAddr sdk.AccAddress, toChainId uint64, fromContractHash, toContractHash []byte, method string, args []byte) error SetDenomCreator(ctx sdk.Context, denom string, creator sdk.AccAddress) GetDenomCreator(ctx sdk.Context, denom string) sdk.AccAddress ExistDenom(ctx sdk.Context, denom string) (string, bool) }
type DenomCrossChainInfo ¶
func (DenomCrossChainInfo) String ¶
func (msg DenomCrossChainInfo) String() string
type MsgBindAssetHash ¶
type MsgBindAssetHash struct { Creator sdk.AccAddress SourceAssetDenom string ToChainId uint64 ToAssetHash []byte }
func NewMsgBindAssetHash ¶
func NewMsgBindAssetHash(creator sdk.AccAddress, sourceAssetDenom string, toChainId uint64, toAssetHash []byte) MsgBindAssetHash
func (MsgBindAssetHash) GetSignBytes ¶
func (msg MsgBindAssetHash) GetSignBytes() []byte
Implements Msg.
func (MsgBindAssetHash) GetSigners ¶
func (msg MsgBindAssetHash) GetSigners() []sdk.AccAddress
Implements Msg.
func (MsgBindAssetHash) String ¶
func (msg MsgBindAssetHash) String() string
func (MsgBindAssetHash) Type ¶
func (msg MsgBindAssetHash) Type() string
func (MsgBindAssetHash) ValidateBasic ¶
func (msg MsgBindAssetHash) ValidateBasic() error
Implements Msg.
type MsgCreateCoins ¶
type MsgCreateCoins struct { Creator sdk.AccAddress Coins string }
func NewMsgCreateCoins ¶
func NewMsgCreateCoins(creator sdk.AccAddress, coins string) MsgCreateCoins
func (MsgCreateCoins) GetSignBytes ¶
func (msg MsgCreateCoins) GetSignBytes() []byte
Implements Msg.
func (MsgCreateCoins) GetSigners ¶
func (msg MsgCreateCoins) GetSigners() []sdk.AccAddress
Implements Msg.
func (MsgCreateCoins) Route ¶
func (msg MsgCreateCoins) Route() string
func (MsgCreateCoins) String ¶
func (msg MsgCreateCoins) String() string
func (MsgCreateCoins) Type ¶
func (msg MsgCreateCoins) Type() string
func (MsgCreateCoins) ValidateBasic ¶
func (msg MsgCreateCoins) ValidateBasic() error
Implements Msg.
type MsgCreateDenom ¶
type MsgCreateDenom struct { Creator sdk.AccAddress Denom string }
func NewMsgCreateDenom ¶
func NewMsgCreateDenom(creator sdk.AccAddress, denom string) MsgCreateDenom
func (MsgCreateDenom) GetSignBytes ¶
func (msg MsgCreateDenom) GetSignBytes() []byte
Implements Msg.
func (MsgCreateDenom) GetSigners ¶
func (msg MsgCreateDenom) GetSigners() []sdk.AccAddress
Implements Msg.
func (MsgCreateDenom) String ¶
func (msg MsgCreateDenom) String() string
func (MsgCreateDenom) Type ¶
func (msg MsgCreateDenom) Type() string
func (MsgCreateDenom) ValidateBasic ¶
func (msg MsgCreateDenom) ValidateBasic() error
Implements Msg.
type MsgLock ¶
type MsgLock struct { FromAddress sdk.AccAddress SourceAssetDenom string ToChainId uint64 ToAddressBs []byte Value sdk.Int }
func NewMsgLock ¶
type QueryDenomCrossChainInfoParam ¶
func NewQueryDenomCrossChainInfoParam ¶
func NewQueryDenomCrossChainInfoParam(denom string, toChainId uint64) QueryDenomCrossChainInfoParam
NewQueryBalanceParams creates a new instance of QueryBalanceParams.
type QueryDenomInfoParam ¶
type QueryDenomInfoParam struct {
Denom string
}
QueryBalanceParams defines the params for querying an account balance.
func NewQueryDenomInfoParam ¶
func NewQueryDenomInfoParam(denom string) QueryDenomInfoParam
NewQueryBalanceParams creates a new instance of QueryBalanceParams.
type SupplyKeeper ¶
type SupplyKeeper interface { GetModuleAddress(name string) sdk.AccAddress GetModuleAccount(ctx sdk.Context, name string) supplyexported.ModuleAccountI // TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862 SetModuleAccount(sdk.Context, exported.ModuleAccountI) SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error SetSupply(ctx sdk.Context, supply exported.SupplyI) GetSupply(ctx sdk.Context) (supply exported.SupplyI) }
SupplyKeeper defines the expected supply keeper
type TxArgs ¶
func (*TxArgs) Deserialization ¶
func (this *TxArgs) Deserialization(source *polycommon.ZeroCopySource, intBsLen int) error
func (*TxArgs) Serialization ¶
func (this *TxArgs) Serialization(sink *polycommon.ZeroCopySink, intBsLen int) error
Click to show internal directories.
Click to hide internal directories.