keeper

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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// default paramspace for params keeper
	DefaultParamspace = types.ModuleName
)

Variables

View Source
var (
	OperatorToLockProxyKey = []byte{0x01}
	BindProxyPrefix        = []byte{0x02}
	BindAssetPrefix        = []byte{0x03}
)

Functions

func GetBindAssetHashKey

func GetBindAssetHashKey(lockProxyHash []byte, sourceAssetHash []byte, targetChainId uint64) []byte

func GetBindProxyKey

func GetBindProxyKey(proxyHash []byte, toChainId uint64) []byte

func GetOperatorToLockProxyKey

func GetOperatorToLockProxyKey(operator sdk.AccAddress) []byte

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier returns a minting Querier handler.

Types

type Keeper

type Keeper struct {
	selfexported.UnlockKeeper
	// contains filtered or unexported fields
}

Keeper of the mint store

func NewKeeper

func NewKeeper(
	cdc *codec.Codec, key sdk.StoreKey, ak types.AccountKeeper, supplyKeeper types.SupplyKeeper, ccmKeeper types.CrossChainManager) Keeper

NewKeeper creates a new mint Keeper instance

func (Keeper) BindAssetHash

func (k Keeper) BindAssetHash(ctx sdk.Context, operator sdk.AccAddress, sourceAssetDenom string, toChainId uint64, toAssetHash []byte) error

func (Keeper) BindProxyHash

func (k Keeper) BindProxyHash(ctx sdk.Context, operator sdk.AccAddress, toChainId uint64, toProxyHash []byte) error

func (Keeper) ContainToContractAddr

func (k Keeper) ContainToContractAddr(ctx sdk.Context, toContractAddr []byte, fromChainId uint64) bool

func (Keeper) CreateCoinAndDelegateToProxy

func (k Keeper) CreateCoinAndDelegateToProxy(ctx sdk.Context, creator sdk.AccAddress, coin sdk.Coin, lockproxyHash []byte) error

func (Keeper) CreateLockProxy

func (k Keeper) CreateLockProxy(ctx sdk.Context, creator sdk.AccAddress) error

func (Keeper) EnsureAccountExist

func (k Keeper) EnsureAccountExist(ctx sdk.Context, addr sdk.AccAddress) error

func (Keeper) EnsureLockProxyExist

func (k Keeper) EnsureLockProxyExist(ctx sdk.Context, creator sdk.AccAddress) bool

func (Keeper) GetAssetHash

func (k Keeper) GetAssetHash(ctx sdk.Context, lockProxyHash []byte, sourceAssetDenom string, toChainId uint64) []byte

func (Keeper) GetLockProxyByOperator

func (k Keeper) GetLockProxyByOperator(ctx sdk.Context, operator sdk.AccAddress) []byte

func (Keeper) GetModuleAccount

func (k Keeper) GetModuleAccount(ctx sdk.Context) exported.ModuleAccountI

func (Keeper) GetProxyHash

func (k Keeper) GetProxyHash(ctx sdk.Context, operator sdk.AccAddress, toChainId uint64) []byte

func (Keeper) Lock

func (k Keeper) Lock(ctx sdk.Context, lockProxyHash []byte, fromAddress sdk.AccAddress, sourceAssetDenom string, toChainId uint64, toAddressBs []byte, value sdk.Int) error

func (Keeper) Unlock

func (k Keeper) Unlock(ctx sdk.Context, fromChainId uint64, fromContractAddr sdk.AccAddress, toContractAddr []byte, argsBs []byte) error

Jump to

Keyboard shortcuts

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