Trigger Prerecorded Transactions
Record transactions that can later be triggered to take urgent action.
Fordefi's Continuous Automated Response Engine (CARE) feature enables you to automate the execution of prerecorded transactions based on on-chain triggers -- facilitating swift responses to both opportunities and threats.
One powerful use case is setting triggers for financial opportunities. For instance, when you are in the final stage of a long trade and await the replenishment of a smart contract, the engine can automatically execute a prerecorded transaction and send an alert for signing as soon as the smart contract is replenished.
Learn more about CARE in our blog.
Enable triggering
To use CARE, turn it on first.
-
Open Fordefiās Chrome extension.
-
Click the workspace name in the top left corner. In the menu, toggle Support triggered signing on.
Record a transaction
Record the transaction you wish to keep for triggering, later.
-
Make sure that the Support triggered signing toggle in the Fordefi extension is on. See Enable triggering.
-
Navigate to the desired DApp.
-
Connect to Fordefiās extension.
-
Create the transaction in the DApp.
-
When the extension refreshes, displaying āCreate transactionā in the title, scroll down in it and select the Triggered signing checkbox. Then click Create.
The transaction is stored in Fordefiās backend, waiting for a trigger through the API to be sent for signing.
Trigger the transaction
Issue an API call to trigger the prerecorded transaction.
- If you have configured a webhhook for the workspace, Fordefi will send a notification for the newly created transaction and its state.
If not, get a list of transactions that are waiting for signing: Query the List Transactions endpoint in Fordefiās API, passing inwaiting_for_signing_trigger
for thestate
field. - To trigger the signing of the transaction, call the Trigger Transaction Signing endpoint passing in the transaction ID you retrieved in the previous step.
Updated 2 months ago