Skip to content

Commit

Permalink
Merge branch 'main' into update-legacyERC20ETH-address
Browse files Browse the repository at this point in the history
  • Loading branch information
Sledro authored Sep 4, 2024
2 parents 4c9ab56 + 7df9bd1 commit f617e7e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions scripts/hardhat/deploy/deployBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ const main = async () => {
[l1CrossDomainMessengerAddr],
);

const portalReceipt = await l1Provider.getTransactionReceipt(
lightLinkPortal.deployTx!.hash,
);

// Deploy SystemConfig contract
log("Deploying SystemConfig to L1...");
const systemConfig = await proxyDeployAndInitialize(
l1Deployer,
await ethers.getContractFactory("SystemConfig"),
[portalReceipt?.blockNumber, lightLinkPortal.address],
);

log("Deployment complete!");

// Log deployment addresses
Expand All @@ -62,6 +74,11 @@ const main = async () => {
`"${L1StandardBridgeDeployment.address}"`,
`"(impl ${L1StandardBridgeDeployment.implementationAddress})"`,
);
log(
" SystemConfig:",
`"${systemConfig.address}"`,
`"(impl ${systemConfig.implementationAddress})"`,
);
};

main()
Expand Down
3 changes: 3 additions & 0 deletions scripts/hardhat/lib/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const proxyDeployAndInitialize = async (
.deploy(signer.address)) as any;
await proxy.waitForDeployment();

const deployTx = await proxy.deploymentTransaction();

await proxy.upgradeToAndCall(
implementationAddress,
implementation.interface.encodeFunctionData("initialize", args),
Expand All @@ -34,6 +36,7 @@ export const proxyDeployAndInitialize = async (
address: proxyAddress,
implementation,
implementationAddress,
deployTx,
};
};

Expand Down

0 comments on commit f617e7e

Please sign in to comment.