mock

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseKeeperMock

type BaseKeeperMock struct {
	// ExportGenesisFunc mocks the ExportGenesis method.
	ExportGenesisFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.GenesisState

	// ForChainFunc mocks the ForChain method.
	ForChainFunc func(chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) evmtypes.ChainKeeper

	// HasChainFunc mocks the HasChain method.
	HasChainFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) bool

	// InitGenesisFunc mocks the InitGenesis method.
	InitGenesisFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, state evmtypes.GenesisState)

	// LoggerFunc mocks the Logger method.
	LoggerFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) log.Logger
	// contains filtered or unexported fields
}

BaseKeeperMock is a mock implementation of evmtypes.BaseKeeper.

func TestSomethingThatUsesBaseKeeper(t *testing.T) {

	// make and configure a mocked evmtypes.BaseKeeper
	mockedBaseKeeper := &BaseKeeperMock{
		ExportGenesisFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.GenesisState {
			panic("mock out the ExportGenesis method")
		},
		ForChainFunc: func(chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) evmtypes.ChainKeeper {
			panic("mock out the ForChain method")
		},
		HasChainFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) bool {
			panic("mock out the HasChain method")
		},
		InitGenesisFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, state evmtypes.GenesisState)  {
			panic("mock out the InitGenesis method")
		},
		LoggerFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) log.Logger {
			panic("mock out the Logger method")
		},
	}

	// use mockedBaseKeeper in code that requires evmtypes.BaseKeeper
	// and then make assertions.

}

func (*BaseKeeperMock) ExportGenesis added in v0.9.0

ExportGenesis calls ExportGenesisFunc.

func (*BaseKeeperMock) ExportGenesisCalls added in v0.9.0

func (mock *BaseKeeperMock) ExportGenesisCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

ExportGenesisCalls gets all the calls that were made to ExportGenesis. Check the length with:

len(mockedBaseKeeper.ExportGenesisCalls())

func (*BaseKeeperMock) ForChain

ForChain calls ForChainFunc.

func (*BaseKeeperMock) ForChainCalls

func (mock *BaseKeeperMock) ForChainCalls() []struct {
	Chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName
}

ForChainCalls gets all the calls that were made to ForChain. Check the length with:

len(mockedBaseKeeper.ForChainCalls())

func (*BaseKeeperMock) HasChain added in v0.13.3

HasChain calls HasChainFunc.

func (*BaseKeeperMock) HasChainCalls added in v0.13.3

HasChainCalls gets all the calls that were made to HasChain. Check the length with:

len(mockedBaseKeeper.HasChainCalls())

func (*BaseKeeperMock) InitGenesis added in v0.9.0

InitGenesis calls InitGenesisFunc.

func (*BaseKeeperMock) InitGenesisCalls added in v0.9.0

func (mock *BaseKeeperMock) InitGenesisCalls() []struct {
	Ctx   github_com_cosmos_cosmos_sdk_types.Context
	State evmtypes.GenesisState
}

InitGenesisCalls gets all the calls that were made to InitGenesis. Check the length with:

len(mockedBaseKeeper.InitGenesisCalls())

func (*BaseKeeperMock) Logger

Logger calls LoggerFunc.

func (*BaseKeeperMock) LoggerCalls

func (mock *BaseKeeperMock) LoggerCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

LoggerCalls gets all the calls that were made to Logger. Check the length with:

len(mockedBaseKeeper.LoggerCalls())

type ChainKeeperMock

type ChainKeeperMock struct {
	// CreateERC20TokenFunc mocks the CreateERC20Token method.
	CreateERC20TokenFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string, details evmtypes.TokenDetails, address evmtypes.Address) (evmtypes.ERC20Token, error)

	// CreateNewBatchToSignFunc mocks the CreateNewBatchToSign method.
	CreateNewBatchToSignFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (evmtypes.CommandBatch, error)

	// DeleteDepositFunc mocks the DeleteDeposit method.
	DeleteDepositFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit evmtypes.ERC20Deposit)

	// DeleteUnsignedCommandBatchIDFunc mocks the DeleteUnsignedCommandBatchID method.
	DeleteUnsignedCommandBatchIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context)

	// EnqueueCommandFunc mocks the EnqueueCommand method.
	EnqueueCommandFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, cmd evmtypes.Command) error

	// GetBatchByIDFunc mocks the GetBatchByID method.
	GetBatchByIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte) evmtypes.CommandBatch

	// GetBurnerAddressAndSaltFunc mocks the GetBurnerAddressAndSalt method.
	GetBurnerAddressAndSaltFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, token evmtypes.ERC20Token, recipient string, gatewayAddr evmtypes.Address) (evmtypes.Address, evmtypes.Hash, error)

	// GetBurnerByteCodeFunc mocks the GetBurnerByteCode method.
	GetBurnerByteCodeFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) ([]byte, bool)

	// GetBurnerInfoFunc mocks the GetBurnerInfo method.
	GetBurnerInfoFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, address evmtypes.Address) *evmtypes.BurnerInfo

	// GetChainIDFunc mocks the GetChainID method.
	GetChainIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (github_com_cosmos_cosmos_sdk_types.Int, bool)

	// GetChainIDByNetworkFunc mocks the GetChainIDByNetwork method.
	GetChainIDByNetworkFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, network string) (github_com_cosmos_cosmos_sdk_types.Int, bool)

	// GetCommandFunc mocks the GetCommand method.
	GetCommandFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, id evmtypes.CommandID) (evmtypes.Command, bool)

	// GetConfirmedDepositsFunc mocks the GetConfirmedDeposits method.
	GetConfirmedDepositsFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.ERC20Deposit

	// GetConfirmedEventQueueFunc mocks the GetConfirmedEventQueue method.
	GetConfirmedEventQueueFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) utils.KVQueue

	// GetDepositFunc mocks the GetDeposit method.
	GetDepositFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, txID evmtypes.Hash, burnerAddr evmtypes.Address) (evmtypes.ERC20Deposit, evmtypes.DepositStatus, bool)

	// GetERC20TokenByAssetFunc mocks the GetERC20TokenByAsset method.
	GetERC20TokenByAssetFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) evmtypes.ERC20Token

	// GetERC20TokenBySymbolFunc mocks the GetERC20TokenBySymbol method.
	GetERC20TokenBySymbolFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, symbol string) evmtypes.ERC20Token

	// GetEventFunc mocks the GetEvent method.
	GetEventFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) (evmtypes.Event, bool)

	// GetGatewayAddressFunc mocks the GetGatewayAddress method.
	GetGatewayAddressFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (evmtypes.Address, bool)

	// GetLatestCommandBatchFunc mocks the GetLatestCommandBatch method.
	GetLatestCommandBatchFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.CommandBatch

	// GetMinVoterCountFunc mocks the GetMinVoterCount method.
	GetMinVoterCountFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (int64, bool)

	// GetNameFunc mocks the GetName method.
	GetNameFunc func() string

	// GetNetworkFunc mocks the GetNetwork method.
	GetNetworkFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (string, bool)

	// GetNetworkByIDFunc mocks the GetNetworkByID method.
	GetNetworkByIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, id github_com_cosmos_cosmos_sdk_types.Int) (string, bool)

	// GetParamsFunc mocks the GetParams method.
	GetParamsFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.Params

	// GetPendingCommandsFunc mocks the GetPendingCommands method.
	GetPendingCommandsFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.Command

	// GetRequiredConfirmationHeightFunc mocks the GetRequiredConfirmationHeight method.
	GetRequiredConfirmationHeightFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (uint64, bool)

	// GetRevoteLockingPeriodFunc mocks the GetRevoteLockingPeriod method.
	GetRevoteLockingPeriodFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (int64, bool)

	// GetTokenByteCodeFunc mocks the GetTokenByteCode method.
	GetTokenByteCodeFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) ([]byte, bool)

	// GetTokensFunc mocks the GetTokens method.
	GetTokensFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.ERC20Token

	// GetVotingThresholdFunc mocks the GetVotingThreshold method.
	GetVotingThresholdFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (utils.Threshold, bool)

	// LoggerFunc mocks the Logger method.
	LoggerFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) log.Logger

	// SetBurnerInfoFunc mocks the SetBurnerInfo method.
	SetBurnerInfoFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, burnerInfo evmtypes.BurnerInfo)

	// SetConfirmedEventFunc mocks the SetConfirmedEvent method.
	SetConfirmedEventFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, event evmtypes.Event) error

	// SetDepositFunc mocks the SetDeposit method.
	SetDepositFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit evmtypes.ERC20Deposit, state evmtypes.DepositStatus)

	// SetEventCompletedFunc mocks the SetEventCompleted method.
	SetEventCompletedFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) error

	// SetEventFailedFunc mocks the SetEventFailed method.
	SetEventFailedFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) error

	// SetGatewayFunc mocks the SetGateway method.
	SetGatewayFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, address evmtypes.Address)

	// SetLatestSignedCommandBatchIDFunc mocks the SetLatestSignedCommandBatchID method.
	SetLatestSignedCommandBatchIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte)

	// SetParamsFunc mocks the SetParams method.
	SetParamsFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, p evmtypes.Params)
	// contains filtered or unexported fields
}

