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 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)
- 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 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 // contains filtered or unexported fields }
func NewICS4Middleware ¶
func NewICS4Middleware( channel porttypes.ICS4Wrapper, accountKeeper *authkeeper.AccountKeeper, contractKeeper *wasmkeeper.PermissionedKeeper, bankKeeper *bankkeeper.BaseKeeper, paramSpace paramtypes.Subspace, ) 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) SetParams ¶
func (i *ICS4Wrapper) SetParams(ctx sdk.Context, params types.Params)
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"` }
Directories ¶
Path | Synopsis |
---|---|
queryproto
Package queryproto is a reverse proxy.
|
Package queryproto is a reverse proxy. |