QuickNode Raises $60M Series B!
Read the Letter from our CEO.
The API credit value for this method is 69 . To learn more about API credits and each method's value, visit the API Credits page.
Currently supports Binance Smart Chain (mainnet and testnet) and Ethereum (mainnet, goerli, and sepolia) networks.
Parameters:
Returns:
Code Examples:
require 'ethereum.rb' require 'eth' client = Ethereum::HttpClient.new('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/') key = Eth::Key.new priv: "{your-key-here}" amount = 50000000000 payload = { chain_id: Eth::Chain::GOERLI, #replace with correct chain! nonce: 5, #replace with correct nonce! priority_fee: 3 * Eth::Unit::GWEI, max_gas_fee: 21 * Eth::Unit::GWEI, gas_limit: 69_420, to: "0xaC2d0226AdE52e6b4CCc97359359f01e34d50352", value: amount, } tx = Eth::Tx.new(payload) tx.sign(key) response = client.send_command('qn_broadcastRawTransaction', [tx.hex]) puts response
const ethers = require("ethers"); (async () => { const provider = new ethers.providers.JsonRpcProvider("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/"); const wallet = new ethers.Wallet("{your-key-here}"); let tx = { to: "0xaC2d0226AdE52e6b4CCc97359359f01e34d50352", value: ethers.utils.parseEther("0.05"), gasLimit: 8000000, gasPrice: "0x07f9acf02", }; let signedTx = await wallet.signTransaction(tx); console.log(signedTx); let sentTx = await provider.send("qn_broadcastRawTransaction", [signedTx]); console.log(sentTx); })();
curl http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ \ -X POST \ -H "Content-Type: application/json" \ --data '{"jsonrpc":"2.0","method":"qn_broadcastRawTransaction","params":["0xf8680685051f4d5c00833d090094ac2d0226ade52e6b4ccc97359359f01e34d50352834c4b40802aa004f4410acfc636f5d65e75ca37448fd0b1e90632661ad3ea071594b646e7621fa0186d78ddbeef43bc372fcc650ad4e77e0629206426cd183d751e9ddcc8d5e777"],"id":1}'
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=1, ), "{your-private-key-here}", ) txHash = w3.provider.make_request("qn_broadcastRawTransaction", [signed_txn.rawTransaction]) print(w3.toHex(txHash))