ensdomains / ensjs-v2

Javascript bindings for the Ethereum Name Service
208 stars 122 forks source link

Warning from Ethers when bundled into Truffle #64

Closed eggplantzzz closed 3 years ago

eggplantzzz commented 3 years ago

I updated Truffle to use @ensdomains/ensjs instead of ethereum-ens for ENS resolution. After doing so, when running truffle test we are now getting a warning printed on the screen which seems to be coming from ethers

WARNING: Missing strong random number source

Searching for the message in the codebase leads to the ethers dep from @ensdomains/ensjs. After we remove @ensdomains/ensjs from Truffle the warning goes away. See the screenshot below.

Screen Shot 2021-05-28 at 2 22 06 PM

Have you seen this error before or do you know of any workarounds to get rid of it?

eggplantzzz commented 3 years ago

Turns out webpack strips out the crypto library when bundling. Closing this as it is not an issue with @ensdomains/ensjs.