UUPS Upgradeable Smart Contracts - How to Fund Them with Ether Upon Initialization

When I deploy a non-upgradeable contract, I fund it with Ether in this manner:

const MyContractFactory = await ethers.getContractFactory("MyContract");
const myContract = <MyContract>await MyContractFactory.deploy({
    value: hre.ethers.utils.parseEther("0.1"),});
await myContract.deployed();

How does one fund implementation contracts for UUPS upgradeable proxies that are deployed this way:

const MyControllerFactory = await ethers.getContractFactory("MyController");
const myController = <MyController>(
        await upgrades.deployProxy(MyControllerFactory, [parameter.address], { kind: "uups" })
    );
await myController.deployed();

const myContProxyAddress = myController.address;
console.log("MyController proxy deployed to:", myContProxyAddress);

Many thanks in advance for any insights!

This isn't supported yet but there is a GitHub issue that was opened from this thread. Please subscribe to that GitHub issue for updates.

1 Like