Replies: 2 comments
-
I have this with ethers v6: import { getAddress } from "ethers"
import { ethers, run, network } from "hardhat"
async function main() {
const SimpleStorageFactory = await ethers.getContractFactory(
"SimpleStorage"
)
console.log("Deploying contract...")
const simpleStorage = await SimpleStorageFactory.deploy()
await simpleStorage.waitForDeployment()
console.log(`Deployed contract to: ${await simpleStorage.getAddress()}`) |
Beta Was this translation helpful? Give feedback.
0 replies
-
async function main() {
const SimpleStorageFactory = await ethers.getContractFactory("SimpleStorage");
console.log("Deploying SimpleStorage...");
const simpleStorage = await SimpleStorageFactory.deploy();
await simpleStorage.waitForDeployment();
console.log("Contract deployed to address: ", await simpleStorage.getAddress());
} I changed |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When I try to deploy the contact I get an error. Below is the main function in the
deploy.ts
file.The error:
TypeError: (0 , ethers_1.getAddress) is not a function
I have tried the following:
ethers
to5.7.2
- the error persists@nomicfoundation/hardhat-ethers
with@nomiclabs/hardhat-ethers
- all files importingethers
fromhardhat
were flagged as ethers not existing in the package@nomicfoundation/hardhat-ethers
and@nomiclabs/hardhat-ethers
and removingethers
- the error persistsdeploy()
- same errorHere is my package.json:
Beta Was this translation helpful? Give feedback.
All reactions