ChainKeeperMock is a mock implementation of evmtypes.ChainKeeper.

func TestSomethingThatUsesChainKeeper(t *testing.T) {

	// make and configure a mocked evmtypes.ChainKeeper
	mockedChainKeeper := &ChainKeeperMock{
		CreateERC20TokenFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string, details evmtypes.TokenDetails, address evmtypes.Address) (evmtypes.ERC20Token, error) {
			panic("mock out the CreateERC20Token method")
		},
		CreateNewBatchToSignFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (evmtypes.CommandBatch, error) {
			panic("mock out the CreateNewBatchToSign method")
		},
		DeleteDepositFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit evmtypes.ERC20Deposit)  {
			panic("mock out the DeleteDeposit method")
		},
		DeleteUnsignedCommandBatchIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context)  {
			panic("mock out the DeleteUnsignedCommandBatchID method")
		},
		EnqueueCommandFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, cmd evmtypes.Command) error {
			panic("mock out the EnqueueCommand method")
		},
		GetBatchByIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte) evmtypes.CommandBatch {
			panic("mock out the GetBatchByID method")
		},
		GetBurnerAddressAndSaltFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, token evmtypes.ERC20Token, recipient string, gatewayAddr evmtypes.Address) (evmtypes.Address, evmtypes.Hash, error) {
			panic("mock out the GetBurnerAddressAndSalt method")
		},
		GetBurnerByteCodeFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) ([]byte, bool) {
			panic("mock out the GetBurnerByteCode method")
		},
		GetBurnerInfoFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, address evmtypes.Address) *evmtypes.BurnerInfo {
			panic("mock out the GetBurnerInfo method")
		},
		GetChainIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (github_com_cosmos_cosmos_sdk_types.Int, bool) {
			panic("mock out the GetChainID method")
		},
		GetChainIDByNetworkFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, network string) (github_com_cosmos_cosmos_sdk_types.Int, bool) {
			panic("mock out the GetChainIDByNetwork method")
		},
		GetCommandFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, id evmtypes.CommandID) (evmtypes.Command, bool) {
			panic("mock out the GetCommand method")
		},
		GetConfirmedDepositsFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.ERC20Deposit {
			panic("mock out the GetConfirmedDeposits method")
		},
		GetConfirmedEventQueueFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) utils.KVQueue {
			panic("mock out the GetConfirmedEventQueue method")
		},
		GetDepositFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, txID evmtypes.Hash, burnerAddr evmtypes.Address) (evmtypes.ERC20Deposit, evmtypes.DepositStatus, bool) {
			panic("mock out the GetDeposit method")
		},
		GetERC20TokenByAssetFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) evmtypes.ERC20Token {
			panic("mock out the GetERC20TokenByAsset method")
		},
		GetERC20TokenBySymbolFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, symbol string) evmtypes.ERC20Token {
			panic("mock out the GetERC20TokenBySymbol method")
		},
		GetEventFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) (evmtypes.Event, bool) {
			panic("mock out the GetEvent method")
		},
		GetGatewayAddressFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (evmtypes.Address, bool) {
			panic("mock out the GetGatewayAddress method")
		},
		GetLatestCommandBatchFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.CommandBatch {
			panic("mock out the GetLatestCommandBatch method")
		},
		GetMinVoterCountFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (int64, bool) {
			panic("mock out the GetMinVoterCount method")
		},
		GetNameFunc: func() string {
			panic("mock out the GetName method")
		},
		GetNetworkFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (string, bool) {
			panic("mock out the GetNetwork method")
		},
		GetNetworkByIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, id github_com_cosmos_cosmos_sdk_types.Int) (string, bool) {
			panic("mock out the GetNetworkByID method")
		},
		GetParamsFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) evmtypes.Params {
			panic("mock out the GetParams method")
		},
		GetPendingCommandsFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.Command {
			panic("mock out the GetPendingCommands method")
		},
		GetRequiredConfirmationHeightFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (uint64, bool) {
			panic("mock out the GetRequiredConfirmationHeight method")
		},
		GetRevoteLockingPeriodFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (int64, bool) {
			panic("mock out the GetRevoteLockingPeriod method")
		},
		GetTokenByteCodeFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) ([]byte, bool) {
			panic("mock out the GetTokenByteCode method")
		},
		GetTokensFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) []evmtypes.ERC20Token {
			panic("mock out the GetTokens method")
		},
		GetVotingThresholdFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (utils.Threshold, bool) {
			panic("mock out the GetVotingThreshold method")
		},
		LoggerFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) log.Logger {
			panic("mock out the Logger method")
		},
		SetBurnerInfoFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, burnerInfo evmtypes.BurnerInfo)  {
			panic("mock out the SetBurnerInfo method")
		},
		SetConfirmedEventFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, event evmtypes.Event) error {
			panic("mock out the SetConfirmedEvent method")
		},
		SetDepositFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, deposit evmtypes.ERC20Deposit, state evmtypes.DepositStatus)  {
			panic("mock out the SetDeposit method")
		},
		SetEventCompletedFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) error {
			panic("mock out the SetEventCompleted method")
		},
		SetEventFailedFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) error {
			panic("mock out the SetEventFailed method")
		},
		SetGatewayFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, address evmtypes.Address)  {
			panic("mock out the SetGateway method")
		},
		SetLatestSignedCommandBatchIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte)  {
			panic("mock out the SetLatestSignedCommandBatchID method")
		},
		SetParamsFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, p evmtypes.Params)  {
			panic("mock out the SetParams method")
		},
	}

	// use mockedChainKeeper in code that requires evmtypes.ChainKeeper
	// and then make assertions.

}

func (*ChainKeeperMock) CreateERC20Token

CreateERC20Token calls CreateERC20TokenFunc.

func (*ChainKeeperMock) CreateERC20TokenCalls

func (mock *ChainKeeperMock) CreateERC20TokenCalls() []struct {
	Ctx     github_com_cosmos_cosmos_sdk_types.Context
	Asset   string
	Details evmtypes.TokenDetails
	Address evmtypes.Address
}

CreateERC20TokenCalls gets all the calls that were made to CreateERC20Token. Check the length with:

len(mockedChainKeeper.CreateERC20TokenCalls())

func (*ChainKeeperMock) CreateNewBatchToSign

CreateNewBatchToSign calls CreateNewBatchToSignFunc.

func (*ChainKeeperMock) CreateNewBatchToSignCalls

func (mock *ChainKeeperMock) CreateNewBatchToSignCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

CreateNewBatchToSignCalls gets all the calls that were made to CreateNewBatchToSign. Check the length with:

len(mockedChainKeeper.CreateNewBatchToSignCalls())

func (*ChainKeeperMock) DeleteDeposit

DeleteDeposit calls DeleteDepositFunc.

func (*ChainKeeperMock) DeleteDepositCalls

func (mock *ChainKeeperMock) DeleteDepositCalls() []struct {
	Ctx     github_com_cosmos_cosmos_sdk_types.Context
	Deposit evmtypes.ERC20Deposit
}

DeleteDepositCalls gets all the calls that were made to DeleteDeposit. Check the length with:

len(mockedChainKeeper.DeleteDepositCalls())

func (*ChainKeeperMock) DeleteUnsignedCommandBatchID added in v0.10.0

