1

I'm making a call to the transfer(address _to, uint256 _value) function within the contract through Web3. Here's my code;

var Contract = web3.eth.contract(ContractABI); var ContractHandle = Contract.at(ContractAddress); ContractHandle.transfer(toAddress, tokens, { from: deductGasFromAddress, gasPrice: gasPrice, gasAmount: gasAmount }, function(error, result) { // write something });

I've specified 22 Gwei as the gasPrice, I think that's good enough for a faster transaction. However, it's in pending state for more than 20 hours.

Am I missing something in this regards? Would appreciate any quick help pertaining to this.

2
  • What is the transaction ID? Aug 3 '18 at 12:51
  • @RaghavSood, 0x8670fdeb162568048b12e10c20fe188f379094d6b9b91a89b47cd7d5f0e282c8 is the TX hash.
    – Anji P
    Aug 3 '18 at 12:53
1

0x8670fdeb162568048b12e10c20fe188f379094d6b9b91a89b47cd7d5f0e282c8 has a nonce of 6.

Currently, every single transaction from your address is pending, from nonce 0 onwards. Nonce 0 itself has a gas price of 1 gwei, which is a bit lower than the current network average of 3 gwei or so.

Ethereum confirms transactions in order of nonce, so nonce 6 will not confirm until 0 through 5 have confirmed.

You can either wait, or make new transactions for the lower nonces with a higher gas price.

2
  • Thanks Raghav! That makes sense. I was not sure if the transactions are processed in order of nonce. I will try with a different address that doesn't have any previous transaction in pending state. Will keep you informed.
    – Anji P
    Aug 3 '18 at 13:06
  • 1
    It worked Raghav! Thank you for your quick help on this.
    – Anji P
    Aug 3 '18 at 13:22

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.