Skip to content

Commit

Permalink
feat: Add Polygon ZkEVM a.DI and Gov V3 addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
sendra committed Jan 4, 2024
1 parent a53910d commit 3cf95b1
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/configs/governance/polygonZkevm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import {ChainId} from '../../generator/chains';
import {GovernanceConfig} from '../types';

export const governanceConfigPolygonZkEVM: GovernanceConfig = {
name: 'PolygonZkEVM',
CHAIN_ID: ChainId.zkevm,
ADDRESSES: {
CROSS_CHAIN_CONTROLLER: '0xed7e0874526B9BB9E36C7e9472ed7ed324CEeE3B',
PAYLOADS_CONTROLLER: '0xa2d22795E0D85D4Cb14Cbb14Df7bb8fec1016615',
PC_DATA_HELPER: '0xF1c11BE0b4466728DDb7991A0Ac5265646ec9672',
},
};
13 changes: 13 additions & 0 deletions scripts/configs/networks/polygonZkevm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import {NetworkAddresses} from '../types';
import {ChainId} from '../../generator/chains';

export const polygonZkevmAddresses: NetworkAddresses = {
name: 'PolygonZkEVM',
chainId: ChainId.zkevm,
addresses: {
TRANSPARENT_PROXY_FACTORY: '0x8B6851156023f4f5A66F68BEA80851c3D905Ac93',
PROXY_ADMIN: '0x2f6571d3Eb9a4e350C68C36bCD2afe39530078E2',
CREATE_3_FACTORY: '0xE2E8Badc5d50f8a6188577B89f50701cDE2D4e19',
PROTOCOL_GUARDIAN: '0x8C05474F1f0161F71276677De0a2d8a347583c45',
},
};
2 changes: 2 additions & 0 deletions scripts/generateAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import {gnosisAddresses} from './configs/networks/gnosis';
import {bnbAddresses} from './configs/networks/bnb';
import {scrollAddresses} from './configs/networks/scroll';
import {governanceConfigScroll} from './configs/governance/scroll';
import {governanceConfigPolygonZkEVM} from './configs/governance/polygonZkevm';

async function main() {
// cleanup ts artifacts
Expand Down Expand Up @@ -86,6 +87,7 @@ async function main() {
governanceConfigBNB,
governanceConfigGnosis,
governanceConfigScroll,
governanceConfigPolygonZkEVM,
].map((config) => generateGovernanceLibrary(config)),
);
const v2LibraryNames = await Promise.all(
Expand Down
1 change: 1 addition & 0 deletions scripts/generator/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ export enum ChainId {
base = 8453,
bnb = 56,
gnosis = 100,
zkevm = 1101,
}
8 changes: 8 additions & 0 deletions scripts/generator/clients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
base,
bsc,
gnosis,
polygonZkEvm,
} from 'viem/chains';
import {ChainId} from './chains';

Expand Down Expand Up @@ -175,4 +176,11 @@ export const RPC_PROVIDERS = {
multicall: true,
},
}),
[ChainId.zkevm]: createPublicClient({
chain: polygonZkEvm,
transport: http(),
batch: {
multicall: true,
},
}),
} as const;
1 change: 1 addition & 0 deletions src/AaveAddressBook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {GovernanceV3Base} from './GovernanceV3Base.sol';
import {GovernanceV3BNB} from './GovernanceV3BNB.sol';
import {GovernanceV3Gnosis} from './GovernanceV3Gnosis.sol';
import {GovernanceV3Scroll} from './GovernanceV3Scroll.sol';
import {GovernanceV3PolygonZkEVM} from './GovernanceV3PolygonZkEVM.sol';
import {AaveV2EthereumAMM} from './AaveV2EthereumAMM.sol';
import {AaveV2EthereumArc} from './AaveV2EthereumArc.sol';
import {AaveV2Ethereum} from './AaveV2Ethereum.sol';
Expand Down
23 changes: 23 additions & 0 deletions src/GovernanceV3PolygonZkEVM.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;

// AUTOGENERATED - MANUALLY CHANGES WILL BE REVERTED BY THE GENERATOR
import {IGovernanceCore, IPayloadsControllerCore, IDataWarehouse, IVotingStrategy} from './GovernanceV3.sol';

library GovernanceV3PolygonZkEVM {
// https://zkevm.polygonscan.com/address/0xed7e0874526B9BB9E36C7e9472ed7ed324CEeE3B
address internal constant CROSS_CHAIN_CONTROLLER = 0xed7e0874526B9BB9E36C7e9472ed7ed324CEeE3B;

// https://zkevm.polygonscan.com/address/0xa2d22795E0D85D4Cb14Cbb14Df7bb8fec1016615
IPayloadsControllerCore internal constant PAYLOADS_CONTROLLER =
IPayloadsControllerCore(0xa2d22795E0D85D4Cb14Cbb14Df7bb8fec1016615);

// https://zkevm.polygonscan.com/address/0xF1c11BE0b4466728DDb7991A0Ac5265646ec9672
address internal constant PC_DATA_HELPER = 0xF1c11BE0b4466728DDb7991A0Ac5265646ec9672;

// https://zkevm.polygonscan.com/address/0xe59470B3BE3293534603487E00A44C72f2CD466d
address internal constant EXECUTOR_LVL_1 = 0xe59470B3BE3293534603487E00A44C72f2CD466d;

// https://zkevm.polygonscan.com/address/0x0000000000000000000000000000000000000000
address internal constant EXECUTOR_LVL_2 = 0x0000000000000000000000000000000000000000;
}
1 change: 1 addition & 0 deletions src/ts/AaveAddressBook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export * as GovernanceV3Base from './GovernanceV3Base';
export * as GovernanceV3BNB from './GovernanceV3BNB';
export * as GovernanceV3Gnosis from './GovernanceV3Gnosis';
export * as GovernanceV3Scroll from './GovernanceV3Scroll';
export * as GovernanceV3PolygonZkEVM from './GovernanceV3PolygonZkEVM';
export * as AaveV2EthereumAMM from './AaveV2EthereumAMM';
export * as AaveV2EthereumArc from './AaveV2EthereumArc';
export * as AaveV2Ethereum from './AaveV2Ethereum';
Expand Down
14 changes: 14 additions & 0 deletions src/ts/GovernanceV3PolygonZkEVM.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// https://zkevm.polygonscan.com/address/0xed7e0874526B9BB9E36C7e9472ed7ed324CEeE3B
export const CROSS_CHAIN_CONTROLLER = '0xed7e0874526B9BB9E36C7e9472ed7ed324CEeE3B';

// IPayloadsControllerCore https://zkevm.polygonscan.com/address/0xa2d22795E0D85D4Cb14Cbb14Df7bb8fec1016615
export const PAYLOADS_CONTROLLER = '0xa2d22795E0D85D4Cb14Cbb14Df7bb8fec1016615';

// https://zkevm.polygonscan.com/address/0xF1c11BE0b4466728DDb7991A0Ac5265646ec9672
export const PC_DATA_HELPER = '0xF1c11BE0b4466728DDb7991A0Ac5265646ec9672';

// https://zkevm.polygonscan.com/address/0xe59470B3BE3293534603487E00A44C72f2CD466d
export const EXECUTOR_LVL_1 = '0xe59470B3BE3293534603487E00A44C72f2CD466d';

// https://zkevm.polygonscan.com/address/0x0000000000000000000000000000000000000000
export const EXECUTOR_LVL_2 = '0x0000000000000000000000000000000000000000';

0 comments on commit 3cf95b1

Please sign in to comment.