Using Web3 version 1.0 and getting the following error:

web3.toWei is not a function

1 Answer 1


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 and acknowledge you have read our privacy policy.

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