testutil

package
v10.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package testutil is a generated GoMock package.

Package testutil is a generated GoMock package.

Package testutil is a generated GoMock package.

Package testutil is a generated GoMock package.

Package testutil is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAccountKeeper) GetAccount

func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddress) types.AccountI

GetAccount mocks base method.

func (*MockAccountKeeper) GetModuleAccount

func (m *MockAccountKeeper) GetModuleAccount(ctx context.Context, moduleName string) types.ModuleAccountI

GetModuleAccount mocks base method.

type MockAccountKeeperMockRecorder

type MockAccountKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.

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.

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) BurnCoins

func (m *MockBankKeeper) BurnCoins(ctx context.Context, moduleName string, amt types.Coins) error

BurnCoins mocks base method.

func (*MockBankKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockBankKeeper) GetBalance

func (m *MockBankKeeper) GetBalance(ctx context.Context, addr types.AccAddress, denom string) types.Coin

GetBalance mocks base method.

func (*MockBankKeeper) IterateAllBalances

func (m *MockBankKeeper) IterateAllBalances(ctx context.Context, cb func(types.AccAddress, types.Coin) bool)

IterateAllBalances mocks base method.

func (*MockBankKeeper) MintCoins

func (m *MockBankKeeper) MintCoins(ctx context.Context, moduleName string, amt types.Coins) error

MintCoins mocks base method.

func (*MockBankKeeper) SendCoinsFromAccountToModule

func (m *MockBankKeeper) SendCoinsFromAccountToModule(ctx context.Context, senderAddr types.AccAddress, recipientModule string, amt types.Coins) error

SendCoinsFromAccountToModule mocks base method.

func (*MockBankKeeper) SendCoinsFromModuleToAccount

func (m *MockBankKeeper) SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr types.AccAddress, amt types.Coins) error

SendCoinsFromModuleToAccount mocks base method.

func (*MockBankKeeper) SpendableCoins

func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types.AccAddress) types.Coins

SpendableCoins 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, moduleName, amt interface{}) *gomock.Call

BurnCoins indicates an expected call of BurnCoins.

func (*MockBankKeeperMockRecorder) GetBalance

func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call

GetBalance indicates an expected call of GetBalance.

func (*MockBankKeeperMockRecorder) IterateAllBalances

func (mr *MockBankKeeperMockRecorder) IterateAllBalances(ctx, cb interface{}) *gomock.Call

IterateAllBalances indicates an expected call of IterateAllBalances.

func (*MockBankKeeperMockRecorder) MintCoins

func (mr *MockBankKeeperMockRecorder) MintCoins(ctx, moduleName, amt interface{}) *gomock.Call

MintCoins indicates an expected call of MintCoins.

func (*MockBankKeeperMockRecorder) SendCoinsFromAccountToModule

func (mr *MockBankKeeperMockRecorder) SendCoinsFromAccountToModule(ctx, senderAddr, recipientModule, amt interface{}) *gomock.Call

SendCoinsFromAccountToModule indicates an expected call of SendCoinsFromAccountToModule.

func (*MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount

func (mr *MockBankKeeperMockRecorder) SendCoinsFromModuleToAccount(ctx, senderModule, recipientAddr, amt interface{}) *gomock.Call

SendCoinsFromModuleToAccount indicates an expected call of SendCoinsFromModuleToAccount.

func (*MockBankKeeperMockRecorder) SpendableCoins

func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call

SpendableCoins indicates an expected call of SpendableCoins.

type MockGovKeeper

type MockGovKeeper struct {
	// contains filtered or unexported fields
}

MockGovKeeper is a mock of GovKeeper interface.

func NewMockGovKeeper

func NewMockGovKeeper(ctrl *gomock.Controller) *MockGovKeeper

NewMockGovKeeper creates a new mock instance.

func (*MockGovKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGovKeeper) SubmitProposal

func (m *MockGovKeeper) SubmitProposal(ctx context.Context, messages []types.Msg, metadata string) (v1.Proposal, error)

SubmitProposal mocks base method.

type MockGovKeeperMockRecorder

type MockGovKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockGovKeeperMockRecorder is the mock recorder for MockGovKeeper.

func (*MockGovKeeperMockRecorder) SubmitProposal

func (mr *MockGovKeeperMockRecorder) SubmitProposal(ctx, messages, metadata interface{}) *gomock.Call

SubmitProposal indicates an expected call of SubmitProposal.

type MockPubKey

type MockPubKey struct {
	// contains filtered or unexported fields
}

MockPubKey is a mock of PubKey interface.

func NewMockPubKey

func NewMockPubKey(ctrl *gomock.Controller) *MockPubKey

NewMockPubKey creates a new mock instance.

func (*MockPubKey) Address

func (m *MockPubKey) Address() types.Address

Address mocks base method.

func (*MockPubKey) Bytes

func (m *MockPubKey) Bytes() []byte

Bytes mocks base method.

func (*MockPubKey) EXPECT

func (m *MockPubKey) EXPECT() *MockPubKeyMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPubKey) Equals

