1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Transactions stuck at pending on ropsten test net from one day

Discussion in 'Finance' started by Block Crasher, Aug 2, 2020 at 9:55 AM.

  1. I am Writing a simple script for ERC20 token transfer method. which sign transaction offline and then submit it to network.

    Transfer method encoded data :

    var encoded = await MyContract.methods
    .transfer(receiver_address, 10);

    To get nonce of sender account :

    var nonce = await web3.eth.getTransactionCount(

    To get estimateed Gas of latest block:

    let estimatedGas = await web3.eth.estimateGas({
    "from" : sender_address,
    "nonce" : nonce,
    "to" : address_contract,
    "data" : encoded.encodeABI(),

    Here i create a tx object using ethereumjs-tx cdn link:

    let privateKey = new ethereumjs.Buffer.Buffer(key, 'hex')
    var tx = {
    nonce: nonce,
    gasPrice: web3.utils.toHex(gasPrice),
    gasLimit: web3.utils.toHex( estimatedGas + 1000000),
    to: address_contract,
    data: encoded.encodeABI(),
    let tx_object = new ethereumjs.Tx(tx , { chain: 'ropsten' })
    let serializedTx = tx_object.serialize();

    Then i submit transaction to ropsten test net:

    .on("transactionHash", function (hash) {
    document.getElementById("error").innerHTML =
    "Transaction Hash :" + hash;

    Gas Limit of transaction is :

    Gas Limit:1051110 also tried with gas Limit of latest block 8000029

    Gas Price of transaction is :

    Gas Price:0.000000002 Ether (2 Gwei)

    But my problem here is that transactions get stuck at pending state from two days. i am attaching image and link to contract address


    link of contract: https://ropsten.etherscan.io/address/0xdc11d98aa50b99a948a4fc2e159c30c5ba9a8364

    following are version of web3 and etherumjs-tx:

    • web3 version 1.0.0-beta.34 (also tried 1.0.0-beta.26 and @latest)
    • Ethereumjs-tx version ethereumjs-tx-1.3.3

    I don't think that there is problem with my gas Price or gas Limit.

    Login To add answer/comment

Share This Page