Documentation ¶
Index ¶
- func BuildWasmExecMsg(msgType string, packet exported.PacketI) ([]byte, error)
- func CheckAndUpdateRateLimits(ctx sdk.Context, contractKeeper *wasmkeeper.PermissionedKeeper, ...) error
- func UndoSendRateLimit(ctx sdk.Context, contractKeeper *wasmkeeper.PermissionedKeeper, ...) error
- func ValidateReceiverAddress(packet exported.PacketI) error
- type AppModule
- func (AppModule) ConsensusVersion() uint64
- func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage
- func (AppModule) GenerateGenesisState(simState *module.SimulationState)
- func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage)
- func (am AppModule) IsAppModule()
- func (am AppModule) IsOnePerModuleType()
- func (am AppModule) Name() string
- func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg
- func (AppModule) QuerierRoute() string
- func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
- func (am AppModule) RegisterServices(cfg module.Configurator)
- func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry)
- func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
- func (b AppModuleBasic) GetQueryCmd() *cobra.Command
- func (b AppModuleBasic) GetTxCmd() *cobra.Command
- func (AppModuleBasic) Name() string
- func (b AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
- func (AppModuleBasic) RegisterInterfaces(reg codectypes.InterfaceRegistry)
- func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func (b AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error
- type IBCModule
- func (im *IBCModule) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool)
- func (im *IBCModule) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, ...) error
- func (im *IBCModule) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string) error
- func (im *IBCModule) OnChanCloseInit(ctx sdk.Context, portID, channelID string) error
- func (im *IBCModule) OnChanOpenAck(ctx sdk.Context, portID, channelID string, counterpartyChannelID string, ...) error
- func (im *IBCModule) OnChanOpenConfirm(ctx sdk.Context, portID, channelID string) error
- func (im *IBCModule) OnChanOpenInit(ctx sdk.Context, order channeltypes.Order, connectionHops []string, ...) (string, error)
- func (im *IBCModule) OnChanOpenTry(ctx sdk.Context, order channeltypes.Order, connectionHops []string, ...) (string, error)
- func (im *IBCModule) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) exported.Acknowledgement
- func (im *IBCModule) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) error
- func (im *IBCModule) RevertSentPacket(ctx sdk.Context, packet exported.PacketI) error
- func (im *IBCModule) SendPacket(ctx sdk.Context, chanCap *capabilitytypes.Capability, ...) (uint64, error)
- func (im *IBCModule) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet exported.PacketI, ...) error
- type ICS4Wrapper
- func (i *ICS4Wrapper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (i *ICS4Wrapper) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool)
- func (i *ICS4Wrapper) GetContractAddress(ctx sdk.Context) (contract string)
- func (i *ICS4Wrapper) GetParams(ctx sdk.Context) (params types.Params)
- func (i *ICS4Wrapper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (i *ICS4Wrapper) SendPacket(ctx sdk.Context, chanCap *capabilitytypes.Capability, ...) (uint64, error)
- func (i *ICS4Wrapper) SetParams(ctx sdk.Context, params types.Params) error
- func (i *ICS4Wrapper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet exported.PacketI, ...) error
- type PacketMsg
- type RecvPacketMsg
- type SendPacketMsg
- type UndoPacketMsg
- type UndoSendMsg
- type UnwrappedPacket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildWasmExecMsg ¶
func CheckAndUpdateRateLimits ¶
func CheckAndUpdateRateLimits(ctx sdk.Context, contractKeeper *wasmkeeper.PermissionedKeeper, msgType, contract string, packet exported.PacketI, ) error
func UndoSendRateLimit ¶
func UndoSendRateLimit(ctx sdk.Context, contractKeeper *wasmkeeper.PermissionedKeeper, contract string, packet exported.PacketI, ) error
func ValidateReceiverAddress ¶
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule implements the AppModule interface for the capability module.
func NewAppModule ¶
func (AppModule) ConsensusVersion ¶
ConsensusVersion implements AppModule/ConsensusVersion.
func (AppModule) ExportGenesis ¶
ExportGenesis returns the txfees module's exported genesis state as raw JSON bytes.
func (AppModule) GenerateGenesisState ¶
func (AppModule) GenerateGenesisState(simState *module.SimulationState)
GenerateGenesisState creates a randomized GenState of the module
func (AppModule) InitGenesis ¶
InitGenesis performs the txfees module's genesis initialization It returns no validator updates.
func (AppModule) IsAppModule ¶
func (am AppModule) IsAppModule()
IsAppModule implements the appmodule.AppModule interface.
func (AppModule) IsOnePerModuleType ¶
func (am AppModule) IsOnePerModuleType()
IsOnePerModuleType is a marker function just indicates that this is a one-per-module type.
func (AppModule) ProposalContents ¶
func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg
ProposalContents doesn't return any content functions for governance proposals
func (AppModule) QuerierRoute ¶
QuerierRoute returns the ibc-rate-limit module's query routing key.
func (AppModule) RegisterInvariants ¶
func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry)
RegisterInvariants registers the txfees 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.
func (AppModule) RegisterStoreDecoder ¶
func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry)
RegisterStoreDecoder registers a decoder
func (AppModule) WeightedOperations ¶
func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation
WeightedOperations returns the all the gov module operations with their respective weights.
type AppModuleBasic ¶
type AppModuleBasic struct {
// contains filtered or unexported fields
}
func NewAppModuleBasic ¶
func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
func (AppModuleBasic) GetQueryCmd ¶
func (b AppModuleBasic) GetQueryCmd() *cobra.Command
func (AppModuleBasic) GetTxCmd ¶
func (b AppModuleBasic) GetTxCmd() *cobra.Command
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (b AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
--------------------------------------- Interfaces.
func (AppModuleBasic) RegisterInterfaces ¶
func (AppModuleBasic) RegisterInterfaces(reg codectypes.InterfaceRegistry)
RegisterInterfaces registers interfaces and implementations of the ibc-rate-limit module.
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
func (AppModuleBasic) ValidateGenesis ¶
func (b AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error
ValidateGenesis performs genesis state validation for the ibcratelimit module.
type IBCModule ¶
type IBCModule struct {
// contains filtered or unexported fields
}
func NewIBCModule ¶
func NewIBCModule(app porttypes.IBCModule, ics4 *ICS4Wrapper) IBCModule
func (*IBCModule) GetAppVersion ¶
func (*IBCModule) OnAcknowledgementPacket ¶
func (im *IBCModule) OnAcknowledgementPacket( ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, ) error
OnAcknowledgementPacket implements the IBCModule interface
func (*IBCModule) OnChanCloseConfirm ¶
OnChanCloseConfirm implements the IBCModule interface
func (*IBCModule) OnChanCloseInit ¶
OnChanCloseInit implements the IBCModule interface
func (*IBCModule) OnChanOpenAck ¶
func (im *IBCModule) OnChanOpenAck( ctx sdk.Context, portID, channelID string, counterpartyChannelID string, counterpartyVersion string, ) error
OnChanOpenAck implements the IBCModule interface
func (*IBCModule) OnChanOpenConfirm ¶
OnChanOpenConfirm implements the IBCModule interface
func (*IBCModule) OnChanOpenInit ¶
func (im *IBCModule) OnChanOpenInit(ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID string, channelID string, channelCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, ) (string, error)
OnChanOpenInit implements the IBCModule interface
func (*IBCModule) OnChanOpenTry ¶
func (im *IBCModule) OnChanOpenTry( ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, channelCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, counterpartyVersion string, ) (string, error)
OnChanOpenTry implements the IBCModule interface
func (*IBCModule) OnRecvPacket ¶
func (im *IBCModule) OnRecvPacket( ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, ) exported.Acknowledgement
OnRecvPacket implements the IBCModule interface
func (*IBCModule) OnTimeoutPacket ¶
func (im *IBCModule) OnTimeoutPacket( ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, ) error
OnTimeoutPacket implements the IBCModule interface
func (*IBCModule) RevertSentPacket ¶
RevertSentPacket Notifies the contract that a sent packet wasn't properly received
func (*IBCModule) SendPacket ¶
func (im *IBCModule) SendPacket( ctx sdk.Context, chanCap *capabilitytypes.Capability, sourcePort, sourceChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, data []byte, ) (uint64, error)
SendPacket implements the ICS4 Wrapper interface
func (*IBCModule) WriteAcknowledgement ¶
func (im *IBCModule) WriteAcknowledgement( ctx sdk.Context, chanCap *capabilitytypes.Capability, packet exported.PacketI, ack exported.Acknowledgement, ) error
WriteAcknowledgement implements the ICS4 Wrapper interface
type ICS4Wrapper ¶
type ICS4Wrapper struct { ContractKeeper *wasmkeeper.PermissionedKeeper IbcratelimitKeeper *keeper.Keeper // contains filtered or unexported fields }
func NewICS4Middleware ¶
func NewICS4Middleware( channel porttypes.ICS4Wrapper, accountKeeper *authkeeper.AccountKeeper, contractKeeper *wasmkeeper.PermissionedKeeper, bankKeeper *bankkeeper.BaseKeeper, ibcratelimitkeeper *keeper.Keeper, ) ICS4Wrapper
func (*ICS4Wrapper) ExportGenesis ¶
func (i *ICS4Wrapper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the x/ibc-rate-limit module's exported genesis.
func (*ICS4Wrapper) GetAppVersion ¶
func (*ICS4Wrapper) GetContractAddress ¶
func (i *ICS4Wrapper) GetContractAddress(ctx sdk.Context) (contract string)
func (*ICS4Wrapper) GetParams ¶
func (i *ICS4Wrapper) GetParams(ctx sdk.Context) (params types.Params)
func (*ICS4Wrapper) InitGenesis ¶
func (i *ICS4Wrapper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
InitGenesis initializes the x/ibc-rate-limit module's state from a provided genesis state, which includes the parameter for the contract address.
func (*ICS4Wrapper) SendPacket ¶
func (i *ICS4Wrapper) SendPacket(ctx sdk.Context, chanCap *capabilitytypes.Capability, sourcePort, sourceChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, data []byte) (uint64, error)
SendPacket implements the ICS4 interface and is called when sending packets. This method retrieves the contract from the middleware's parameters and checks if the limits have been exceeded for the current transfer, in which case it returns an error preventing the IBC send from taking place. If the contract param is not configured, or the contract doesn't have a configuration for the (channel+denom) being used, transfers are not prevented and handled by the wrapped IBC app
func (*ICS4Wrapper) WriteAcknowledgement ¶
func (i *ICS4Wrapper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet exported.PacketI, ack exported.Acknowledgement) error
type PacketMsg ¶
type PacketMsg struct {
Packet UnwrappedPacket `json:"packet"`
}
type RecvPacketMsg ¶
type RecvPacketMsg struct {
RecvPacket PacketMsg `json:"recv_packet"`
}
type SendPacketMsg ¶
type SendPacketMsg struct {
SendPacket PacketMsg `json:"send_packet"`
}
type UndoPacketMsg ¶
type UndoPacketMsg struct {
Packet UnwrappedPacket `json:"packet"`
}
type UndoSendMsg ¶
type UndoSendMsg struct {
UndoSend UndoPacketMsg `json:"undo_send"`
}
type UnwrappedPacket ¶
type UnwrappedPacket struct { Sequence uint64 `json:"sequence"` SourcePort string `json:"source_port"` SourceChannel string `json:"source_channel"` DestinationPort string `json:"destination_port"` DestinationChannel string `json:"destination_channel"` Data transfertypes.FungibleTokenPacketData `json:"data"` TimeoutHeight clienttypes.Height `json:"timeout_height"` TimeoutTimestamp uint64 `json:"timeout_timestamp,omitempty"` }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
client
|
|
Package types is a reverse proxy.
|
Package types is a reverse proxy. |