testutil

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ValidatorInitPower    = int64(10000000000)
	ValidatorInitTokens   = sdk.TokensFromConsensusPower(ValidatorInitPower, sdk.DefaultPowerReduction)
	ValidatorInitCoins    = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, ValidatorInitTokens))
	ValidatorAmountBonded = sdk.TokensFromConsensusPower(100, sdk.DefaultPowerReduction)
)

Functions

func FundAccount

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

FundAccount is a utility function that funds an account by minting and sending the coins to the address. This should be used for testing purposes only!

func FundModuleAccount

func FundModuleAccount(bankKeeper bankkeeper.Keeper, ctx sdk.Context, recipientMod string, amounts sdk.Coins) error

FundModuleAccount is a utility function that funds a module account by minting and sending the coins to the address. This should be used for testing purposes only!

func StakingAddValidators

func StakingAddValidators(
	bankKeeper bankkeeper.Keeper,
	stakingKeeper stakingkeeper.Keeper,
	ctx sdk.Context,
	num int,
) (
	[]sdk.AccAddress,
	[]sdk.ValAddress,
	error,
)

StakingAddValidators generates N validators and adds them to staking keeper as bonded validators.

Types

This section is empty.

Jump to

Keyboard shortcuts

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