Documentation
¶
Index ¶
- Constants
- Variables
- func ErrBindAssetHash(reason string) error
- func ErrBurnCoins(reason string) error
- func ErrCreateDenom(reason string) error
- func ErrEmptyToAssetHash(toHashStr string) error
- func ErrInvalidChainId(chainId uint64) error
- func ErrInvalidRedeemScript(reason string) error
- func ErrLock(reason string) error
- func ErrMintCoins(reason string) error
- func ErrUnLock(reason string) error
- func RegisterCodec(cdc *codec.Codec)
- type AccountKeeper
- type BTCArgs
- type BankKeeper
- type CCMKeeper
- type DenomCrossChainInfo
- type DenomInfo
- type MsgBindAssetHash
- type MsgCreateDenom
- type MsgLock
- type QueryDenomCrossChainInfoParam
- type QueryDenomInfoParam
- type SupplyKeeper
- type ToBTCArgs
Constants ¶
View Source
const ( AttributeValueCategory = ModuleName EventTypeCreateDenom = "create_denom" AttributeKeySourceAssetDenom = "source_asset_denom" AttributeKeyFromAssetHash = "from_asset_hash" AttributeKeyRedeemScript = "redeem_script" EventTypeBindAsset = "bind_asset_hash" AttributeKeyCreator = "creator" AttributeKeyToChainId = "to_chain_id" AttributeKeyToAssetHash = "to_asset_hash" EventTypeLock = "lock" AttributeKeyFromAddress = "from_address" AttributeKeyToAddress = "to_address" AttributeKeyAmount = "amount" EventTypeUnlock = "unlock" )
Btcx module event types
View Source
const ( // module name ModuleName = "btcx" // 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 ( TypeMsgBindAssetHash = "bind_asset_hash" TypeMsgLock = "lock" TypeMsgCreateDenom = "create_coin" )
Governance message types and routes
View Source
const ( QueryDenomInfo = "denom_info" QueryDenomCrossChainInfo = "denom_cc_info" )
View Source
const (
BtcChainId = uint64(1)
)
Variables ¶
View Source
var ( ErrInvalidChainIdType = sdkerrors.Register(ModuleName, 1, "ErrInvalidChainIdType") ErrInvalidRedeemScriptType = sdkerrors.Register(ModuleName, 2, "ErrInvalidRedeemScriptType") ErrEmptyToAssetHashType = sdkerrors.Register(ModuleName, 3, "ErrEmptyToAssetHashType") ErrCreateDenomType = sdkerrors.Register(ModuleName, 4, "ErrCreateDenomType") ErrBindAssetHashType = sdkerrors.Register(ModuleName, 5, "ErrBindAssetHashType") ErrLockType = sdkerrors.Register(ModuleName, 6, "ErrLockType") ErrUnLockType = sdkerrors.Register(ModuleName, 7, "ErrUnLockType") ErrBurnCoinsType = sdkerrors.Register(ModuleName, 8, "ErrBurnCoinsType") ErrMintCoinsType = sdkerrors.Register(ModuleName, 9, "ErrMintCoinsType") )
View Source
var ModuleCdc *codec.Codec
generic sealed codec to be used throughout this module
Functions ¶
func ErrBindAssetHash ¶
func ErrBurnCoins ¶
func ErrCreateDenom ¶
func ErrEmptyToAssetHash ¶
func ErrInvalidChainId ¶
func ErrInvalidRedeemScript ¶
func ErrMintCoins ¶
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 BTCArgs ¶
func (*BTCArgs) Deserialization ¶
func (this *BTCArgs) Deserialization(source *polycommon.ZeroCopySource) error
func (*BTCArgs) Serialization ¶
func (this *BTCArgs) Serialization(sink *polycommon.ZeroCopySink) error
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) }
type CCMKeeper ¶
type CCMKeeper 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 DenomInfo ¶
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 MsgCreateDenom ¶
type MsgCreateDenom struct { Creator sdk.AccAddress Denom string RedeemScript string }
func NewMsgCreateDenom ¶
func NewMsgCreateDenom(creator sdk.AccAddress, denom string, redeemScript 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 ToBTCArgs ¶
func (*ToBTCArgs) Deserialization ¶
func (this *ToBTCArgs) Deserialization(source *polycommon.ZeroCopySource) error
func (*ToBTCArgs) Serialization ¶
func (this *ToBTCArgs) Serialization(sink *polycommon.ZeroCopySink) error
Click to show internal directories.
Click to hide internal directories.