🚂Execution Engine Controller
The execution engine is designed to take transaction queues and execute them in a sequential manner. It's functionality is to have all breakpoint status updated in the queue about each txn, notify UI.
Integrations to be done:
So the UI is expected to receive a base path, as in a transaction queue to be executed for a user's operation
This basePath/queue is to be stored in the local storage of auth, to not lose it if user reloads in middle
For any user session check if there is a pending queue in user's local storage, and execute it passing the queue to the execution engine.
this is a fail safe in case the user drops in middle of a transaction queue execution
When the user is doing an operation, and tria creates a base path for their operation, we get a transaction queue from the basePath provider to be executed using the execution engine, and execution engine starts to execute the complete queue with one user click, returns the breakpoint status to the UI for display/progress bar purpose.
To enable debridge (spooncat minting via debridge) with Tria wallet:
create a transaction queue on auth side, for the required transactions to be done for spooncat minting specifically, i.e. approve + debridge txn (like done in metamask integration)
Check for token allowance - use the checkTokenAllowance function from the connect sdk - refer metamask integration for spooncat minting
Approve txn object - use getApproveTxnObject in fee controller to get the txnObject for approve and add it to the data: {evm: txnObject} field in the transaction to add to the queue, and add it as pending to the queue
Debridge Txn object - use the getBridgeQuote function from the connect sdk with the same params passed in metamask integration
Last updated