You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To support ethers 6 and hardhat 2.14 we need to import ESM modules. Big libraries in the ecosystem are moving to ESM so I think we can/should do the same. If we export an ESM module anyone using commonjs with not be able to import the unirep libraries. I think this is reasonable at this point given that nodejs, webpack, and browsers all support ESM out of the box.
Typescript support for ESM is mediocre at this point. The configuration is complicated, especially with tests/ts-node. I think this is a good opportunity to remove some parts of our systems that are typescript, specifically:
switch @unirep/contracts deploy/build/test logic to javascript
manually write a type definition for the deploy function
This issue is a pretty big lift and I think we should break it up into the following steps:
Remove typechain support in @unirep/contracts
Refactor @unirep/contracts to javascript
Manually write a type definition file for the deploy function
Switch @unirep/core to ESM and ethers-v6
(optional) switch @unirep/utils and @unirep/circuits to ESM
To support ethers 6 and hardhat 2.14 we need to import ESM modules. Big libraries in the ecosystem are moving to ESM so I think we can/should do the same. If we export an ESM module anyone using commonjs with not be able to import the unirep libraries. I think this is reasonable at this point given that nodejs, webpack, and browsers all support ESM out of the box.
Typescript support for ESM is mediocre at this point. The configuration is complicated, especially with tests/
ts-node
. I think this is a good opportunity to remove some parts of our systems that are typescript, specifically:@unirep/contracts
deploy/build/test logic to javascriptThis issue is a pretty big lift and I think we should break it up into the following steps:
@unirep/contracts
@unirep/contracts
to javascript@unirep/core
to ESM and ethers-v6@unirep/utils
and@unirep/circuits
to ESMRelated #366
The text was updated successfully, but these errors were encountered: