OpenZeppelin / openzeppelin-test-environment

[Not actively maintained] One-line setup for blazing-fast smart contracts tests
https://docs.openzeppelin.com/test-environment
MIT License
90 stars 39 forks source link

Add support for Geth #20

Open nventuro opened 4 years ago

nventuro commented 4 years ago

It shouldn't be hard to change the underlying local blockchain to a geth instance in dev mode. While ganache has certain features that geth lacks (like time manipulation), there are still some small differences between geth and ganache, and many users will find this useful.

As far as I know, it is not possible to configure geth with a set of private keys, like we do on ganache-core. We should be able however to have those accounts in the provider itself, by adding a step to the setup process where the initial account funds these. This goes in line with the geth team recommending not using the client to store private keys.

tinchoabbate commented 4 years ago

You might want to take this one https://github.com/trufflesuite/truffle/issues/624 into account too, perhaps it becomes an issue during your tests against Geth. I lost several hours of why on earth are my tests not running until I ran into that issue. So I hope I'll save you some time :)

nventuro commented 4 years ago

Hm, I'm surprised that issue is still around, the web3 1.0 should've taken care of that. We'll keep it in mind, thanks!

vicnaum commented 4 years ago

I assume there's no option of connecting to a locally installed Ganache either?

frangio commented 4 years ago

@vicnaum No, but in that case I don't see what benefit there would be to using Test Environment! The main feature is that it will spin up Ganache for you and stop it when your tests end.

Let us know what use case you had in mind so we can consider implementing support for it!