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

Documentation

Index

Constants

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

Variables

View Source
var (
	ChainIdToAssetHashPrefix       = []byte{0x01}
	CreatorDenomToScriptHashPrefix = []byte{0x02}
	ScriptHashToRedeemScriptPrefix = []byte{0x03}
	DenomToCreatorPrefix           = []byte{0x04}
	BindAssetHashPrefix            = []byte{0x05}
	DenomToRedeemScriptKey         = []byte{0x06}
)

Functions

func GetBindAssetHashKey

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

func GetCreatorDenomToScriptHashKey

func GetCreatorDenomToScriptHashKey(creator sdk.AccAddress, denom string) []byte

func GetDenomToCreatorKey

func GetDenomToCreatorKey(denom string) []byte

func GetDenomToRedeemScriptKey

func GetDenomToRedeemScriptKey(denom string) []byte

func GetScriptHashAndChainIdToAssetHashKey

func GetScriptHashAndChainIdToAssetHashKey(scriptHash []byte, chainId uint64) []byte

TODO: delete this method

func GetScriptHashToRedeemScript

func GetScriptHashToRedeemScript(scriptHashKeyBs []byte) []byte

func NewQuerier

func NewQuerier(k Keeper) sdk.Querier

NewQuerier returns a minting Querier handler.

Types

type Keeper

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

Keeper of the btcx store

func NewKeeper

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

NewKeeper creates a new btcx 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

func (Keeper) ContainToContractAddr

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

func (Keeper) CreateDenom

func (k Keeper) CreateDenom(ctx sdk.Context, creator sdk.AccAddress, denom string, redeemScript string) 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) 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

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