keeper

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServiceServer

func NewMsgServiceServer(keeper Keeper) types.MsgServiceServer

func NewQueryServiceServer

func NewQueryServiceServer(k Keeper) types.QueryServiceServer

Types

type Keeper

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

func (*Keeper) BurnCoin

func (k *Keeper) BurnCoin(ctx sdk.Context, name string, coin sdk.Coin) error

func (*Keeper) CalculateCollaterlizationRatio

func (k *Keeper) CalculateCollaterlizationRatio(
	ctx sdk.Context,
	amountIn sdk.Int,
	assetIn assettypes.Asset,
	amountOut sdk.Int,
	assetOut assettypes.Asset,
) (sdk.Dec, error)

func (*Keeper) DeleteVault

func (k *Keeper) DeleteVault(ctx sdk.Context, id uint64)

func (*Keeper) DeleteVaultForAddressByPair

func (k *Keeper) DeleteVaultForAddressByPair(ctx sdk.Context, address sdk.AccAddress, pairID uint64)

func (*Keeper) GetAsset

func (k *Keeper) GetAsset(ctx sdk.Context, id uint64) (assettypes.Asset, bool)

func (*Keeper) GetID

func (k *Keeper) GetID(ctx sdk.Context) uint64

func (*Keeper) GetPair

func (k *Keeper) GetPair(ctx sdk.Context, id uint64) (assettypes.Pair, bool)

func (*Keeper) GetPriceForAsset

func (k *Keeper) GetPriceForAsset(ctx sdk.Context, id uint64) (uint64, bool)

func (*Keeper) GetVault

func (k *Keeper) GetVault(ctx sdk.Context, id uint64) (vault types.Vault, found bool)

func (*Keeper) GetVaults

func (k *Keeper) GetVaults(ctx sdk.Context) (vaults []types.Vault)

func (*Keeper) HasVaultForAddressByPair

func (k *Keeper) HasVaultForAddressByPair(ctx sdk.Context, address sdk.AccAddress, pairID uint64) bool

func (*Keeper) Logger

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

func (*Keeper) MintCoin

func (k *Keeper) MintCoin(ctx sdk.Context, name string, coin sdk.Coin) error

func (*Keeper) SendCoinFromAccountToModule

func (k *Keeper) SendCoinFromAccountToModule(ctx sdk.Context, address sdk.AccAddress, name string, coin sdk.Coin) error

func (*Keeper) SendCoinFromModuleToAccount

func (k *Keeper) SendCoinFromModuleToAccount(ctx sdk.Context, name string, address sdk.AccAddress, coin sdk.Coin) error

func (*Keeper) SetID

func (k *Keeper) SetID(ctx sdk.Context, id uint64)

func (*Keeper) SetVault

func (k *Keeper) SetVault(ctx sdk.Context, vault types.Vault)

func (*Keeper) SetVaultForAddressByPair

func (k *Keeper) SetVaultForAddressByPair(ctx sdk.Context, address sdk.AccAddress, pairID, id uint64)

func (*Keeper) SpendableCoins

func (k *Keeper) SpendableCoins(ctx sdk.Context, address sdk.AccAddress) sdk.Coins

func (*Keeper) Store

func (k *Keeper) Store(ctx sdk.Context) sdk.KVStore

func (*Keeper) VerifyCollaterlizationRatio

func (k *Keeper) VerifyCollaterlizationRatio(
	ctx sdk.Context,
	amountIn sdk.Int,
	assetIn assettypes.Asset,
	amountOut sdk.Int,
	assetOut assettypes.Asset,
	liquidationRatio sdk.Dec,
) error

Jump to

Keyboard shortcuts

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