Documentation ¶
Overview ¶
Package testutil is a generated GoMock package.
Index ¶
- Variables
- func GetCmtConsPubKey(v types.Validator) (cmtcrypto.PubKey, error)
- func NewValidator(tb testing.TB, operator sdk.ValAddress, pubKey cryptotypes.PubKey) types.Validator
- func ToCmtValidator(v types.Validator, r math.Int) (*cmttypes.Validator, error)
- func ToCmtValidators(v types.Validators, r math.Int) ([]*cmttypes.Validator, error)
- type Helper
- func (sh *Helper) CheckDelegator(delegator sdk.AccAddress, val sdk.ValAddress, found bool)
- func (sh *Helper) CheckValidator(addr sdk.ValAddress, status stakingtypes.BondStatus, jailed bool) stakingtypes.Validator
- func (sh *Helper) CreateValidator(addr sdk.ValAddress, pk cryptotypes.PubKey, stakeAmount math.Int, ok bool)
- func (sh *Helper) CreateValidatorMsg(addr sdk.ValAddress, pk cryptotypes.PubKey, stakeAmount math.Int) *stakingtypes.MsgCreateValidator
- func (sh *Helper) CreateValidatorWithMsg(ctx context.Context, msg *stakingtypes.MsgCreateValidator) (*stakingtypes.MsgCreateValidatorResponse, error)
- func (sh *Helper) CreateValidatorWithValPower(addr sdk.ValAddress, pk cryptotypes.PubKey, valPower int64, ok bool) math.Int
- func (sh *Helper) Delegate(delegator sdk.AccAddress, val sdk.ValAddress, amount math.Int)
- func (sh *Helper) DelegateWithPower(delegator sdk.AccAddress, val sdk.ValAddress, power int64)
- func (sh *Helper) TurnBlock(newTime time.Time) sdk.Context
- func (sh *Helper) TurnBlockTimeDiff(diff time.Duration) sdk.Context
- func (sh *Helper) Undelegate(delegator sdk.AccAddress, val sdk.ValAddress, amount math.Int, ok bool)
- type MockAccountKeeper
- func (m *MockAccountKeeper) AddressCodec() address.Codec
- func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder
- func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types0.AccAddress) types0.AccountI
- func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName string) types0.ModuleAccountI
- func (m *MockAccountKeeper) GetModuleAddress(name string) types0.AccAddress
- func (m *MockAccountKeeper) IterateAccounts(ctx context.Context, process func(types0.AccountI) bool)
- func (m *MockAccountKeeper) SetModuleAccount(arg0 context.Context, arg1 types0.ModuleAccountI)
- type MockAccountKeeperMockRecorder
- func (mr *MockAccountKeeperMockRecorder) AddressCodec() *gomock.Call
- func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call
- func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName interface{}) *gomock.Call
- func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name interface{}) *gomock.Call
- func (mr *MockAccountKeeperMockRecorder) IterateAccounts(ctx, process interface{}) *gomock.Call
- func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 interface{}) *gomock.Call
- type MockBankKeeper
- func (m *MockBankKeeper) BurnCoins(ctx context.Context, name string, amt types0.Coins) error
- func (m *MockBankKeeper) DelegateCoinsFromAccountToModule(ctx context.Context, senderAddr types0.AccAddress, recipientModule string, ...) error
- func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder
- func (m *MockBankKeeper) GetAllBalances(ctx context.Context, addr types0.AccAddress) types0.Coins
- func (m *MockBankKeeper) GetBalance(ctx context.Context, addr types0.AccAddress, denom string) types0.Coin
- func (m *MockBankKeeper) GetSupply(ctx context.Context, denom string) types0.Coin
- func (m *MockBankKeeper) LockedCoins(ctx context.Context, addr types0.AccAddress) types0.Coins
- func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx context.Context, senderPool, recipientPool string, amt types0.Coins) error
- func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types0.AccAddress) types0.Coins
- func (m *MockBankKeeper) UndelegateCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr types0.AccAddress, ...) error
- type MockBankKeeperMockRecorder
- func (mr *MockBankKeeperMockRecorder) BurnCoins(ctx, name, amt interface{}) *gomock.Call
- func (mr *MockBankKeeperMockRecorder) DelegateCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call
- func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call
- func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call
- func (mr *MockBankKeeperMockRecorder) GetSupply(ctx, denom interface{}) *gomock.Call
- func (mr *MockBankKeeperMockRecorder) LockedCoins(ctx, addr interface{}) *gomock.Call
- func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderPool, recipientPool, amt interface{}) *gomock.Call
- func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call
- func (mr *MockBankKeeperMockRecorder) UndelegateCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call
- type MockDelegationSet
- type MockDelegationSetMockRecorder
- type MockRefStakingHooks
- func (m *MockRefStakingHooks) CheckDelegationAvailable(ctx context.Context, delAddr, valAddr string) error
- func (m *MockRefStakingHooks) DelegationCoinsModified(ctx context.Context, delAddr, valAddr string, oldCoins, newCoins math.Int) error
- func (m *MockRefStakingHooks) EXPECT() *MockRefStakingHooksMockRecorder
- func (m *MockRefStakingHooks) SpendCoinsForRef(ctx context.Context, addr string, totalAmount math.Int) (math.Int, error)
- type MockRefStakingHooksMockRecorder
- func (mr *MockRefStakingHooksMockRecorder) CheckDelegationAvailable(ctx, delAddr, valAddr interface{}) *gomock.Call
- func (mr *MockRefStakingHooksMockRecorder) DelegationCoinsModified(ctx, delAddr, valAddr, oldCoins, newCoins interface{}) *gomock.Call
- func (mr *MockRefStakingHooksMockRecorder) SpendCoinsForRef(ctx, addr, totalAmount interface{}) *gomock.Call
- type MockStakingHooks
- func (m *MockStakingHooks) AfterDelegationModified(ctx context.Context, delAddr types0.AccAddress, valAddr types0.ValAddress) error
- func (m *MockStakingHooks) AfterUnbondingInitiated(ctx context.Context, id uint64) error
- func (m *MockStakingHooks) AfterValidatorBeginUnbonding(ctx context.Context, consAddr types0.ConsAddress, valAddr types0.ValAddress) error
- func (m *MockStakingHooks) AfterValidatorBonded(ctx context.Context, consAddr types0.ConsAddress, valAddr types0.ValAddress) error
- func (m *MockStakingHooks) AfterValidatorCreated(ctx context.Context, valAddr types0.ValAddress) error
- func (m *MockStakingHooks) AfterValidatorRemoved(ctx context.Context, consAddr types0.ConsAddress, valAddr types0.ValAddress) error
- func (m *MockStakingHooks) BeforeDelegationCreated(ctx context.Context, delAddr types0.AccAddress, valAddr types0.ValAddress) error
- func (m *MockStakingHooks) BeforeDelegationRemoved(ctx context.Context, delAddr types0.AccAddress, valAddr types0.ValAddress) error
- func (m *MockStakingHooks) BeforeDelegationSharesModified(ctx context.Context, delAddr types0.AccAddress, valAddr types0.ValAddress) error
- func (m *MockStakingHooks) BeforeValidatorModified(ctx context.Context, valAddr types0.ValAddress) error
- func (m *MockStakingHooks) BeforeValidatorSlashed(ctx context.Context, valAddr types0.ValAddress, fraction math.LegacyDec) error
- func (m *MockStakingHooks) EXPECT() *MockStakingHooksMockRecorder
- type MockStakingHooksMockRecorder
- func (mr *MockStakingHooksMockRecorder) AfterDelegationModified(ctx, delAddr, valAddr interface{}) *gomock.Call
- func (mr *MockStakingHooksMockRecorder) AfterUnbondingInitiated(ctx, id interface{}) *gomock.Call
- func (mr *MockStakingHooksMockRecorder) AfterValidatorBeginUnbonding(ctx, consAddr, valAddr interface{}) *gomock.Call
- func (mr *MockStakingHooksMockRecorder) AfterValidatorBonded(ctx, consAddr, valAddr interface{}) *gomock.Call
- func (mr *MockStakingHooksMockRecorder) AfterValidatorCreated(ctx, valAddr interface{}) *gomock.Call
- func (mr *MockStakingHooksMockRecorder) AfterValidatorRemoved(ctx, consAddr, valAddr interface{}) *gomock.Call
- func (mr *MockStakingHooksMockRecorder) BeforeDelegationCreated(ctx, delAddr, valAddr interface{}) *gomock.Call
- func (mr *MockStakingHooksMockRecorder) BeforeDelegationRemoved(ctx, delAddr, valAddr interface{}) *gomock.Call
- func (mr *MockStakingHooksMockRecorder) BeforeDelegationSharesModified(ctx, delAddr, valAddr interface{}) *gomock.Call
- func (mr *MockStakingHooksMockRecorder) BeforeValidatorModified(ctx, valAddr interface{}) *gomock.Call
- func (mr *MockStakingHooksMockRecorder) BeforeValidatorSlashed(ctx, valAddr, fraction interface{}) *gomock.Call
- type MockValidatorSet
- func (m *MockValidatorSet) Delegation(arg0 context.Context, arg1 types0.AccAddress, arg2 types0.ValAddress) (types.DelegationI, error)
- func (m *MockValidatorSet) EXPECT() *MockValidatorSetMockRecorder
- func (m *MockValidatorSet) GetPubKeyByConsAddr(arg0 context.Context, arg1 types0.ConsAddress) (crypto.PublicKey, error)
- func (m *MockValidatorSet) IterateBondedValidatorsByPower(arg0 context.Context, arg1 func(int64, types.ValidatorI) bool) error
- func (m *MockValidatorSet) IterateLastValidators(arg0 context.Context, arg1 func(int64, types.ValidatorI) bool) error
- func (m *MockValidatorSet) IterateValidators(arg0 context.Context, arg1 func(int64, types.ValidatorI) bool) error
- func (m *MockValidatorSet) Jail(arg0 context.Context, arg1 types0.ConsAddress) error
- func (m *MockValidatorSet) MaxValidators(arg0 context.Context) (uint32, error)
- func (m *MockValidatorSet) Slash(arg0 context.Context, arg1 types0.ConsAddress, arg2, arg3 int64, ...) (math.Int, error)
- func (m *MockValidatorSet) SlashWithInfractionReason(arg0 context.Context, arg1 types0.ConsAddress, arg2, arg3 int64, ...) (math.Int, error)
- func (m *MockValidatorSet) StakingTokenSupply(arg0 context.Context) (math.Int, error)
- func (m *MockValidatorSet) TotalBondedTokens(arg0 context.Context) (math.Int, error)
- func (m *MockValidatorSet) Unjail(arg0 context.Context, arg1 types0.ConsAddress) error
- func (m *MockValidatorSet) Validator(arg0 context.Context, arg1 types0.ValAddress) (types.ValidatorI, error)
- func (m *MockValidatorSet) ValidatorByConsAddr(arg0 context.Context, arg1 types0.ConsAddress) (types.ValidatorI, error)
- type MockValidatorSetMockRecorder
- func (mr *MockValidatorSetMockRecorder) Delegation(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockValidatorSetMockRecorder) GetPubKeyByConsAddr(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockValidatorSetMockRecorder) IterateBondedValidatorsByPower(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockValidatorSetMockRecorder) IterateLastValidators(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockValidatorSetMockRecorder) IterateValidators(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockValidatorSetMockRecorder) Jail(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockValidatorSetMockRecorder) MaxValidators(arg0 interface{}) *gomock.Call
- func (mr *MockValidatorSetMockRecorder) Slash(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call
- func (mr *MockValidatorSetMockRecorder) SlashWithInfractionReason(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call
- func (mr *MockValidatorSetMockRecorder) StakingTokenSupply(arg0 interface{}) *gomock.Call
- func (mr *MockValidatorSetMockRecorder) TotalBondedTokens(arg0 interface{}) *gomock.Call
- func (mr *MockValidatorSetMockRecorder) Unjail(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockValidatorSetMockRecorder) Validator(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockValidatorSetMockRecorder) ValidatorByConsAddr(arg0, arg1 interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
var AppConfig = configurator.NewAppConfig( configurator.AuthModule(), configurator.BankModule(), appconfigurator.StakingModule(), configurator.TxModule(), configurator.ConsensusModule(), configurator.ParamsModule(), appconfigurator.GenutilModule(), appconfigurator.DistributionModule(), )
Functions ¶
func GetCmtConsPubKey ¶
GetCmtConsPubKey gets the validator's public key as a cmtcrypto.PubKey.
func NewValidator ¶
func NewValidator(tb testing.TB, operator sdk.ValAddress, pubKey cryptotypes.PubKey) types.Validator
NewValidator is a testing helper method to create validators in tests
func ToCmtValidator ¶
ToCmtValidator casts an SDK validator to a CometBFT type Validator.
func ToCmtValidators ¶
ToCmtValidators casts all validators to the corresponding CometBFT type.
Types ¶
type Helper ¶
type Helper struct { Ctx sdk.Context // Coin Denomination Denom string // contains filtered or unexported fields }
Helper is a structure which wraps the staking message server and provides methods useful in tests
func (*Helper) CheckDelegator ¶
func (sh *Helper) CheckDelegator(delegator sdk.AccAddress, val sdk.ValAddress, found bool)
CheckDelegator asserts that a delegator exists
func (*Helper) CheckValidator ¶
func (sh *Helper) CheckValidator(addr sdk.ValAddress, status stakingtypes.BondStatus, jailed bool) stakingtypes.Validator
CheckValidator asserts that a validor exists and has a given status (if status!="") and if has a right jailed flag.
func (*Helper) CreateValidator ¶
func (sh *Helper) CreateValidator(addr sdk.ValAddress, pk cryptotypes.PubKey, stakeAmount math.Int, ok bool)
CreateValidator calls staking module `MsgServer/CreateValidator` to create a new validator
func (*Helper) CreateValidatorMsg ¶
func (sh *Helper) CreateValidatorMsg(addr sdk.ValAddress, pk cryptotypes.PubKey, stakeAmount math.Int) *stakingtypes.MsgCreateValidator
CreateValidatorMsg returns a message used to create validator in this service.
func (*Helper) CreateValidatorWithMsg ¶
func (sh *Helper) CreateValidatorWithMsg(ctx context.Context, msg *stakingtypes.MsgCreateValidator) (*stakingtypes.MsgCreateValidatorResponse, error)
CreateValidatorWithMsg calls staking module `MsgServer/CreateValidator`
func (*Helper) CreateValidatorWithValPower ¶
func (sh *Helper) CreateValidatorWithValPower(addr sdk.ValAddress, pk cryptotypes.PubKey, valPower int64, ok bool) math.Int
CreateValidatorWithValPower calls staking module `MsgServer/CreateValidator` to create a new validator with zero commission
func (*Helper) Delegate ¶
func (sh *Helper) Delegate(delegator sdk.AccAddress, val sdk.ValAddress, amount math.Int)
Delegate calls staking module staking module `MsgServer/Delegate` to delegate stake for a validator
func (*Helper) DelegateWithPower ¶
func (sh *Helper) DelegateWithPower(delegator sdk.AccAddress, val sdk.ValAddress, power int64)
DelegateWithPower calls staking module `MsgServer/Delegate` to delegate stake for a validator
func (*Helper) TurnBlockTimeDiff ¶
TurnBlockTimeDiff calls EndBlocker and updates the block time by adding the duration to the current block time
func (*Helper) Undelegate ¶
func (sh *Helper) Undelegate(delegator sdk.AccAddress, val sdk.ValAddress, amount math.Int, ok bool)
Undelegate calls staking module `MsgServer/Undelegate` to unbound some stake from a validator.
type MockAccountKeeper ¶
type MockAccountKeeper struct {
// contains filtered or unexported fields
}
MockAccountKeeper is a mock of AccountKeeper interface.
func NewMockAccountKeeper ¶
func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper
NewMockAccountKeeper creates a new mock instance.
func (*MockAccountKeeper) AddressCodec ¶
func (m *MockAccountKeeper) AddressCodec() address.Codec
AddressCodec mocks base method.
func (*MockAccountKeeper) EXPECT ¶
func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAccountKeeper) GetAccount ¶
func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types0.AccAddress) types0.AccountI
GetAccount mocks base method.
func (*MockAccountKeeper) GetModuleAccount ¶
func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName string) types0.ModuleAccountI
GetModuleAccount mocks base method.
func (*MockAccountKeeper) GetModuleAddress ¶
func (m *MockAccountKeeper) GetModuleAddress(name string) types0.AccAddress
GetModuleAddress mocks base method.
func (*MockAccountKeeper) IterateAccounts ¶
func (m *MockAccountKeeper) IterateAccounts(ctx context.Context, process func(types0.AccountI) bool)
IterateAccounts mocks base method.
func (*MockAccountKeeper) SetModuleAccount ¶
func (m *MockAccountKeeper) SetModuleAccount(arg0 context.Context, arg1 types0.ModuleAccountI)
SetModuleAccount mocks base method.
type MockAccountKeeperMockRecorder ¶
type MockAccountKeeperMockRecorder struct {
// contains filtered or unexported fields
}
MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.
func (*MockAccountKeeperMockRecorder) AddressCodec ¶
func (mr *MockAccountKeeperMockRecorder) AddressCodec() *gomock.Call
AddressCodec indicates an expected call of AddressCodec.
func (*MockAccountKeeperMockRecorder) GetAccount ¶
func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call
GetAccount indicates an expected call of GetAccount.
func (*MockAccountKeeperMockRecorder) GetModuleAccount ¶
func (mr *MockAccountKeeperMockRecorder) GetModuleAccount(ctx, moduleName interface{}) *gomock.Call
GetModuleAccount indicates an expected call of GetModuleAccount.
func (*MockAccountKeeperMockRecorder) GetModuleAddress ¶
func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name interface{}) *gomock.Call
GetModuleAddress indicates an expected call of GetModuleAddress.
func (*MockAccountKeeperMockRecorder) IterateAccounts ¶
func (mr *MockAccountKeeperMockRecorder) IterateAccounts(ctx, process interface{}) *gomock.Call
IterateAccounts indicates an expected call of IterateAccounts.
func (*MockAccountKeeperMockRecorder) SetModuleAccount ¶
func (mr *MockAccountKeeperMockRecorder) SetModuleAccount(arg0, arg1 interface{}) *gomock.Call
SetModuleAccount indicates an expected call of SetModuleAccount.
type MockBankKeeper ¶
type MockBankKeeper struct {
// contains filtered or unexported fields
}
MockBankKeeper is a mock of BankKeeper interface.
func NewMockBankKeeper ¶
func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper
NewMockBankKeeper creates a new mock instance.
func (*MockBankKeeper) DelegateCoinsFromAccountToModule ¶
func (m *MockBankKeeper) DelegateCoinsFromAccountToModule(ctx context.Context, senderAddr types0.AccAddress, recipientModule string, amt types0.Coins) error
DelegateCoinsFromAccountToModule mocks base method.
func (*MockBankKeeper) EXPECT ¶
func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockBankKeeper) GetAllBalances ¶
func (m *MockBankKeeper) GetAllBalances(ctx context.Context, addr types0.AccAddress) types0.Coins
GetAllBalances mocks base method.
func (*MockBankKeeper) GetBalance ¶
func (m *MockBankKeeper) GetBalance(ctx context.Context, addr types0.AccAddress, denom string) types0.Coin
GetBalance mocks base method.
func (*MockBankKeeper) LockedCoins ¶
func (m *MockBankKeeper) LockedCoins(ctx context.Context, addr types0.AccAddress) types0.Coins
LockedCoins mocks base method.
func (*MockBankKeeper) SendCoinsFromModuleToModule ¶
func (m *MockBankKeeper) SendCoinsFromModuleToModule(ctx context.Context, senderPool, recipientPool string, amt types0.Coins) error
SendCoinsFromModuleToModule mocks base method.
func (*MockBankKeeper) SpendableCoins ¶
func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types0.AccAddress) types0.Coins
SpendableCoins mocks base method.
func (*MockBankKeeper) UndelegateCoinsFromModuleToAccount ¶
func (m *MockBankKeeper) UndelegateCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr types0.AccAddress, amt types0.Coins) error
UndelegateCoinsFromModuleToAccount mocks base method.
type MockBankKeeperMockRecorder ¶
type MockBankKeeperMockRecorder struct {
// contains filtered or unexported fields
}
MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.
func (*MockBankKeeperMockRecorder) BurnCoins ¶
func (mr *MockBankKeeperMockRecorder) BurnCoins(ctx, name, amt interface{}) *gomock.Call
BurnCoins indicates an expected call of BurnCoins.
func (*MockBankKeeperMockRecorder) DelegateCoinsFromAccountToModule ¶
func (mr *MockBankKeeperMockRecorder) DelegateCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call
DelegateCoinsFromAccountToModule indicates an expected call of DelegateCoinsFromAccountToModule.
func (*MockBankKeeperMockRecorder) GetAllBalances ¶
func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call
GetAllBalances indicates an expected call of GetAllBalances.
func (*MockBankKeeperMockRecorder) GetBalance ¶
func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call
GetBalance indicates an expected call of GetBalance.
func (*MockBankKeeperMockRecorder) GetSupply ¶
func (mr *MockBankKeeperMockRecorder) GetSupply(ctx, denom interface{}) *gomock.Call
GetSupply indicates an expected call of GetSupply.
func (*MockBankKeeperMockRecorder) LockedCoins ¶
func (mr *MockBankKeeperMockRecorder) LockedCoins(ctx, addr interface{}) *gomock.Call
LockedCoins indicates an expected call of LockedCoins.
func (*MockBankKeeperMockRecorder) SendCoinsFromModuleToModule ¶
func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToModule(ctx, senderPool, recipientPool, amt interface{}) *gomock.Call
SendCoinsFromModuleToModule indicates an expected call of SendCoinsFromModuleToModule.
func (*MockBankKeeperMockRecorder) SpendableCoins ¶
func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call
SpendableCoins indicates an expected call of SpendableCoins.
func (*MockBankKeeperMockRecorder) UndelegateCoinsFromModuleToAccount ¶
func (mr *MockBankKeeperMockRecorder) UndelegateCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call
UndelegateCoinsFromModuleToAccount indicates an expected call of UndelegateCoinsFromModuleToAccount.
type MockDelegationSet ¶
type MockDelegationSet struct {
// contains filtered or unexported fields
}
MockDelegationSet is a mock of DelegationSet interface.
func NewMockDelegationSet ¶
func NewMockDelegationSet(ctrl *gomock.Controller) *MockDelegationSet
NewMockDelegationSet creates a new mock instance.
func (*MockDelegationSet) EXPECT ¶
func (m *MockDelegationSet) EXPECT() *MockDelegationSetMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockDelegationSet) GetValidatorSet ¶
func (m *MockDelegationSet) GetValidatorSet() types.ValidatorSet
GetValidatorSet mocks base method.
func (*MockDelegationSet) IterateDelegations ¶
func (m *MockDelegationSet) IterateDelegations(ctx context.Context, delegator types0.AccAddress, fn func(int64, types.DelegationI) bool) error
IterateDelegations mocks base method.
type MockDelegationSetMockRecorder ¶
type MockDelegationSetMockRecorder struct {
// contains filtered or unexported fields
}
MockDelegationSetMockRecorder is the mock recorder for MockDelegationSet.
func (*MockDelegationSetMockRecorder) GetValidatorSet ¶
func (mr *MockDelegationSetMockRecorder) GetValidatorSet() *gomock.Call
GetValidatorSet indicates an expected call of GetValidatorSet.
func (*MockDelegationSetMockRecorder) IterateDelegations ¶
func (mr *MockDelegationSetMockRecorder) IterateDelegations(ctx, delegator, fn interface{}) *gomock.Call
IterateDelegations indicates an expected call of IterateDelegations.
type MockRefStakingHooks ¶
type MockRefStakingHooks struct {
// contains filtered or unexported fields
}
MockRefStakingHooks is a mock of RefStakingHooks interface.
func NewMockRefStakingHooks ¶
func NewMockRefStakingHooks(ctrl *gomock.Controller) *MockRefStakingHooks
NewMockRefStakingHooks creates a new mock instance.
func (*MockRefStakingHooks) CheckDelegationAvailable ¶
func (m *MockRefStakingHooks) CheckDelegationAvailable(ctx context.Context, delAddr, valAddr string) error
CheckDelegationAvailable mocks base method.
func (*MockRefStakingHooks) DelegationCoinsModified ¶
func (m *MockRefStakingHooks) DelegationCoinsModified(ctx context.Context, delAddr, valAddr string, oldCoins, newCoins math.Int) error
DelegationCoinsModified mocks base method.
func (*MockRefStakingHooks) EXPECT ¶
func (m *MockRefStakingHooks) EXPECT() *MockRefStakingHooksMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockRefStakingHooksMockRecorder ¶
type MockRefStakingHooksMockRecorder struct {
// contains filtered or unexported fields
}
MockRefStakingHooksMockRecorder is the mock recorder for MockRefStakingHooks.
func (*MockRefStakingHooksMockRecorder) CheckDelegationAvailable ¶
func (mr *MockRefStakingHooksMockRecorder) CheckDelegationAvailable(ctx, delAddr, valAddr interface{}) *gomock.Call
CheckDelegationAvailable indicates an expected call of CheckDelegationAvailable.
func (*MockRefStakingHooksMockRecorder) DelegationCoinsModified ¶
func (mr *MockRefStakingHooksMockRecorder) DelegationCoinsModified(ctx, delAddr, valAddr, oldCoins, newCoins interface{}) *gomock.Call
DelegationCoinsModified indicates an expected call of DelegationCoinsModified.
func (*MockRefStakingHooksMockRecorder) SpendCoinsForRef ¶
func (mr *MockRefStakingHooksMockRecorder) SpendCoinsForRef(ctx, addr, totalAmount interface{}) *gomock.Call
SpendCoinsForRef indicates an expected call of SpendCoinsForRef.
type MockStakingHooks ¶
type MockStakingHooks struct {
// contains filtered or unexported fields
}
MockStakingHooks is a mock of StakingHooks interface.
func NewMockStakingHooks ¶
func NewMockStakingHooks(ctrl *gomock.Controller) *MockStakingHooks
NewMockStakingHooks creates a new mock instance.
func (*MockStakingHooks) AfterDelegationModified ¶
func (m *MockStakingHooks) AfterDelegationModified(ctx context.Context, delAddr types0.AccAddress, valAddr types0.ValAddress) error
AfterDelegationModified mocks base method.
func (*MockStakingHooks) AfterUnbondingInitiated ¶
func (m *MockStakingHooks) AfterUnbondingInitiated(ctx context.Context, id uint64) error
AfterUnbondingInitiated mocks base method.
func (*MockStakingHooks) AfterValidatorBeginUnbonding ¶
func (m *MockStakingHooks) AfterValidatorBeginUnbonding(ctx context.Context, consAddr types0.ConsAddress, valAddr types0.ValAddress) error
AfterValidatorBeginUnbonding mocks base method.
func (*MockStakingHooks) AfterValidatorBonded ¶
func (m *MockStakingHooks) AfterValidatorBonded(ctx context.Context, consAddr types0.ConsAddress, valAddr types0.ValAddress) error
AfterValidatorBonded mocks base method.
func (*MockStakingHooks) AfterValidatorCreated ¶
func (m *MockStakingHooks) AfterValidatorCreated(ctx context.Context, valAddr types0.ValAddress) error
AfterValidatorCreated mocks base method.
func (*MockStakingHooks) AfterValidatorRemoved ¶
func (m *MockStakingHooks) AfterValidatorRemoved(ctx context.Context, consAddr types0.ConsAddress, valAddr types0.ValAddress) error
AfterValidatorRemoved mocks base method.
func (*MockStakingHooks) BeforeDelegationCreated ¶
func (m *MockStakingHooks) BeforeDelegationCreated(ctx context.Context, delAddr types0.AccAddress, valAddr types0.ValAddress) error
BeforeDelegationCreated mocks base method.
func (*MockStakingHooks) BeforeDelegationRemoved ¶
func (m *MockStakingHooks) BeforeDelegationRemoved(ctx context.Context, delAddr types0.AccAddress, valAddr types0.ValAddress) error
BeforeDelegationRemoved mocks base method.
func (*MockStakingHooks) BeforeDelegationSharesModified ¶
func (m *MockStakingHooks) BeforeDelegationSharesModified(ctx context.Context, delAddr types0.AccAddress, valAddr types0.ValAddress) error
BeforeDelegationSharesModified mocks base method.
func (*MockStakingHooks) BeforeValidatorModified ¶
func (m *MockStakingHooks) BeforeValidatorModified(ctx context.Context, valAddr types0.ValAddress) error
BeforeValidatorModified mocks base method.
func (*MockStakingHooks) BeforeValidatorSlashed ¶
func (m *MockStakingHooks) BeforeValidatorSlashed(ctx context.Context, valAddr types0.ValAddress, fraction math.LegacyDec) error
BeforeValidatorSlashed mocks base method.
func (*MockStakingHooks) EXPECT ¶
func (m *MockStakingHooks) EXPECT() *MockStakingHooksMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockStakingHooksMockRecorder ¶
type MockStakingHooksMockRecorder struct {
// contains filtered or unexported fields
}
MockStakingHooksMockRecorder is the mock recorder for MockStakingHooks.
func (*MockStakingHooksMockRecorder) AfterDelegationModified ¶
func (mr *MockStakingHooksMockRecorder) AfterDelegationModified(ctx, delAddr, valAddr interface{}) *gomock.Call
AfterDelegationModified indicates an expected call of AfterDelegationModified.
func (*MockStakingHooksMockRecorder) AfterUnbondingInitiated ¶
func (mr *MockStakingHooksMockRecorder) AfterUnbondingInitiated(ctx, id interface{}) *gomock.Call
AfterUnbondingInitiated indicates an expected call of AfterUnbondingInitiated.
func (*MockStakingHooksMockRecorder) AfterValidatorBeginUnbonding ¶
func (mr *MockStakingHooksMockRecorder) AfterValidatorBeginUnbonding(ctx, consAddr, valAddr interface{}) *gomock.Call
AfterValidatorBeginUnbonding indicates an expected call of AfterValidatorBeginUnbonding.
func (*MockStakingHooksMockRecorder) AfterValidatorBonded ¶
func (mr *MockStakingHooksMockRecorder) AfterValidatorBonded(ctx, consAddr, valAddr interface{}) *gomock.Call
AfterValidatorBonded indicates an expected call of AfterValidatorBonded.
func (*MockStakingHooksMockRecorder) AfterValidatorCreated ¶
func (mr *MockStakingHooksMockRecorder) AfterValidatorCreated(ctx, valAddr interface{}) *gomock.Call
AfterValidatorCreated indicates an expected call of AfterValidatorCreated.
func (*MockStakingHooksMockRecorder) AfterValidatorRemoved ¶
func (mr *MockStakingHooksMockRecorder) AfterValidatorRemoved(ctx, consAddr, valAddr interface{}) *gomock.Call
AfterValidatorRemoved indicates an expected call of AfterValidatorRemoved.
func (*MockStakingHooksMockRecorder) BeforeDelegationCreated ¶
func (mr *MockStakingHooksMockRecorder) BeforeDelegationCreated(ctx, delAddr, valAddr interface{}) *gomock.Call
BeforeDelegationCreated indicates an expected call of BeforeDelegationCreated.
func (*MockStakingHooksMockRecorder) BeforeDelegationRemoved ¶
func (mr *MockStakingHooksMockRecorder) BeforeDelegationRemoved(ctx, delAddr, valAddr interface{}) *gomock.Call
BeforeDelegationRemoved indicates an expected call of BeforeDelegationRemoved.
func (*MockStakingHooksMockRecorder) BeforeDelegationSharesModified ¶
func (mr *MockStakingHooksMockRecorder) BeforeDelegationSharesModified(ctx, delAddr, valAddr interface{}) *gomock.Call
BeforeDelegationSharesModified indicates an expected call of BeforeDelegationSharesModified.
func (*MockStakingHooksMockRecorder) BeforeValidatorModified ¶
func (mr *MockStakingHooksMockRecorder) BeforeValidatorModified(ctx, valAddr interface{}) *gomock.Call
BeforeValidatorModified indicates an expected call of BeforeValidatorModified.
func (*MockStakingHooksMockRecorder) BeforeValidatorSlashed ¶
func (mr *MockStakingHooksMockRecorder) BeforeValidatorSlashed(ctx, valAddr, fraction interface{}) *gomock.Call
BeforeValidatorSlashed indicates an expected call of BeforeValidatorSlashed.
type MockValidatorSet ¶
type MockValidatorSet struct {
// contains filtered or unexported fields
}
MockValidatorSet is a mock of ValidatorSet interface.
func NewMockValidatorSet ¶
func NewMockValidatorSet(ctrl *gomock.Controller) *MockValidatorSet
NewMockValidatorSet creates a new mock instance.
func (*MockValidatorSet) Delegation ¶
func (m *MockValidatorSet) Delegation(arg0 context.Context, arg1 types0.AccAddress, arg2 types0.ValAddress) (types.DelegationI, error)
Delegation mocks base method.
func (*MockValidatorSet) EXPECT ¶
func (m *MockValidatorSet) EXPECT() *MockValidatorSetMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockValidatorSet) GetPubKeyByConsAddr ¶
func (m *MockValidatorSet) GetPubKeyByConsAddr(arg0 context.Context, arg1 types0.ConsAddress) (crypto.PublicKey, error)
GetPubKeyByConsAddr mocks base method.
func (*MockValidatorSet) IterateBondedValidatorsByPower ¶
func (m *MockValidatorSet) IterateBondedValidatorsByPower(arg0 context.Context, arg1 func(int64, types.ValidatorI) bool) error
IterateBondedValidatorsByPower mocks base method.
func (*MockValidatorSet) IterateLastValidators ¶
func (m *MockValidatorSet) IterateLastValidators(arg0 context.Context, arg1 func(int64, types.ValidatorI) bool) error
IterateLastValidators mocks base method.
func (*MockValidatorSet) IterateValidators ¶
func (m *MockValidatorSet) IterateValidators(arg0 context.Context, arg1 func(int64, types.ValidatorI) bool) error
IterateValidators mocks base method.
func (*MockValidatorSet) Jail ¶
func (m *MockValidatorSet) Jail(arg0 context.Context, arg1 types0.ConsAddress) error
Jail mocks base method.
func (*MockValidatorSet) MaxValidators ¶
func (m *MockValidatorSet) MaxValidators(arg0 context.Context) (uint32, error)
MaxValidators mocks base method.
func (*MockValidatorSet) Slash ¶
func (m *MockValidatorSet) Slash(arg0 context.Context, arg1 types0.ConsAddress, arg2, arg3 int64, arg4 math.LegacyDec) (math.Int, error)
Slash mocks base method.
func (*MockValidatorSet) SlashWithInfractionReason ¶
func (m *MockValidatorSet) SlashWithInfractionReason(arg0 context.Context, arg1 types0.ConsAddress, arg2, arg3 int64, arg4 math.LegacyDec, arg5 types.Infraction) (math.Int, error)
SlashWithInfractionReason mocks base method.
func (*MockValidatorSet) StakingTokenSupply ¶
StakingTokenSupply mocks base method.
func (*MockValidatorSet) TotalBondedTokens ¶
TotalBondedTokens mocks base method.
func (*MockValidatorSet) Unjail ¶
func (m *MockValidatorSet) Unjail(arg0 context.Context, arg1 types0.ConsAddress) error
Unjail mocks base method.
func (*MockValidatorSet) Validator ¶
func (m *MockValidatorSet) Validator(arg0 context.Context, arg1 types0.ValAddress) (types.ValidatorI, error)
Validator mocks base method.
func (*MockValidatorSet) ValidatorByConsAddr ¶
func (m *MockValidatorSet) ValidatorByConsAddr(arg0 context.Context, arg1 types0.ConsAddress) (types.ValidatorI, error)
ValidatorByConsAddr mocks base method.
type MockValidatorSetMockRecorder ¶
type MockValidatorSetMockRecorder struct {
// contains filtered or unexported fields
}
MockValidatorSetMockRecorder is the mock recorder for MockValidatorSet.
func (*MockValidatorSetMockRecorder) Delegation ¶
func (mr *MockValidatorSetMockRecorder) Delegation(arg0, arg1, arg2 interface{}) *gomock.Call
Delegation indicates an expected call of Delegation.
func (*MockValidatorSetMockRecorder) GetPubKeyByConsAddr ¶
func (mr *MockValidatorSetMockRecorder) GetPubKeyByConsAddr(arg0, arg1 interface{}) *gomock.Call
GetPubKeyByConsAddr indicates an expected call of GetPubKeyByConsAddr.
func (*MockValidatorSetMockRecorder) IterateBondedValidatorsByPower ¶
func (mr *MockValidatorSetMockRecorder) IterateBondedValidatorsByPower(arg0, arg1 interface{}) *gomock.Call
IterateBondedValidatorsByPower indicates an expected call of IterateBondedValidatorsByPower.
func (*MockValidatorSetMockRecorder) IterateLastValidators ¶
func (mr *MockValidatorSetMockRecorder) IterateLastValidators(arg0, arg1 interface{}) *gomock.Call
IterateLastValidators indicates an expected call of IterateLastValidators.
func (*MockValidatorSetMockRecorder) IterateValidators ¶
func (mr *MockValidatorSetMockRecorder) IterateValidators(arg0, arg1 interface{}) *gomock.Call
IterateValidators indicates an expected call of IterateValidators.
func (*MockValidatorSetMockRecorder) Jail ¶
func (mr *MockValidatorSetMockRecorder) Jail(arg0, arg1 interface{}) *gomock.Call
Jail indicates an expected call of Jail.
func (*MockValidatorSetMockRecorder) MaxValidators ¶
func (mr *MockValidatorSetMockRecorder) MaxValidators(arg0 interface{}) *gomock.Call
MaxValidators indicates an expected call of MaxValidators.
func (*MockValidatorSetMockRecorder) Slash ¶
func (mr *MockValidatorSetMockRecorder) Slash(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call
Slash indicates an expected call of Slash.
func (*MockValidatorSetMockRecorder) SlashWithInfractionReason ¶
func (mr *MockValidatorSetMockRecorder) SlashWithInfractionReason(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call
SlashWithInfractionReason indicates an expected call of SlashWithInfractionReason.
func (*MockValidatorSetMockRecorder) StakingTokenSupply ¶
func (mr *MockValidatorSetMockRecorder) StakingTokenSupply(arg0 interface{}) *gomock.Call
StakingTokenSupply indicates an expected call of StakingTokenSupply.
func (*MockValidatorSetMockRecorder) TotalBondedTokens ¶
func (mr *MockValidatorSetMockRecorder) TotalBondedTokens(arg0 interface{}) *gomock.Call
TotalBondedTokens indicates an expected call of TotalBondedTokens.
func (*MockValidatorSetMockRecorder) Unjail ¶
func (mr *MockValidatorSetMockRecorder) Unjail(arg0, arg1 interface{}) *gomock.Call
Unjail indicates an expected call of Unjail.
func (*MockValidatorSetMockRecorder) Validator ¶
func (mr *MockValidatorSetMockRecorder) Validator(arg0, arg1 interface{}) *gomock.Call
Validator indicates an expected call of Validator.
func (*MockValidatorSetMockRecorder) ValidatorByConsAddr ¶
func (mr *MockValidatorSetMockRecorder) ValidatorByConsAddr(arg0, arg1 interface{}) *gomock.Call
ValidatorByConsAddr indicates an expected call of ValidatorByConsAddr.