app

package
v2.0.0-rc6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddValidatorsToAppGenesis

func AddValidatorsToAppGenesis(app *c4eapp.App, genesisState c4eapp.GenesisState, bondDenom string, valSet *tmtypes.ValidatorSet, balances ...banktypes.Balance) sdk.Coin

func BaseSetup

func BaseSetup() (*c4eapp.App, c4eapp.GenesisState)

func Setup

func Setup(isCheckTx bool) *c4eapp.App

func SetupAndGetValidatorsRelatedCoins

func SetupAndGetValidatorsRelatedCoins(isCheckTx bool, balances ...banktypes.Balance) (*c4eapp.App, sdk.Coin)

func SetupApp

func SetupApp(initBlock int64) (*c4eapp.App, sdk.Context, sdk.Coin)

func SetupAppWithTime

func SetupAppWithTime(initBlock int64, initTime time.Time, balances ...banktypes.Balance) (*c4eapp.App, sdk.Context, sdk.Coin)

func SetupWithBondDenom

func SetupWithBondDenom(isCheckTx bool, bondDenom string) (*c4eapp.App, sdk.Coin)

Setup initializes a new chainforenergyApp

func SetupWithValidatorsAmount

func SetupWithValidatorsAmount(isCheckTx bool, bondDenom string, validatorsAmount int, balances ...banktypes.Balance) (*c4eapp.App, sdk.Coin)

Types

type TestHelper

type TestHelper struct {
	App                   *c4eapp.App
	Context               sdk.Context
	WrappedContext        context.Context
	InitialValidatorsCoin sdk.Coin
	InitTime              time.Time
	BankUtils             *testcosmos.ContextBankUtils
	AuthUtils             *testcosmos.ContextAuthUtils
	StakingUtils          *testcosmos.ContextStakingUtils
	GovUtils              *testcosmos.ContextGovUtils
	DistributionUtils     *testcosmos.ContextDistributionUtils
	FeegrantUtils         *testcosmos.ContextFeegrantUtils
	C4eVestingUtils       *testcfevesting.ContextC4eVestingUtils
	C4eMinterUtils        *testcfeminter.ContextC4eMinterUtils
	C4eDistributorUtils   *testcfedistributor.ContextC4eDistributorUtils
	C4eClaimUtils         *testcfeclaim.ContextC4eClaimUtils
}

func SetupTestApp

func SetupTestApp(t require.TestingT) *TestHelper

func SetupTestAppWithHeight

func SetupTestAppWithHeight(t require.TestingT, initBlock int64) *TestHelper

func SetupTestAppWithHeightAndTime

func SetupTestAppWithHeightAndTime(t require.TestingT, initBlock int64, initTime time.Time, balances ...banktypes.Balance) *TestHelper

func (*TestHelper) BeginBlocker

func (*TestHelper) EndBlocker

func (th *TestHelper) EndBlocker(req abci.RequestEndBlock) abci.ResponseEndBlock

func (TestHelper) GetContext

func (th TestHelper) GetContext() sdk.Context

func (TestHelper) GetWrappedContext

func (th TestHelper) GetWrappedContext() context.Context

func (*TestHelper) IncrementContextBlockHeight

func (th *TestHelper) IncrementContextBlockHeight()

func (*TestHelper) IncrementContextBlockHeightAndSetTime

func (th *TestHelper) IncrementContextBlockHeightAndSetTime(time time.Time)

func (*TestHelper) SetContextBlockHeight

func (th *TestHelper) SetContextBlockHeight(height int64)

func (*TestHelper) SetContextBlockHeightAndAddTime

func (th *TestHelper) SetContextBlockHeightAndAddTime(height int64, durationToAdd time.Duration)

func (*TestHelper) SetContextBlockHeightAndTime

func (th *TestHelper) SetContextBlockHeightAndTime(height int64, time time.Time)

func (*TestHelper) SetContextBlockTime

func (th *TestHelper) SetContextBlockTime(time time.Time)

Jump to

Keyboard shortcuts

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