Open FlySkyler opened 10 months ago
no need of await simplestorage.deployed() just run without adding this it will run fine. And if you want to wait for block conformation use simplestorage.deployTransaction.wait(6) like that
no need of await simplestorage.deployed() just run without adding this it will run fine. And if you want to wait for block conformation use simplestorage.deployTransaction.wait(6) like that thank you it worked !
You need to wait in order to get address later. What you can do just change 2 funstions. "deployed()" to "waitForDeployment()" and "address" to "target"
await simpleStorage.waitForDeployment(); // Wait for the contract deployment to complete
console.log(`Contract deployed to address: ${simpleStorage.target}`);
Lesson
Lesson 6
Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")
https://www.youtube.com/watch?v=gyMwXuJrbJQ&list=PL4sBgjGsKcGAMfrkGoOwglLKlc4-jCTK6&index=1&t=30935s
Operating System
Windows
Describe the bug
typeError : .deployed() is not a function
when i try to run my scripts with the command "yarn hardhat run scripts/deploy.js" it says that "simpleStorage.deployed is not a function"
here's my code :
and here's my package.json
hope someone can help me :