Skip to content

Commit

Permalink
fix: deployment tasks
Browse files Browse the repository at this point in the history
Signed-off-by: Reinis Martinsons <reinis@umaproject.org>
  • Loading branch information
Reinis-FRP committed Feb 8, 2024
1 parent 3c9f316 commit 0062d42
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sdk/factory/mastercopyDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const deployMastercopyWithInitData = async (
const initCodeHash = keccak256(initCode);

const computedTargetAddress = getCreate2Address(
await singletonFactory.address(),
await singletonFactory.getAddress(),
salt,
initCodeHash
);
Expand Down
10 changes: 6 additions & 4 deletions sdk/factory/singletonFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ export const getSingletonFactory = async (
"Singleton factory is not deployed on this chain. Deploying singleton factory..."
);
// fund the singleton factory deployer account
await signer.sendTransaction({
to: singletonDeployer,
value: parseEther("0.0247"),
});
await (
await signer.sendTransaction({
to: singletonDeployer,
value: parseEther("0.0247"),
})
).wait();

// deploy the singleton factory
await (
Expand Down
2 changes: 1 addition & 1 deletion tasks/deploy-replay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const deploy = async (_: unknown, hre: HardhatRuntimeEnvironment) => {
console.log(`\n\x1B[4m\x1B[1m${hre.network.name}\x1B[0m`);

const [deployer] = await hre.ethers.getSigners();
const signer = hre.ethers.provider.getSigner(deployer.address);
const signer = await hre.ethers.provider.getSigner(deployer.address);
for (let index = 0; index < contracts.length; index++) {
const initData: InitData | undefined = MasterCopyInitData[contracts[index]];

Expand Down
2 changes: 1 addition & 1 deletion tasks/singleton-deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const deploy = async (_: unknown, hre: HardhatRuntimeEnvironment) => {
}

const [deployer] = await hre.ethers.getSigners();
await deployModuleFactory(hre.ethers.provider.getSigner(deployer.address));
await deployModuleFactory(await hre.ethers.provider.getSigner(deployer.address));
};

task(
Expand Down

0 comments on commit 0062d42

Please sign in to comment.