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

This section is empty.

Variables

View Source
var (
	BindAssetHashPrefix         = []byte{0x01}
	IndependentCrossDenomPrefix = []byte{0x02}
)

Functions

func GetBindAssetHashKey

func GetBindAssetHashKey(sourceDenomHash []byte, chainId uint64) []byte

func GetIndependentCrossDenomKey

func GetIndependentCrossDenomKey(denom string) []byte

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier returns a minting Querier handler.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper of the mint store

func NewKeeper

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

NewKeeper creates a new mint Keeper instance

func (Keeper) BindAssetHash

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

func (Keeper) BurnCoins

func (k Keeper) BurnCoins(ctx sdk.Context, fromAcct sdk.AccAddress, amt sdk.Coins) error

BurnCoins burns coins deletes coins from the balance of the module account. Panics if the name maps to a non-burner module account or if the amount is invalid.

func (Keeper) ContainToContractAddr

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

func (Keeper) CreateCoins

func (k Keeper) CreateCoins(ctx sdk.Context, creator sdk.AccAddress, coins sdk.Coins) error

func (Keeper) CreateDenom

func (k Keeper) CreateDenom(ctx sdk.Context, creator sdk.AccAddress, denom string) error

func (Keeper) EnsureAccountExist

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

func (Keeper) GetDenomCrossChainInfo

func (k Keeper) GetDenomCrossChainInfo(ctx sdk.Context, denom string, toChainId uint64) *types.DenomCrossChainInfo

func (Keeper) GetDenomInfo

func (k Keeper) GetDenomInfo(ctx sdk.Context, denom string) *types.DenomInfo

func (Keeper) GetModuleAccount

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

func (Keeper) Lock

func (k Keeper) Lock(ctx sdk.Context, fromAddr sdk.AccAddress, sourceAssetDenom string, toChainId uint64, toAddr []byte, amount sdk.Int) error

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) MintCoins

func (k Keeper) MintCoins(ctx sdk.Context, toAcct sdk.AccAddress, amt sdk.Coins) error

MintCoins creates new coins from thin air and adds it to the module account. Panics if the name maps to a non-minter module account or if the amount is invalid.

func (Keeper) Unlock

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

func (Keeper) ValidCreator

func (k Keeper) ValidCreator(ctx sdk.Context, denom string, creator sdk.AccAddress) bool

Jump to

Keyboard shortcuts

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