Skip to content
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

Fix errant hardhat console instruction in parsec_user_guide #234

Closed
wants to merge 0 commits into from

Conversation

maurermi
Copy link
Collaborator

ethers.toBeHex(ethers.parseUnits()) no longer appears to be supported as written, modified to parseEther() for correct functionality.

@maurermi
Copy link
Collaborator Author

May also loop in #230 if DCO not fixed for an omnibus doc improvement PR

Copy link
Contributor

@AlexRamRam AlexRamRam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that ethers.utils.parseEther works in ethers v5, but is not defined in ethers v6 (rather it is just ethers.parseEther see: https://docs.ethers.org/v6/api/utils/#parseEther)

> ethers.version
'6.7.1'
> ethers.parseEther
[Function: parseEther]
> ethers.utils
undefined
> ethers.utils.parseEther
Uncaught TypeError: Cannot read properties of undefined (reading 'parseEther')

More generally, ethers v6 is not backward compatible with v5. The main gist of the migration issues are explained here but the doc is not comprehensive.

I recommend that we explicitly require ethers v6 (as in the uniswap demo doc) and make the necessary changes in the doc.

@maurermi
Copy link
Collaborator Author

maurermi commented Sep 23, 2023

Note that ethers.utils.parseEther works in ethers v5, but is not defined in ethers v6 (rather it is just ethers.parseEther see: https://docs.ethers.org/v6/api/utils/#parseEther)

> ethers.version
'6.7.1'
> ethers.parseEther
[Function: parseEther]
> ethers.utils
undefined
> ethers.utils.parseEther
Uncaught TypeError: Cannot read properties of undefined (reading 'parseEther')

More generally, ethers v6 is not backward compatible with v5. The main gist of the migration issues are explained here but the doc is not comprehensive.

I recommend that we explicitly require ethers v6 (as in the uniswap demo doc) and make the necessary changes in the doc.

@AlexRamRam I agree, this is an oversight on my part. Thanks for catching this. I will make the corresponding updates shortly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants