I have a smart contract with a payable constructor. I'm trying to figure out the syntax with ethers js how I can deploy the smart contract and send an initial balance with the deployment.
const initialBalance = ethers.utils.parseEther("0.1"); const myContract = await ethers.getContractFactory('MyContract'); const deployedContract = await myContract.deploy(initialBalance);
The above gives me an error, I assume because it's reading the initialBalance as an argument to the constructor and my constructor takes in no arguments. How can I send an initial balance during deployment like you can from the Remix IDE? Thanks.