func (m *MockPubKey) Equals(arg0 types.PubKey) bool

Equals mocks base method.

func (*MockPubKey) ProtoMessage

func (m *MockPubKey) ProtoMessage()

ProtoMessage mocks base method.

func (*MockPubKey) Reset

func (m *MockPubKey) Reset()

Reset mocks base method.

func (*MockPubKey) String

func (m *MockPubKey) String() string

String mocks base method.

func (*MockPubKey) Type

func (m *MockPubKey) Type() string

Type mocks base method.

func (*MockPubKey) VerifySignature

func (m *MockPubKey) VerifySignature(msg, sig []byte) bool

VerifySignature mocks base method.

type MockPubKeyMockRecorder

type MockPubKeyMockRecorder struct {
	// contains filtered or unexported fields
}

MockPubKeyMockRecorder is the mock recorder for MockPubKey.

func (*MockPubKeyMockRecorder) Address

func (mr *MockPubKeyMockRecorder) Address() *gomock.Call

Address indicates an expected call of Address.

func (*MockPubKeyMockRecorder) Bytes

func (mr *MockPubKeyMockRecorder) Bytes() *gomock.Call

Bytes indicates an expected call of Bytes.

func (*MockPubKeyMockRecorder) Equals

func (mr *MockPubKeyMockRecorder) Equals(arg0 interface{}) *gomock.Call

Equals indicates an expected call of Equals.

func (*MockPubKeyMockRecorder) ProtoMessage

func (mr *MockPubKeyMockRecorder) ProtoMessage() *gomock.Call

ProtoMessage indicates an expected call of ProtoMessage.

func (*MockPubKeyMockRecorder) Reset

func (mr *MockPubKeyMockRecorder) Reset() *gomock.Call

Reset indicates an expected call of Reset.

func (*MockPubKeyMockRecorder) String

func (mr *MockPubKeyMockRecorder) String() *gomock.Call

String indicates an expected call of String.

func (*MockPubKeyMockRecorder) Type

func (mr *MockPubKeyMockRecorder) Type() *gomock.Call

Type indicates an expected call of Type.

func (*MockPubKeyMockRecorder) VerifySignature

func (mr *MockPubKeyMockRecorder) VerifySignature(msg, sig interface{}) *gomock.Call

VerifySignature indicates an expected call of VerifySignature.

type MockSlashingKeeper

type MockSlashingKeeper struct {
	// contains filtered or unexported fields
}

MockSlashingKeeper is a mock of SlashingKeeper interface.

func NewMockSlashingKeeper

func NewMockSlashingKeeper(ctrl *gomock.Controller) *MockSlashingKeeper

NewMockSlashingKeeper creates a new mock instance.

func (*MockSlashingKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSlashingKeeper) GetParams

func (m *MockSlashingKeeper) GetParams(ctx context.Context) (types0.Params, error)

GetParams mocks base method.

type MockSlashingKeeperMockRecorder

type MockSlashingKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockSlashingKeeperMockRecorder is the mock recorder for MockSlashingKeeper.

func (*MockSlashingKeeperMockRecorder) GetParams

func (mr *MockSlashingKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Call

GetParams indicates an expected call of GetParams.

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 types.AccAddress, valAddr types.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 types.ConsAddress, valAddr types.ValAddress) error

