bank

package
v0.0.0-...-41d3419 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: AGPL-3.0, AGPL-3.0-or-later Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterDenomFromBalances

func FilterDenomFromBalances(
	balances []banktypes.Balance,
	denom string,
) []banktypes.Balance

func FundAccount

func FundAccount(
	ctx sdk.Context,
	addr sdk.AccAddress,
	amounts sdk.Coins,
	bankKeeper bankkeeper.BaseKeeper,
) error

FundAccount is a test utility function that funds an account by minting the coins in the mint module, and sending them to the address account.

func FundModuleAccount

func FundModuleAccount(
	ctx sdk.Context,
	moduleName string,
	amounts sdk.Coins,
	bankKeeper bankkeeper.BaseKeeper,
) error

FundModuleAccount is a test utility function that funds a module account by minting the coins in the mint module, and sending them to the module account.

func GetModuleAccAssetBalance

func GetModuleAccAssetBalance(
	val *network.Validator,
	codec codec.Codec,
	moduleName string,
	assetDenom string,
) (
	balance int64,
	err error,
)

GetModuleAccAssetBalance is a test utility function to query asset balance of a module account from the bank module.

func MatchTDaiOfAmount

func MatchTDaiOfAmount(amount int64) func(coins sdk.Coins) bool

MatchTDaiOfAmount is a test utility function to generate a matcher function passed into mock.MatchedBy(). This matcher can be used to match parameters of *big.Int type when setting up mocks.

Types

This section is empty.

Jump to

Keyboard shortcuts

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