I want to do a very simple operation: send eth to another address.

Here is what I did:

Method 1 . use personal.send_transaction JSON-RPC interface. ( seems deprecated )

I run:

curl --request POST   --data '{
        "gas": "0x5208",
        "gasPrice": "0x178411b200",
        "from": "0x7CCfaF74ADBA37b2eF11B4caa3ce3759xxxxxxxx",
        "to": "0x3Ae7a18407B17037B2ECC4901c1b77Dbxxxxxxxx",
        "value": "0x4f94ae6af8000"
    "id": 4004
  }'   --header 'Content-Type: application/json'



however, this tx could NOT be found in etherscan.

and got this log:

2020-12-20 07:45:03 UTC http.worker10 WARN rpc  personal_sendTransaction is deprecated and will be removed in future versions: Account management is being phased out see #9997 for alternatives.
2020-12-20 07:45:03 UTC http.worker10 DEBUG own_tx  Imported to the pool (hash 0x76af9bc26ac39f6011c76c3adf2914ab8b677ad95a8687ed0b3de058d4866bb6)
2020-12-20 07:45:03 UTC http.worker10 DEBUG txqueue  [0x76af9bc26ac39f6011c76c3adf2914ab8b677ad95a8687ed0b3de058d4866bb6] Added to the pool.
2020-12-20 07:45:03 UTC http.worker10 DEBUG txqueue  [0x76af9bc26ac39f6011c76c3adf2914ab8b677ad95a8687ed0b3de058d4866bb6] Sender: 0x7ccf…xxxx, nonce: 887, gasPrice: 101000000000, gas: 21000, value: 1400000000000000, dataLen: 0))
2020-12-20 07:45:03 UTC IO Worker #1 DEBUG sync  Finished transaction propagation, took 0ms
2020-12-20 07:45:03 UTC http.worker10 DEBUG txqueue  Re-computing pending set for block: 11475896
2020-12-20 07:45:03 UTC http.worker10 DEBUG miner  Attempting to push 1 transactions.
2020-12-20 07:45:03 UTC http.worker10 DEBUG miner  Adding tx 0x76af9bc26ac39f6011c76c3adf2914ab8b677ad95a8687ed0b3de058d4866bb6 took 3 ms
2020-12-20 07:45:03 UTC http.worker10 DEBUG miner  Pushed 1 transactions in 3 ms
2020-12-20 07:45:03 UTC http.worker10 DEBUG rpc  [Some(Num(4004))] Took 42ms
2020-12-20 07:45:03 UTC http.worker10 DEBUG rpc  Response: {"jsonrpc":"2.0","result":"0x76af9bc26ac39f6011c76c3adf2914ab8b677ad95a8687ed0b3de058d4866bb6","id":4004}.

method 2. called eth_sendRawTransaction to my local ETH node.

I did this following the steps:

Step 2.1 got the private key ( really correct, I promise, I got this via 2 language API , and they are the same! )


Step 2.2 got the signed tx by my code:

const get_raw_tx = function(params){

  console.info("== params:")
  const privateKey = Buffer.from(

  const txParams = { 
    nonce: params.nonce,
    gasPrice: params.gas_price,
    gasLimit: params.gas_limit,
    to: params.to_address,
    value: params.crypto_amount,
    data: params.data,

  const tx = new EthereumTx(txParams, { chain: 'mainnet', hardfork: 'petersburg' })
  const serializedTx = tx.serialize()
  const rawTx = '0x' + serializedTx.toString('hex');
  return rawTx

and HTTP GET method:

  • crypto_amount: 0.0013 ETH
  • gas_limit: 21000, in hex: 0x5208
  • gas_price: 121000000000 ( 121 Gwei) , in hex: 0x1c2c297a00
$ curl http://localhost:8000/get_tx?private_key=MY_PRIVATE_KEY&nonce=0x01&gas_price=0x1c2c297a00&gas_limit=0x2710&to_address=0xC6d64494D2042B69aceAd368395f8e4Fxxxxxxxx&crypto_amount=1300000000000000

and got this signed TX string:


Step 2.3 I make a JSON-PRC call like this:

curl --location --request POST 'http://my-server-ip:port'   --header 'Content-Type: application/json'   --data-raw '{
    "id": 4004

and this is the response:


this tx still could not be found on ( http://etherscan.io/tx/0x06a1958e25ef269346cc79043c4c4343b9df86bf0b135c257b9b7077e7d83bc7 )

no error or warning in log.

method 3. called infura API

curl https://mainnet.infura.io/v3/MY-PROJECT-ID     
    -X POST
    -H "Content-Type: application/json"
    -d '{

and got response from infura:


still, this TX could not be found on etherscan.io

so, could someone help me, why all these methods are failed.

thanks a lot!


my environment

Ubuntu 18.04 server

client: openethereum ( OpenEthereum/v3.0.1-stable-8ca8089-20200601/x86_64-unknown-linux-gnu/rustc1.43.1 )

command to launch it: nohup ./openethereum &

config file: ( in .local/share/openethereum/config.toml)

mode = "active"
identity = "lueluelue"
apis = ["web3", "eth", "pubsub", "net", "parity", "parity_pubsub", "traces", "rpc", "shh", "shh_pubsub", "personal", "parity_accounts", "secretstore"]
server_threads = 2

port = 8800
interface = "172.my.i.p"

apis = ["web3", "eth", "pubsub", "net", "parity", "parity_pubsub", "traces", "rpc", "shh", "shh_pubsub", "personal"]

log_file = "/home/ubuntu/eth.log"
logging = "debug"

min_gas_price = 1 

and I ran the JSON-RPC calls when the block is not completed synced. ( synced to 1 days ago)

  • Which ethereum client are you using? geth, openethereum, besu, .... What's the command line used to launch it? Is the client fully synchronized? Is the nonce correct? – Ismael Dec 20 '20 at 21:22
  • I am using openethereum ( OpenEthereum/v3.0.1-stable-8ca8089-20200601/x86_64-unknown-linux-gnu/rustc1.43.1), the command line lauching it is ohup ./openethereum &, and I will update my question and put this information on it. – Siwei Dec 20 '20 at 23:10
  • @Ismael Is it because I run the JSON-RPC calls on the in-completed synced node? should I wait until it's fully synced? and I am doubting that my signed tx is incorrect. how to check it? thanks a lot! – Siwei Dec 20 '20 at 23:20
  • You can use eth_getBlockByNumber to obtain the latest block number it should be close to the latest block in any block explorer like etherscan. – Ismael Dec 22 '20 at 3:52
  • OK, I will try. thanks ! – Siwei Dec 22 '20 at 12:11

OK I got it: the parameter nonce is important!

My fault: I randomly give the nonce parameter, which is not valid in some way. ( I don't know )

After searching many posts, I found the nonce is important! ( according to https://nonseodion.medium.com/7-easy-steps-to-resolve-cancel-pending-ethereum-transactions-88d7d8bce053 , this post talks about the relation ship between nonce and pending transactions )

also this post: https://info.etherscan.com/how-to-cancel-ethereum-pending-transactions mentioned nonce.

so, to make clear which number should be my address, I created a transaction using MetaMask, and very soon, I got its state:

0.204465275198051046 Eth
Nonce: 912

0.202643275198051046 Eth
Nonce: 913     <!---  this should be your next transaction's nonce! 

enter image description here

So I changed my code, specified the correct nonce , and then my new signed transaction broadcasted in 3 seconds!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.