curl --request POST \
--url https://polygon-mainnet.core.chainstack.com/0615fdf3c9eaf0681469e61a4308ea09 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_sendRawTransactionSync",
"params": [
"0xf86c808504a817c80082520894ab5db0e98b8ea6b7f9d8ad8e8ed0bc8fba0d1a2f870de0b6b3a764000080821b9f",
"0x1388"
],
"id": 1
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"blockHash": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd",
"blockNumber": "0x12345",
"gasUsed": "0x5208",
"status": "0x1"
}
}curl --request POST \
--url https://polygon-mainnet.core.chainstack.com/0615fdf3c9eaf0681469e61a4308ea09 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "eth_sendRawTransactionSync",
"params": [
"0xf86c808504a817c80082520894ab5db0e98b8ea6b7f9d8ad8e8ed0bc8fba0d1a2f870de0b6b3a764000080821b9f",
"0x1388"
],
"id": 1
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"blockHash": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd",
"blockNumber": "0x12345",
"gasUsed": "0x5208",
"status": "0x1"
}
}Polygon API method that submits a signed transaction and blocks until the transaction receipt is returned or the timeout expires. This is a synchronous version ofDocumentation Index
Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
Use this file to discover all available pages before exploring further.
eth_sendRawTransaction — instead of returning just the transaction hash, it waits for the transaction to be included in a block and returns the full receipt.
timeout parameter is typed as hexutil.Uint64. You must pass the timeout as a hex-encoded value (e.g., "0x1388" for 5000 ms), not as a decimal integer like on Base, Ethereum, or other EIP-7966-conformant implementations. Passing a decimal integer returns invalid argument 1: json: cannot unmarshal non-string into Go value of type hexutil.Uint64.signedTransactionData — the signed transaction data in hexadecimal format. Includes nonce, gas price, gas limit, recipient address, value, data, and signature.timeout (optional) — maximum wait time in milliseconds, passed as a hex-encoded uint64 string (e.g., "0x1388" for 5000 ms). If omitted, the node uses its configured default.result — the full transaction receipt object once the transaction is included in a block, with the same fields as eth_getTransactionReceipt. If the timeout expires before inclusion, the node returns an error.eth_sendRawTransactionSync code examplesconst ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);
const sendTransactionSync = async () => {
const wallet = new ethers.Wallet("YOUR_PRIVATE_KEY", provider);
const tx = {
to: "0xRecipientAddress",
value: ethers.parseEther("0"),
chainId: 137,
};
// Sign the transaction
const signedTx = await wallet.signTransaction(tx);
// Send synchronously — Bor expects a HEX-encoded timeout
const receipt = await provider.send(
"eth_sendRawTransactionSync",
[signedTx, "0x1388"] // 5000 ms in hex
);
console.log(`Confirmed in block: ${receipt.blockNumber}`);
console.log(`Status: ${receipt.status}`);
};
sendTransactionSync();
eth_sendRawTransactionSync instead of eth_sendRawTransaction when:
eth_getTransactionReceipt.eth_sendRawTransaction.
Was this page helpful?