func (mock *ChainKeeperMock) DeleteUnsignedCommandBatchID(ctx github_com_cosmos_cosmos_sdk_types.Context)

DeleteUnsignedCommandBatchID calls DeleteUnsignedCommandBatchIDFunc.

func (*ChainKeeperMock) DeleteUnsignedCommandBatchIDCalls added in v0.10.0

func (mock *ChainKeeperMock) DeleteUnsignedCommandBatchIDCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

DeleteUnsignedCommandBatchIDCalls gets all the calls that were made to DeleteUnsignedCommandBatchID. Check the length with:

len(mockedChainKeeper.DeleteUnsignedCommandBatchIDCalls())

func (*ChainKeeperMock) EnqueueCommand

EnqueueCommand calls EnqueueCommandFunc.

func (*ChainKeeperMock) EnqueueCommandCalls

func (mock *ChainKeeperMock) EnqueueCommandCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
	Cmd evmtypes.Command
}

EnqueueCommandCalls gets all the calls that were made to EnqueueCommand. Check the length with:

len(mockedChainKeeper.EnqueueCommandCalls())

func (*ChainKeeperMock) GetBatchByID

GetBatchByID calls GetBatchByIDFunc.

func (*ChainKeeperMock) GetBatchByIDCalls

func (mock *ChainKeeperMock) GetBatchByIDCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
	ID  []byte
}

GetBatchByIDCalls gets all the calls that were made to GetBatchByID. Check the length with:

len(mockedChainKeeper.GetBatchByIDCalls())

func (*ChainKeeperMock) GetBurnerAddressAndSalt

func (mock *ChainKeeperMock) GetBurnerAddressAndSalt(ctx github_com_cosmos_cosmos_sdk_types.Context, token evmtypes.ERC20Token, recipient string, gatewayAddr evmtypes.Address) (evmtypes.Address, evmtypes.Hash, error)

GetBurnerAddressAndSalt calls GetBurnerAddressAndSaltFunc.

func (*ChainKeeperMock) GetBurnerAddressAndSaltCalls

func (mock *ChainKeeperMock) GetBurnerAddressAndSaltCalls() []struct {
	Ctx         github_com_cosmos_cosmos_sdk_types.Context
	Token       evmtypes.ERC20Token
	Recipient   string
	GatewayAddr evmtypes.Address
}

GetBurnerAddressAndSaltCalls gets all the calls that were made to GetBurnerAddressAndSalt. Check the length with:

len(mockedChainKeeper.GetBurnerAddressAndSaltCalls())

func (*ChainKeeperMock) GetBurnerByteCode added in v0.14.0

func (mock *ChainKeeperMock) GetBurnerByteCode(ctx github_com_cosmos_cosmos_sdk_types.Context) ([]byte, bool)

GetBurnerByteCode calls GetBurnerByteCodeFunc.

func (*ChainKeeperMock) GetBurnerByteCodeCalls added in v0.14.0

func (mock *ChainKeeperMock) GetBurnerByteCodeCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetBurnerByteCodeCalls gets all the calls that were made to GetBurnerByteCode. Check the length with:

len(mockedChainKeeper.GetBurnerByteCodeCalls())

func (*ChainKeeperMock) GetBurnerInfo

GetBurnerInfo calls GetBurnerInfoFunc.

func (*ChainKeeperMock) GetBurnerInfoCalls

func (mock *ChainKeeperMock) GetBurnerInfoCalls() []struct {
	Ctx     github_com_cosmos_cosmos_sdk_types.Context
	Address evmtypes.Address
}

GetBurnerInfoCalls gets all the calls that were made to GetBurnerInfo. Check the length with:

len(mockedChainKeeper.GetBurnerInfoCalls())

func (*ChainKeeperMock) GetChainID added in v0.9.0

GetChainID calls GetChainIDFunc.

func (*ChainKeeperMock) GetChainIDByNetwork

GetChainIDByNetwork calls GetChainIDByNetworkFunc.

func (*ChainKeeperMock) GetChainIDByNetworkCalls

func (mock *ChainKeeperMock) GetChainIDByNetworkCalls() []struct {
	Ctx     github_com_cosmos_cosmos_sdk_types.Context
	Network string
}

GetChainIDByNetworkCalls gets all the calls that were made to GetChainIDByNetwork. Check the length with:

len(mockedChainKeeper.GetChainIDByNetworkCalls())

func (*ChainKeeperMock) GetChainIDCalls added in v0.9.0

func (mock *ChainKeeperMock) GetChainIDCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetChainIDCalls gets all the calls that were made to GetChainID. Check the length with:

len(mockedChainKeeper.GetChainIDCalls())

func (*ChainKeeperMock) GetCommand added in v0.10.0

GetCommand calls GetCommandFunc.

func (*ChainKeeperMock) GetCommandCalls added in v0.10.0

func (mock *ChainKeeperMock) GetCommandCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
	ID  evmtypes.CommandID
}

GetCommandCalls gets all the calls that were made to GetCommand. Check the length with:

len(mockedChainKeeper.GetCommandCalls())

func (*ChainKeeperMock) GetConfirmedDeposits

GetConfirmedDeposits calls GetConfirmedDepositsFunc.

func (*ChainKeeperMock) GetConfirmedDepositsCalls

func (mock *ChainKeeperMock) GetConfirmedDepositsCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetConfirmedDepositsCalls gets all the calls that were made to GetConfirmedDeposits. Check the length with:

len(mockedChainKeeper.GetConfirmedDepositsCalls())

func (*ChainKeeperMock) GetConfirmedEventQueue added in v0.17.0

func (mock *ChainKeeperMock) GetConfirmedEventQueue(ctx github_com_cosmos_cosmos_sdk_types.Context) utils.KVQueue

GetConfirmedEventQueue calls GetConfirmedEventQueueFunc.

func (*ChainKeeperMock) GetConfirmedEventQueueCalls added in v0.17.0

func (mock *ChainKeeperMock) GetConfirmedEventQueueCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetConfirmedEventQueueCalls gets all the calls that were made to GetConfirmedEventQueue. Check the length with:

len(mockedChainKeeper.GetConfirmedEventQueueCalls())

func (*ChainKeeperMock) GetDeposit

GetDeposit calls GetDepositFunc.

func (*ChainKeeperMock) GetDepositCalls

func (mock *ChainKeeperMock) GetDepositCalls() []struct {
	Ctx        github_com_cosmos_cosmos_sdk_types.Context
	TxID       evmtypes.Hash
	BurnerAddr evmtypes.Address
}

GetDepositCalls gets all the calls that were made to GetDeposit. Check the length with:

len(mockedChainKeeper.GetDepositCalls())

func (*ChainKeeperMock) GetERC20TokenByAsset

GetERC20TokenByAsset calls GetERC20TokenByAssetFunc.

func (*ChainKeeperMock) GetERC20TokenByAssetCalls

func (mock *ChainKeeperMock) GetERC20TokenByAssetCalls() []struct {
	Ctx   github_com_cosmos_cosmos_sdk_types.Context
	Asset string
}

GetERC20TokenByAssetCalls gets all the calls that were made to GetERC20TokenByAsset. Check the length with:

len(mockedChainKeeper.GetERC20TokenByAssetCalls())

func (*ChainKeeperMock) GetERC20TokenBySymbol

func (mock *ChainKeeperMock) GetERC20TokenBySymbol(ctx github_com_cosmos_cosmos_sdk_types.Context, symbol string) evmtypes.ERC20Token

GetERC20TokenBySymbol calls GetERC20TokenBySymbolFunc.

func (*ChainKeeperMock) GetERC20TokenBySymbolCalls

func (mock *ChainKeeperMock) GetERC20TokenBySymbolCalls() []struct {
	Ctx    github_com_cosmos_cosmos_sdk_types.Context
	Symbol string
}

GetERC20TokenBySymbolCalls gets all the calls that were made to GetERC20TokenBySymbol. Check the length with:

len(mockedChainKeeper.GetERC20TokenBySymbolCalls())

func (*ChainKeeperMock) GetEvent added in v0.17.0

GetEvent calls GetEventFunc.

func (*ChainKeeperMock) GetEventCalls added in v0.17.0

