mock

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "mock"

	Version = "mock-version"
)

Variables

View Source
var (
	MockAcknowledgement             = channeltypes.NewResultAcknowledgement([]byte("mock acknowledgement"))
	MockFailAcknowledgement         = channeltypes.NewErrorAcknowledgement("mock failed acknowledgement")
	MockPacketData                  = []byte("mock packet data")
	MockFailPacketData              = []byte("mock failed packet data")
	MockAsyncPacketData             = []byte("mock async packet data")
	MockRecvCanaryCapabilityName    = "mock receive canary capability name"
	MockAckCanaryCapabilityName     = "mock acknowledgement canary capability name"
	MockTimeoutCanaryCapabilityName = "mock timeout canary capability name"
)

Functions

This section is empty.

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

AppModule represents the AppModule for the mock module.

func NewAppModule

NewAppModule returns a mock AppModule instance.

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)

BeginBlock implements the AppModule interface

func (AppModule) ConsensusVersion

func (AppModule) ConsensusVersion() uint64

ConsensusVersion implements AppModule/ConsensusVersion.

func (AppModule) EndBlock

func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate

EndBlock implements the AppModule interface

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

ExportGenesis implements the AppModule interface.

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

InitGenesis implements the AppModule interface.

func (AppModule) NegotiateAppVersion

func (am AppModule) NegotiateAppVersion(
	ctx sdk.Context,
	order channeltypes.Order,
	connectionID string,
	portID string,
	counterparty channeltypes.Counterparty,
	proposedVersion string,
) (string, error)

NegotiateAppVersion implements the IBCModule interface.

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

func (AppModule) OnAcknowledgementPacket

func (am AppModule) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, _ []byte, _ sdk.AccAddress) error

OnAcknowledgementPacket implements the IBCModule interface.

func (AppModule) OnChanCloseConfirm

func (am AppModule) OnChanCloseConfirm(sdk.Context, string, string) error

OnChanCloseConfirm implements the IBCModule interface.

func (AppModule) OnChanCloseInit

func (am AppModule) OnChanCloseInit(sdk.Context, string, string) error

OnChanCloseInit implements the IBCModule interface.

func (AppModule) OnChanOpenAck

func (am AppModule) OnChanOpenAck(sdk.Context, string, string, string) error

OnChanOpenAck implements the IBCModule interface.

func (AppModule) OnChanOpenConfirm

func (am AppModule) OnChanOpenConfirm(sdk.Context, string, string) error

OnChanOpenConfirm implements the IBCModule interface.

func (AppModule) OnChanOpenInit

func (am AppModule) OnChanOpenInit(
	ctx sdk.Context, _ channeltypes.Order, _ []string, portID string,
	channelID string, chanCap *capabilitytypes.Capability, _ channeltypes.Counterparty, _ string,
) error

OnChanOpenInit implements the IBCModule interface.

func (AppModule) OnChanOpenTry

func (am AppModule) OnChanOpenTry(
	ctx sdk.Context, _ channeltypes.Order, _ []string, portID string,
	channelID string, chanCap *capabilitytypes.Capability, _ channeltypes.Counterparty, _, _ string,
) error

OnChanOpenTry implements the IBCModule interface.

func (AppModule) OnRecvPacket

func (am AppModule) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) exported.Acknowledgement

OnRecvPacket implements the IBCModule interface.

func (AppModule) OnTimeoutPacket

func (am AppModule) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, _ sdk.AccAddress) error

OnTimeoutPacket implements the IBCModule interface.

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute implements the AppModule interface.

func (AppModule) RegisterInvariants

func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry)

RegisterInvariants implements the AppModule interface.

func (AppModule) RegisterServices

func (am AppModule) RegisterServices(module.Configurator)

RegisterServices implements the AppModule interface.

func (AppModule) Route

func (am AppModule) Route() string

Route implements the AppModule interface.

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic is the mock AppModuleBasic.

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis implements AppModuleBasic interface.

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd(codec *codec.Codec) *cobra.Command

GetQueryCmd implements AppModuleBasic interface.

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd(proxy *codec.Codec) *cobra.Command

GetTxCmd implements AppModuleBasic interface.

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name implements AppModuleBasic interface.

func (AppModuleBasic) RegisterCodec

func (a AppModuleBasic) RegisterCodec(c *codec.Codec)

func (AppModuleBasic) RegisterGRPCGatewayRoutes

func (a AppModuleBasic) RegisterGRPCGatewayRoutes(_ context.CLIContext, _ *runtime.ServeMux)

RegisterGRPCGatewayRoutes implements AppModuleBasic interface.

func (AppModuleBasic) RegisterInterfaces

func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces implements AppModuleBasic interface.

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(clientCtx context.CLIContext, rtr *mux.Router)

RegisterRESTRoutes implements AppModuleBasic interface.

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(json.RawMessage) error

ValidateGenesis implements the AppModuleBasic interface.

type PV

type PV struct {
	PrivKey ed25519.PrivKeyEd25519
}

MockPV implements PrivValidator without any safety or persistence. Only use it for testing.

func NewPV

func NewPV() PV

func (PV) GetPubKey

func (pv PV) GetPubKey() (crypto.PubKey, error)

GetPubKey implements PrivValidator interface

func (PV) SignProposal

func (pv PV) SignProposal(chainID string, proposal *tmtypes.Proposal) error

SignProposal implements PrivValidator interface

func (PV) SignVote

func (pv PV) SignVote(chainID string, vote *tmtypes.Vote) error

SignVote implements PrivValidator interface

type PortKeeper

type PortKeeper interface {
	BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability
}

Expected Interface PortKeeper defines the expected IBC port keeper

Jump to

Keyboard shortcuts

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