0

I'm working on developing an ETH wallet, and I ran into some weird behavior. I'm using nethereum and etherscan.io. I'm creating a raw transaction using nethereum and then I'm posting it to the blockchain using etherscan's eth_sendRawTransaction endpoint.

It works most of the times, but there are ocasions in which the transaction cannot be found on etherscan after submitting it even after a couple of days. I'm getting the Sorry, We are unable to locate this TxnHash error.

The nonce on the transaction is correct, this was my first thought.

Why can a transaction disappear like this, and what can be done to avoid this?

1
  • Perhaps gasPrice is too low, or the raw transaction has an encoding error. Did you try to decode one of the failed raw transaction?
    – Ismael
    Sep 25 '21 at 22:23
0

When you send a transaction from a wallet. You will get a transaction hash right away because it's produced by the wallet and submitted. My guess would be that you expect the transaction to pass because you received a hash. Maybe once the RPC endpoint received it, it did not like something and rejected it so it never got submitted even if you have the hash.

To test your functions call, you should look at the event log to make sure that the transaction got processed and emitted an event at the end of the call.

0

This is an issue with the transaction library:
https://github.com/web3p/ethereum-tx.

Use the following library instead.
https://github.com/kornrunner/php-ethereum-offline-raw-tx

It's working fine with me now.

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.