integration

package
v1.0.1-0...-bdf299b Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerApp

type ConsumerApp interface {
	ibctesting.TestingApp

	BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
	GetConsumerKeeper() consumerkeeper.Keeper
	GetSubspace(moduleName string) paramstypes.Subspace

	// Returns a bank keeper interface with more capabilities than the expected_keepers interface
	GetTestBankKeeper() TestBankKeeper
	// Tests an account keeper interface with more capabilities than the expected_keepers interface
	GetTestAccountKeeper() TestAccountKeeper
	// Tests a slashing keeper interface with more capabilities than the expected_keepers interface
	GetTestSlashingKeeper() TestSlashingKeeper
	// Tests an evidence keeper interface with more capabilities than the expected_keepers interface
	GetTestEvidenceKeeper() TestEvidenceKeeper
}

The interface that any consumer app must implement to be compatible with integration tests This is a wrapper around the ibc testing app interface with additional constraints.

type DemocConsumerApp

type DemocConsumerApp interface {
	ConsumerApp
	// Returns a distribution keeper interface with more capabilities than the expected_keepers interface
	GetTestDistributionKeeper() TestDistributionKeeper
	// Tests a staking keeper interface with more capabilities than the expected_keepers interface
	GetTestStakingKeeper() TestStakingKeeper
	// Tests a mint keeper interface with more capabilities than the expected_keepers interface
	GetTestMintKeeper() TestMintKeeper
	// Tests a gov keeper interface with more capabilities than the expected_keepers interface
	GetTestGovKeeper() TestGovKeeper
}

type ProviderApp

type ProviderApp interface {
	ibctesting.TestingApp
	GetSubspace(moduleName string) paramstypes.Subspace

	GetProviderKeeper() providerkeeper.Keeper
	// Returns a staking keeper interface with more capabilities than the expected_keepers interface
	GetTestStakingKeeper() TestStakingKeeper
	// Returns a bank keeper interface with more capabilities than the expected_keepers interface
	GetTestBankKeeper() TestBankKeeper
	// Returns a slashing keeper interface with more capabilities than the expected_keepers interface
	GetTestSlashingKeeper() TestSlashingKeeper
	// Returns a distribution keeper interface with more capabilities than the expected_keepers interface
	GetTestDistributionKeeper() TestDistributionKeeper
	// Returns an account keeper interface with more capabilities than the expected_keepers interface
	GetTestAccountKeeper() TestAccountKeeper
}

The interface that any provider app must implement to be compatible with ccv integration tests. This is a wrapper around the ibc testing app interface with additional constraints.

type TestAccountKeeper

type TestAccountKeeper interface {
	ccvtypes.AccountKeeper
	GetParams(sdk.Context) authtypes.Params
}

type TestBankKeeper

type TestBankKeeper interface {
	ccvtypes.BankKeeper
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress,
		recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string,
		recipientAddr sdk.AccAddress, amt sdk.Coins) error
}

type TestDistributionKeeper

type TestDistributionKeeper interface {
	GetFeePoolCommunityCoins(ctx sdk.Context) sdk.DecCoins
	GetDistributionAccount(ctx sdk.Context) authtypes.ModuleAccountI
	GetValidatorOutstandingRewards(ctx sdk.Context,
		val sdk.ValAddress) (rewards distributiontypes.ValidatorOutstandingRewards)
	GetCommunityTax(ctx sdk.Context) (percent sdk.Dec)
}

type TestEvidenceKeeper

type TestEvidenceKeeper interface {
	HandleEquivocationEvidence(ctx sdk.Context, evidence *evidencetypes.Equivocation)
}

type TestGovKeeper

type TestGovKeeper interface {
	GetDepositParams(ctx sdk.Context) govtypes.DepositParams
	GetVotingParams(ctx sdk.Context) govtypes.VotingParams
	SetVotingParams(ctx sdk.Context, votingParams govtypes.VotingParams)
	SubmitProposal(ctx sdk.Context, content govtypes.Content) (govtypes.Proposal, error)
	AddDeposit(ctx sdk.Context, proposalID uint64, depositorAddr sdk.AccAddress, depositAmount sdk.Coins) (bool, error)
	AddVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress, options govtypes.WeightedVoteOptions) error
}

type TestMintKeeper

type TestMintKeeper interface {
	GetParams(ctx sdk.Context) (params minttypes.Params)
}

type TestSlashingKeeper

type TestSlashingKeeper interface {
	ccvtypes.SlashingKeeper
	SetValidatorSigningInfo(ctx sdk.Context, address sdk.ConsAddress,
		info slashingtypes.ValidatorSigningInfo)
	SignedBlocksWindow(ctx sdk.Context) (res int64)
	HandleValidatorSignature(ctx sdk.Context, addr cryptotypes.Address, power int64, signed bool)
	MinSignedPerWindow(ctx sdk.Context) int64
	IterateValidatorMissedBlockBitArray(ctx sdk.Context,
		address sdk.ConsAddress, handler func(index int64, missed bool) (stop bool))
}

type TestStakingKeeper

type TestStakingKeeper interface {
	ccvtypes.StakingKeeper
	Delegate(ctx sdk.Context, delAddr sdk.AccAddress, bondAmt sdk.Int, tokenSrc types.BondStatus,
		validator types.Validator, subtractAccount bool) (newShares sdk.Dec, err error)
	Undelegate(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, sharesAmount sdk.Dec,
	) (time.Time, error)
	BeginRedelegation(ctx sdk.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress,
		sharesAmount sdk.Dec) (completionTime time.Time, err error)
	GetUnbondingDelegationByUnbondingID(ctx sdk.Context, id uint64,
	) (ubd types.UnbondingDelegation, found bool)
	GetRedelegations(ctx sdk.Context, delegator sdk.AccAddress,
		maxRetrieve uint16) (redelegations []types.Redelegation)
	BondDenom(ctx sdk.Context) (res string)
	IsValidatorJailed(ctx sdk.Context, addr sdk.ConsAddress) bool
	GetUnbondingDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress,
	) (ubd types.UnbondingDelegation, found bool)
	GetAllValidators(ctx sdk.Context) (validators []types.Validator)
	GetValidatorSet() types.ValidatorSet
}

Jump to

Keyboard shortcuts

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