Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deployment/v2/1_createGenesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ async function main() {
nonce: bridgeImplementationInfo.nonce.toString(),
address: finalBridgeImplAddress,
bytecode: bridgeImplementationInfo.bytecode,
// storage: bridgeImplementationInfo.storage, implementation do not have storage
storage: bridgeImplementationInfo.storage, // _initialized = type(uint8).max;
});

// Bridge proxy
Expand Down Expand Up @@ -370,7 +370,7 @@ async function main() {
nonce: implGlobalExitRootL2Info.nonce.toString(),
address: finalGlobalExitRootL2ImplAddress,
bytecode: implGlobalExitRootL2Info.bytecode,
// storage: implGlobalExitRootL2Info.storage, , implementation do not have storage
storage: implGlobalExitRootL2Info.storage, // should be empty
});

// polygonZkEVMGlobalExitRootL2 proxy
Expand Down
2 changes: 1 addition & 1 deletion deployment/v2/utils/updateVanillaGenesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ async function updateVanillaGenesis(genesis, chainID, initializeParams) {
return obj.contractName === GENESIS_CONTRACT_NAMES.POLYGON_DEPLOYER;
});
const deployerAddressObj = genesis.genesis.find(function (obj) {
return obj.accountName === 'deployer';
return obj.accountName === GENESIS_CONTRACT_NAMES.DEPLOYER;
});
expect(polygonDeployerObj.storage['0x0000000000000000000000000000000000000000000000000000000000000000']).to.include(
deployerAddressObj.address.toLowerCase().slice(2),
Expand Down
19 changes: 19 additions & 0 deletions src/genesis-hardhat/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Those contracts names came from the genesis creation:
// - https://github.com/0xPolygonHermez/zkevm-contracts/blob/main/deployment/v2/1_createGenesis.ts#L294
// - https://github.com/0xPolygonHermez/zkevm-contracts/blob/main/deployment/v2/1_createGenesis.ts#L328
// Genesis files have been created previously and so they have old naming, as it shown in the links above
// Those genesis are already imported on different tooling and added as a metadata on-chain. Therefore, this util aims
// to support them too

import { GENESIS_CONTRACT_NAMES } from '../utils-common-aggchain';

export const SUPPORTED_GER_MANAGERS = [
'PolygonZkEVMGlobalExitRootL2 implementation',
GENESIS_CONTRACT_NAMES.GER_L2_IMPLEMENTATION,
];

export const SUPPORTED_BRIDGE_CONTRACTS = ['PolygonZkEVMBridge implementation', 'AgglayerBridge implementation'];

export const SUPPORTED_BRIDGE_CONTRACTS_PROXY = ['AgglayerBridge proxy', 'PolygonZkEVMBridge proxy'];

export { GENESIS_CONTRACT_NAMES };
Loading