Documentation ¶
Index ¶
- Constants
- Variables
- func ErrAccountNotExist(reason string) error
- func ErrBindAssetHash(reason string) error
- func ErrBindProxyHash(reason string) error
- func ErrCreateCoinAndDelegateToProxy(reason string) error
- func ErrCreateLockProxy(reason string) error
- func ErrInvalidChainId(chainId uint64) error
- func ErrLock(reason string) error
- func ErrMsgBindAssetHash(reason string) error
- func ErrMsgBindProxyHash(reason string) error
- func ErrMsgLock(reason string) error
- func ErrUnLock(reason string) error
- func RegisterCodec(cdc *codec.Codec)
- type AccountKeeper
- type CrossChainManager
- type MsgBindAssetHash
- type MsgBindProxyHash
- type MsgCreateCoinAndDelegateToProxy
- func (msg MsgCreateCoinAndDelegateToProxy) GetSignBytes() []byte
- func (msg MsgCreateCoinAndDelegateToProxy) GetSigners() []sdk.AccAddress
- func (msg MsgCreateCoinAndDelegateToProxy) Route() string
- func (msg MsgCreateCoinAndDelegateToProxy) Type() string
- func (msg MsgCreateCoinAndDelegateToProxy) ValidateBasic() error
- type MsgCreateLockProxy
- type MsgLock
- type QueryAssetHashParam
- type QueryProxyByOperatorParam
- type QueryProxyHashParam
- type SupplyKeeper
- type TxArgs
Constants ¶
const ( AttributeValueCategory = ModuleName EventTypeCreateLockProxy = "create_lock_proxy" EventTypeCreateAndDelegateCoinToProxy = "create_and_delegate_coin_to_proxy" EventTypeBindProxy = "bind_proxy_hash" EventTypeBindAsset = "bind_asset_hash" EventTypeLock = "lock" EventTypeUnlock = "unlock" AttributeKeyCreator = "creator" AttributeKeyLockProxy = "lock_proxy_hash" AttributeKeyToChainId = "to_chain_id" AttributeKeyToChainProxyHash = "to_chain_proxy_hash" AttributeKeySourceAssetDenom = "source_asset_denom" AttributeKeyFromAssetHash = "from_asset_hash" AttributeKeyToAssetHash = "to_asset_hash" AttributeKeyFromAddress = "from_address" AttributeKeyToAddress = "to_address" AttributeKeyAmount = "amount" )
Minting module event types
const ( // module name ModuleName = "lockproxy" // 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
const ( TypeMsgCreateLockProxy = "create_lock_proxy" TypeMsgCreateCoinAndDelegateToProxy = "create_delegate_to_proxy" TypeMsgBindProxyHash = "bind_proxy_hash" TypeMsgBindAssetHash = "bind_asset_hash" TypeMsgLock = "lock" )
Governance message types and routes
const ( QueryProxyByOperator = "query_proxy_by_operator" QueryProxyHash = "proxy_hash" QueryAssetHash = "asset_hash" )
Variables ¶
var ( ErrInvalidChainIdType = sdkerrors.Register(ModuleName, 1, "ErrInvalidChainIdType") ErrMsgBindAssetHashType = sdkerrors.Register(ModuleName, 2, "ErrMsgBindAssetHashType") ErrMsgLockType = sdkerrors.Register(ModuleName, 3, "ErrMsgLockType") ErrAccountNotExistType = sdkerrors.Register(ModuleName, 4, "ErrAccountNotExistType") ErrCreateLockProxyType = sdkerrors.Register(ModuleName, 5, "ErrCreateLockProxyType") ErrBindProxyHashType = sdkerrors.Register(ModuleName, 6, "ErrBindProxyHashType") ErrBindAssetHashType = sdkerrors.Register(ModuleName, 7, "ErrBindAssetHashType") ErrLockType = sdkerrors.Register(ModuleName, 8, "ErrLockType") ErrUnLockType = sdkerrors.Register(ModuleName, 9, "ErrUnLockType") ErrMsgBindProxyHashType = sdkerrors.Register(ModuleName, 10, "ErrMsgBindProxyHashType") ErrCreateCoinAndDelegateToProxyType = sdkerrors.Register(ModuleName, 11, "ErrCreateCoinAndDelegateToProxyType") )
var ModuleCdc *codec.Codec
generic sealed codec to be used throughout this module
Functions ¶
func ErrAccountNotExist ¶
func ErrBindAssetHash ¶
func ErrBindProxyHash ¶
func ErrCreateLockProxy ¶
func ErrInvalidChainId ¶
func ErrMsgBindAssetHash ¶
func ErrMsgBindProxyHash ¶
func ErrMsgLock ¶
func RegisterCodec ¶
Types ¶
type AccountKeeper ¶
type AccountKeeper interface {
GetAccount(ctx sdk.Context, addr sdk.AccAddress) authexported.Account
}
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 MsgBindAssetHash ¶
type MsgBindAssetHash struct { Operator sdk.AccAddress SourceAssetDenom string ToChainId uint64 ToAssetHash []byte }
func NewMsgBindAssetHash ¶
func NewMsgBindAssetHash(operator 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 MsgBindProxyHash ¶
type MsgBindProxyHash struct { Operator sdk.AccAddress ToChainId uint64 ToChainProxyHash []byte }
func NewMsgBindProxyHash ¶
func NewMsgBindProxyHash(operator sdk.AccAddress, toChainId uint64, toChainProxyHash []byte) MsgBindProxyHash
func (MsgBindProxyHash) GetSignBytes ¶
func (msg MsgBindProxyHash) GetSignBytes() []byte
Implements Msg.
func (MsgBindProxyHash) GetSigners ¶
func (msg MsgBindProxyHash) GetSigners() []sdk.AccAddress
Implements Msg.
func (MsgBindProxyHash) String ¶
func (msg MsgBindProxyHash) String() string
func (MsgBindProxyHash) Type ¶
func (msg MsgBindProxyHash) Type() string
func (MsgBindProxyHash) ValidateBasic ¶
func (msg MsgBindProxyHash) ValidateBasic() error
Implements Msg.
type MsgCreateCoinAndDelegateToProxy ¶
type MsgCreateCoinAndDelegateToProxy struct { Creator sdk.AccAddress Coin sdk.Coin LockProxyHash []byte }
MsgSend - high level transaction of the coin module
func NewMsgCreateCoinAndDelegateToProxy ¶
func NewMsgCreateCoinAndDelegateToProxy(creator sdk.AccAddress, coin sdk.Coin, lockProxyHash []byte) MsgCreateCoinAndDelegateToProxy
NewMsgSend - construct arbitrary multi-in, multi-out send msg.
func (MsgCreateCoinAndDelegateToProxy) GetSignBytes ¶
func (msg MsgCreateCoinAndDelegateToProxy) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgCreateCoinAndDelegateToProxy) GetSigners ¶
func (msg MsgCreateCoinAndDelegateToProxy) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgCreateCoinAndDelegateToProxy) Route ¶
func (msg MsgCreateCoinAndDelegateToProxy) Route() string
Route Implements Msg.
func (MsgCreateCoinAndDelegateToProxy) Type ¶
func (msg MsgCreateCoinAndDelegateToProxy) Type() string
Type Implements Msg.
func (MsgCreateCoinAndDelegateToProxy) ValidateBasic ¶
func (msg MsgCreateCoinAndDelegateToProxy) ValidateBasic() error
ValidateBasic Implements Msg.
type MsgCreateLockProxy ¶
type MsgCreateLockProxy struct {
Creator sdk.AccAddress
}
MsgSend - high level transaction of the coin module
func NewMsgCreateLockProxy ¶
func NewMsgCreateLockProxy(creator sdk.AccAddress) MsgCreateLockProxy
NewMsgSend - construct arbitrary multi-in, multi-out send msg.
func (MsgCreateLockProxy) GetSignBytes ¶
func (msg MsgCreateLockProxy) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgCreateLockProxy) GetSigners ¶
func (msg MsgCreateLockProxy) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgCreateLockProxy) Route ¶
func (msg MsgCreateLockProxy) Route() string
Route Implements Msg.
func (MsgCreateLockProxy) ValidateBasic ¶
func (msg MsgCreateLockProxy) ValidateBasic() error
ValidateBasic Implements Msg.
type MsgLock ¶
type MsgLock struct { LockProxyHash []byte FromAddress sdk.AccAddress SourceAssetDenom string ToChainId uint64 ToAddressBs []byte Value sdk.Int }
func NewMsgLock ¶
type QueryAssetHashParam ¶
func NewQueryAssetHashParam ¶
func NewQueryAssetHashParam(lockProxyHash []byte, sourceAssetDenom string, chainId uint64) QueryAssetHashParam
type QueryProxyByOperatorParam ¶
type QueryProxyByOperatorParam struct {
Operator sdk.AccAddress
}
QueryBalanceParams defines the params for querying an account balance.
func NewQueryProxyByOperatorParam ¶
func NewQueryProxyByOperatorParam(operator sdk.AccAddress) QueryProxyByOperatorParam
NewQueryBalanceParams creates a new instance of QueryBalanceParams.
type QueryProxyHashParam ¶
QueryBalanceParams defines the params for querying an account balance.
func NewQueryProxyHashParam ¶
func NewQueryProxyHashParam(lockProxyHash []byte, chainId uint64) QueryProxyHashParam
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 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 }
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