func (mock *ChainKeeperMock) GetEventCalls() []struct {
	Ctx     github_com_cosmos_cosmos_sdk_types.Context
	EventID evmtypes.EventID
}

GetEventCalls gets all the calls that were made to GetEvent. Check the length with:

len(mockedChainKeeper.GetEventCalls())

func (*ChainKeeperMock) GetGatewayAddress

GetGatewayAddress calls GetGatewayAddressFunc.

func (*ChainKeeperMock) GetGatewayAddressCalls

func (mock *ChainKeeperMock) GetGatewayAddressCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetGatewayAddressCalls gets all the calls that were made to GetGatewayAddress. Check the length with:

len(mockedChainKeeper.GetGatewayAddressCalls())

func (*ChainKeeperMock) GetLatestCommandBatch

GetLatestCommandBatch calls GetLatestCommandBatchFunc.

func (*ChainKeeperMock) GetLatestCommandBatchCalls

func (mock *ChainKeeperMock) GetLatestCommandBatchCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetLatestCommandBatchCalls gets all the calls that were made to GetLatestCommandBatch. Check the length with:

len(mockedChainKeeper.GetLatestCommandBatchCalls())

func (*ChainKeeperMock) GetMinVoterCount

func (mock *ChainKeeperMock) GetMinVoterCount(ctx github_com_cosmos_cosmos_sdk_types.Context) (int64, bool)

GetMinVoterCount calls GetMinVoterCountFunc.

func (*ChainKeeperMock) GetMinVoterCountCalls

func (mock *ChainKeeperMock) GetMinVoterCountCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetMinVoterCountCalls gets all the calls that were made to GetMinVoterCount. Check the length with:

len(mockedChainKeeper.GetMinVoterCountCalls())

func (*ChainKeeperMock) GetName

func (mock *ChainKeeperMock) GetName() string

GetName calls GetNameFunc.

func (*ChainKeeperMock) GetNameCalls

func (mock *ChainKeeperMock) GetNameCalls() []struct {
}

GetNameCalls gets all the calls that were made to GetName. Check the length with:

len(mockedChainKeeper.GetNameCalls())

func (*ChainKeeperMock) GetNetwork

GetNetwork calls GetNetworkFunc.

func (*ChainKeeperMock) GetNetworkByID

GetNetworkByID calls GetNetworkByIDFunc.

func (*ChainKeeperMock) GetNetworkByIDCalls

GetNetworkByIDCalls gets all the calls that were made to GetNetworkByID. Check the length with:

len(mockedChainKeeper.GetNetworkByIDCalls())

func (*ChainKeeperMock) GetNetworkCalls

func (mock *ChainKeeperMock) GetNetworkCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetNetworkCalls gets all the calls that were made to GetNetwork. Check the length with:

len(mockedChainKeeper.GetNetworkCalls())

func (*ChainKeeperMock) GetParams added in v0.9.0

GetParams calls GetParamsFunc.

func (*ChainKeeperMock) GetParamsCalls added in v0.9.0

func (mock *ChainKeeperMock) GetParamsCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetParamsCalls gets all the calls that were made to GetParams. Check the length with:

len(mockedChainKeeper.GetParamsCalls())

func (*ChainKeeperMock) GetPendingCommands added in v0.10.0

GetPendingCommands calls GetPendingCommandsFunc.

func (*ChainKeeperMock) GetPendingCommandsCalls added in v0.10.0

func (mock *ChainKeeperMock) GetPendingCommandsCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetPendingCommandsCalls gets all the calls that were made to GetPendingCommands. Check the length with:

len(mockedChainKeeper.GetPendingCommandsCalls())

func (*ChainKeeperMock) GetRequiredConfirmationHeight

func (mock *ChainKeeperMock) GetRequiredConfirmationHeight(ctx github_com_cosmos_cosmos_sdk_types.Context) (uint64, bool)

GetRequiredConfirmationHeight calls GetRequiredConfirmationHeightFunc.

func (*ChainKeeperMock) GetRequiredConfirmationHeightCalls

func (mock *ChainKeeperMock) GetRequiredConfirmationHeightCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetRequiredConfirmationHeightCalls gets all the calls that were made to GetRequiredConfirmationHeight. Check the length with:

len(mockedChainKeeper.GetRequiredConfirmationHeightCalls())

func (*ChainKeeperMock) GetRevoteLockingPeriod

func (mock *ChainKeeperMock) GetRevoteLockingPeriod(ctx github_com_cosmos_cosmos_sdk_types.Context) (int64, bool)

GetRevoteLockingPeriod calls GetRevoteLockingPeriodFunc.

func (*ChainKeeperMock) GetRevoteLockingPeriodCalls

func (mock *ChainKeeperMock) GetRevoteLockingPeriodCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetRevoteLockingPeriodCalls gets all the calls that were made to GetRevoteLockingPeriod. Check the length with:

len(mockedChainKeeper.GetRevoteLockingPeriodCalls())

func (*ChainKeeperMock) GetTokenByteCode added in v0.14.0

func (mock *ChainKeeperMock) GetTokenByteCode(ctx github_com_cosmos_cosmos_sdk_types.Context) ([]byte, bool)

GetTokenByteCode calls GetTokenByteCodeFunc.

func (*ChainKeeperMock) GetTokenByteCodeCalls added in v0.14.0

func (mock *ChainKeeperMock) GetTokenByteCodeCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetTokenByteCodeCalls gets all the calls that were made to GetTokenByteCode. Check the length with:

len(mockedChainKeeper.GetTokenByteCodeCalls())

func (*ChainKeeperMock) GetTokens added in v0.14.0

GetTokens calls GetTokensFunc.

func (*ChainKeeperMock) GetTokensCalls added in v0.14.0

func (mock *ChainKeeperMock) GetTokensCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetTokensCalls gets all the calls that were made to GetTokens. Check the length with:

len(mockedChainKeeper.GetTokensCalls())

func (*ChainKeeperMock) GetVotingThreshold

GetVotingThreshold calls GetVotingThresholdFunc.

func (*ChainKeeperMock) GetVotingThresholdCalls

func (mock *ChainKeeperMock) GetVotingThresholdCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetVotingThresholdCalls gets all the calls that were made to GetVotingThreshold. Check the length with:

len(mockedChainKeeper.GetVotingThresholdCalls())

func (*ChainKeeperMock) Logger

Logger calls LoggerFunc.

func (*ChainKeeperMock) LoggerCalls

func (mock *ChainKeeperMock) LoggerCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

LoggerCalls gets all the calls that were made to Logger. Check the length with:

len(mockedChainKeeper.LoggerCalls())

func (*ChainKeeperMock) SetBurnerInfo

func (mock *ChainKeeperMock) SetBurnerInfo(ctx github_com_cosmos_cosmos_sdk_types.Context, burnerInfo evmtypes.BurnerInfo)

SetBurnerInfo calls SetBurnerInfoFunc.

func (*ChainKeeperMock) SetBurnerInfoCalls

func (mock *ChainKeeperMock) SetBurnerInfoCalls() []struct {
	Ctx        github_com_cosmos_cosmos_sdk_types.Context
	BurnerInfo evmtypes.BurnerInfo
}

SetBurnerInfoCalls gets all the calls that were made to SetBurnerInfo. Check the length with:

len(mockedChainKeeper.SetBurnerInfoCalls())

func (*ChainKeeperMock) SetConfirmedEvent added in v0.17.0

func (mock *ChainKeeperMock) SetConfirmedEvent(ctx github_com_cosmos_cosmos_sdk_types.Context, event evmtypes.Event) error

SetConfirmedEvent calls SetConfirmedEventFunc.

func (*ChainKeeperMock) SetConfirmedEventCalls added in v0.17.0

func (mock *ChainKeeperMock) SetConfirmedEventCalls() []struct {
	Ctx   github_com_cosmos_cosmos_sdk_types.Context
	Event evmtypes.Event
}

SetConfirmedEventCalls gets all the calls that were made to SetConfirmedEvent. Check the length with:

len(mockedChainKeeper.SetConfirmedEventCalls())

func (*ChainKeeperMock) SetDeposit

SetDeposit calls SetDepositFunc.

func (*ChainKeeperMock) SetDepositCalls

