Skip to content

Commit

Permalink
tiny change
Browse files Browse the repository at this point in the history
  • Loading branch information
josojo committed Aug 16, 2023
1 parent 9e622ce commit 6d4b3e9
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions deployment/3_deployContracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,17 +214,26 @@ async function main() {

// Deploy implementation PolygonZkEVMBridge
const overrideGasLimit = ethers.BigNumber.from(5500000);
let bridgeOperationImplementationAddress;
if (!ongoingDeployment.bridgeOperationImplementationAddress) {
const bridgeOperationLib = await ethers.getContractFactory('BridgeAssetOperations', deployer);
const bridgeOperationLibDeployTransaction = (bridgeOperationLib.getDeployTransaction()).data;
[bridgeOperationImplementationAddress] = await create2Deployment(
zkEVMDeployerContract,
salt,
bridgeOperationLibDeployTransaction,
null,
deployer,
overrideGasLimit,
);
console.log('#######################\n');
console.log('bridgeOperationImplementationAddress deployed to:', bridgeOperationImplementationAddress);
ongoingDeployment.bridgeOperationImplementationAddress = bridgeOperationImplementationAddress;
fs.writeFileSync(pathOngoingDeploymentJson, JSON.stringify(ongoingDeployment, null, 1));
} else {
console.log('bridgeOperationImplementation already deployed on: ', ongoingDeployment.bridgeOperationImplementation);
}

const bridgeOperationLib = await ethers.getContractFactory('BridgeAssetOperations', deployer);
const bridgeOperationLibDeployTransaction = (bridgeOperationLib.getDeployTransaction()).data;
const [bridgeOperationImplementationAddress] = await create2Deployment(
zkEVMDeployerContract,
salt,
bridgeOperationLibDeployTransaction,
null,
deployer,
overrideGasLimit,
);
const polygonZkEVMBridgeFactory = await ethers.getContractFactory('ForkableBridge', {
libraries: {
CreateChildren: createChildrenImplementationAddress,
Expand Down

0 comments on commit 6d4b3e9

Please sign in to comment.