router

package
v3.1.5 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 26 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppModule

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

AppModule represents the AppModule for this module

func NewAppModule

func NewAppModule(k *keeper.Keeper) AppModule

NewAppModule creates a new router module

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, cdc codec.JSONCodec) json.RawMessage

ExportGenesis returns the exported genesis state as raw bytes for the ibc-router module.

func (AppModule) GenerateGenesisState

func (AppModule) GenerateGenesisState(simState *module.SimulationState)

GenerateGenesisState creates a randomized GenState of the router module.

func (AppModule) InitGenesis

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

InitGenesis performs genesis initialization for the ibc-router module. It returns no validator updates.

func (AppModule) LegacyQuerierHandler

func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier

LegacyQuerierHandler implements the AppModule interface

func (AppModule) ProposalContents

ProposalContents doesn't return any content functions for governance proposals.

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute implements the AppModule interface

func (AppModule) RandomizedParams

func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.ParamChange

RandomizedParams creates randomized ibc-router param changes for the simulator.

func (AppModule) RegisterInvariants

func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry)

RegisterInvariants implements the AppModule interface

func (AppModule) RegisterServices

func (am AppModule) RegisterServices(cfg module.Configurator)

RegisterServices registers module services.

func (AppModule) RegisterStoreDecoder

func (am AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)

RegisterStoreDecoder registers a decoder for router module's types

func (AppModule) Route

func (am AppModule) Route() sdk.Route

Route implements the AppModule interface

func (AppModule) WeightedOperations

func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation

WeightedOperations returns the all the router module operations with their respective weights.

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic is the router AppModuleBasic

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage

DefaultGenesis returns default genesis state as raw bytes for the ibc router module.

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd() *cobra.Command

GetQueryCmd implements AppModuleBasic interface

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd() *cobra.Command

GetTxCmd implements AppModuleBasic interface

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name implements AppModuleBasic interface

func (AppModuleBasic) RegisterGRPCGatewayRoutes

func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)

RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the ibc-router module.

func (AppModuleBasic) RegisterInterfaces

func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers module concrete types into protobuf Any.

func (AppModuleBasic) RegisterLegacyAminoCodec

func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec implements AppModuleBasic interface

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router)

RegisterRESTRoutes implements AppModuleBasic interface

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error

ValidateGenesis performs genesis state validation for the router module.

type IBCMiddleware added in v3.1.0

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

IBCMiddleware implements the ICS26 callbacks for the forward middleware given the forward keeper and the underlying application.

func NewIBCMiddleware added in v3.1.0

func NewIBCMiddleware(
	app porttypes.IBCModule,
	k *keeper.Keeper,
	retriesOnTimeout uint8,
	forwardTimeout time.Duration,
	refundTimeout time.Duration,
) IBCMiddleware

NewIBCMiddleware creates a new IBCMiddleware given the keeper and underlying application.

func (IBCMiddleware) OnAcknowledgementPacket added in v3.1.0

func (im IBCMiddleware) OnAcknowledgementPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	acknowledgement []byte,
	relayer sdk.AccAddress,
) error

OnAcknowledgementPacket implements the IBCModule interface.

func (IBCMiddleware) OnChanCloseConfirm added in v3.1.0

func (im IBCMiddleware) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string) error

OnChanCloseConfirm implements the IBCModule interface.

func (IBCMiddleware) OnChanCloseInit added in v3.1.0

func (im IBCMiddleware) OnChanCloseInit(ctx sdk.Context, portID, channelID string) error

OnChanCloseInit implements the IBCModule interface.

func (IBCMiddleware) OnChanOpenAck added in v3.1.0

func (im IBCMiddleware) OnChanOpenAck(
	ctx sdk.Context,
	portID, channelID string,
	counterpartyChannelID string,
	counterpartyVersion string,
) error

OnChanOpenAck implements the IBCModule interface.

func (IBCMiddleware) OnChanOpenConfirm added in v3.1.0

func (im IBCMiddleware) OnChanOpenConfirm(ctx sdk.Context, portID, channelID string) error

OnChanOpenConfirm implements the IBCModule interface.

func (IBCMiddleware) OnChanOpenInit added in v3.1.0

func (im IBCMiddleware) OnChanOpenInit(
	ctx sdk.Context,
	order channeltypes.Order,
	connectionHops []string,
	portID string,
	channelID string,
	chanCap *capabilitytypes.Capability,
	counterparty channeltypes.Counterparty,
	version string,
) error

OnChanOpenInit implements the IBCModule interface.

func (IBCMiddleware) OnChanOpenTry added in v3.1.0

func (im IBCMiddleware) OnChanOpenTry(
	ctx sdk.Context,
	order channeltypes.Order,
	connectionHops []string,
	portID, channelID string,
	chanCap *capabilitytypes.Capability,
	counterparty channeltypes.Counterparty,
	counterpartyVersion string,
) (version string, err error)

OnChanOpenTry implements the IBCModule interface.

func (IBCMiddleware) OnRecvPacket added in v3.1.0

func (im IBCMiddleware) OnRecvPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	relayer sdk.AccAddress,
) ibcexported.Acknowledgement

OnRecvPacket checks the memo field on this packet and if the metadata inside's root key indicates this packet should be handled by the swap middleware it attempts to perform a swap. If the swap is successful the underlying application's OnRecvPacket callback is invoked, an ack error is returned otherwise.

func (IBCMiddleware) OnTimeoutPacket added in v3.1.0

func (im IBCMiddleware) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) error

OnTimeoutPacket implements the IBCModule interface.

func (IBCMiddleware) SendPacket added in v3.1.0

func (im IBCMiddleware) SendPacket(
	ctx sdk.Context,
	chanCap *capabilitytypes.Capability,
	packet ibcexported.PacketI,
) error

SendPacket implements the ICS4 Wrapper interface.

func (IBCMiddleware) WriteAcknowledgement added in v3.1.0

func (im IBCMiddleware) WriteAcknowledgement(
	ctx sdk.Context,
	chanCap *capabilitytypes.Capability,
	packet ibcexported.PacketI,
	ack ibcexported.Acknowledgement,
) error

WriteAcknowledgement implements the ICS4 Wrapper interface.

Directories

Path Synopsis
client
cli
Package types is a reverse proxy.
Package types is a reverse proxy.

Jump to

Keyboard shortcuts

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