func (mock *ChainKeeperMock) SetDepositCalls() []struct {
	Ctx     github_com_cosmos_cosmos_sdk_types.Context
	Deposit evmtypes.ERC20Deposit
	State   evmtypes.DepositStatus
}

SetDepositCalls gets all the calls that were made to SetDeposit. Check the length with:

len(mockedChainKeeper.SetDepositCalls())

func (*ChainKeeperMock) SetEventCompleted added in v0.17.0

func (mock *ChainKeeperMock) SetEventCompleted(ctx github_com_cosmos_cosmos_sdk_types.Context, eventID evmtypes.EventID) error

SetEventCompleted calls SetEventCompletedFunc.

func (*ChainKeeperMock) SetEventCompletedCalls added in v0.17.0

func (mock *ChainKeeperMock) SetEventCompletedCalls() []struct {
	Ctx     github_com_cosmos_cosmos_sdk_types.Context
	EventID evmtypes.EventID
}

SetEventCompletedCalls gets all the calls that were made to SetEventCompleted. Check the length with:

len(mockedChainKeeper.SetEventCompletedCalls())

func (*ChainKeeperMock) SetEventFailed added in v0.17.0

SetEventFailed calls SetEventFailedFunc.

func (*ChainKeeperMock) SetEventFailedCalls added in v0.17.0

func (mock *ChainKeeperMock) SetEventFailedCalls() []struct {
	Ctx     github_com_cosmos_cosmos_sdk_types.Context
	EventID evmtypes.EventID
}

SetEventFailedCalls gets all the calls that were made to SetEventFailed. Check the length with:

len(mockedChainKeeper.SetEventFailedCalls())

func (*ChainKeeperMock) SetGateway added in v0.17.0

SetGateway calls SetGatewayFunc.

func (*ChainKeeperMock) SetGatewayCalls added in v0.17.0

func (mock *ChainKeeperMock) SetGatewayCalls() []struct {
	Ctx     github_com_cosmos_cosmos_sdk_types.Context
	Address evmtypes.Address
}

SetGatewayCalls gets all the calls that were made to SetGateway. Check the length with:

len(mockedChainKeeper.SetGatewayCalls())

func (*ChainKeeperMock) SetLatestSignedCommandBatchID added in v0.10.0

func (mock *ChainKeeperMock) SetLatestSignedCommandBatchID(ctx github_com_cosmos_cosmos_sdk_types.Context, id []byte)

SetLatestSignedCommandBatchID calls SetLatestSignedCommandBatchIDFunc.

func (*ChainKeeperMock) SetLatestSignedCommandBatchIDCalls added in v0.10.0

func (mock *ChainKeeperMock) SetLatestSignedCommandBatchIDCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
	ID  []byte
}

SetLatestSignedCommandBatchIDCalls gets all the calls that were made to SetLatestSignedCommandBatchID. Check the length with:

len(mockedChainKeeper.SetLatestSignedCommandBatchIDCalls())

func (*ChainKeeperMock) SetParams added in v0.9.0

SetParams calls SetParamsFunc.

func (*ChainKeeperMock) SetParamsCalls added in v0.9.0

func (mock *ChainKeeperMock) SetParamsCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
	P   evmtypes.Params
}

SetParamsCalls gets all the calls that were made to SetParams. Check the length with:

len(mockedChainKeeper.SetParamsCalls())

type MultisigKeeperMock added in v0.21.0

type MultisigKeeperMock struct {
	// AssignKeyFunc mocks the AssignKey method.
	AssignKeyFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID) error

	// GetCurrentKeyIDFunc mocks the GetCurrentKeyID method.
	GetCurrentKeyIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, bool)

	// GetKeyFunc mocks the GetKey method.
	GetKeyFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID) (github_com_axelarnetwork_axelar_core_x_multisig_exported.Key, bool)

	// GetNextKeyIDFunc mocks the GetNextKeyID method.
	GetNextKeyIDFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, bool)

	// RotateKeyFunc mocks the RotateKey method.
	RotateKeyFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) error

	// SignFunc mocks the Sign method.
	SignFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, payloadHash github_com_axelarnetwork_axelar_core_x_multisig_exported.Hash, module string, moduleMetadata ...codec.ProtoMarshaler) error
	// contains filtered or unexported fields
}

MultisigKeeperMock is a mock implementation of evmtypes.MultisigKeeper.

func TestSomethingThatUsesMultisigKeeper(t *testing.T) {

	// make and configure a mocked evmtypes.MultisigKeeper
	mockedMultisigKeeper := &MultisigKeeperMock{
		AssignKeyFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID) error {
			panic("mock out the AssignKey method")
		},
		GetCurrentKeyIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, bool) {
			panic("mock out the GetCurrentKeyID method")
		},
		GetKeyFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID) (github_com_axelarnetwork_axelar_core_x_multisig_exported.Key, bool) {
			panic("mock out the GetKey method")
		},
		GetNextKeyIDFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, bool) {
			panic("mock out the GetNextKeyID method")
		},
		RotateKeyFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chainName github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) error {
			panic("mock out the RotateKey method")
		},
		SignFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID github_com_axelarnetwork_axelar_core_x_multisig_exported.KeyID, payloadHash github_com_axelarnetwork_axelar_core_x_multisig_exported.Hash, module string, moduleMetadata ...codec.ProtoMarshaler) error {
			panic("mock out the Sign method")
		},
	}

	// use mockedMultisigKeeper in code that requires evmtypes.MultisigKeeper
	// and then make assertions.

}

func (*MultisigKeeperMock) AssignKey added in v0.21.0

AssignKey calls AssignKeyFunc.

func (*MultisigKeeperMock) AssignKeyCalls added in v0.21.0

AssignKeyCalls gets all the calls that were made to AssignKey. Check the length with:

len(mockedMultisigKeeper.AssignKeyCalls())

func (*MultisigKeeperMock) GetCurrentKeyID added in v0.21.0

GetCurrentKeyID calls GetCurrentKeyIDFunc.

func (*MultisigKeeperMock) GetCurrentKeyIDCalls added in v0.21.0

GetCurrentKeyIDCalls gets all the calls that were made to GetCurrentKeyID. Check the length with:

len(mockedMultisigKeeper.GetCurrentKeyIDCalls())

func (*MultisigKeeperMock) GetKeyCalls added in v0.21.0

GetKeyCalls gets all the calls that were made to GetKey. Check the length with:

len(mockedMultisigKeeper.GetKeyCalls())

func (*MultisigKeeperMock) GetNextKeyID added in v0.21.0

GetNextKeyID calls GetNextKeyIDFunc.

func (*MultisigKeeperMock) GetNextKeyIDCalls added in v0.21.0

GetNextKeyIDCalls gets all the calls that were made to GetNextKeyID. Check the length with:

len(mockedMultisigKeeper.GetNextKeyIDCalls())

func (*MultisigKeeperMock) RotateKey added in v0.21.0

RotateKey calls RotateKeyFunc.

func (*MultisigKeeperMock) RotateKeyCalls added in v0.21.0

RotateKeyCalls gets all the calls that were made to RotateKey. Check the length with:

len(mockedMultisigKeeper.RotateKeyCalls())

func (*MultisigKeeperMock) Sign added in v0.21.0

Sign calls SignFunc.

func (*MultisigKeeperMock) SignCalls added in v0.21.0

SignCalls gets all the calls that were made to Sign. Check the length with:

len(mockedMultisigKeeper.SignCalls())

type NexusMock

type NexusMock struct {
	// AddTransferFeeFunc mocks the AddTransferFee method.
	AddTransferFeeFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, coin github_com_cosmos_cosmos_sdk_types.Coin)

	// ArchivePendingTransferFunc mocks the ArchivePendingTransfer method.
	ArchivePendingTransferFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, transfer github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer)

	// ComputeTransferFeeFunc mocks the ComputeTransferFee method.
	ComputeTransferFeeFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, destinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_cosmos_cosmos_sdk_types.Coin, error)

	// EnqueueForTransferFunc mocks the EnqueueForTransfer method.
	EnqueueForTransferFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, amount github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error)

	// EnqueueTransferFunc mocks the EnqueueTransfer method.
	EnqueueTransferFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, senderChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error)

	// GetChainFunc mocks the GetChain method.
	GetChainFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool)

	// GetChainByNativeAssetFunc mocks the GetChainByNativeAsset method.
	GetChainByNativeAssetFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool)

	// GetChainMaintainersFunc mocks the GetChainMaintainers method.
	GetChainMaintainersFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) []github_com_cosmos_cosmos_sdk_types.ValAddress

	// GetChainsFunc mocks the GetChains method.
	GetChainsFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) []github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain

	// GetRecipientFunc mocks the GetRecipient method.
	GetRecipientFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) (github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, bool)

	// GetTransfersForChainFunc mocks the GetTransfersForChain method.
	GetTransfersForChainFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, state github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferState) []github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer

	// IsAssetRegisteredFunc mocks the IsAssetRegistered method.
	IsAssetRegisteredFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, denom string) bool

	// IsChainActivatedFunc mocks the IsChainActivated method.
	IsChainActivatedFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) bool

	// LinkAddressesFunc mocks the LinkAddresses method.
	LinkAddressesFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) error

	// MarkChainMaintainerIncorrectVoteFunc mocks the MarkChainMaintainerIncorrectVote method.
	MarkChainMaintainerIncorrectVoteFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, address github_com_cosmos_cosmos_sdk_types.ValAddress, incorrectVote bool)

	// MarkChainMaintainerMissingVoteFunc mocks the MarkChainMaintainerMissingVote method.
	MarkChainMaintainerMissingVoteFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, address github_com_cosmos_cosmos_sdk_types.ValAddress, missingVote bool)

	// RegisterAssetFunc mocks the RegisterAsset method.
	RegisterAssetFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_axelarnetwork_axelar_core_x_nexus_exported.Asset) error

	// SetChainFunc mocks the SetChain method.
	SetChainFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain)
	// contains filtered or unexported fields
}

NexusMock is a mock implementation of evmtypes.Nexus.

func TestSomethingThatUsesNexus(t *testing.T) {

	// make and configure a mocked evmtypes.Nexus
	mockedNexus := &NexusMock{
		AddTransferFeeFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, coin github_com_cosmos_cosmos_sdk_types.Coin)  {
			panic("mock out the AddTransferFee method")
		},
		ArchivePendingTransferFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, transfer github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer)  {
			panic("mock out the ArchivePendingTransfer method")
		},
		ComputeTransferFeeFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, destinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_cosmos_cosmos_sdk_types.Coin, error) {
			panic("mock out the ComputeTransferFee method")
		},
		EnqueueForTransferFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, amount github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error) {
			panic("mock out the EnqueueForTransfer method")
		},
		EnqueueTransferFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, senderChain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, asset github_com_cosmos_cosmos_sdk_types.Coin) (github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferID, error) {
			panic("mock out the EnqueueTransfer method")
		},
		GetChainFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool) {
			panic("mock out the GetChain method")
		},
		GetChainByNativeAssetFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, asset string) (github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, bool) {
			panic("mock out the GetChainByNativeAsset method")
		},
		GetChainMaintainersFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) []github_com_cosmos_cosmos_sdk_types.ValAddress {
			panic("mock out the GetChainMaintainers method")
		},
		GetChainsFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) []github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain {
			panic("mock out the GetChains method")
		},
		GetRecipientFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) (github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, bool) {
			panic("mock out the GetRecipient method")
		},
		GetTransfersForChainFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, state github_com_axelarnetwork_axelar_core_x_nexus_exported.TransferState) []github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainTransfer {
			panic("mock out the GetTransfersForChain method")
		},
		IsAssetRegisteredFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, denom string) bool {
			panic("mock out the IsAssetRegistered method")
		},
		IsChainActivatedFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain) bool {
			panic("mock out the IsChainActivated method")
		},
		LinkAddressesFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sender github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress, recipient github_com_axelarnetwork_axelar_core_x_nexus_exported.CrossChainAddress) error {
			panic("mock out the LinkAddresses method")
		},
		MarkChainMaintainerIncorrectVoteFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, address github_com_cosmos_cosmos_sdk_types.ValAddress, incorrectVote bool)  {
			panic("mock out the MarkChainMaintainerIncorrectVote method")
		},
		MarkChainMaintainerMissingVoteFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, address github_com_cosmos_cosmos_sdk_types.ValAddress, missingVote bool)  {
			panic("mock out the MarkChainMaintainerMissingVote method")
		},
		RegisterAssetFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain, asset github_com_axelarnetwork_axelar_core_x_nexus_exported.Asset) error {
			panic("mock out the RegisterAsset method")
		},
		SetChainFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, chain github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain)  {
			panic("mock out the SetChain method")
		},
	}

	// use mockedNexus in code that requires evmtypes.Nexus
	// and then make assertions.

}

func (*NexusMock) AddTransferFee added in v0.17.0

AddTransferFee calls AddTransferFeeFunc.

func (*NexusMock) AddTransferFeeCalls added in v0.17.0

func (mock *NexusMock) AddTransferFeeCalls() []struct {
	Ctx  github_com_cosmos_cosmos_sdk_types.Context
	Coin github_com_cosmos_cosmos_sdk_types.Coin
}

AddTransferFeeCalls gets all the calls that were made to AddTransferFee. Check the length with:

len(mockedNexus.AddTransferFeeCalls())

func (*NexusMock) ArchivePendingTransfer

ArchivePendingTransfer calls ArchivePendingTransferFunc.

func (*NexusMock) ArchivePendingTransferCalls

ArchivePendingTransferCalls gets all the calls that were made to ArchivePendingTransfer. Check the length with:

len(mockedNexus.ArchivePendingTransferCalls())

func (*NexusMock) ComputeTransferFeeCalls added in v0.17.0

ComputeTransferFeeCalls gets all the calls that were made to ComputeTransferFee. Check the length with:

len(mockedNexus.ComputeTransferFeeCalls())

func (*NexusMock) EnqueueForTransferCalls

EnqueueForTransferCalls gets all the calls that were made to EnqueueForTransfer. Check the length with:

len(mockedNexus.EnqueueForTransferCalls())

func (*NexusMock) EnqueueTransferCalls added in v0.17.0

EnqueueTransferCalls gets all the calls that were made to EnqueueTransfer. Check the length with:

len(mockedNexus.EnqueueTransferCalls())

func (*NexusMock) GetChainByNativeAsset added in v0.14.0

GetChainByNativeAsset calls GetChainByNativeAssetFunc.

func (*NexusMock) GetChainByNativeAssetCalls added in v0.14.0

func (mock *NexusMock) GetChainByNativeAssetCalls() []struct {
	Ctx   github_com_cosmos_cosmos_sdk_types.Context
	Asset string
}

GetChainByNativeAssetCalls gets all the calls that were made to GetChainByNativeAsset. Check the length with:

len(mockedNexus.GetChainByNativeAssetCalls())

func (*NexusMock) GetChainCalls

GetChainCalls gets all the calls that were made to GetChain. Check the length with:

len(mockedNexus.GetChainCalls())

func (*NexusMock) GetChainMaintainers

GetChainMaintainers calls GetChainMaintainersFunc.

func (*NexusMock) GetChainMaintainersCalls

GetChainMaintainersCalls gets all the calls that were made to GetChainMaintainers. Check the length with:

len(mockedNexus.GetChainMaintainersCalls())

func (*NexusMock) GetChains

GetChains calls GetChainsFunc.

func (*NexusMock) GetChainsCalls

func (mock *NexusMock) GetChainsCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetChainsCalls gets all the calls that were made to GetChains. Check the length with:

len(mockedNexus.GetChainsCalls())

func (*NexusMock) GetRecipientCalls

GetRecipientCalls gets all the calls that were made to GetRecipient. Check the length with:

len(mockedNexus.GetRecipientCalls())

func (*NexusMock) GetTransfersForChainCalls

GetTransfersForChainCalls gets all the calls that were made to GetTransfersForChain. Check the length with:

len(mockedNexus.GetTransfersForChainCalls())

func (*NexusMock) IsAssetRegistered

IsAssetRegistered calls IsAssetRegisteredFunc.

func (*NexusMock) IsAssetRegisteredCalls

