types

package
v0.0.0-...-1237470 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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

View Source
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

View Source
const (
	QueryProxyByOperator = "query_proxy_by_operator"
	QueryProxyHash       = "proxy_hash"
	QueryAssetHash       = "asset_hash"
)

Variables

View Source
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")
)
View Source
var ModuleCdc *codec.Codec

generic sealed codec to be used throughout this module

Functions

func ErrAccountNotExist

func ErrAccountNotExist(reason string) error

func ErrBindAssetHash

func ErrBindAssetHash(reason string) error

func ErrBindProxyHash

func ErrBindProxyHash(reason string) error

func ErrCreateCoinAndDelegateToProxy

func ErrCreateCoinAndDelegateToProxy(reason string) error

func ErrCreateLockProxy

func ErrCreateLockProxy(reason string) error

func ErrInvalidChainId

func ErrInvalidChainId(chainId uint64) error

func ErrLock

func ErrLock(reason string) error

func ErrMsgBindAssetHash

func ErrMsgBindAssetHash(reason string) error

func ErrMsgBindProxyHash

func ErrMsgBindProxyHash(reason string) error

func ErrMsgLock

func ErrMsgLock(reason string) error

func ErrUnLock

func ErrUnLock(reason string) error

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

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) Route

func (msg MsgBindAssetHash) Route() string

nolint

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) Route

func (msg MsgBindProxyHash) Route() string

nolint

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

Route Implements Msg.

func (MsgCreateCoinAndDelegateToProxy) Type

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) Type

func (msg MsgCreateLockProxy) Type() string

Type 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

func NewMsgLock(lockProxyHash []byte, fromAddress sdk.AccAddress, sourceAssetDenom string, toChainId uint64, toAddress []byte, value sdk.Int) MsgLock

func (MsgLock) GetSignBytes

func (msg MsgLock) GetSignBytes() []byte

Implements Msg.

func (MsgLock) GetSigners

func (msg MsgLock) GetSigners() []sdk.AccAddress

Implements Msg.

func (MsgLock) Route

func (msg MsgLock) Route() string

nolint

func (MsgLock) String

func (msg MsgLock) String() string

func (MsgLock) Type

func (msg MsgLock) Type() string

func (MsgLock) ValidateBasic

func (msg MsgLock) ValidateBasic() error

Implements Msg.

type QueryAssetHashParam

type QueryAssetHashParam struct {
	LockProxyHash    []byte
	SourceAssetDenom string
	ChainId          uint64
}

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

type QueryProxyHashParam struct {
	LockProxyHash []byte
	ChainId       uint64
}

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

type TxArgs struct {
	ToAssetHash []byte
	ToAddress   []byte
	Amount      *big.Int
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL