3

Using the go-ethereum simulated backend, I would like to:

1) Instantly commit a transaction so that it either succeeds or reverts in a given simulated blockchain.

So far I'm using sim.Commit() to trigger this.

2) Verify whether the transaction succeeded or reverted. Is there an API available to help with this?

I've noticed there is a TransactionByHash() function that does return an isPending variable, however, this variable only indicates whether the transaction is part of the pending pool and is not correlated with success or failure.

I have the transaction hash and the simulated back-end object available.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.