Optimism
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Optimism
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_sendRawTransaction broadcasts a fully signed, RLP-encoded transaction to OP Mainnet and returns its 32-byte hash. OP Mainnet is the ETH-gas OP Stack rollup at chain ID 10 (0xa); you sign the transaction client-side with a library such as ethers, viem, or web3.js — including chain ID 10 so it cannot be replayed on other chains — and submit the resulting hex string to the sequencer for inclusion. The node validates the signature, nonce, and balance, then admits the transaction to its mempool, returning the hash so you can track inclusion. Submit to https://optimism.therpc.io/YOUR_API_KEY.
to field and setting data to the contract's creation bytecode; the receipt's contractAddress will hold the deployed address.transfer or a Velodrome swap — by encoding the call into data, signing, and broadcasting it.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | signedTransaction | string | نعم | The serialized signed transaction. Build and sign it client-side with a library (e.g. ethers, viem, web3.js); never send a private key to the node. |
| النوع | الوصف |
|---|---|
| string | 32-byte transaction hash (0x-prefixed). The transaction is now in the mempool but not yet confirmed. |
Try it live in the Optimism playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32000 | nonce too low | The nonce in the signed transaction is lower than the sender's current on-chain nonce. |
-32000 | insufficient funds for gas * price + value | The sender does not have enough native-token balance to cover gas cost and the transferred value. |
-32000 | replacement transaction underpriced | Tried to replace a pending transaction (same nonce) but the new fee is not high enough (typically requires ≥10% bump). |
eth_getTransactionReceipt until you get a non-null receipt to confirm inclusion — usually quick on OP Mainnet's ~2s blocks.status: "0x0" means the sequencer included it but execution reverted, and you still pay the L2 gas plus the L1 data fee.eth_getTransactionCount immediately before signing to avoid nonce too low collisions; and budget for the OP Stack L1 data fee on top of L2 gas, since it can dominate the total cost of a small transaction.المعاملات
0x-prefixed hex string of the RLP-encoded signed transaction