-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add polygon zkEVM contracts (#320)
* feat: Add Polygon ZkEVM a.DI and Gov V3 addresses * feat: add zkEvm pool contracts * feat: add missing addresses * chore: some rename * fix: rename * fix: file name * fix: file name * fix: ts rename --------- Co-authored-by: Harsh Pandey <harshsatishpandey@gmail.com>
- Loading branch information
1 parent
a53910d
commit 772807c
Showing
14 changed files
with
342 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {NetworkAddresses} from '../types'; | ||
import {ChainId} from '../../generator/chains'; | ||
|
||
export const polygonZkEvmAddresses: NetworkAddresses = { | ||
name: 'PolygonZkEvm', | ||
chainId: ChainId.zkevm, | ||
addresses: { | ||
PARASWAP_FEE_CLAIMER: '0xAe940e61E9863178b71500c9B5faE2a04Da361a1', | ||
TRANSPARENT_PROXY_FACTORY: '0x8B6851156023f4f5A66F68BEA80851c3D905Ac93', | ||
PROXY_ADMIN: '0x2f6571d3Eb9a4e350C68C36bCD2afe39530078E2', | ||
CREATE_3_FACTORY: '0xE2E8Badc5d50f8a6188577B89f50701cDE2D4e19', | ||
PROTOCOL_GUARDIAN: '0x8C05474F1f0161F71276677De0a2d8a347583c45', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import {ChainId} from '../../generator/chains'; | ||
import {PoolConfig} from '../types'; | ||
|
||
export const polygonZkEvmProtoV3: PoolConfig = { | ||
name: 'PolygonZkEvm', | ||
chainId: ChainId.zkevm, | ||
POOL_ADDRESSES_PROVIDER: '0x36616cf17557639614c1cdDb356b1B83fc0B2132', | ||
additionalAddresses: { | ||
L2_ENCODER: '0x777fBA024bA1228fDa76149A4ff8B23475ed057D', | ||
CAPS_PLUS_RISK_STEWARD: '0xAe13e4DA0952f0B8fE04E21df53716fCF799a923', | ||
FREEZING_STEWARD: '0x33AE1f41546a2e05368Bf789b3d868813c0Ae658', | ||
DEBT_SWAP_ADAPTER: '0xb9Ef6e27ef85fE393B9F8B8C23e794ff4596C7dF', | ||
CONFIG_ENGINE: '0x1D0f881Ce1a646E2f27Dec3c57Fa056cB838BCC2', | ||
POOL_ADDRESSES_PROVIDER_REGISTRY: '0x1236010CECea55998384e795B59815D871f5f94d', | ||
RATES_FACTORY: '0x78946C514C385248b13AAf3056529a99E7E26BFC', | ||
REPAY_WITH_COLLATERAL_ADAPTER: '0xBeC519531F0E78BcDdB295242fA4EC5251B38574', | ||
SWAP_COLLATERAL_ADAPTER: '0x589750BA8aF186cE5B55391B0b7148cAD43a1619', | ||
UI_INCENTIVE_DATA_PROVIDER: '0xCFDAdA7DCd2e785cF706BaDBC2B8Af5084d595e9', | ||
UI_POOL_DATA_PROVIDER: '0x86E2938daE289763D4e09a7e42c5cCcA62Cf9809', | ||
WALLET_BALANCE_PROVIDER: '0x4172E6aAEC070ACB31aaCE343A58c93E4C70f44D', | ||
WETH_GATEWAY: '0x6c23bAF050ec192afc0B967a93b83e6c5405df43', | ||
WITHDRAW_SWAP_ADAPTER: '0x06C35Cfd3FC61eC2aC437f0d08840d5776b945af', | ||
}, | ||
initial: { | ||
COLLECTOR: '0xe892E40C92c2E4D281Be59b2E6300F271d824E75', | ||
DEFAULT_A_TOKEN_IMPL: '0xDe090EfCD6ef4b86792e2D84E55a5fa8d49D25D2', | ||
DEFAULT_VARIABLE_DEBT_TOKEN_IMPL: '0x988B5d3863bdEE83339Be41cD31344Dfd9FD197c', | ||
DEFAULT_STABLE_DEBT_TOKEN_IMPL: '0x96086C25d13943C80Ff9a19791a40Df6aFC08328', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,5 @@ export enum ChainId { | |
base = 8453, | ||
bnb = 56, | ||
gnosis = 100, | ||
zkevm = 1101, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
// AUTOGENERATED - MANUALLY CHANGES WILL BE REVERTED BY THE GENERATOR | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.6.0; | ||
|
||
import {IPoolAddressesProvider, IPool, IPoolConfigurator, IAaveOracle, IPoolDataProvider, IACLManager} from './AaveV3.sol'; | ||
import {ICollector} from './common/ICollector.sol'; | ||
|
||
library AaveV3PolygonZkEvm { | ||
// https://zkevm.polygonscan.com/address/0x36616cf17557639614c1cdDb356b1B83fc0B2132 | ||
IPoolAddressesProvider internal constant POOL_ADDRESSES_PROVIDER = | ||
IPoolAddressesProvider(0x36616cf17557639614c1cdDb356b1B83fc0B2132); | ||
|
||
// https://zkevm.polygonscan.com/address/0xb50201558B00496A145fE76f7424749556E326D8 | ||
IPool internal constant POOL = IPool(0xb50201558B00496A145fE76f7424749556E326D8); | ||
|
||
// https://zkevm.polygonscan.com/address/0x7304979ec9E4EaA0273b6A037a31c4e9e5A75D16 | ||
IPoolConfigurator internal constant POOL_CONFIGURATOR = | ||
IPoolConfigurator(0x7304979ec9E4EaA0273b6A037a31c4e9e5A75D16); | ||
|
||
// https://zkevm.polygonscan.com/address/0x3e652E97ff339B73421f824F5b03d75b62F1Fb51 | ||
IAaveOracle internal constant ORACLE = IAaveOracle(0x3e652E97ff339B73421f824F5b03d75b62F1Fb51); | ||
|
||
// https://zkevm.polygonscan.com/address/0x0000000000000000000000000000000000000000 | ||
address internal constant PRICE_ORACLE_SENTINEL = 0x0000000000000000000000000000000000000000; | ||
|
||
// https://zkevm.polygonscan.com/address/0x501B4c19dd9C2e06E94dA7b6D5Ed4ddA013EC741 | ||
IPoolDataProvider internal constant AAVE_PROTOCOL_DATA_PROVIDER = | ||
IPoolDataProvider(0x501B4c19dd9C2e06E94dA7b6D5Ed4ddA013EC741); | ||
|
||
// https://zkevm.polygonscan.com/address/0x41585C50524fb8c3899B43D7D797d9486AAc94DB | ||
IACLManager internal constant ACL_MANAGER = | ||
IACLManager(0x41585C50524fb8c3899B43D7D797d9486AAc94DB); | ||
|
||
// https://zkevm.polygonscan.com/address/0xe59470B3BE3293534603487E00A44C72f2CD466d | ||
address internal constant ACL_ADMIN = 0xe59470B3BE3293534603487E00A44C72f2CD466d; | ||
|
||
// https://zkevm.polygonscan.com/address/0xe892E40C92c2E4D281Be59b2E6300F271d824E75 | ||
ICollector internal constant COLLECTOR = ICollector(0xe892E40C92c2E4D281Be59b2E6300F271d824E75); | ||
|
||
// https://zkevm.polygonscan.com/address/0xaD4F91D26254B6B0C6346b390dDA2991FDE2F20d | ||
address internal constant DEFAULT_INCENTIVES_CONTROLLER = | ||
0xaD4F91D26254B6B0C6346b390dDA2991FDE2F20d; | ||
|
||
// https://zkevm.polygonscan.com/address/0xDe090EfCD6ef4b86792e2D84E55a5fa8d49D25D2 | ||
address internal constant DEFAULT_A_TOKEN_IMPL_REV_1 = 0xDe090EfCD6ef4b86792e2D84E55a5fa8d49D25D2; | ||
|
||
// https://zkevm.polygonscan.com/address/0x988B5d3863bdEE83339Be41cD31344Dfd9FD197c | ||
address internal constant DEFAULT_VARIABLE_DEBT_TOKEN_IMPL_REV_1 = | ||
0x988B5d3863bdEE83339Be41cD31344Dfd9FD197c; | ||
|
||
// https://zkevm.polygonscan.com/address/0x96086C25d13943C80Ff9a19791a40Df6aFC08328 | ||
address internal constant DEFAULT_STABLE_DEBT_TOKEN_IMPL_REV_1 = | ||
0x96086C25d13943C80Ff9a19791a40Df6aFC08328; | ||
|
||
// https://zkevm.polygonscan.com/address/0xeb0a051be10228213BAEb449db63719d6742F7c4 | ||
address internal constant EMISSION_MANAGER = 0xeb0a051be10228213BAEb449db63719d6742F7c4; | ||
|
||
// https://zkevm.polygonscan.com/address/0x777fBA024bA1228fDa76149A4ff8B23475ed057D | ||
address internal constant L2_ENCODER = 0x777fBA024bA1228fDa76149A4ff8B23475ed057D; | ||
|
||
// https://zkevm.polygonscan.com/address/0xAe13e4DA0952f0B8fE04E21df53716fCF799a923 | ||
address internal constant CAPS_PLUS_RISK_STEWARD = 0xAe13e4DA0952f0B8fE04E21df53716fCF799a923; | ||
|
||
// https://zkevm.polygonscan.com/address/0x33AE1f41546a2e05368Bf789b3d868813c0Ae658 | ||
address internal constant FREEZING_STEWARD = 0x33AE1f41546a2e05368Bf789b3d868813c0Ae658; | ||
|
||
// https://zkevm.polygonscan.com/address/0xb9Ef6e27ef85fE393B9F8B8C23e794ff4596C7dF | ||
address internal constant DEBT_SWAP_ADAPTER = 0xb9Ef6e27ef85fE393B9F8B8C23e794ff4596C7dF; | ||
|
||
// https://zkevm.polygonscan.com/address/0x1D0f881Ce1a646E2f27Dec3c57Fa056cB838BCC2 | ||
address internal constant CONFIG_ENGINE = 0x1D0f881Ce1a646E2f27Dec3c57Fa056cB838BCC2; | ||
|
||
// https://zkevm.polygonscan.com/address/0x1236010CECea55998384e795B59815D871f5f94d | ||
address internal constant POOL_ADDRESSES_PROVIDER_REGISTRY = | ||
0x1236010CECea55998384e795B59815D871f5f94d; | ||
|
||
// https://zkevm.polygonscan.com/address/0x78946C514C385248b13AAf3056529a99E7E26BFC | ||
address internal constant RATES_FACTORY = 0x78946C514C385248b13AAf3056529a99E7E26BFC; | ||
|
||
// https://zkevm.polygonscan.com/address/0xBeC519531F0E78BcDdB295242fA4EC5251B38574 | ||
address internal constant REPAY_WITH_COLLATERAL_ADAPTER = | ||
0xBeC519531F0E78BcDdB295242fA4EC5251B38574; | ||
|
||
// https://zkevm.polygonscan.com/address/0x589750BA8aF186cE5B55391B0b7148cAD43a1619 | ||
address internal constant SWAP_COLLATERAL_ADAPTER = 0x589750BA8aF186cE5B55391B0b7148cAD43a1619; | ||
|
||
// https://zkevm.polygonscan.com/address/0xCFDAdA7DCd2e785cF706BaDBC2B8Af5084d595e9 | ||
address internal constant UI_INCENTIVE_DATA_PROVIDER = 0xCFDAdA7DCd2e785cF706BaDBC2B8Af5084d595e9; | ||
|
||
// https://zkevm.polygonscan.com/address/0x86E2938daE289763D4e09a7e42c5cCcA62Cf9809 | ||
address internal constant UI_POOL_DATA_PROVIDER = 0x86E2938daE289763D4e09a7e42c5cCcA62Cf9809; | ||
|
||
// https://zkevm.polygonscan.com/address/0x4172E6aAEC070ACB31aaCE343A58c93E4C70f44D | ||
address internal constant WALLET_BALANCE_PROVIDER = 0x4172E6aAEC070ACB31aaCE343A58c93E4C70f44D; | ||
|
||
// https://zkevm.polygonscan.com/address/0x6c23bAF050ec192afc0B967a93b83e6c5405df43 | ||
address internal constant WETH_GATEWAY = 0x6c23bAF050ec192afc0B967a93b83e6c5405df43; | ||
|
||
// https://zkevm.polygonscan.com/address/0x06C35Cfd3FC61eC2aC437f0d08840d5776b945af | ||
address internal constant WITHDRAW_SWAP_ADAPTER = 0x06C35Cfd3FC61eC2aC437f0d08840d5776b945af; | ||
} | ||
|
||
library AaveV3PolygonZkEvmAssets {} | ||
|
||
library AaveV3PolygonZkEvmEModes {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// AUTOGENERATED - MANUALLY CHANGES WILL BE REVERTED BY THE GENERATOR | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.6.0; | ||
|
||
library MiscPolygonZkEvm { | ||
// https://zkevm.polygonscan.com/address/0xAe940e61E9863178b71500c9B5faE2a04Da361a1 | ||
address internal constant PARASWAP_FEE_CLAIMER = 0xAe940e61E9863178b71500c9B5faE2a04Da361a1; | ||
|
||
// https://zkevm.polygonscan.com/address/0x8B6851156023f4f5A66F68BEA80851c3D905Ac93 | ||
address internal constant TRANSPARENT_PROXY_FACTORY = 0x8B6851156023f4f5A66F68BEA80851c3D905Ac93; | ||
|
||
// https://zkevm.polygonscan.com/address/0x2f6571d3Eb9a4e350C68C36bCD2afe39530078E2 | ||
address internal constant PROXY_ADMIN = 0x2f6571d3Eb9a4e350C68C36bCD2afe39530078E2; | ||
|
||
// https://zkevm.polygonscan.com/address/0xE2E8Badc5d50f8a6188577B89f50701cDE2D4e19 | ||
address internal constant CREATE_3_FACTORY = 0xE2E8Badc5d50f8a6188577B89f50701cDE2D4e19; | ||
|
||
// https://zkevm.polygonscan.com/address/0x8C05474F1f0161F71276677De0a2d8a347583c45 | ||
address internal constant PROTOCOL_GUARDIAN = 0x8C05474F1f0161F71276677De0a2d8a347583c45; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.