AfterValidatorBeginUnbonding mocks base method.

func (*MockStakingHooks) AfterValidatorBonded

func (m *MockStakingHooks) AfterValidatorBonded(ctx context.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error

AfterValidatorBonded mocks base method.

func (*MockStakingHooks) AfterValidatorCreated

func (m *MockStakingHooks) AfterValidatorCreated(ctx context.Context, valAddr types.ValAddress) error

AfterValidatorCreated mocks base method.

func (*MockStakingHooks) AfterValidatorRemoved

func (m *MockStakingHooks) AfterValidatorRemoved(ctx context.Context, consAddr types.ConsAddress, valAddr types.ValAddress) error

AfterValidatorRemoved mocks base method.

func (*MockStakingHooks) BeforeDelegationCreated

func (m *MockStakingHooks) BeforeDelegationCreated(ctx context.Context, delAddr types.AccAddress, valAddr types.ValAddress) error

BeforeDelegationCreated mocks base method.

func (*MockStakingHooks) BeforeDelegationRemoved

func (m *MockStakingHooks) BeforeDelegationRemoved(ctx context.Context, delAddr types.AccAddress, valAddr types.ValAddress) error

BeforeDelegationRemoved mocks base method.

func (*MockStakingHooks) BeforeDelegationSharesModified

func (m *MockStakingHooks) BeforeDelegationSharesModified(ctx context.Context, delAddr types.AccAddress, valAddr types.ValAddress) error

BeforeDelegationSharesModified mocks base method.

func (*MockStakingHooks) BeforeValidatorModified

func (m *MockStakingHooks) BeforeValidatorModified(ctx context.Context, valAddr types.ValAddress) error

BeforeValidatorModified mocks base method.

func (*MockStakingHooks) BeforeValidatorSlashed

func (m *MockStakingHooks) BeforeValidatorSlashed(ctx context.Context, valAddr types.ValAddress, fraction math.LegacyDec) error

BeforeValidatorSlashed mocks base method.

func (*MockStakingHooks) EXPECT

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 MockStakingKeeper

type MockStakingKeeper struct {
	// contains filtered or unexported fields
}

MockStakingKeeper is a mock of StakingKeeper interface.

func NewMockStakingKeeper

func NewMockStakingKeeper(ctrl *gomock.Controller) *MockStakingKeeper

NewMockStakingKeeper creates a new mock instance.

func (*MockStakingKeeper) BondDenom

func (m *MockStakingKeeper) BondDenom(ctx context.Context) (string, error)

BondDenom mocks base method.

func (*MockStakingKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStakingKeeper) GetAllDelegations

func (m *MockStakingKeeper) GetAllDelegations(ctx context.Context) ([]types1.Delegation, error)

GetAllDelegations mocks base method.

func (*MockStakingKeeper) GetAllDelegatorDelegations

func (m *MockStakingKeeper) GetAllDelegatorDelegations(ctx context.Context, delegator types.AccAddress) ([]types1.Delegation, error)

GetAllDelegatorDelegations mocks base method.

func (*MockStakingKeeper) GetAllValidators

func (m *MockStakingKeeper) GetAllValidators(ctx context.Context) ([]types1.Validator, error)

GetAllValidators mocks base method.

func (*MockStakingKeeper) GetParams

func (m *MockStakingKeeper) GetParams(ctx context.Context) (types1.Params, error)

GetParams mocks base method.

func (*MockStakingKeeper) GetUnbondingDelegationsFromValidator

func (m *MockStakingKeeper) GetUnbondingDelegationsFromValidator(ctx context.Context, validator types.ValAddress) ([]types1.UnbondingDelegation, error)

GetUnbondingDelegationsFromValidator mocks base method.

func (*MockStakingKeeper) GetValidator

func (m *MockStakingKeeper) GetValidator(ctx context.Context, addr types.ValAddress) (types1.Validator, error)

GetValidator mocks base method.

func (*MockStakingKeeper) GetValidators

func (m *MockStakingKeeper) GetValidators(ctx context.Context, maxRetrieve uint32) ([]types1.Validator, error)

GetValidators mocks base method.

func (*MockStakingKeeper) Hooks

Hooks mocks base method.

func (*MockStakingKeeper) RemoveDelegation

func (m *MockStakingKeeper) RemoveDelegation(ctx context.Context, delegation types1.Delegation) error

RemoveDelegation mocks base method.

func (*MockStakingKeeper) RemoveValidatorTokens

func (m *MockStakingKeeper) RemoveValidatorTokens(ctx context.Context, validator types1.Validator, tokensToRemove math.Int) (types1.Validator, error)

RemoveValidatorTokens mocks base method.

func (*MockStakingKeeper) RemoveValidatorTokensAndShares

func (m *MockStakingKeeper) RemoveValidatorTokensAndShares(ctx context.Context, validator types1.Validator, sharesToRemove math.LegacyDec) (types1.Validator, math.Int, error)

RemoveValidatorTokensAndShares mocks base method.

func (*MockStakingKeeper) SlashUnbondingDelegation

func (m *MockStakingKeeper) SlashUnbondingDelegation(ctx context.Context, ubd types1.UnbondingDelegation, infractionHeight int64, slashFactor math.LegacyDec) (math.Int, error)

SlashUnbondingDelegation mocks base method.

func (*MockStakingKeeper) Unbond

func (m *MockStakingKeeper) Unbond(ctx context.Context, delAddr types.AccAddress, valAddr types.ValAddress, shares math.LegacyDec) (math.Int, error)

Unbond mocks base method.

type MockStakingKeeperMockRecorder

type MockStakingKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockStakingKeeperMockRecorder is the mock recorder for MockStakingKeeper.

func (*MockStakingKeeperMockRecorder) BondDenom

func (mr *MockStakingKeeperMockRecorder) BondDenom(ctx interface{}) *gomock.Call

BondDenom indicates an expected call of BondDenom.

func (*MockStakingKeeperMockRecorder) GetAllDelegations

func (mr *MockStakingKeeperMockRecorder) GetAllDelegations(ctx interface{}) *gomock.Call

GetAllDelegations indicates an expected call of GetAllDelegations.

func (*MockStakingKeeperMockRecorder) GetAllDelegatorDelegations

func (mr *MockStakingKeeperMockRecorder) GetAllDelegatorDelegations(ctx, delegator interface{}) *gomock.Call

GetAllDelegatorDelegations indicates an expected call of GetAllDelegatorDelegations.

func (*MockStakingKeeperMockRecorder) GetAllValidators

func (mr *MockStakingKeeperMockRecorder) GetAllValidators(ctx interface{}) *gomock.Call

GetAllValidators indicates an expected call of GetAllValidators.

func (*MockStakingKeeperMockRecorder) GetParams

func (mr *MockStakingKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Call

GetParams indicates an expected call of GetParams.

func (*MockStakingKeeperMockRecorder) GetUnbondingDelegationsFromValidator

func (mr *MockStakingKeeperMockRecorder) GetUnbondingDelegationsFromValidator(ctx, validator interface{}) *gomock.Call

GetUnbondingDelegationsFromValidator indicates an expected call of GetUnbondingDelegationsFromValidator.

func (*MockStakingKeeperMockRecorder) GetValidator

func (mr *MockStakingKeeperMockRecorder) GetValidator(ctx, addr interface{}) *gomock.Call

GetValidator indicates an expected call of GetValidator.

func (*MockStakingKeeperMockRecorder) GetValidators

func (mr *MockStakingKeeperMockRecorder) GetValidators(ctx, maxRetrieve interface{}) *gomock.Call

GetValidators indicates an expected call of GetValidators.

func (*MockStakingKeeperMockRecorder) Hooks

Hooks indicates an expected call of Hooks.

func (*MockStakingKeeperMockRecorder) RemoveDelegation

func (mr *MockStakingKeeperMockRecorder) RemoveDelegation(ctx, delegation interface{}) *gomock.Call

RemoveDelegation indicates an expected call of RemoveDelegation.

func (*MockStakingKeeperMockRecorder) RemoveValidatorTokens

func (mr *MockStakingKeeperMockRecorder) RemoveValidatorTokens(ctx, validator, tokensToRemove interface{}) *gomock.Call

RemoveValidatorTokens indicates an expected call of RemoveValidatorTokens.

func (*MockStakingKeeperMockRecorder) RemoveValidatorTokensAndShares

func (mr *MockStakingKeeperMockRecorder) RemoveValidatorTokensAndShares(ctx, validator, sharesToRemove interface{}) *gomock.Call

RemoveValidatorTokensAndShares indicates an expected call of RemoveValidatorTokensAndShares.

func (*MockStakingKeeperMockRecorder) SlashUnbondingDelegation

func (mr *MockStakingKeeperMockRecorder) SlashUnbondingDelegation(ctx, ubd, infractionHeight, slashFactor interface{}) *gomock.Call

SlashUnbondingDelegation indicates an expected call of SlashUnbondingDelegation.

func (*MockStakingKeeperMockRecorder) Unbond

func (mr *MockStakingKeeperMockRecorder) Unbond(ctx, delAddr, valAddr, shares interface{}) *gomock.Call

Unbond indicates an expected call of Unbond.

type MockStakingMsgServer

type MockStakingMsgServer struct {
	// contains filtered or unexported fields
}

MockStakingMsgServer is a mock of StakingMsgServer interface.

func NewMockStakingMsgServer

func NewMockStakingMsgServer(ctrl *gomock.Controller) *MockStakingMsgServer

NewMockStakingMsgServer creates a new mock instance.

func (*MockStakingMsgServer) BeginRedelegate

BeginRedelegate mocks base method.

func (*MockStakingMsgServer) CancelUnbondingDelegation

CancelUnbondingDelegation mocks base method.

func (*MockStakingMsgServer) CreateValidator

CreateValidator mocks base method.

func (*MockStakingMsgServer) Delegate

Delegate mocks base method.

func (*MockStakingMsgServer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStakingMsgServer) EditValidator

EditValidator mocks base method.

func (*MockStakingMsgServer) Undelegate

Undelegate mocks base method.

func (*MockStakingMsgServer) UpdateParams

UpdateParams mocks base method.

type MockStakingMsgServerMockRecorder

type MockStakingMsgServerMockRecorder struct {
	// contains filtered or unexported fields
}

MockStakingMsgServerMockRecorder is the mock recorder for MockStakingMsgServer.

func (*MockStakingMsgServerMockRecorder) BeginRedelegate

func (mr *MockStakingMsgServerMockRecorder) BeginRedelegate(arg0, arg1 interface{}) *gomock.Call

BeginRedelegate indicates an expected call of BeginRedelegate.

func (*MockStakingMsgServerMockRecorder) CancelUnbondingDelegation

func (mr *MockStakingMsgServerMockRecorder) CancelUnbondingDelegation(arg0, arg1 interface{}) *gomock.Call

CancelUnbondingDelegation indicates an expected call of CancelUnbondingDelegation.

func (*MockStakingMsgServerMockRecorder) CreateValidator

func (mr *MockStakingMsgServerMockRecorder) CreateValidator(arg0, arg1 interface{}) *gomock.Call

CreateValidator indicates an expected call of CreateValidator.

func (*MockStakingMsgServerMockRecorder) Delegate

func (mr *MockStakingMsgServerMockRecorder) Delegate(arg0, arg1 interface{}) *gomock.Call

Delegate indicates an expected call of Delegate.

func (*MockStakingMsgServerMockRecorder) EditValidator

func (mr *MockStakingMsgServerMockRecorder) EditValidator(arg0, arg1 interface{}) *gomock.Call

EditValidator indicates an expected call of EditValidator.

func (*MockStakingMsgServerMockRecorder) Undelegate

func (mr *MockStakingMsgServerMockRecorder) Undelegate(arg0, arg1 interface{}) *gomock.Call

Undelegate indicates an expected call of Undelegate.

func (*MockStakingMsgServerMockRecorder) UpdateParams

func (mr *MockStakingMsgServerMockRecorder) UpdateParams(arg0, arg1 interface{}) *gomock.Call

UpdateParams indicates an expected call of UpdateParams.

type MockTx

type MockTx struct {
	// contains filtered or unexported fields
}

MockTx is a mock of Tx interface.

func NewMockTx

func NewMockTx(ctrl *gomock.Controller) *MockTx

NewMockTx creates a new mock instance.

func (*MockTx) EXPECT

func (m *MockTx) EXPECT() *MockTxMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTx) GetMsgs

func (m *MockTx) GetMsgs() []types.Msg

GetMsgs mocks base method.

func (*MockTx) GetMsgsV2

func (m *MockTx) GetMsgsV2() ([]proto.Message, error)

GetMsgsV2 mocks base method.

type MockTxMockRecorder

type MockTxMockRecorder struct {
	// contains filtered or unexported fields
}

MockTxMockRecorder is the mock recorder for MockTx.

func (*MockTxMockRecorder) GetMsgs

func (mr *MockTxMockRecorder) GetMsgs() *gomock.Call

GetMsgs indicates an expected call of GetMsgs.

func (*MockTxMockRecorder) GetMsgsV2

func (mr *MockTxMockRecorder) GetMsgsV2() *gomock.Call

GetMsgsV2 indicates an expected call of GetMsgsV2.

type PubKey

type PubKey interface {
	cryptotypes.PubKey
}

type StakingHooks

type StakingHooks interface {
	AfterValidatorCreated(ctx context.Context, valAddr sdk.ValAddress) error                           // Must be called when a validator is created
	BeforeValidatorModified(ctx context.Context, valAddr sdk.ValAddress) error                         // Must be called when a validator's state changes
	AfterValidatorRemoved(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator is deleted

	AfterValidatorBonded(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error         // Must be called when a validator is bonded
	AfterValidatorBeginUnbonding(ctx context.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) error // Must be called when a validator begins unbonding

	BeforeDelegationCreated(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error        // Must be called when a delegation is created
	BeforeDelegationSharesModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error // Must be called when a delegation's shares are modified
	BeforeDelegationRemoved(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error        // Must be called when a delegation is removed
	AfterDelegationModified(ctx context.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
	BeforeValidatorSlashed(ctx context.Context, valAddr sdk.ValAddress, fraction math.LegacyDec) error
	AfterUnbondingInitiated(ctx context.Context, id uint64) error
}

type StakingMsgServer

type StakingMsgServer interface {
	// CreateValidator defines a method for creating a new validator.
	CreateValidator(context.Context, *stakingtypes.MsgCreateValidator) (*stakingtypes.MsgCreateValidatorResponse, error)
	// EditValidator defines a method for editing an existing validator.
	EditValidator(context.Context, *stakingtypes.MsgEditValidator) (*stakingtypes.MsgEditValidatorResponse, error)
	// Delegate defines a method for performing a delegation of coins
	// from a delegator to a validator.
	Delegate(context.Context, *stakingtypes.MsgDelegate) (*stakingtypes.MsgDelegateResponse, error)
	// BeginRedelegate defines a method for performing a redelegation
	// of coins from a delegator and source validator to a destination validator.
	BeginRedelegate(context.Context, *stakingtypes.MsgBeginRedelegate) (*stakingtypes.MsgBeginRedelegateResponse, error)
	// Undelegate defines a method for performing an undelegation from a
	// delegate and a validator.
	Undelegate(context.Context, *stakingtypes.MsgUndelegate) (*stakingtypes.MsgUndelegateResponse, error)
	// CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation
	// and delegate back to previous validator.
	//
	// Since: cosmos-sdk 0.46
	CancelUnbondingDelegation(context.Context, *stakingtypes.MsgCancelUnbondingDelegation) (*stakingtypes.MsgCancelUnbondingDelegationResponse, error)
	// UpdateParams defines an operation for updating the x/staking module
	// parameters.
	// Since: cosmos-sdk 0.47
	UpdateParams(context.Context, *stakingtypes.MsgUpdateParams) (*stakingtypes.MsgUpdateParamsResponse, error)
}

MsgServer is the server API for Msg service.

type Tx

type Tx interface {
	sdk.HasMsgs

	// GetMsgsV2 gets the transaction's messages as google.golang.org/protobuf/proto.Message's.
	GetMsgsV2() ([]protov2.Message, error)
}

Jump to

Keyboard shortcuts

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