Key Features
Contract Detection
Automatically detects if the sender is a smart contract using HasContractInfo() to apply contract-specific handling.
Enhanced Responses
Provides tracking information with sequence IDs and channel information to help correlate transfers with their results.
Sudo Callbacks
Calls back to sending contracts via Sudo mechanism when acknowledgements or timeouts are received.
IBC Compatibility
Maintains full compatibility with standard IBC Transfer functionality while adding smart contract enhancements.
Packet Forwarding
Supports relaying transfer packets through Neutron using memo-based packet forwarding middleware for multi-hop transfers.
IBC Hooks
Enables calling smart contracts on Neutron via IBC transfers by supplying memo in the correct format for contract execution.
Module Interactions
The Transfer module integrates with other Neutron modules:- IBC Core: Routes packets between chains using the IBC protocol
- Contract Manager: Uses
PrepareSudoCallbackMessage()
for callback message preparation - Fee Refunder: Uses fee locking (
LockFees()
) and distribution functions for packet processing
Architecture
The Transfer module wraps the standard IBC transfer functionality, adding contract detection and callback mechanisms for smart contract integration.Advanced Transfer Features
Packet Forwarding Middleware
Neutron supports relaying transfer packets through itself using memo-based packet forwarding middleware. This enables multi-hop transfers where Neutron acts as an intermediary chain. Example memo format for packet forwarding:Packet forwarding is implemented as middleware in the IBC stack. The exact implementation details may be provided by external packet forwarding middleware integrated with Neutron’s IBC setup.
IBC Hooks Integration
IBC Hooks allow you to call smart contracts on Neutron by sending IBC transfers to the chain with properly formatted memo fields. This enables cross-chain contract execution triggered by token transfers. Example memo format for contract calls:Standard IBC Transfer Features
The module maintains all capabilities of the standard IBC Transfer module:- Transfer of tokens between IBC-connected chains
- Denomination trace for cross-chain tokens
- Automatic escrowing and releasing of tokens
- Support for transfer timeout and recovery
- Standard queries delegated to underlying IBC transfer implementation