IsAssetRegisteredCalls gets all the calls that were made to IsAssetRegistered. Check the length with:

len(mockedNexus.IsAssetRegisteredCalls())

func (*NexusMock) IsChainActivated

IsChainActivated calls IsChainActivatedFunc.

func (*NexusMock) IsChainActivatedCalls

IsChainActivatedCalls gets all the calls that were made to IsChainActivated. Check the length with:

len(mockedNexus.IsChainActivatedCalls())

func (*NexusMock) LinkAddressesCalls

LinkAddressesCalls gets all the calls that were made to LinkAddresses. Check the length with:

len(mockedNexus.LinkAddressesCalls())

func (*NexusMock) MarkChainMaintainerIncorrectVote added in v0.18.0

MarkChainMaintainerIncorrectVote calls MarkChainMaintainerIncorrectVoteFunc.

func (*NexusMock) MarkChainMaintainerIncorrectVoteCalls added in v0.18.0

func (mock *NexusMock) MarkChainMaintainerIncorrectVoteCalls() []struct {
	Ctx           github_com_cosmos_cosmos_sdk_types.Context
	Chain         github_com_axelarnetwork_axelar_core_x_nexus_exported.Chain
	Address       github_com_cosmos_cosmos_sdk_types.ValAddress
	IncorrectVote bool
}

MarkChainMaintainerIncorrectVoteCalls gets all the calls that were made to MarkChainMaintainerIncorrectVote. Check the length with:

len(mockedNexus.MarkChainMaintainerIncorrectVoteCalls())

func (*NexusMock) MarkChainMaintainerMissingVote added in v0.18.0

MarkChainMaintainerMissingVote calls MarkChainMaintainerMissingVoteFunc.

func (*NexusMock) MarkChainMaintainerMissingVoteCalls added in v0.18.0

MarkChainMaintainerMissingVoteCalls gets all the calls that were made to MarkChainMaintainerMissingVote. Check the length with:

len(mockedNexus.MarkChainMaintainerMissingVoteCalls())

func (*NexusMock) RegisterAssetCalls

RegisterAssetCalls gets all the calls that were made to RegisterAsset. Check the length with:

len(mockedNexus.RegisterAssetCalls())

func (*NexusMock) SetChain

SetChain calls SetChainFunc.

func (*NexusMock) SetChainCalls

SetChainCalls gets all the calls that were made to SetChain. Check the length with:

len(mockedNexus.SetChainCalls())

type RewarderMock added in v0.18.0

type RewarderMock struct {
	// GetPoolFunc mocks the GetPool method.
	GetPoolFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, name string) reward.RewardPool
	// contains filtered or unexported fields
}

RewarderMock is a mock implementation of evmtypes.Rewarder.

func TestSomethingThatUsesRewarder(t *testing.T) {

	// make and configure a mocked evmtypes.Rewarder
	mockedRewarder := &RewarderMock{
		GetPoolFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, name string) reward.RewardPool {
			panic("mock out the GetPool method")
		},
	}

	// use mockedRewarder in code that requires evmtypes.Rewarder
	// and then make assertions.

}

func (*RewarderMock) GetPool added in v0.18.0

GetPool calls GetPoolFunc.

func (*RewarderMock) GetPoolCalls added in v0.18.0

func (mock *RewarderMock) GetPoolCalls() []struct {
	Ctx  github_com_cosmos_cosmos_sdk_types.Context
	Name string
}

GetPoolCalls gets all the calls that were made to GetPool. Check the length with:

len(mockedRewarder.GetPoolCalls())

type SignerMock

type SignerMock struct {
	// GetKeyFunc mocks the GetKey method.
	GetKeyFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID exported.KeyID) (exported.Key, bool)

	// GetMultisigSignInfoFunc mocks the GetMultisigSignInfo method.
	GetMultisigSignInfoFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (tsstypes.MultisigSignInfo, bool)

	// GetSigFunc mocks the GetSig method.
	GetSigFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (exported.Signature, exported.SigStatus)
	// contains filtered or unexported fields
}

SignerMock is a mock implementation of evmtypes.Signer.

func TestSomethingThatUsesSigner(t *testing.T) {

	// make and configure a mocked evmtypes.Signer
	mockedSigner := &SignerMock{
		GetKeyFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyID exported.KeyID) (exported.Key, bool) {
			panic("mock out the GetKey method")
		},
		GetMultisigSignInfoFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (tsstypes.MultisigSignInfo, bool) {
			panic("mock out the GetMultisigSignInfo method")
		},
		GetSigFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, sigID string) (exported.Signature, exported.SigStatus) {
			panic("mock out the GetSig method")
		},
	}

	// use mockedSigner in code that requires evmtypes.Signer
	// and then make assertions.

}

func (*SignerMock) GetKey

GetKey calls GetKeyFunc.

func (*SignerMock) GetKeyCalls

func (mock *SignerMock) GetKeyCalls() []struct {
	Ctx   github_com_cosmos_cosmos_sdk_types.Context
	KeyID exported.KeyID
}

GetKeyCalls gets all the calls that were made to GetKey. Check the length with:

len(mockedSigner.GetKeyCalls())

func (*SignerMock) GetMultisigSignInfo added in v0.21.0

GetMultisigSignInfo calls GetMultisigSignInfoFunc.

func (*SignerMock) GetMultisigSignInfoCalls added in v0.21.0

func (mock *SignerMock) GetMultisigSignInfoCalls() []struct {
	Ctx   github_com_cosmos_cosmos_sdk_types.Context
	SigID string
}

GetMultisigSignInfoCalls gets all the calls that were made to GetMultisigSignInfo. Check the length with:

len(mockedSigner.GetMultisigSignInfoCalls())

func (*SignerMock) GetSig

GetSig calls GetSigFunc.

func (*SignerMock) GetSigCalls

func (mock *SignerMock) GetSigCalls() []struct {
	Ctx   github_com_cosmos_cosmos_sdk_types.Context
	SigID string
}

GetSigCalls gets all the calls that were made to GetSig. Check the length with:

len(mockedSigner.GetSigCalls())

type SlashingKeeperMock added in v0.21.0

type SlashingKeeperMock struct {
	// IsTombstonedFunc mocks the IsTombstoned method.
	IsTombstonedFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, consAddr github_com_cosmos_cosmos_sdk_types.ConsAddress) bool
	// contains filtered or unexported fields
}

SlashingKeeperMock is a mock implementation of evmtypes.SlashingKeeper.

func TestSomethingThatUsesSlashingKeeper(t *testing.T) {

	// make and configure a mocked evmtypes.SlashingKeeper
	mockedSlashingKeeper := &SlashingKeeperMock{
		IsTombstonedFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, consAddr github_com_cosmos_cosmos_sdk_types.ConsAddress) bool {
			panic("mock out the IsTombstoned method")
		},
	}

	// use mockedSlashingKeeper in code that requires evmtypes.SlashingKeeper
	// and then make assertions.

}

func (*SlashingKeeperMock) IsTombstoned added in v0.21.0

IsTombstoned calls IsTombstonedFunc.

func (*SlashingKeeperMock) IsTombstonedCalls added in v0.21.0

IsTombstonedCalls gets all the calls that were made to IsTombstoned. Check the length with:

len(mockedSlashingKeeper.IsTombstonedCalls())

type SnapshotterMock

type SnapshotterMock struct {
	// CreateSnapshotFunc mocks the CreateSnapshot method.
	CreateSnapshotFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, candidates []github_com_cosmos_cosmos_sdk_types.ValAddress, filterFunc func(snapshot.ValidatorI) bool, weightFunc func(consensusPower github_com_cosmos_cosmos_sdk_types.Uint) github_com_cosmos_cosmos_sdk_types.Uint, threshold utils.Threshold) (snapshot.Snapshot, error)

	// GetLatestSnapshotFunc mocks the GetLatestSnapshot method.
	GetLatestSnapshotFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) (snapshot.Snapshot, bool)

	// GetOperatorFunc mocks the GetOperator method.
	GetOperatorFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, proxy github_com_cosmos_cosmos_sdk_types.AccAddress) github_com_cosmos_cosmos_sdk_types.ValAddress

	// GetProxyFunc mocks the GetProxy method.
	GetProxyFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, principal github_com_cosmos_cosmos_sdk_types.ValAddress) (github_com_cosmos_cosmos_sdk_types.AccAddress, bool)

	// GetSnapshotFunc mocks the GetSnapshot method.
	GetSnapshotFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, seqNo int64) (snapshot.Snapshot, bool)

	// GetValidatorIllegibilityFunc mocks the GetValidatorIllegibility method.
	GetValidatorIllegibilityFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, validator snapshot.SDKValidator) (snapshot.ValidatorIllegibility, error)

	// TakeSnapshotFunc mocks the TakeSnapshot method.
	TakeSnapshotFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyRequirement exported.KeyRequirement) (snapshot.Snapshot, error)
	// contains filtered or unexported fields
}

