hey guys, I have contracts like this:

contract A {
constructor(address addr) {...}
}

contract B is A {
constructor() A(msg.sender) {}
}

I what to deploy it whit ethers:
when I write with argument like this:

const contractFactory = await ethers.getContractFactory('B');
instance = await contractFactory.deploy(someAddress)

it cames error "in Contract constructor (count=1, expectedCount=0, code=UNEXPECTED_ARGUMENT, version=contracts/5.0.9)"
when I write without argument like this:

const contractFactory = await ethers.getContractFactory('B');
instance = await contractFactory.deploy()

it cames error "invalid ENS name ..."
what is the right way to deploy B contract?
Thanks!

Feb 1, 2021, 9:53 AM
but the ethers tells me an invalid ENS name error😣
Feb 1, 2021, 10:01 AM

Ā© 2024 Draquery.com All rights reserved.