Documentation ¶
Index ¶
- func BeginBlocker(_ sdk.Context, _ abci.RequestBeginBlock)
- func EndBlocker(ctx sdk.Context, _ abci.RequestEndBlock, bk types.BaseKeeper, ...) ([]abci.ValidatorUpdate, error)
- func NewHandler(k keeper.Keeper, n types.Nexus, b types.BankKeeper, a types.AccountKeeper, ...) sdk.Handler
- func NewProposalHandler(k keeper.Keeper, nexusK types.Nexus, accountK types.AccountKeeper) govtypes.Handler
- func OnRecvMessage(ctx sdk.Context, k keeper.Keeper, ibcK keeper.IBCKeeper, n types.Nexus, ...) ibcexported.Acknowledgement
- type AppModule
- func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
- func (AppModule) ConsensusVersion() uint64
- func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate
- func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage
- func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate
- func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier
- func (AppModule) QuerierRoute() string
- func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
- func (am AppModule) RegisterServices(cfg module.Configurator)
- func (am AppModule) Route() sdk.Route
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
- func (AppModuleBasic) GetQueryCmd() *cobra.Command
- func (AppModuleBasic) GetTxCmd() *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
- func (AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry)
- func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router)
- func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error
- type AxelarnetIBCModule
- func (m AxelarnetIBCModule) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, ...) error
- func (m AxelarnetIBCModule) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) ibcexported.Acknowledgement
- func (m AxelarnetIBCModule) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) error
- type Fee
- type Message
- type RateLimitedICS4Wrapper
- func (r RateLimitedICS4Wrapper) GetAppVersion(ctx sdk.Context, portID string, channelID string) (string, bool)
- func (r RateLimitedICS4Wrapper) SendPacket(ctx sdk.Context, chanCap *capabilitytypes.Capability, ...) error
- func (r RateLimitedICS4Wrapper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, ...) error
- type RateLimiter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginBlocker ¶
func BeginBlocker(_ sdk.Context, _ abci.RequestBeginBlock)
BeginBlocker check for infraction evidence or downtime of validators on every begin block
func EndBlocker ¶
func EndBlocker(ctx sdk.Context, _ abci.RequestEndBlock, bk types.BaseKeeper, ibcKeeper keeper.IBCKeeper) ([]abci.ValidatorUpdate, error)
EndBlocker called every block, process inflation, update validator set.
func NewHandler ¶
func NewHandler(k keeper.Keeper, n types.Nexus, b types.BankKeeper, a types.AccountKeeper, ibcK keeper.IBCKeeper) sdk.Handler
NewHandler returns the handler of the Cosmos module
func NewProposalHandler ¶ added in v0.34.0
func NewProposalHandler(k keeper.Keeper, nexusK types.Nexus, accountK types.AccountKeeper) govtypes.Handler
NewProposalHandler returns the handler for the proposals of the axelarnet module
func OnRecvMessage ¶ added in v0.32.0
func OnRecvMessage(ctx sdk.Context, k keeper.Keeper, ibcK keeper.IBCKeeper, n types.Nexus, b types.BankKeeper, r RateLimiter, packet ibcexported.PacketI) ibcexported.Acknowledgement
OnRecvMessage handles general message from a cosmos chain
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule implements module.AppModule
func NewAppModule ¶
func NewAppModule(ibcK keeper.IBCKeeper, nexus types.Nexus, bank types.BankKeeper, account types.AccountKeeper, logger log.Logger) AppModule
NewAppModule creates a new AppModule object
func (AppModule) BeginBlock ¶
func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock)
BeginBlock executes all state transitions this module requires at the beginning of each new block
func (AppModule) ConsensusVersion ¶
ConsensusVersion implements AppModule/ConsensusVersion.
func (AppModule) EndBlock ¶
func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate
EndBlock executes all state transitions this module requires at the end of each new block
func (AppModule) ExportGenesis ¶
ExportGenesis exports a genesis state from the module's keeper
func (AppModule) InitGenesis ¶
func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate
InitGenesis initializes the module's keeper from the given genesis state
func (AppModule) LegacyQuerierHandler ¶
func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier
LegacyQuerierHandler returns a new query handler for this module
func (AppModule) QuerierRoute ¶
QuerierRoute returns this module's query route
func (AppModule) RegisterInvariants ¶
func (AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
RegisterInvariants registers this module's invariants
func (AppModule) RegisterServices ¶
func (am AppModule) RegisterServices(cfg module.Configurator)
RegisterServices registers a GRPC query service to respond to the module-specific GRPC queries.
type AppModuleBasic ¶
type AppModuleBasic struct { }
AppModuleBasic implements module.AppModuleBasic
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns the default genesis state
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd() *cobra.Command
GetQueryCmd returns all CLI query commands for this module
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd() *cobra.Command
GetTxCmd returns all CLI tx commands for this module
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
Name returns the name of the module
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module.
func (AppModuleBasic) RegisterInterfaces ¶
func (AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry)
RegisterInterfaces registers the module's interface types
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the types necessary in this module with the given codec
func (AppModuleBasic) RegisterRESTRoutes ¶
func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router)
RegisterRESTRoutes registers the REST routes for this module
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error
ValidateGenesis checks the given genesis state for validity
type AxelarnetIBCModule ¶ added in v0.35.0
AxelarnetIBCModule is an IBCModule that adds rate limiting and gmp processing to the ibc middleware
func NewAxelarnetIBCModule ¶ added in v0.35.0
func NewAxelarnetIBCModule( transferModule porttypes.IBCModule, ibcK keeper.IBCKeeper, rateLimiter RateLimiter, nexus types.Nexus, bank types.BankKeeper, ) AxelarnetIBCModule
NewAxelarnetIBCModule creates a new AxelarnetIBCModule instance
func (AxelarnetIBCModule) OnAcknowledgementPacket ¶ added in v0.35.0
func (m AxelarnetIBCModule) OnAcknowledgementPacket( ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, ) error
OnAcknowledgementPacket implements the IBCModule interface
func (AxelarnetIBCModule) OnRecvPacket ¶ added in v0.35.0
func (m AxelarnetIBCModule) OnRecvPacket( ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, ) ibcexported.Acknowledgement
OnRecvPacket implements the IBCModule interface. A successful acknowledgement is returned if the packet data is successfully decoded and the receive application logic returns without error.
func (AxelarnetIBCModule) OnTimeoutPacket ¶ added in v0.35.0
func (m AxelarnetIBCModule) OnTimeoutPacket( ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, ) error
OnTimeoutPacket implements the IBCModule interface
type Fee ¶ added in v0.33.0
type Fee struct { Amount string `json:"amount"` Recipient string `json:"recipient"` RefundRecipient *string `json:"refund_recipient"` }
Fee is used to pay relayer for executing cross chain message
func (Fee) ValidateBasic ¶ added in v0.34.0
ValidateBasic validates the fee
type Message ¶ added in v0.32.0
type Message struct { DestinationChain string `json:"destination_chain"` DestinationAddress string `json:"destination_address"` Payload []byte `json:"payload"` Type int64 `json:"type"` Fee *Fee `json:"fee"` // Optional }
Message is attached in ICS20 packet memo field
type RateLimitedICS4Wrapper ¶ added in v0.35.0
type RateLimitedICS4Wrapper struct {
// contains filtered or unexported fields
}
func NewRateLimitedICS4Wrapper ¶ added in v0.35.0
func NewRateLimitedICS4Wrapper(channel porttypes.ICS4Wrapper, rateLimiter RateLimiter, keeper *keeper.Keeper) RateLimitedICS4Wrapper
func (RateLimitedICS4Wrapper) GetAppVersion ¶ added in v0.35.0
func (r RateLimitedICS4Wrapper) GetAppVersion(ctx sdk.Context, portID string, channelID string) (string, bool)
GetAppVersion implements the ICS4 Wrapper interface
func (RateLimitedICS4Wrapper) SendPacket ¶ added in v0.35.0
func (r RateLimitedICS4Wrapper) SendPacket(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet ibcexported.PacketI) error
SendPacket implements the ICS4 Wrapper interface
func (RateLimitedICS4Wrapper) WriteAcknowledgement ¶ added in v0.35.0
func (r RateLimitedICS4Wrapper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet ibcexported.PacketI, ack ibcexported.Acknowledgement) error
WriteAcknowledgement implements the ICS4 Wrapper interface
type RateLimiter ¶ added in v0.27.0
type RateLimiter struct {
// contains filtered or unexported fields
}
RateLimiter implements an ICS4Wrapper middleware to rate limit IBC transfers
func NewRateLimiter ¶ added in v0.27.0
func NewRateLimiter(keeper *keeper.Keeper, nexus types.Nexus) RateLimiter
NewRateLimiter returns a new RateLimiter
func (RateLimiter) RateLimitPacket ¶ added in v0.27.0
func (r RateLimiter) RateLimitPacket(ctx sdk.Context, packet ibcexported.PacketI, direction nexus.TransferDirection, ibcPath string) error
RateLimitPacket implements rate limiting of IBC packets - If the IBC channel that the packet is sent on is a registered chain, check the activation status. - If the packet is an ICS-20 coin transfer, apply rate limiting on (chain, base denom) pair. - If the rate limit is exceeded, an error is returned. From direction is used for tokens coming from source chain (unlocked from IBC escrow/minted as an IBC denom). To direction is used for tokens going to destination chain (locked in the IBC escrow/burned as an IBC denom).