Execute an Intent
Once the intent is defined, you can execute it using the execute()
function from the IntentBuilder
. It takes your defined states (the initial and target outcomes) and manages the transaction details like gas and calldata generation behind the scenes.
How Intent Execution Works:
Structure the Intent: Define both the initial (from) and target (to) states of the operation.
Format an userIntentOp: Borsa takes the structured intent and automatically converts it into a userOp, which is a pseudo-transaction based on the ERC-4337 standard.
Sign with Account: The intent (now a userIntentOp) must be signed by the user’s Account. In Borsa, the Account is a unified wallet that spans multiple blockchains, ensuring non-custodial, secure asset control.
Publish to Bundler: Once signed, the userOp is published to the relevant chain’s bundler, which manages the transaction on that specific blockchain.
When you call the execute()
function, Borsa takes care of gas optimization, calldata generation, and ensures the transaction is efficiently executed across multiple blockchains.
Fetch the Transaction Receipt
After executing the intent, you can retrieve the transaction receipt to view details such as the transaction hash:
This method lets you track and verify your transactions across blockchains, providing full transparency for DeFi operations.
Last updated