-
Notifications
You must be signed in to change notification settings - Fork 365
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
Ethers v6 target #803
Ethers v6 target #803
Conversation
🦋 Changeset detectedLatest commit: 0770179 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This is because ethers internally imports @adraffy/ens-normalize/xnf which gives typecheck error if not using node16 module resolution. The potential issue of using node16 is that common js imports stop working for a dependency that has exports field defined in it's package json.
Socket Security Pull Request Report👍 No new dependency issues detected in pull request Pull request report summary
Bot CommandsTo ignore an alert, reply with a comment starting with Powered by socket.dev |
Pretty exciting to see this potential support coming soon 🙏 Thanks @zemse |
It is so version specific that it requires ethers@6.0.0-beta-exports.10 |
|
How do I provide structs as function input? The generated struct is declared like this: export declare namespace ContractName {
export type SignatureStruct = {
signer: AddressLike;
v: BigNumberish;
r: BytesLike;
s: BytesLike;
};
} using EDIT: It is fine, I got the syntax mix up. 😳 I should cast it as interface instead of init it like an object, ie |
That should be // example
import type { ISwapRouter } from '../typechain';
const input: ISwapRouter.ExactInputParamsStruct = {
path: '0x1234',
recipient: '0x000',
deadline: 1,
amountIn: 1,
amountOutMinimum: 1,
}; |
d69f3c9
to
0770179
Compare
For trying out this PR in your project:
ethers-v6
as target in your typechain config (or you can clone this repo and publish yourself).>=4.7
.moduleResolution: 'node16'
+ forpackage.json
exports
ezolenko/rollup-plugin-typescript2#437)