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

Type error #1

Open
thamesh210 opened this issue Jun 22, 2023 · 1 comment
Open

Type error #1

thamesh210 opened this issue Jun 22, 2023 · 1 comment

Comments

@thamesh210
Copy link

thamesh210 commented Jun 22, 2023

when i run deploy.js its giving me error like

TypeError: no matching function (argument="key", value="deployed", code=INVALID_ARGUMENT, version=6.6.0)

cse@DESKTOP-JVDJV28:/mnt/c/have_a_tea$ yarn hardhat run scripts/deploy.js
yarn run v1.22.15
warning package.json: No license field
$ /mnt/c/have_a_tea/node_modules/.bin/hardhat run scripts/deploy.js
Compiled 1 Solidity file successfully
TypeError: no matching function (argument="key", value="deployed", code=INVALID_ARGUMENT, version=6.6.0)
at makeError (/mnt/c/have_a_tea/node_modules/ethers/src.ts/utils/errors.ts:670:21)
at assert (/mnt/c/have_a_tea/node_modules/ethers/src.ts/utils/errors.ts:694:25)
at assert (/mnt/c/have_a_tea/node_modules/ethers/src.ts/utils/errors.ts:694:25) 6:5)
at assertArgument (/mnt/c/have_a_tea/node_modules/ethers/src.ts/utils/errors.ts:706:5)
at Interface.getFunctionName (/mnt/c/have_a_tea/node_modules/ethers/src.ts/abi/interface.ts:542:23)
at buildWrappedMethod (/mnt/c/have_a_tea/node_modules/ethers/src.ts/contract/contract.ts:334:34)
at BaseContract.getFunction (/mnt/c/have_a_tea/node_modules/ethers/src.ts/contract/contract.ts:849:22)
at Object.get (/mnt/c/have_a_tea/node_modules/ethers/src.ts/contract/contract.ts:747:39)
at main (/mnt/c/have_a_tea/scripts/deploy.js:30:18)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
code: 'INVALID_ARGUMENT',
argument: 'key',
value: 'deployed'
}
error Command failed with exit code 1.

@tarantj21
Copy link

install latest ethers version 6.2.2
change .address to .getAddress() everywhere in deploy.js file
delete .utils from formatEther and parseEther
and change deployed() to .waitForDeployement();

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

No branches or pull requests

2 participants