-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Feature: Ability for CEA to move FUNDS_and_PAYLOAD from CEA to UEA
Main Feature
As per v1 of CEA, it was decided that CEA will only [withdraw funds back to UEA.](https://www.notion.so/CEA-Preliminary-R-D-Doc-2b5188aea7f480a0bba3fbf1d326d52d?pvs=21)
As per new feature request:
- CEA should be able to move FUNDS and PAYLOAD to UEA as well.
- The flow would be:
- Bob Request: Move 100 USDT from CEA balance to UEA on PC → Then execute payload 0xABC on UEA
- The request goes from UGPC as is. NO CHANGES
- TSS calls VAULT.
- Vault calls CEA.executeUniversalTx()
- CEA and CEAFactory Flow:
- If payload empty ? tx type is FUNDS
- pass empty payload and no sigData
- recipient is UEA of the CEA
- call gateway.sendUniversalTx() - already existing funds
- If payload is non-empty ? tx typs is FUNDS_AND_PAYLOAD
- call CEAFactory.sendUniversalTxViaCEA()
- Factory checks caller is CEA , via CEA_TO_UEA mapping. valid CEA = has a UEA.
- Factory sets recipient of the tx as recipient == CEA_TO_UEA[CEA]
- factory calls gateway.sendUniversalTxViaCEA() → new function
- If payload empty ? tx type is FUNDS
- On Gateway.sendUniversalTxViaCEA()
- the function does exactly same as already existing function
- only diff: adds viaCEA as true param in UniversalTx() event.
Contract Modifications for this feat
- UEA:
- bring back UniversalPayload ( no more rawPayload )
- CEA Changes
- signatureData removal
- payload check → empty then call normal gateway function else call special
- Invoke CEAFactory of that respective chain
- CEAFactory
- sendUniversalViaCEA()
- check its from valid CEA
- then put the recipient of this tx as the UEA of the CEA.
- call sendUnievrsalTxVIACEA()
- flow → [CEA and CEAFactory Flow:](https://www.notion.so/CEA-and-CEAFactory-Flow-308188aea7f480b49d26ef6a5b0575e3?pvs=21)
- Gateway:
- new function sendUniversalTxViaCEA()
- emits bool _ceaCall as true
- for all normal tx the _ceaCall is false.
- sendUniversalViaCEA()
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels