Versions in this module Expand all Collapse all v5 v5.0.0 Feb 18, 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 TestingStakeParams = stakingtypes.Params + var TestingcorkParams = types.Params + var TokenContractAddrs = []string + var ValAddrs = []sdk.ValAddress + func ExportGenesis(ctx sdk.Context, k Keeper) types.GenesisState + func HandleAddManagedCellarsProposal(ctx sdk.Context, k Keeper, p types.AddManagedCellarIDsProposal) error + func HandleRemoveManagedCellarsProposal(ctx sdk.Context, k Keeper, p types.RemoveManagedCellarIDsProposal) error + func InitGenesis(ctx sdk.Context, k Keeper, gs types.GenesisState) + func MakeTestCodec() *codec.LegacyAmino + func MakeTestMarshaler() codec.Codec + type AlwaysPanicStakingMock struct + func (s AlwaysPanicStakingMock) GetBondedValidatorsByPower(ctx sdk.Context) []stakingtypes.Validator + func (s AlwaysPanicStakingMock) GetLastTotalPower(ctx sdk.Context) (power sdk.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) PowerReduction(sdk.Context) sdk.Int + 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) AfterBatchExecutedEvent(ctx sdk.Context, event gravitytypes.BatchExecutedEvent) + func (h Hooks) AfterContractCallExecutedEvent(ctx sdk.Context, event gravitytypes.ContractCallExecutedEvent) + func (h Hooks) AfterERC20DeployedEvent(ctx sdk.Context, event gravitytypes.ERC20DeployedEvent) + func (h Hooks) AfterSendToCosmosEvent(ctx sdk.Context, event gravitytypes.SendToCosmosEvent) + func (h Hooks) AfterSignerSetExecutedEvent(ctx sdk.Context, event gravitytypes.SignerSetTxExecutedEvent) + type Keeper struct + func NewKeeper(cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, ...) Keeper + func (k Keeper) BeginBlocker(ctx sdk.Context) + func (k Keeper) DeleteCork(ctx sdk.Context, val sdk.ValAddress, contract common.Address) + func (k Keeper) DeleteScheduledCork(ctx sdk.Context, val sdk.ValAddress, blockHeight uint64, ...) + func (k Keeper) EndBlocker(ctx sdk.Context) + func (k Keeper) GetApprovedCorks(ctx sdk.Context, threshold sdk.Dec) (approvedCorks []types.Cork) + func (k Keeper) GetApprovedScheduledCorks(ctx sdk.Context, currentBlockHeight uint64, threshold sdk.Dec) (approvedCorks []types.Cork) + func (k Keeper) GetCellarIDs(ctx sdk.Context) (cellars []common.Address) + func (k Keeper) GetCommitPeriodStart(ctx sdk.Context) (int64, bool) + func (k Keeper) GetCork(ctx sdk.Context, val sdk.ValAddress, contract common.Address) (types.Cork, bool) + func (k Keeper) GetLatestInvalidationNonce(ctx sdk.Context) uint64 + func (k Keeper) GetParamSet(ctx sdk.Context) types.Params + func (k Keeper) GetScheduledBlockHeights(ctx sdk.Context) []uint64 + func (k Keeper) GetScheduledCork(ctx sdk.Context, val sdk.ValAddress, blockHeight uint64, ...) (types.Cork, bool) + func (k Keeper) GetScheduledCorks(ctx sdk.Context) []*types.ScheduledCork + func (k Keeper) GetScheduledCorksByBlockHeight(ctx sdk.Context, height uint64) []*types.ScheduledCork + func (k Keeper) GetValidatorCorks(ctx sdk.Context) []*types.ValidatorCork + func (k Keeper) HasCellarID(ctx sdk.Context, address common.Address) (found bool) + func (k Keeper) HasCommitPeriodStart(ctx sdk.Context) bool + func (k Keeper) HasCork(ctx sdk.Context, val sdk.ValAddress) bool + func (k Keeper) HasCorkForContract(ctx sdk.Context, val sdk.ValAddress, contract common.Address) bool + func (k Keeper) Hooks() Hooks + func (k Keeper) IncrementInvalidationNonce(ctx sdk.Context) uint64 + func (k Keeper) IterateCorks(ctx sdk.Context, ...) + func (k Keeper) IterateScheduledCorks(ctx sdk.Context, ...) + func (k Keeper) Logger(ctx sdk.Context) log.Logger + func (k Keeper) QueryCellarIDs(c context.Context, _ *types.QueryCellarIDsRequest) (*types.QueryCellarIDsResponse, error) + func (k Keeper) QueryCommitPeriod(c context.Context, _ *types.QueryCommitPeriodRequest) (*types.QueryCommitPeriodResponse, error) + func (k Keeper) QueryParams(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) + func (k Keeper) QueryScheduledBlockHeights(c context.Context, _ *types.QueryScheduledBlockHeightsRequest) (*types.QueryScheduledBlockHeightsResponse, error) + func (k Keeper) QueryScheduledCorks(c context.Context, _ *types.QueryScheduledCorksRequest) (*types.QueryScheduledCorksResponse, error) + func (k Keeper) QueryScheduledCorksByBlockHeight(c context.Context, req *types.QueryScheduledCorksByBlockHeightRequest) (*types.QueryScheduledCorksByBlockHeightResponse, error) + func (k Keeper) QuerySubmittedCorks(c context.Context, _ *types.QuerySubmittedCorksRequest) (*types.QuerySubmittedCorksResponse, error) + func (k Keeper) ScheduleCork(c context.Context, msg *types.MsgScheduleCorkRequest) (*types.MsgScheduleCorkResponse, error) + func (k Keeper) SetCellarIDs(ctx sdk.Context, c types.CellarIDSet) + func (k Keeper) SetCommitPeriodStart(ctx sdk.Context, height int64) + func (k Keeper) SetCork(ctx sdk.Context, val sdk.ValAddress, cork types.Cork) + func (k Keeper) SetLatestInvalidationNonce(ctx sdk.Context, invalidationNonce uint64) + func (k Keeper) SetScheduledCork(ctx sdk.Context, blockHeight uint64, val sdk.ValAddress, cork types.Cork) + func (k Keeper) SubmitCork(c context.Context, msg *types.MsgSubmitCorkRequest) (*types.MsgSubmitCorkResponse, error) + type MockStakingValidatorData struct + Operator sdk.ValAddress + Power int64 + type StakingKeeperMock struct + BondedValidators []stakingtypes.Validator + ValidatorPower map[string]int64 + func NewStakingKeeperWeightedMock(t ...MockStakingValidatorData) *StakingKeeperMock + func (s *StakingKeeperMock) GetBondedValidatorsByPower(ctx sdk.Context) []stakingtypes.Validator + func (s *StakingKeeperMock) GetLastTotalPower(ctx sdk.Context) (power sdk.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) PowerReduction(sdk.Context) sdk.Int + func (s *StakingKeeperMock) Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec) + 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 gravitykeeper.Keeper + LegacyAmino *codec.LegacyAmino + Marshaler codec.Codec + SlashingKeeper slashingkeeper.Keeper + StakingKeeper stakingkeeper.Keeper + func CreateTestEnv(t *testing.T) TestInput Other modules containing this package github.com/peggyjv/sommelier/v4 github.com/peggyjv/sommelier/v6 github.com/peggyjv/sommelier/v7 github.com/peggyjv/sommelier/v8