Key Features
- Error Containment: Prevents contract errors from disrupting IBC channels by capturing and storing errors rather than failing the channel
- Gas Limitation: Protects against infinite recursion attacks or excessive gas consumption during sudo calls
- Failure Recording: Stores details of contract failures for later retrieval and handling
- Failure Resubmission: Allows contracts to resubmit failed operations outside of the relayer context
Module Functionality
When a contract uses IBC functionality and receives an acknowledgment, the message from the counterparty chain is delivered via a sudo call. The Contract Manager module:- Wraps all sudo calls to enforce gas limits and error handling
- Executes the sudo call in a temporary context to protect state consistency
- Captures and stores errors if the sudo call fails
- Allows the contract owner to query failure information
- Provides mechanisms for failure resubmission