Send Preconf Tx
How to Submit a Preconf Transaction
This guide will walk you through the process of submitting a preconfirmation (preconf) transaction using the Taiyi protocol.
To see the full code for this example, including imports and additional details, check out the source code on GitHub.
Prerequisites
Before you begin, make sure you have:
- Rust installed on your system
- A private key for signing transactions
Step 1: Configure Connection Details
First, set up the connection details for the Taiyi, Ethereum execution layer, and your private key.
Step 2: Query Available Slots
Query the Taiyi for available slots to submit your preconf transaction.
Step 3: Prepare Transaction Details
Prepare the necessary details for your preconf transaction, including nonces and gas estimates.
Step 4: Create TipTransaction
Create a TipTransaction
object with the necessary details for the preconfirmation request.
Step 5: Sign TipTransaction
Sign the TipTransaction
using your private key.
Step 6: Create and Sign PreconfTx
Create a PreconfTx
object and sign it with your private key.
Step 7: Create PreconfRequest
Combine the TipTransaction
and PreconfTx
into a PreconfRequest
object.
Step 8: Submit PreconfRequest
Finally, submit the PreconfRequest
to the Taiyi using an HTTP POST request.