deployTransaction.wait(1)
Not working
#5112
-
Hey, I'm using async function main() {
const provider = new ethers.JsonRpcProvider("http://127.0.0.1:7545");
const wallet = new ethers.Wallet(
"0x4e669b793198a13fc2bd3c5693da8ac121428afea0eb9dd6dd986b632e903130",
provider
);
const abi = fs.readFileSync("./SimpleStorage_sol_SimpleStorage.abi", "utf8");
const bin = fs.readFileSync("./SimpleStorage_sol_SimpleStorage.bin", "utf8");
const contractFactory = new ethers.ContractFactory(abi, bin, wallet);
console.log("Deploying...\n");
const contract = await contractFactory.deploy();
await contract.deployTransaction.wait(1); // Doesn't work (TypeError: no matching function)
console.log(contract);
} |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@Mr-Ahmadi Hey reach out to the etherjs team on their GitHub repo for any issues if you want to use version 6 and above, but because version 6 is in beta here we are suggesting everyone use the version below 6. And I also suggest you to use the same package.json file from the course repos while learning so your learning process can be smooth later you can move to updated versions. |
Beta Was this translation helpful? Give feedback.
-
Hi @alymurtazamemon I have the same issue despite the same ether version in the package.json as the course.
package.json file
ERROR MESSAGE
|
Beta Was this translation helpful? Give feedback.
-
just chech the syntax of the code, it should be like this |
Beta Was this translation helpful? Give feedback.
@Mr-Ahmadi Hey reach out to the etherjs team on their GitHub repo for any issues if you want to use version 6 and above, but because version 6 is in beta here we are suggesting everyone use the version below 6.
And I also suggest you to use the same package.json file from the course repos while learning so your learning process can be smooth later you can move to updated versions.