CLI Implementation Issue: The current CLI implementation has a bug that prevents query commands from working. Use REST endpoints instead.
Parameters
Parameter | Type | Description |
---|---|---|
contract_address | string | Address of the CosmWasm contract that handles rate limiting decisions. Empty string disables rate limiting. |
Queries
QueryParams
Retrieve the current module parameters. REST:Messages
MsgUpdateParams
Update module parameters through governance. Authority Required: Governance only Fields:authority
: Governance authority addressparams
: New module parameters containing the contract address
Events
EventBadRevert
Emitted when the module fails to notify the contract about a failed packet. Type:bad_revert
Attributes:
module
:rate-limited-ibc
failure_type
: Type of failure (acknowledgment
ortimeout
)packet
: The IBC packet dataacknowledgement
: The acknowledgement data (only present for acknowledgment failures)
Error Types
The module defines these error types:Error | Code | Description |
---|---|---|
ErrRateLimitExceeded | 2 | Returned when the contract rejects a transfer due to rate limits |
ErrBadMessage | 3 | Returned for malformed packet data |
ErrContractError | 4 | Returned for other contract execution errors |
Contract Interface
The module sends standardized sudo messages to the configured contract:send_packet
Sent when an IBC packet is being transmitted from Neutron. Message Structure:recv_packet
Sent when an IBC packet is being received by Neutron. Message Structure:undo_send
Sent when a packet send fails and needs to be reverted. Message Structure:Module Behavior
- No Contract Set: If
contract_address
is empty, all transfers proceed without rate limiting - Contract Set: All transfers are forwarded to the contract for approval
- Rate Limit Detection: Contract errors containing the substring “rate limit exceeded” return
ErrRateLimitExceeded
- Other Contract Errors: All other contract errors return
ErrContractError
- Failed Packet Handling: Automatically calls
undo_send
for timeouts and error acknowledgments
Contract Independence: The module does not implement any rate limiting logic itself. All rate limiting behavior depends entirely on the CosmWasm contract implementation.