SnapshotterMock is a mock implementation of evmtypes.Snapshotter.

func TestSomethingThatUsesSnapshotter(t *testing.T) {

	// make and configure a mocked evmtypes.Snapshotter
	mockedSnapshotter := &SnapshotterMock{
		CreateSnapshotFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, candidates []github_com_cosmos_cosmos_sdk_types.ValAddress, filterFunc func(snapshot.ValidatorI) bool, weightFunc func(consensusPower github_com_cosmos_cosmos_sdk_types.Uint) github_com_cosmos_cosmos_sdk_types.Uint, threshold utils.Threshold) (snapshot.Snapshot, error) {
			panic("mock out the CreateSnapshot method")
		},
		GetLatestSnapshotFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) (snapshot.Snapshot, bool) {
			panic("mock out the GetLatestSnapshot method")
		},
		GetOperatorFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, proxy github_com_cosmos_cosmos_sdk_types.AccAddress) github_com_cosmos_cosmos_sdk_types.ValAddress {
			panic("mock out the GetOperator method")
		},
		GetProxyFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, principal github_com_cosmos_cosmos_sdk_types.ValAddress) (github_com_cosmos_cosmos_sdk_types.AccAddress, bool) {
			panic("mock out the GetProxy method")
		},
		GetSnapshotFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, seqNo int64) (snapshot.Snapshot, bool) {
			panic("mock out the GetSnapshot method")
		},
		GetValidatorIllegibilityFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, validator snapshot.SDKValidator) (snapshot.ValidatorIllegibility, error) {
			panic("mock out the GetValidatorIllegibility method")
		},
		TakeSnapshotFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, keyRequirement exported.KeyRequirement) (snapshot.Snapshot, error) {
			panic("mock out the TakeSnapshot method")
		},
	}

	// use mockedSnapshotter in code that requires evmtypes.Snapshotter
	// and then make assertions.

}

func (*SnapshotterMock) CreateSnapshot added in v0.21.0

CreateSnapshot calls CreateSnapshotFunc.

func (*SnapshotterMock) CreateSnapshotCalls added in v0.21.0

CreateSnapshotCalls gets all the calls that were made to CreateSnapshot. Check the length with:

len(mockedSnapshotter.CreateSnapshotCalls())

func (*SnapshotterMock) GetLatestSnapshot

GetLatestSnapshot calls GetLatestSnapshotFunc.

func (*SnapshotterMock) GetLatestSnapshotCalls

func (mock *SnapshotterMock) GetLatestSnapshotCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

GetLatestSnapshotCalls gets all the calls that were made to GetLatestSnapshot. Check the length with:

len(mockedSnapshotter.GetLatestSnapshotCalls())

func (*SnapshotterMock) GetOperator

GetOperator calls GetOperatorFunc.

func (*SnapshotterMock) GetOperatorCalls

GetOperatorCalls gets all the calls that were made to GetOperator. Check the length with:

len(mockedSnapshotter.GetOperatorCalls())

func (*SnapshotterMock) GetProxyCalls

GetProxyCalls gets all the calls that were made to GetProxy. Check the length with:

len(mockedSnapshotter.GetProxyCalls())

func (*SnapshotterMock) GetSnapshot

GetSnapshot calls GetSnapshotFunc.

func (*SnapshotterMock) GetSnapshotCalls

func (mock *SnapshotterMock) GetSnapshotCalls() []struct {
	Ctx   github_com_cosmos_cosmos_sdk_types.Context
	SeqNo int64
}

GetSnapshotCalls gets all the calls that were made to GetSnapshot. Check the length with:

len(mockedSnapshotter.GetSnapshotCalls())

func (*SnapshotterMock) GetValidatorIllegibility

GetValidatorIllegibility calls GetValidatorIllegibilityFunc.

func (*SnapshotterMock) GetValidatorIllegibilityCalls

func (mock *SnapshotterMock) GetValidatorIllegibilityCalls() []struct {
	Ctx       github_com_cosmos_cosmos_sdk_types.Context
	Validator snapshot.SDKValidator
}

GetValidatorIllegibilityCalls gets all the calls that were made to GetValidatorIllegibility. Check the length with:

len(mockedSnapshotter.GetValidatorIllegibilityCalls())

func (*SnapshotterMock) TakeSnapshot

TakeSnapshot calls TakeSnapshotFunc.

func (*SnapshotterMock) TakeSnapshotCalls

func (mock *SnapshotterMock) TakeSnapshotCalls() []struct {
	Ctx            github_com_cosmos_cosmos_sdk_types.Context
	KeyRequirement exported.KeyRequirement
}

TakeSnapshotCalls gets all the calls that were made to TakeSnapshot. Check the length with:

len(mockedSnapshotter.TakeSnapshotCalls())

type StakingKeeperMock added in v0.21.0

type StakingKeeperMock struct {
	// PowerReductionFunc mocks the PowerReduction method.
	PowerReductionFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context) github_com_cosmos_cosmos_sdk_types.Int
	// contains filtered or unexported fields
}

StakingKeeperMock is a mock implementation of evmtypes.StakingKeeper.

func TestSomethingThatUsesStakingKeeper(t *testing.T) {

	// make and configure a mocked evmtypes.StakingKeeper
	mockedStakingKeeper := &StakingKeeperMock{
		PowerReductionFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context) github_com_cosmos_cosmos_sdk_types.Int {
			panic("mock out the PowerReduction method")
		},
	}

	// use mockedStakingKeeper in code that requires evmtypes.StakingKeeper
	// and then make assertions.

}

func (*StakingKeeperMock) PowerReduction added in v0.21.0

PowerReduction calls PowerReductionFunc.

func (*StakingKeeperMock) PowerReductionCalls added in v0.21.0

func (mock *StakingKeeperMock) PowerReductionCalls() []struct {
	Ctx github_com_cosmos_cosmos_sdk_types.Context
}

PowerReductionCalls gets all the calls that were made to PowerReduction. Check the length with:

len(mockedStakingKeeper.PowerReductionCalls())

type VoterMock

type VoterMock struct {
	// InitializePollFunc mocks the InitializePoll method.
	InitializePollFunc func(ctx github_com_cosmos_cosmos_sdk_types.Context, pollBuilder vote.PollBuilder) (vote.PollID, error)
	// contains filtered or unexported fields
}

VoterMock is a mock implementation of evmtypes.Voter.

func TestSomethingThatUsesVoter(t *testing.T) {

	// make and configure a mocked evmtypes.Voter
	mockedVoter := &VoterMock{
		InitializePollFunc: func(ctx github_com_cosmos_cosmos_sdk_types.Context, pollBuilder vote.PollBuilder) (vote.PollID, error) {
			panic("mock out the InitializePoll method")
		},
	}

	// use mockedVoter in code that requires evmtypes.Voter
	// and then make assertions.

}

func (*VoterMock) InitializePoll

func (mock *VoterMock) InitializePoll(ctx github_com_cosmos_cosmos_sdk_types.Context, pollBuilder vote.PollBuilder) (vote.PollID, error)

InitializePoll calls InitializePollFunc.

func (*VoterMock) InitializePollCalls

func (mock *VoterMock) InitializePollCalls() []struct {
	Ctx         github_com_cosmos_cosmos_sdk_types.Context
	PollBuilder vote.PollBuilder
}

InitializePollCalls gets all the calls that were made to InitializePoll. Check the length with:

len(mockedVoter.InitializePollCalls())

Jump to

Keyboard shortcuts

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