Using Web3 version 1.0 and getting the following error:

web3.toWei is not a function


At Web3 version 1.0, utility functions like toWei and many others have been moved to the web3.utils.

To check all utility functions refer to:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.