New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the helpers outside of Truffle (i.e. remove assumption of global web3) #35
Comments
Oh I see... You assume that we run I want to use the library as a standalone library. There are a lot of useful functions that can be used outside a testing environment. For example in a project I am working at the moment we have a solidity grader where students submit their solutions. The functionality provided by |
Hello @cnasikas, thanks for reporting this! I've considered supporting a standalone environment where either the user supplies web3 or Is there any particular reason why you don't want/cannot use truffle? If I'm not mistaken, you can also run |
@dionyziz my bad for not being clear enough, |
We should 100% support using this library outside of a Truffle project. I wasn't aware of this limitation. @nventuro What parts depend on it? |
@cnasikas @dionyziz would you expect the helpers to include web3, or for the user to provide it? The first approach has the advantage of us knowing which web3 version we're using, but we'd have to provide a way to set the web3 provider, which is a non-issue in the second one. @frangio what if the
|
@nventuro I think it is better the openzeppelin to provide For example:
Reading the code I saw that some modules do not need a provider and depend only on Thanks a lot for your effort and time putting into this. |
@frangio Thanks a lot! That was fast :). I will try it as soon as possible! |
I test it and for the moment everything works fine! Thanks a lot! |
I am trying to
const oz = require('openzeppelin-test-helpers')
but I am getting the following error:Why web3 is not imported inside
setup.js
? Am I missing something obvious ?The text was updated successfully, but these errors were encountered: