-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
[Feature] Track progress of Offramp Relayer Updates
Description
We need to track the status and progress of Offramp Relayer configurations as they are initiated on the Hub and finalized on the Spoke's OnOfframpManager.
On-Chain Specifications
The process involves sending a trusted contract update from the Hub to the specific Spoke manager contract, enabling or disabling an address as an authorized relayer for offramp operations.
1. Hub Domain (Initiation)
- Contract:
Hub.sol - Function:
updateContract(PoolId poolId, ShareClassId scId, uint16 centrifugeId, bytes32 target, bytes calldata payload, uint128 extraGasLimit, address refund) - Event Emitted:
UpdateContract(uint16 indexed centrifugeId, PoolId indexed poolId, ShareClassId scId, bytes32 target, bytes payload) - Order: This is the initiating event. Once emitted, it triggers a cross-chain message to the Spoke.
- Payload Details: For relayer updates, the
payloadencodes anIOnOfframpManager.TrustedCall.Relayeroperation. It takes the formabi.encode(uint8(1), bytes32 relayerAddress, bool isEnabled).
2. Spoke Domain (Finalization)
- Contract:
OnOfframpManager.sol - Function:
trustedCall(PoolId poolId, ShareClassId scId, bytes memory payload) - Event Emitted:
UpdateRelayer(address indexed relayer, bool isEnabled) - Order: This is the finalizing event. It occurs when the cross-chain message is processed and updates the allowed relayers on the Spoke.
Data Type Notes
- The
relayerAddressis encoded as abytes32inside the Hub payload and is resolved to a standardaddressbefore being emitted on the Spoke side. - The
UpdateContractevent logs theOnOfframpManagercontract address as abytes32 target.
Indexer Requirements (cfg-api-v3)
- Listen to
Hub.UpdateContract. Decode or inspect thepayloadto detect if it corresponds toTrustedCall.Relayer(enumvalue1). - Listen to
OnOfframpManager.UpdateRelayer. - Track the lifecycle of the relayer configuration from initiation on the Hub to finalization on the Spoke.
Reactions are currently unavailable