Manually Broadcast a Transaction to the Blockchain
Fordefi lets you broadcast a signed transaction to the node of your choice.
By default, all transactions that you sign using Fordefi's web console or mobile app are sent by Fordefi to the blockchain. However, Fordefi lets you broadcast a signed transaction to the node of your choice, for example, in order to expedite a transaction.
To "sign but not send" a transaction, specify the manual
option in the push_mode
field of a CreateTransaction request.
Here's an example:
"vault_id": "197a4de2-48e7-412a-9fbd-13d08122a12d",
"note": "string",
"signer_type": "api_signer",
"type": "evm_transaction",
"details": {
"type": "evm_raw_transaction",
"push_mode": "manual",
"gas": {
"gas_limit": "2630420",
"type": "priority",
"priority_level": "low"
},
"fail_on_prediction_failure": false,
"chain": "ethereum_sepolia",
"to": "0x4eF28B0BD14FB26a1aD7cF0E2e4d4ff3f1C7D858",
"value": "1",
"data": {
"type": "hex",
"hex_data": "0x48656c6c6f"
}
}
}
As with transactions that are sent automatically by Fordefi:
- The transaction is still subject to policy rules and approvals.
- Programmatic transactions are always signed by an API Signer.
Statuses of manually broadcast transactions
- Once signed, the transaction will take on the
SIGNED
status. - Once the transaction is signed, Fordefi sends a webhook notification to the API User with the updated state and the signature. The API User can also retrieve the signed transaction from the API for further processing.
- Fordefi monitors the blockchain for this transaction (similarly to any other managed transaction). When it is detected on chain, its status is updated accordingly: it transitions from
SIGNED
toMINED
(orCOMPLETED
orREVERTED
). - When a transaction has a fixed expiration deadline (as in Solana), then the
SIGNED
transaction automatically transitions toABORTED
once it expires.
Multiple transactions
EVM
- Each signed transaction increments the nonce at the time of signing. Subsequent transactions, whether 'sign-but-not-send' or regular, receive subsequent nonces.
- Simulation for subsequent transactions includes pending
SIGNED
transactions in its simulation queue.
Solana
- Solana does not enforce a strict ordering of nonces. Fordefi therefore allows subsequent normal transactions (which are also sent) from the same vault and chain.
Accelerate or cancel a transaction
You can accelerate or cancel EVM transactions that you have broadcast to a node of your choice.
Note the following with respect to these transactions:
- A
SIGNED
transaction can be accelerated or canceled. The replacement transaction will always be sent to the node by Fordefi (meaning: it will NOT inherit the sign-but-not-send). - When a
SIGNED
transaction is accelerated or cancelled, the original transitions to theACCELERATING
orCANCELLING
state, as in a regular transaction. - The replacement follows the normal transaction lifecycle:
- If the replacement has other transactions before it (with status
SIGNED
,WAITING_TO_BE_MINED
, orSTUCK
), the replacement will take on theQUEUED
status. - If the replacement does not have other transactions before it, it will take on the
WAITING_TO_BE_MINED
and later possibly theSTUCK
status.
- If the replacement has other transactions before it (with status
Manually control an EVM transaction nonce
Fordefi lets you "reuse" a nonce of your choice to leverage situations such as the following:
- You want to replace an existing transaction that was not mined with a different one, without canceling it and so, save on gas fees.
- You want to create multiple manual push-mode transactions with the same nonce, letting client-side logic determine which one to broadcast.
Simply create a transaction and pass in the nonce value for the custom_nonce
field.
The nonce you choose can be only:
The nonce of any signed transaction that has not been mined yet.
OR
The next available nonce. That is, if the maximal nonce of any signed transaction from this vault on this chain is
n
, you can pass inn+1
.
Here's an example:
"vault_id": "197a4de2-48e7-412a-9fbd-13d08122a12d",
"signer_type": "api_signer",
"type": "evm_transaction",
"details": {
"type": "evm_raw_transaction",
"push_mode": "manual",
"chain": "ethereum_sepolia",
"to": "0x4eF28B0BD14FB26a1aD7cF0E2e4d4ff3f1C7D858",
"value": "1",
"data": {
"type": "hex",
"hex_data": "0x48656c6c6f"
}
"custom_nonce": "47890",
}
}