I am using backends.SimulatedBackend in unit testing.
backends.SimulatedBackend is not compatible with ethclient.Client.
Any one can advise how to create a
ethclient.Client in unit testing? Thank you
check this out..
Probably the following package helps with what you try to achieve...
At line 12 at the comments it says:
// Blockchain is a generalized interface for interacting with the ethereum blockchain
// it satisfies all functions required by the ethclient, and simulated backend types.
// This allows you to use ethclient and the simulated backend interchangeably which is
// particularly useful for testing
You could try to use exactly this "Blockchain" interface or treat the
backends.SimulatedBackend and the
ethclient.Client sperately (as it should be).