mocks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlorinKeeper

func FlorinKeeper() (*keeper.Keeper, sdk.Context)

func FlorinWithKeepers

func FlorinWithKeepers(account types.AccountKeeper, bank BankKeeper) (*keeper.Keeper, sdk.Context)

func NoOpSendRestrictionFn

func NoOpSendRestrictionFn(_ sdk.Context, _, toAddr sdk.AccAddress, _ sdk.Coins) (sdk.AccAddress, error)

Types

type AccountKeeper

type AccountKeeper struct {
	Accounts map[string]authtypes.AccountI
}

func (AccountKeeper) GetAccount

func (k AccountKeeper) GetAccount(_ sdk.Context, addr sdk.AccAddress) authtypes.AccountI

type BankKeeper

type BankKeeper struct {
	Balances    map[string]sdk.Coins
	Restriction SendRestrictionFn
}

func (BankKeeper) BurnCoins

func (k BankKeeper) BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error

func (BankKeeper) GetBalance

func (k BankKeeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin

func (BankKeeper) GetSupply

func (k BankKeeper) GetSupply(ctx sdk.Context, denom string) sdk.Coin

func (BankKeeper) MintCoins

func (k BankKeeper) MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error

func (BankKeeper) SendCoins

func (k BankKeeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error

func (BankKeeper) SendCoinsFromAccountToModule

func (k BankKeeper) SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error

func (BankKeeper) SendCoinsFromModuleToAccount

func (k BankKeeper) SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error

func (BankKeeper) WithSendCoinsRestriction

func (k BankKeeper) WithSendCoinsRestriction(check SendRestrictionFn) BankKeeper

type SendRestrictionFn

type SendRestrictionFn func(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) (newToAddr sdk.AccAddress, err error)

Jump to

Keyboard shortcuts

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