Documentation
¶
Index ¶
- type KeeperTestHelper
- func (s *KeeperTestHelper) BeginNewBlock()
- func (s *KeeperTestHelper) BeginNewBlockWithProposer(proposer sdk.ValAddress)
- func (s *KeeperTestHelper) Commit()
- func (s *KeeperTestHelper) EndBlock()
- func (s *KeeperTestHelper) FundAcc(acc sdk.AccAddress, amounts sdk.Coins)
- func (s *KeeperTestHelper) FundModuleAcc(moduleName string, amounts sdk.Coins)
- func (s *KeeperTestHelper) InstantiateContract(sender string, admin string, wasmContract []byte) string
- func (s *KeeperTestHelper) MintCoins(coins sdk.Coins)
- func (s *KeeperTestHelper) Reset()
- func (s *KeeperTestHelper) Setup()
- func (s *KeeperTestHelper) SetupMultipleValidators(numValidator int) []string
- func (s *KeeperTestHelper) SetupTestForInitGenesis()
- func (s *KeeperTestHelper) SetupValidator(bondStatus stakingtypes.BondStatus) sdk.ValAddress
- func (s *KeeperTestHelper) SetupWithLevelDB() func()
- func (s *KeeperTestHelper) StoreCode(wasmContract []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeeperTestHelper ¶
type KeeperTestHelper struct { suite.Suite App *app.App Ctx sdk.Context QueryHelper *baseapp.QueryServiceTestHelper TestAccs []sdk.AccAddress // contains filtered or unexported fields }
func (*KeeperTestHelper) BeginNewBlock ¶
func (s *KeeperTestHelper) BeginNewBlock()
BeginNewBlock starts a new block.
func (*KeeperTestHelper) BeginNewBlockWithProposer ¶
func (s *KeeperTestHelper) BeginNewBlockWithProposer(proposer sdk.ValAddress)
BeginNewBlockWithProposer begins a new block with a proposer.
func (*KeeperTestHelper) Commit ¶
func (s *KeeperTestHelper) Commit()
func (*KeeperTestHelper) EndBlock ¶
func (s *KeeperTestHelper) EndBlock()
EndBlock ends the block, and runs commit
func (*KeeperTestHelper) FundAcc ¶
func (s *KeeperTestHelper) FundAcc(acc sdk.AccAddress, amounts sdk.Coins)
FundAcc funds target address with specified amount.
func (*KeeperTestHelper) FundModuleAcc ¶
func (s *KeeperTestHelper) FundModuleAcc(moduleName string, amounts sdk.Coins)
FundModuleAcc funds target modules with specified amount.
func (*KeeperTestHelper) InstantiateContract ¶
func (s *KeeperTestHelper) InstantiateContract(sender string, admin string, wasmContract []byte) string
func (*KeeperTestHelper) MintCoins ¶
func (s *KeeperTestHelper) MintCoins(coins sdk.Coins)
func (*KeeperTestHelper) Reset ¶
func (s *KeeperTestHelper) Reset()
resets the test environment requires that all commits go through helpers in s. On first reset, will instantiate a new app, with caching enabled. NOTE: If you are using ABCI methods, usage of Reset vs Setup has not been well tested. It is believed to work, but if you get an odd error, try changing the call to this for setup to sanity check. what's supposed to happen is a new setup call, and reset just does that in such a case.
func (*KeeperTestHelper) Setup ¶
func (s *KeeperTestHelper) Setup()
Setup sets up basic environment for suite (App, Ctx, and test accounts) preserves the caching enabled/disabled state.
func (*KeeperTestHelper) SetupMultipleValidators ¶
func (s *KeeperTestHelper) SetupMultipleValidators(numValidator int) []string
SetupMultipleValidators setups "numValidator" validators and returns their address in string
func (*KeeperTestHelper) SetupTestForInitGenesis ¶
func (s *KeeperTestHelper) SetupTestForInitGenesis()
func (*KeeperTestHelper) SetupValidator ¶
func (s *KeeperTestHelper) SetupValidator(bondStatus stakingtypes.BondStatus) sdk.ValAddress
SetupValidator sets up a validator and returns the ValAddress.
func (*KeeperTestHelper) SetupWithLevelDB ¶
func (s *KeeperTestHelper) SetupWithLevelDB() func()
func (*KeeperTestHelper) StoreCode ¶
func (s *KeeperTestHelper) StoreCode(wasmContract []byte)