eth_sendRawTransactionSync
Submits a signed transaction and waits synchronously for inclusion in a Flashblock before returning. Unlike eth_sendRawTransaction which returns immediately with just the transaction hash, this method blocks until the transaction is included in a Flashblock and returns a full transaction receipt.
This enables sub-200ms transaction confirmation flows — the response includes the receipt with blockNumber, gasUsed, logs, status, and L2-specific fields like l1Fee.
Use Cases#
- Instant confirmation UX — Display transaction results immediately without polling
- Synchronous workflows — Chain dependent operations without receipt polling
- Payment processing — Confirm payment transactions inline
- Bot and MEV operations — Confirm execution before proceeding
Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
signedTransactionData | DATA | Yes | The signed transaction data (RLP encoded) |
Request#
{
"jsonrpc": "2.0",
"method": "eth_sendRawTransactionSync",
"params": ["0xf86c..."],
"id": 1
}
Returns#
Returns a full transaction receipt (same format as eth_getTransactionReceipt):
| Field | Type | Description |
|---|---|---|
transactionHash | DATA | 32-byte transaction hash |
blockHash | DATA | 32-byte block hash (may be zero for preconfirmed blocks) |
blockNumber | QUANTITY | Block number the transaction was included in |
gasUsed | QUANTITY | Gas consumed by the transaction |
status | QUANTITY | 0x1 for success, 0x0 for revert |
logs | Array | Logs emitted by the transaction |
l1Fee | QUANTITY | L1 data posting fee charged |
l1GasUsed | QUANTITY | Gas used for L1 data posting |
Code Examples#
- cURL
- JavaScript
- Python
curl -X POST https://api-base-mainnet-archive.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_sendRawTransactionSync",
"params": ["0xf86c808504a817c80082520894..."],
"id": 1
}'
import { Wallet, parseEther, JsonRpcProvider } from 'ethers';
const provider = new JsonRpcProvider(
'https://api-base-mainnet-archive.n.dwellir.com/YOUR_API_KEY'
);
const wallet = new Wallet('YOUR_PRIVATE_KEY', provider);
// Build and sign the transaction
const tx = await wallet.populateTransaction({
to: '0x...',
value: parseEther('0.01'),
});
const signedTx = await wallet.signTransaction(tx);
// Send synchronously — returns full receipt, not just hash
const receipt = await provider.send('eth_sendRawTransactionSync', [signedTx]);
console.log('Status:', receipt.status === '0x1' ? 'success' : 'reverted');
console.log('Block:', parseInt(receipt.blockNumber, 16));
console.log('Gas used:', parseInt(receipt.gasUsed, 16));
console.log('L1 fee:', parseInt(receipt.l1Fee, 16));
from web3 import Web3
w3 = Web3(Web3.HTTPProvider('https://api-base-mainnet-archive.n.dwellir.com/YOUR_API_KEY'))
account = w3.eth.account.from_key('YOUR_PRIVATE_KEY')
tx = {
'nonce': w3.eth.get_transaction_count(account.address),
'to': '0x...',
'value': w3.to_wei(0.01, 'ether'),
'gas': 21000,
'maxFeePerGas': w3.eth.gas_price,
'maxPriorityFeePerGas': w3.eth.max_priority_fee,
'chainId': 8453
}
signed_tx = account.sign_transaction(tx)
# Send synchronously — returns full receipt
receipt = w3.provider.make_request(
'eth_sendRawTransactionSync',
[signed_tx.raw_transaction.hex()]
)
print(f"Status: {receipt['result']['status']}")
print(f"Block: {int(receipt['result']['blockNumber'], 16)}")
Response Example#
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x...",
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"blockNumber": "0x29442e3",
"gasUsed": "0x5208",
"status": "0x1",
"logs": [],
"l1Fee": "0xa5fce0e0",
"l1GasUsed": "0x34dc"
}
}
The blockHash may be 0x000...000 because the transaction was included in a Flashblock that hasn't been sealed into a final block yet. The receipt is a preconfirmation — the transaction will be included in the next sealed block.
Error Handling#
| Error Code | Message | Description |
|---|---|---|
| -32602 | Failed to decode signed transaction | Invalid RLP-encoded transaction data |
| -32000 | Nonce too low | Transaction nonce already used |
| -32000 | Insufficient funds | Account has insufficient balance |
Related Methods#
eth_sendRawTransaction— Async version (returns hash immediately)eth_getTransactionReceipt— Get receipt for a previously sent transactioneth_simulateV1— Simulate transactions before sending
Need help? Contact our support team or check the Base documentation.