Versions in this module Expand all Collapse all v4 v4.0.1 Feb 9, 2024 v4.0.0 Dec 11, 2023 Changes in this version + var AccAddrs = []sdk.AccAddress + var AccPrivKeys = []ccrypto.PrivKey + var AccPubKeys = []ccrypto.PubKey + var ConsPrivKeys = []ccrypto.PrivKey + var ConsPubKeys = []ccrypto.PubKey + var EthAddrs = []gethcommon.Address + var InitCoins = sdk.NewCoins(sdk.NewCoin(TestingStakeParams.BondDenom, InitTokens)) + var InitTokens = sdk.TokensFromConsensusPower(110, sdk.DefaultPowerReduction) + var ModuleBasics = module.NewBasicManager(auth.AppModuleBasic{}, genutil.AppModuleBasic{}, bank.AppModuleBasic{}, ...) + var StakingAmount = sdk.TokensFromConsensusPower(10, sdk.DefaultPowerReduction) + var StakingCoins = sdk.NewCoins(sdk.NewCoin(TestingStakeParams.BondDenom, StakingAmount)) + var TestingGravityParams = types.Params + var TestingStakeParams = stakingtypes.Params + var TokenContractAddrs = []string + var ValAddrs = []sdk.ValAddress + func MakeTestCodec() *codec.LegacyAmino + func MakeTestMarshaler() codec.Codec + func MintVouchersFromAir(t *testing.T, ctx sdk.Context, k Keeper, dest sdk.AccAddress, ...) sdk.Coin + func NewTestMsgCreateValidator(address sdk.ValAddress, pubKey ccrypto.PubKey, amt sdkmath.Int) *stakingtypes.MsgCreateValidator + func NewTestMsgUnDelegateValidator(address sdk.ValAddress, amt sdkmath.Int) *stakingtypes.MsgUndelegate + type AlwaysPanicStakingMock struct + func (s AlwaysPanicStakingMock) GetBondedValidatorsByPower(ctx sdk.Context) []stakingtypes.Validator + func (s AlwaysPanicStakingMock) GetLastTotalPower(ctx sdk.Context) (power sdkmath.Int) + func (s AlwaysPanicStakingMock) GetLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress) int64 + func (s AlwaysPanicStakingMock) IterateBondedValidatorsByPower(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) + func (s AlwaysPanicStakingMock) IterateLastValidators(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) + func (s AlwaysPanicStakingMock) IterateValidators(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool)) + func (s AlwaysPanicStakingMock) Jail(sdk.Context, sdk.ConsAddress) + func (s AlwaysPanicStakingMock) Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec) + func (s AlwaysPanicStakingMock) Validator(sdk.Context, sdk.ValAddress) stakingtypes.ValidatorI + func (s AlwaysPanicStakingMock) ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) stakingtypes.ValidatorI + type Hooks struct + func (h Hooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error + func (h Hooks) AfterValidatorBeginUnbonding(ctx sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error + func (h Hooks) AfterValidatorBonded(_ sdk.Context, _ sdk.ConsAddress, _ sdk.ValAddress) error + func (h Hooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error + func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) error + func (h Hooks) BeforeDelegationCreated(_ sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error + func (h Hooks) BeforeDelegationRemoved(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) error + func (h Hooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error + func (h Hooks) BeforeValidatorModified(_ sdk.Context, _ sdk.ValAddress) error + func (h Hooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error + type Keeper struct + PowerReduction sdk.Int + SlashingKeeper types.SlashingKeeper + StakingKeeper types.StakingKeeper + func NewKeeper(cdc codec.Codec, storeKey storetypes.StoreKey, paramSpace paramtypes.Subspace, ...) Keeper + func (k *Keeper) SetHooks(sh types.GravityHooks) *Keeper + func (k Keeper) AfterBatchExecutedEvent(ctx sdk.Context, event types.BatchExecutedEvent) + func (k Keeper) AfterContractCallExecutedEvent(ctx sdk.Context, event types.ContractCallExecutedEvent) + func (k Keeper) AfterERC20DeployedEvent(ctx sdk.Context, event types.ERC20DeployedEvent) + func (k Keeper) AfterSendToCosmosEvent(ctx sdk.Context, event types.SendToCosmosEvent) + func (k Keeper) AfterSignerSetExecutedEvent(ctx sdk.Context, event types.SignerSetTxExecutedEvent) + func (k Keeper) Hooks() Hooks + func (k Keeper) Logger(ctx sdk.Context) log.Logger + type MockStakingValidatorData struct + Operator sdk.ValAddress + Power int64 + type StakingKeeperMock struct + BondedValidators []stakingtypes.Validator + ValidatorPower map[string]int64 + func NewStakingKeeperMock(operators ...sdk.ValAddress) *StakingKeeperMock + func NewStakingKeeperWeightedMock(t ...MockStakingValidatorData) *StakingKeeperMock + func (s *StakingKeeperMock) GetBondedValidatorsByPower(ctx sdk.Context) []stakingtypes.Validator + func (s *StakingKeeperMock) GetLastTotalPower(ctx sdk.Context) (power sdkmath.Int) + func (s *StakingKeeperMock) GetLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress) int64 + func (s *StakingKeeperMock) GetParams(ctx sdk.Context) stakingtypes.Params + func (s *StakingKeeperMock) GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool) + func (s *StakingKeeperMock) IterateBondedValidatorsByPower(ctx sdk.Context, ...) + func (s *StakingKeeperMock) IterateLastValidators(ctx sdk.Context, ...) + func (s *StakingKeeperMock) IterateValidators(ctx sdk.Context, ...) + func (s *StakingKeeperMock) Jail(sdk.Context, sdk.ConsAddress) + func (s *StakingKeeperMock) Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec) sdkmath.Int + func (s *StakingKeeperMock) Validator(ctx sdk.Context, addr sdk.ValAddress) stakingtypes.ValidatorI + func (s *StakingKeeperMock) ValidatorByConsAddr(ctx sdk.Context, addr sdk.ConsAddress) stakingtypes.ValidatorI + func (s *StakingKeeperMock) ValidatorQueueIterator(ctx sdk.Context, endTime time.Time, endHeight int64) sdk.Iterator + type TestInput struct + AccountKeeper authkeeper.AccountKeeper + BankKeeper bankkeeper.BaseKeeper + Context sdk.Context + DistKeeper distrkeeper.Keeper + GovKeeper govkeeper.Keeper + GravityKeeper Keeper + GravityStoreKey *storetypes.KVStoreKey + LegacyAmino *codec.LegacyAmino + Marshaler codec.Codec + SlashingKeeper slashingkeeper.Keeper + StakingKeeper stakingkeeper.Keeper + func CreateTestEnv(t *testing.T) TestInput + func (input TestInput) AddBalanceToBank(ctx sdk.Context, addr sdk.AccAddress, balances sdk.Coins) error Other modules containing this package github.com/peggyjv/gravity-bridge/module/v2