-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
No overload matches this call - Lock's deploy script #4118
Comments
Uhm, I cannot reproduce this. I generated the sample typescript project, opened the script with VSCode, and got no errors. Can you share your |
I've seen someone else having same issue and asking about that here https://ethereum.stackexchange.com/questions/152107/error-in-hardhat-basic-example-deploy-ts So I am not the only one I guess |
The issue here is related to TypeChain, not Hardhat, the script runs without a problem, but the error is shown once the This is due to the latest version of hardhat-ethers that TypeChain supports is v3.0.0 and in version v3.0.1 transactions override where added, updating the In the This could work until TypeChain is updated. edit: I have been taking a look at TypeCheck and not sure what is the issue but think it should work with v3.0.1 |
@clauBv23 I'm using hardhat-ethers 3.0.0 and I'm facing the same issue now . |
@boldrack what version of hardhat and hardhat-toolbox are you using? |
@clauBv23 I"m using hardhat 2.16.1 and hardhat-toolbox 3.0.0 I think there's been a mixup in the usage of
|
Yeap, it looks like
|
FixI've added a fix to Merged: Workaround for nowManually import import { DeployContractOptions } from '@nomicfoundation/hardhat-ethers/types' Then assert type of the object to be const lock = await ethers.deployContract('Lock', [unlockTime], {
value: lockedAmount,
} as DeployContractOptions) |
Thanks a lot everyone for the info, I will look into this again |
I just tried with the latest version of @typechain/hardhat@8.0.2 and the typechain error has gone |
Ah interesting. @0xartcro can you check if that fixes the issue for you? |
I can confirm this issue is now solved due to flexible patch versioning in hardhat-toolbox package and absence of a lock file. The actual fix is in Users with already existing projects will need to run Here are the package versions currently used when creating a TypeScript project: Versions
|
It does, thanks |
Thanks. In that case I think I will close this issue. I didn't re-read the whole conversation so let me know if I'm missing something and I'll re-open. |
Version of Hardhat
2.16.1
What happened?
Installed latest version of Hardhat including Toolbox 3 and after opening Lock's
deploy.ts
script it shows errors:Running the script compiles and deploys everything properly though.
Using Visual Studio Code.
Minimal reproduction steps
My
package.json
file:deploy.ts
scriptSearch terms
No response
The text was updated successfully, but these errors were encountered: