Skip to content

Lesson5 @ 8:00:00 - Error / contract.address #5959

Answered by alfaqi
Astronaut828 asked this question in Q&A
Discussion options

You must be logged in to vote

You are using ethersV6 instead of contract.address, use contract.target or await contract.getAddress()
like this

console.log(`Contract Address: ${contract.target}`)

or

console.log(`Contract Address: ${await contract.getAddress()}`)
//OR
const contractAddress = await contract.getAddress()
console.log(`Contract Address: ${contractAddress}`)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@alfaqi
Comment options

Answer selected by Astronaut828
@Astronaut828
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants