That code is somewhat hard to trace with the async stuff… I just want to know what RPCs it’s calling and what values it’s looking for to confirm a transaction
Feb 1, 2021, 5:37 PM
I am building an RPC implementation for a new EVM and it’s all working for the most part, but some code that uses web3 is failing on confirmTransaction
Feb 1, 2021, 5:37 PM
I think you can use eth_getTransactionByHash. Then check for blockhash/block num. They will be null if its still on the pool
Don't know how its implemented on metamask though...
Feb 1, 2021, 6:03 PM
Metamask vs mew seems different, mew doesn’t like our current RPC however metamask does...
Interesting on the null thing, our EVM probably won’t ever return null as blocktime is .5sec
But the current RPC doesn’t include the block in the eth_getTransactionByHash response
Well it does, 0x0 is currently hardcoded 🙂
And getBlockByNumber always returns a hardcoded 0x0 block, so currently that’s what I’m fixing.
Feb 1, 2021, 6:07 PM
That'll work too
Feb 1, 2021, 6:07 PM
Yeah, the chain never advances with the current implementation, so that’s definitely gonna get fixed… and I’m hoping confirmTransaction will work at that point
I first hit this trying to run the uniswap deployment script, but then someone reported it with MEW so I’m gonna test with MEW since it’s simpler test
Feb 1, 2021, 6:08 PM