Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
invocamanman committed Feb 21, 2023
1 parent 80a52e4 commit 6d035d3
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 19 deletions.
10 changes: 10 additions & 0 deletions deployment/deployContracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ async function main() {
const dataCallAdmin = proxyAdminFactory.interface.encodeFunctionData('transferOwnership', [deployer.address]);
const proxyAdminAddress = await create2Deployment(zkEVMDeployerContract, salt, deployTransactionAdmin, dataCallAdmin);

console.log('#######################\n');
console.log('Proxy admin deployed to:', proxyAdminAddress);

// Deploy implementation PolygonZkEVMBridg
const polygonZkEVMBridgeFactory = await ethers.getContractFactory('PolygonZkEVMBridge', deployer);
const deployTransactionBridge = (polygonZkEVMBridgeFactory.getDeployTransaction()).data;
Expand All @@ -123,6 +126,9 @@ async function main() {
overrideGasLimit,
);

console.log('#######################\n');
console.log('bridge impl deployed to:', bridgeImplementationAddress);

/*
* deploy proxy
* Do not initialize directly the proxy since we want to deploy the same code on L2 and this will alter the bytecode deployed of the proxy
Expand Down Expand Up @@ -431,6 +437,10 @@ async function create2Deployment(polgonZKEVMDeployerContract, salt, deployTransa
const precalculatedAddressDeployed = ethers.utils.getCreate2Address(polgonZKEVMDeployerContract.address, salt, hashInitCode);
const amount = 0;

if (await ethers.provider.getCode(precalculatedAddressDeployed) !== '0x') {
return precalculatedAddressDeployed;
}

if (dataCall) {
// Deploy using create2 and call
if (hardcodedGasLimit) {
Expand Down
4 changes: 2 additions & 2 deletions deployment/deploy_parameters.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"networkName": "zkevm",
"deployerPvtKey": "",
"maxFeePerGas":0,
"maxPriorityFeePerGas":0,
"multiplierGas": 0,
"maxPriorityFeePerGas":"0",
"multiplierGas": "0",
"trustedSequencerPvtKey":"",
"admin":"0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
"trustedAggregator":"0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D",
Expand Down
20 changes: 10 additions & 10 deletions deployment/genesis.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions docker/scripts/genesis_docker.json

Large diffs are not rendered by default.

0 comments on commit 6d035d3

Please sign in to comment.