🚀 We’re excited to announce our $35m Series A led by Tiger Global: Press Release, Coindesk, Bloomberg, Business Insider & RefreshMiami!

Contents

eth_sendRawTransaction RPC method

Parameters:

  1. Data - The signed transaction (typically signed with a library, using your private key)

Returns:

  1. Result - The transaction hash, or the zero hash if the transaction is not yet available.

Code Examples:

from web3 import Web3, HTTPProvider
w3 = Web3(HTTPProvider('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/'))
signed_txn = w3.eth.account.sign_transaction(dict(
    nonce=w3.eth.get_transaction_count("{your-public-address-here}"),
    maxFeePerGas=3000000000,
    maxPriorityFeePerGas=2000000000,
    gas=100000,
    to='0xaC2d0226AdE52e6b4CCc97359359f01e34d50352',
    value=50000000000,
    data=b'',
    type=2,
    chainId=3,
  ),
  "{your-key-here}",
)
txHash = w3.eth.send_raw_transaction(signed_txn.rawTransaction)
print(txHash)
Ready to try QuickNode? Start your 7-day free trial