diff --git a/package-lock.json b/package-lock.json index 5391e109..89941ec2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ ], "devDependencies": { "@bgd-labs/react-web3-icons": "^1.51.0", - "@bgd-labs/toolbox": "^0.0.51", + "@bgd-labs/toolbox": "^0.0.52", "@size-limit/file": "^11.2.0", "@types/node": "^22.4.1", "@uniswap/token-lists": "^1.0.0-beta.33", @@ -124,9 +124,9 @@ } }, "node_modules/@bgd-labs/toolbox": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@bgd-labs/toolbox/-/toolbox-0.0.51.tgz", - "integrity": "sha512-9zvEipJ/yuqeI6tEXvuki903EDk73fXlzhCcXMKHNy4Q4MDDBp4z1qT8JYWkXxafEv2jLgy2V+IL5UHO3hgcZQ==", + "version": "0.0.52", + "resolved": "https://registry.npmjs.org/@bgd-labs/toolbox/-/toolbox-0.0.52.tgz", + "integrity": "sha512-8KIiG3mycRMs/2C5kIwL6kI66A0FCbPVlj1u1Fc9q+a5vgXS6/i6LzqAAij/A/HoKPaW0Gcc8GiSb/F7G4nF0w==", "dev": true, "license": "MIT", "dependencies": { @@ -1763,7 +1763,6 @@ "version": "5.4.0", "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.4.0.tgz", "integrity": "sha512-eCYgWnLg6WO+X52I16TZt8uEjbtdkgLC0SUX/xnAksjjrQI4Xfn4iBRoI5j55dmlOhDv1Y7BoR3cU7e3WWhC6A==", - "dev": true, "license": "MIT", "peer": true }, @@ -1771,7 +1770,6 @@ "version": "5.4.0", "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-5.4.0.tgz", "integrity": "sha512-STJKyDzUcYuB35Zub1JpWW58JxvrFFVgQ+Ykdr8A9PGXgtq/obF5uoh07k2XmFyPxfnZdPdBdhkJ/n2YxJ87HQ==", - "dev": true, "license": "MIT", "peerDependencies": { "@openzeppelin/contracts": "5.4.0" @@ -9944,11 +9942,12 @@ } }, "ui/node_modules/@bgd-labs/toolbox": { - "version": "0.0.43", - "resolved": "https://registry.npmjs.org/@bgd-labs/toolbox/-/toolbox-0.0.43.tgz", - "integrity": "sha512-vP6+2bSGznLMMFkbiApoN00aaOCzjeY/FOMbRcmhRk7pm2kQwV3LuZSuz0Pc6vekzivG1rj2JkUJyFFNJc146A==", + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@bgd-labs/toolbox/-/toolbox-0.0.51.tgz", + "integrity": "sha512-9zvEipJ/yuqeI6tEXvuki903EDk73fXlzhCcXMKHNy4Q4MDDBp4z1qT8JYWkXxafEv2jLgy2V+IL5UHO3hgcZQ==", "license": "MIT", "dependencies": { + "@openzeppelin/contracts-upgradeable": "^5.4.0", "arktype": "^2.1.20", "blockstore-core": "^5.0.2", "diff": "^7.0.0", diff --git a/package.json b/package.json index 68ef394b..470c26d6 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "homepage": "https://github.com/bgd-labs/aave-address-book#readme", "devDependencies": { "@bgd-labs/react-web3-icons": "^1.51.0", - "@bgd-labs/toolbox": "^0.0.51", + "@bgd-labs/toolbox": "^0.0.52", "@size-limit/file": "^11.2.0", "@types/node": "^22.4.1", "@uniswap/token-lists": "^1.0.0-beta.33", @@ -112,4 +112,4 @@ "@types/react": "19.1.13", "@types/react-dom": "19.1.9" } -} +} \ No newline at end of file diff --git a/safe.csv b/safe.csv index 9914c476..23f6e63f 100644 --- a/safe.csv +++ b/safe.csv @@ -848,6 +848,11 @@ address,name,chainId 0x7bd81B1e0137Fc0fa013b1De2Be81180814C5deb,AaveV3EthereumHorizon ASSETS JAAA V_TOKEN,1 0x87593272C06f4FC49EC2942eBda0972d2F1Ab521,AaveV3EthereumHorizon ASSETS JAAA INTEREST_RATE_STRATEGY,1 0xF77f2537dba4ffD60f77fACdfB2c1706364fA03d,AaveV3EthereumHorizon ASSETS JAAA ORACLE,1 +0x2255718832bC9fD3bE1CaF75084F4803DA14FF01,AaveV3EthereumHorizon ASSETS VBILL UNDERLYING,1 +0xE1CfD16b8E4B1C86Bb5b7A104cfEFbc7b09326dD,AaveV3EthereumHorizon ASSETS VBILL A_TOKEN,1 +0xEAf93Fd541f11D2617C2915D02F7fe67bCa71d4f,AaveV3EthereumHorizon ASSETS VBILL V_TOKEN,1 +0x87593272C06f4FC49EC2942eBda0972d2F1Ab521,AaveV3EthereumHorizon ASSETS VBILL INTEREST_RATE_STRATEGY,1 +0x5ed77a9D9b7cc80E9d0D7711024AF38C2643C1c4,AaveV3EthereumHorizon ASSETS VBILL ORACLE,1 0x70CC725B8f05e0f230B05C4e91ABc651E121354f,AaveV3EthereumHorizon COLLECTOR,1 0xB2668573828029917ffbD1e76270373511818498,AaveV3EthereumHorizon DEFAULT_A_TOKEN_IMPL,1 0x1D5D386a90CEA8AcEa9fa75389e97CF5F1AE21D3,AaveV3EthereumHorizon DEFAULT_INCENTIVES_CONTROLLER,1 @@ -2184,6 +2189,7 @@ address,name,chainId 0x56076f960980d453b5B749CB6A1c4D2E4e138B1A,AaveV3Polygon ASSETS USDT0 INTEREST_RATE_STRATEGY,137 0x01Aba1Fe7D72a3490bEef7CD0C09e1Ba2dD88D83,AaveV3Polygon ASSETS USDT0 ORACLE,137 0x87A1fdc4C726c459f597282be639a045062c0E46,AaveV3Polygon ASSETS USDT0 STATIC_A_TOKEN,137 +0x2eaD203C5C1C00612B1DdbBb20e4180dA822d6ff,AaveV3Polygon ASSETS USDT0 STATA_TOKEN,137 0xD6DF932A45C0f255f85145f286eA0b292B21C90B,AaveV3Polygon ASSETS AAVE UNDERLYING,137 0xf329e36C7bF6E5E86ce2150875a84Ce77f477375,AaveV3Polygon ASSETS AAVE A_TOKEN,137 0xE80761Ea617F66F96274eA5e8c37f03960ecC679,AaveV3Polygon ASSETS AAVE V_TOKEN,137 @@ -2606,6 +2612,14 @@ address,name,chainId 0xA4aF5175ed38e791362F01c67a487DbA4aE07dFe,MiscSonic PROTOCOL_GUARDIAN,146 0x9eFf17b168867Dc2bCD87D2Ab44e4857902dbC29,MiscSonic REWARD_STEWARD,146 0xEB0682d148e874553008730f0686ea89db7DA412,MiscSonic TRANSPARENT_PROXY_FACTORY,146 +0x8a86927E3cf7309D74E504EBDb866903DBD11a1f,GovernanceV3XLayer CL_EMERGENCY_ORACLE,196 +0xFdd46155fD3DA5B907AD3B9f9395366290f58097,GovernanceV3XLayer CROSS_CHAIN_CONTROLLER,196 +0xE2E8Badc5d50f8a6188577B89f50701cDE2D4e19,GovernanceV3XLayer EXECUTOR_LVL_1,196 +0xeB55A63bf9993d80c86D47f819B5eC958c7C127B,GovernanceV3XLayer GOVERNANCE_GUARDIAN,196 +0xD6727ec503A8d0C10a0EAA4e76eAf9A628188b25,GovernanceV3XLayer GRANULAR_GUARDIAN,196 +0x80e11cB895a23C901a990239E5534054C66476B5,GovernanceV3XLayer PAYLOADS_CONTROLLER,196 +0x9fE056F44510F970d724adA16903ba5D75CC4742,GovernanceV3XLayer PC_DATA_HELPER,196 +0xEB0682d148e874553008730f0686ea89db7DA412,MiscXLayer TRANSPARENT_PROXY_FACTORY,196 0x9057ac7b2D35606F8AD5aE2FCBafcD94E58D9927,AaveV3ZkSync AAVE_PROTOCOL_DATA_PROVIDER,324 0x04cE39789e11a49595cD0ECEf6f4Bd54ABF4d020,AaveV3ZkSync ACL_ADMIN,324 0xc6150b63c2F02528d4A969a248710A4658ed7928,AaveV3ZkSync ACL_MANAGER,324 diff --git a/scripts/configs/governance/xlayer.ts b/scripts/configs/governance/xlayer.ts new file mode 100644 index 00000000..ce996005 --- /dev/null +++ b/scripts/configs/governance/xlayer.ts @@ -0,0 +1,15 @@ +import { ChainId } from '@bgd-labs/toolbox'; +import { GovernanceConfig } from '../types'; + +export const governanceConfigXlayer: GovernanceConfig = { + name: 'XLayer', + CHAIN_ID: ChainId.xLayer, + ADDRESSES: { + CROSS_CHAIN_CONTROLLER: '0xFdd46155fD3DA5B907AD3B9f9395366290f58097', + PAYLOADS_CONTROLLER: '0x80e11cB895a23C901a990239E5534054C66476B5', + PC_DATA_HELPER: '0x9fE056F44510F970d724adA16903ba5D75CC4742', + GRANULAR_GUARDIAN: '0xD6727ec503A8d0C10a0EAA4e76eAf9A628188b25', + GOVERNANCE_GUARDIAN: '0xeB55A63bf9993d80c86D47f819B5eC958c7C127B', + CL_EMERGENCY_ORACLE: '0x8a86927E3cf7309D74E504EBDb866903DBD11a1f', + }, +}; \ No newline at end of file diff --git a/scripts/configs/networks/xlayer.ts b/scripts/configs/networks/xlayer.ts new file mode 100644 index 00000000..bdfccb9d --- /dev/null +++ b/scripts/configs/networks/xlayer.ts @@ -0,0 +1,10 @@ +import { ChainId } from '@bgd-labs/toolbox'; +import { NetworkAddresses } from '../types'; + +export const xLayerAddresses: NetworkAddresses = { + name: 'XLayer', + chainId: ChainId.xLayer, + addresses: { + TRANSPARENT_PROXY_FACTORY: '0xEB0682d148e874553008730f0686ea89db7DA412', + }, +}; diff --git a/scripts/generateAddresses.ts b/scripts/generateAddresses.ts index db708a39..93a5f991 100644 --- a/scripts/generateAddresses.ts +++ b/scripts/generateAddresses.ts @@ -93,6 +93,8 @@ import { governanceConfigBob } from './configs/governance/bob'; import { bobAddresses } from './configs/networks/bob'; import { governanceConfigInk, governanceConfigInkWhiteLabel } from './configs/governance/ink'; import { governanceConfigPlasma } from './configs/governance/plasma'; +import { xLayerAddresses } from './configs/networks/xlayer'; +import { governanceConfigXlayer } from './configs/governance/xlayer'; async function main() { // cleanup ts artifacts @@ -131,6 +133,7 @@ async function main() { governanceConfigInk, governanceConfigInkWhiteLabel, governanceConfigPlasma, + governanceConfigXlayer, ].map((config) => generateGovernanceLibrary(config)), ); const v1Library = generateAaveV1(); @@ -222,6 +225,7 @@ async function main() { inkAddresses, inkWhiteLabelAddresses, plasmaAddresses, + xLayerAddresses, ].map((addresses) => generateNetworkAddresses(addresses)); const govImports = generateGovV2(); diff --git a/src/AaveV3Base.sol b/src/AaveV3Base.sol index b265a250..b427534a 100644 --- a/src/AaveV3Base.sol +++ b/src/AaveV3Base.sol @@ -448,6 +448,8 @@ library AaveV3BaseEModes { uint8 internal constant wstETH__WETH = 8; uint8 internal constant cbETH__WETH = 9; + + uint8 internal constant cbBTC__USDC_GHO = 10; } library AaveV3BaseExternalLibraries { // https://basescan.org/address/0x5e84CEe2afb7B37d2AB14722C39A7c1C26F5B0BB diff --git a/src/AaveV3EthereumHorizon.sol b/src/AaveV3EthereumHorizon.sol index cc5baec0..3482f297 100644 --- a/src/AaveV3EthereumHorizon.sol +++ b/src/AaveV3EthereumHorizon.sol @@ -211,14 +211,34 @@ library AaveV3EthereumHorizonAssets { // https://etherscan.io/address/0x87593272C06f4FC49EC2942eBda0972d2F1Ab521 address internal constant JAAA_INTEREST_RATE_STRATEGY = 0x87593272C06f4FC49EC2942eBda0972d2F1Ab521; + + // https://etherscan.io/address/0x2255718832bC9fD3bE1CaF75084F4803DA14FF01 + address internal constant VBILL_UNDERLYING = 0x2255718832bC9fD3bE1CaF75084F4803DA14FF01; + + uint8 internal constant VBILL_DECIMALS = 6; + + // https://etherscan.io/address/0xE1CfD16b8E4B1C86Bb5b7A104cfEFbc7b09326dD + address internal constant VBILL_A_TOKEN = 0xE1CfD16b8E4B1C86Bb5b7A104cfEFbc7b09326dD; + + // https://etherscan.io/address/0xEAf93Fd541f11D2617C2915D02F7fe67bCa71d4f + address internal constant VBILL_V_TOKEN = 0xEAf93Fd541f11D2617C2915D02F7fe67bCa71d4f; + + // https://etherscan.io/address/0x5ed77a9D9b7cc80E9d0D7711024AF38C2643C1c4 + address internal constant VBILL_ORACLE = 0x5ed77a9D9b7cc80E9d0D7711024AF38C2643C1c4; + + // https://etherscan.io/address/0x87593272C06f4FC49EC2942eBda0972d2F1Ab521 + address internal constant VBILL_INTEREST_RATE_STRATEGY = + 0x87593272C06f4FC49EC2942eBda0972d2F1Ab521; } library AaveV3EthereumHorizonEModes { uint8 internal constant NONE = 0; - uint8 internal constant __ = 9; + uint8 internal constant VBILL__GHO = 1; uint8 internal constant USTB__GHO = 2; + uint8 internal constant __ = 9; + uint8 internal constant USCC__GHO = 4; uint8 internal constant USYC__GHO = 6; diff --git a/src/AaveV3Polygon.sol b/src/AaveV3Polygon.sol index 8c0dbed4..85cdf204 100644 --- a/src/AaveV3Polygon.sol +++ b/src/AaveV3Polygon.sol @@ -238,6 +238,9 @@ library AaveV3PolygonAssets { // https://polygonscan.com/address/0x87A1fdc4C726c459f597282be639a045062c0E46 address internal constant USDT0_STATIC_A_TOKEN = 0x87A1fdc4C726c459f597282be639a045062c0E46; + // https://polygonscan.com/address/0x2eaD203C5C1C00612B1DdbBb20e4180dA822d6ff + address internal constant USDT0_STATA_TOKEN = 0x2eaD203C5C1C00612B1DdbBb20e4180dA822d6ff; + // https://polygonscan.com/address/0xD6DF932A45C0f255f85145f286eA0b292B21C90B address internal constant AAVE_UNDERLYING = 0xD6DF932A45C0f255f85145f286eA0b292B21C90B; diff --git a/src/GovernanceV3XLayer.sol b/src/GovernanceV3XLayer.sol new file mode 100644 index 00000000..d57c6203 --- /dev/null +++ b/src/GovernanceV3XLayer.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.0; + +// AUTOGENERATED - MANUALLY CHANGES WILL BE REVERTED BY THE GENERATOR +import {IPayloadsControllerCore} from './GovernanceV3.sol'; + +library GovernanceV3XLayer { + // https://www.oklink.com/xlayer/address/0xFdd46155fD3DA5B907AD3B9f9395366290f58097 + address internal constant CROSS_CHAIN_CONTROLLER = 0xFdd46155fD3DA5B907AD3B9f9395366290f58097; + + // https://www.oklink.com/xlayer/address/0x80e11cB895a23C901a990239E5534054C66476B5 + IPayloadsControllerCore internal constant PAYLOADS_CONTROLLER = + IPayloadsControllerCore(0x80e11cB895a23C901a990239E5534054C66476B5); + + // https://www.oklink.com/xlayer/address/0x9fE056F44510F970d724adA16903ba5D75CC4742 + address internal constant PC_DATA_HELPER = 0x9fE056F44510F970d724adA16903ba5D75CC4742; + + // https://www.oklink.com/xlayer/address/0xD6727ec503A8d0C10a0EAA4e76eAf9A628188b25 + address internal constant GRANULAR_GUARDIAN = 0xD6727ec503A8d0C10a0EAA4e76eAf9A628188b25; + + // https://www.oklink.com/xlayer/address/0xeB55A63bf9993d80c86D47f819B5eC958c7C127B + address internal constant GOVERNANCE_GUARDIAN = 0xeB55A63bf9993d80c86D47f819B5eC958c7C127B; + + // https://www.oklink.com/xlayer/address/0x8a86927E3cf7309D74E504EBDb866903DBD11a1f + address internal constant CL_EMERGENCY_ORACLE = 0x8a86927E3cf7309D74E504EBDb866903DBD11a1f; + + // https://www.oklink.com/xlayer/address/0xE2E8Badc5d50f8a6188577B89f50701cDE2D4e19 + address internal constant EXECUTOR_LVL_1 = 0xE2E8Badc5d50f8a6188577B89f50701cDE2D4e19; +} diff --git a/src/MiscXLayer.sol b/src/MiscXLayer.sol new file mode 100644 index 00000000..088aa7cc --- /dev/null +++ b/src/MiscXLayer.sol @@ -0,0 +1,8 @@ +// AUTOGENERATED - MANUALLY CHANGES WILL BE REVERTED BY THE GENERATOR +// SPDX-License-Identifier: MIT +pragma solidity >=0.6.0; + +library MiscXLayer { + // https://www.oklink.com/xlayer/address/0xEB0682d148e874553008730f0686ea89db7DA412 + address internal constant TRANSPARENT_PROXY_FACTORY = 0xEB0682d148e874553008730f0686ea89db7DA412; +} diff --git a/src/ts/AaveAddressBook.ts b/src/ts/AaveAddressBook.ts index fda4a91f..9ab22e40 100644 --- a/src/ts/AaveAddressBook.ts +++ b/src/ts/AaveAddressBook.ts @@ -20,6 +20,7 @@ export * as GovernanceV3Bob from './GovernanceV3Bob'; export * as GovernanceV3Ink from './GovernanceV3Ink'; export * as GovernanceV3InkWhitelabel from './GovernanceV3InkWhitelabel'; export * as GovernanceV3Plasma from './GovernanceV3Plasma'; +export * as GovernanceV3XLayer from './GovernanceV3XLayer'; export * as AaveV1 from './AaveV1'; export * as AaveV2EthereumAMM from './AaveV2EthereumAMM'; export * as AaveV2EthereumArc from './AaveV2EthereumArc'; @@ -80,6 +81,7 @@ export * as MiscBob from './MiscBob'; export * as MiscInk from './MiscInk'; export * as MiscInkWhitelabel from './MiscInkWhitelabel'; export * as MiscPlasma from './MiscPlasma'; +export * as MiscXLayer from './MiscXLayer'; export * as AaveGovernanceV2 from './AaveGovernanceV2'; export * as AaveSafetyModule from './AaveSafetyModule'; export * as GhoEthereum from './GhoEthereum'; diff --git a/src/ts/AaveV3Base.ts b/src/ts/AaveV3Base.ts index 88d956d0..330c90b3 100644 --- a/src/ts/AaveV3Base.ts +++ b/src/ts/AaveV3Base.ts @@ -350,6 +350,19 @@ export const E_MODES = { liquidationThreshold: 9500, liquidationBonus: 10200, }, + '10': { + label: 'cbBTC / USDC,GHO', + collateralBitmap: '64', + collateralAssets: ['0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf'], + borrowableBitmap: '272', + borrowableAssets: [ + '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + '0x6Bb7a212910682DCFdbd5BCBb3e28FB4E8da10Ee', + ], + ltv: 8000, + liquidationThreshold: 8300, + liquidationBonus: 10400, + }, } as const; export const EXTERNAL_LIBRARIES = { FLASHLOAN_LOGIC: '0x5e84CEe2afb7B37d2AB14722C39A7c1C26F5B0BB', diff --git a/src/ts/AaveV3Ethereum.ts b/src/ts/AaveV3Ethereum.ts index 538630f2..9c4483a4 100644 --- a/src/ts/AaveV3Ethereum.ts +++ b/src/ts/AaveV3Ethereum.ts @@ -1057,8 +1057,8 @@ export const E_MODES = { ], borrowableBitmap: '1073741824', borrowableAssets: ['0x4c9EDD5852cd905f086C759E8383e09bff1E68B3'], - ltv: 9360, - liquidationThreshold: 9560, + ltv: 9400, + liquidationThreshold: 9600, liquidationBonus: 10200, }, } as const; diff --git a/src/ts/AaveV3EthereumHorizon.ts b/src/ts/AaveV3EthereumHorizon.ts index e9047171..7cf043df 100644 --- a/src/ts/AaveV3EthereumHorizon.ts +++ b/src/ts/AaveV3EthereumHorizon.ts @@ -130,16 +130,25 @@ export const ASSETS = { INTEREST_RATE_STRATEGY: '0x87593272C06f4FC49EC2942eBda0972d2F1Ab521', ORACLE: '0xF77f2537dba4ffD60f77fACdfB2c1706364fA03d', }, + VBILL: { + decimals: 6, + id: 8, + UNDERLYING: '0x2255718832bC9fD3bE1CaF75084F4803DA14FF01', + A_TOKEN: '0xE1CfD16b8E4B1C86Bb5b7A104cfEFbc7b09326dD', + V_TOKEN: '0xEAf93Fd541f11D2617C2915D02F7fe67bCa71d4f', + INTEREST_RATE_STRATEGY: '0x87593272C06f4FC49EC2942eBda0972d2F1Ab521', + ORACLE: '0x5ed77a9D9b7cc80E9d0D7711024AF38C2643C1c4', + }, } as const; export const E_MODES = { '1': { - label: ' / ', - collateralBitmap: '0', - collateralAssets: [], - borrowableBitmap: '0', - borrowableAssets: [], - ltv: 8300, - liquidationThreshold: 8800, + label: 'VBILL / GHO', + collateralBitmap: '256', + collateralAssets: ['0x2255718832bC9fD3bE1CaF75084F4803DA14FF01'], + borrowableBitmap: '1', + borrowableAssets: ['0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f'], + ltv: 8400, + liquidationThreshold: 8900, liquidationBonus: 10300, }, '2': { diff --git a/src/ts/AaveV3Plasma.ts b/src/ts/AaveV3Plasma.ts index c9309d42..81d709ca 100644 --- a/src/ts/AaveV3Plasma.ts +++ b/src/ts/AaveV3Plasma.ts @@ -244,9 +244,9 @@ export const E_MODES = { '0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb', '0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34', ], - ltv: 8640, - liquidationThreshold: 8840, - liquidationBonus: 10460, + ltv: 8740, + liquidationThreshold: 8940, + liquidationBonus: 10430, }, '6': { label: 'PT_USDe_15JAN2026 / USDe', @@ -254,9 +254,9 @@ export const E_MODES = { collateralAssets: ['0x93B544c330F60A2aa05ceD87aEEffB8D38FD8c9a'], borrowableBitmap: '2', borrowableAssets: ['0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34'], - ltv: 8720, - liquidationThreshold: 8920, - liquidationBonus: 10360, + ltv: 8820, + liquidationThreshold: 9020, + liquidationBonus: 10330, }, '7': { label: 'PT_sUSDE_15JAN2026 / USDT0,USDe', @@ -267,9 +267,9 @@ export const E_MODES = { '0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb', '0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34', ], - ltv: 8490, - liquidationThreshold: 8690, - liquidationBonus: 10600, + ltv: 8590, + liquidationThreshold: 8790, + liquidationBonus: 10570, }, '8': { label: 'PT_sUSDE_15JAN2026 / USDe', @@ -277,9 +277,9 @@ export const E_MODES = { collateralAssets: ['0x02FCC4989B4C9D435b7ceD3fE1Ba4CF77BBb5Dd8'], borrowableBitmap: '2', borrowableAssets: ['0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34'], - ltv: 8550, - liquidationThreshold: 8750, - liquidationBonus: 10490, + ltv: 8650, + liquidationThreshold: 8850, + liquidationBonus: 10450, }, '9': { label: 'wrsETH / WETH,wstETH', diff --git a/src/ts/AaveV3Polygon.ts b/src/ts/AaveV3Polygon.ts index a17476e3..95dde5c9 100644 --- a/src/ts/AaveV3Polygon.ts +++ b/src/ts/AaveV3Polygon.ts @@ -159,6 +159,7 @@ export const ASSETS = { INTEREST_RATE_STRATEGY: '0x56076f960980d453b5B749CB6A1c4D2E4e138B1A', ORACLE: '0x01Aba1Fe7D72a3490bEef7CD0C09e1Ba2dD88D83', STATIC_A_TOKEN: '0x87A1fdc4C726c459f597282be639a045062c0E46', + STATA_TOKEN: '0x2eaD203C5C1C00612B1DdbBb20e4180dA822d6ff', }, AAVE: { decimals: 18, diff --git a/src/ts/GovernanceV3XLayer.ts b/src/ts/GovernanceV3XLayer.ts new file mode 100644 index 00000000..30c1f5a6 --- /dev/null +++ b/src/ts/GovernanceV3XLayer.ts @@ -0,0 +1,22 @@ +// https://www.oklink.com/xlayer/address/0xFdd46155fD3DA5B907AD3B9f9395366290f58097 +export const CROSS_CHAIN_CONTROLLER = '0xFdd46155fD3DA5B907AD3B9f9395366290f58097'; + +// IPayloadsControllerCore https://www.oklink.com/xlayer/address/0x80e11cB895a23C901a990239E5534054C66476B5 +export const PAYLOADS_CONTROLLER = '0x80e11cB895a23C901a990239E5534054C66476B5'; + +// https://www.oklink.com/xlayer/address/0x9fE056F44510F970d724adA16903ba5D75CC4742 +export const PC_DATA_HELPER = '0x9fE056F44510F970d724adA16903ba5D75CC4742'; + +// https://www.oklink.com/xlayer/address/0xD6727ec503A8d0C10a0EAA4e76eAf9A628188b25 +export const GRANULAR_GUARDIAN = '0xD6727ec503A8d0C10a0EAA4e76eAf9A628188b25'; + +// https://www.oklink.com/xlayer/address/0xeB55A63bf9993d80c86D47f819B5eC958c7C127B +export const GOVERNANCE_GUARDIAN = '0xeB55A63bf9993d80c86D47f819B5eC958c7C127B'; + +// https://www.oklink.com/xlayer/address/0x8a86927E3cf7309D74E504EBDb866903DBD11a1f +export const CL_EMERGENCY_ORACLE = '0x8a86927E3cf7309D74E504EBDb866903DBD11a1f'; + +// https://www.oklink.com/xlayer/address/0xE2E8Badc5d50f8a6188577B89f50701cDE2D4e19 +export const EXECUTOR_LVL_1 = '0xE2E8Badc5d50f8a6188577B89f50701cDE2D4e19'; + +export const CHAIN_ID = 196; diff --git a/src/ts/MiscXLayer.ts b/src/ts/MiscXLayer.ts new file mode 100644 index 00000000..e90a4fdc --- /dev/null +++ b/src/ts/MiscXLayer.ts @@ -0,0 +1,5 @@ +// AUTOGENERATED - MANUALLY CHANGES WILL BE REVERTED BY THE GENERATOR +// https://www.oklink.com/xlayer/address/0xEB0682d148e874553008730f0686ea89db7DA412 +export const TRANSPARENT_PROXY_FACTORY = '0xEB0682d148e874553008730f0686ea89db7DA412'; + +export const CHAIN_ID = 196; diff --git a/tests/cache/verified.json b/tests/cache/verified.json index 66aca56e..555d0c2c 100644 --- a/tests/cache/verified.json +++ b/tests/cache/verified.json @@ -3911,6 +3911,18 @@ }, "0x185477906B46D9b8DE0DEB73A1bBfb87b5b51BC3": { "name": "SupplyLogic" + }, + "0x2255718832bC9fD3bE1CaF75084F4803DA14FF01": { + "name": "ERC1967Proxy" + }, + "0xE1CfD16b8E4B1C86Bb5b7A104cfEFbc7b09326dD": { + "name": "InitializableImmutableAdminUpgradeabilityProxy" + }, + "0xEAf93Fd541f11D2617C2915D02F7fe67bCa71d4f": { + "name": "InitializableImmutableAdminUpgradeabilityProxy" + }, + "0x5ed77a9D9b7cc80E9d0D7711024AF38C2643C1c4": { + "name": "EACAggregatorProxy" } }, "10": { @@ -8038,6 +8050,9 @@ }, "0x9f6aA2aB14bFF53e4b79A81ce1554F1DFdbb6608": { "name": "RiskOracle" + }, + "0x2eaD203C5C1C00612B1DdbBb20e4180dA822d6ff": { + "name": "TransparentUpgradeableProxy" } }, "146": { @@ -8429,6 +8444,32 @@ "name": "RewardsSteward" } }, + "196": { + "0xeB55A63bf9993d80c86D47f819B5eC958c7C127B": { + "name": "SafeL2" + }, + "0xEB0682d148e874553008730f0686ea89db7DA412": { + "name": "TransparentProxyFactory" + }, + "0xFdd46155fD3DA5B907AD3B9f9395366290f58097": { + "name": "CrossChainControllerWithEmergencyMode" + }, + "0x80e11cB895a23C901a990239E5534054C66476B5": { + "name": "PayloadsController" + }, + "0x9fE056F44510F970d724adA16903ba5D75CC4742": { + "name": "PayloadsControllerDataHelper" + }, + "0xD6727ec503A8d0C10a0EAA4e76eAf9A628188b25": { + "name": "GranularGuardianAccessControl" + }, + "0x8a86927E3cf7309D74E504EBDb866903DBD11a1f": { + "name": "EACAggregatorProxy" + }, + "0xE2E8Badc5d50f8a6188577B89f50701cDE2D4e19": { + "name": "Executor" + } + }, "324": { "0x800813f4714BC7A0a95310e3fB9e4f18872CA92C": { "name": "TransparentUpgradeableProxy" diff --git a/tests/verification.spec.ts b/tests/verification.spec.ts index ca10ce5e..72d5bee4 100644 --- a/tests/verification.spec.ts +++ b/tests/verification.spec.ts @@ -1,11 +1,11 @@ -import {ChainId, ChainList, getExplorer, getSourceCode} from '@bgd-labs/toolbox'; -import {describe, expect, it} from 'vitest'; -import {flattenedAddresses, ListItem} from '../ui/src/utils/getAddresses'; +import { BlockscoutStyleSourceCode, ChainId, ChainList, EtherscanStyleSourceCode, getExplorer, getSourceCode } from '@bgd-labs/toolbox'; +import { describe, expect, it } from 'vitest'; +import { flattenedAddresses, ListItem } from '../ui/src/utils/getAddresses'; import verified from './cache/verified.json'; -import {writeFileSync} from 'fs'; -import {Address, Hex, PublicClient, zeroAddress} from 'viem'; -import {getCode} from 'viem/actions'; -import {getClient} from '../scripts/clients'; +import { writeFileSync } from 'fs'; +import { Address, Hex, PublicClient, zeroAddress } from 'viem'; +import { getCode } from 'viem/actions'; +import { getClient } from '../scripts/clients'; const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY as string; @@ -50,7 +50,7 @@ async function verifyProxy(item: ListItem) { }), }); - const {status, result} = await request.json(); + const { status, result } = await request.json(); await sleep(200); if (status === '1') checkProxyVerification(item, result); } catch (e) { @@ -61,12 +61,34 @@ async function verifyProxy(item: ListItem) { async function checkVerified(item: ListItem) { try { - const source = await getSourceCode({ + const source: BlockscoutStyleSourceCode | EtherscanStyleSourceCode = await getSourceCode({ chainId: item.chainId, apiKey: process.env.ETHERSCAN_API_KEY, address: item.value as Address, apiUrl: process.env.EXPLORER_PROXY, }); + + if (item.chainId === ChainId.xLayer) { + // TODO: check for implementation then check if it is also verified + if (source) { + + if (source.Implementation !== '') { + const implementationSource = await getSourceCode({ + chainId: item.chainId, + apiKey: process.env.ETHERSCAN_API_KEY, + address: source.Implementation as Address, + }); + if (implementationSource) { + return { status: '1', result: implementationSource }; + } else { + return { status: '0', result: new Error('Implementation not found') }; + } + } else { + return { status: '1', result: source }; + } + } + } + if (!source.ContractName) { // etherscan returns proxy contracts as non verified if the proxy is not manually assigned // therefore we try to manually assign it @@ -74,7 +96,10 @@ async function checkVerified(item: ListItem) { await verifyProxy(item); } } - return {status: '1', result: source}; + + + + return { status: '1', result: source }; } catch (e) { console.error(e); return { status: '0', result: e }; @@ -103,7 +128,7 @@ const knownErrors = { }, 5000: { '0x14816fC7f443A9C834d30eeA64daD20C4f56fBCD': true, // gnosis safe, not sure why its not verified on etherscan (it is on routescan) - }, + } }; describe('verification', { timeout: 500_000 }, () => { @@ -116,7 +141,7 @@ describe('verification', { timeout: 500_000 }, () => { (!verified[item.chainId]?.[item.value] || verified[item.chainId]?.[item.value] === zeroAddress), ); - const errors: {item: ListItem}[] = []; + const errors: { item: ListItem }[] = []; // unique set of addresses checked on this iteration // used to prevent double checking the same address const checked = new Set(); @@ -131,10 +156,10 @@ describe('verification', { timeout: 500_000 }, () => { if (hasCode) { const { status, result } = (await checkVerified(item)) as { status: string; - result: {ContractName: string}; + result: { ContractName: string }; }; if (status !== '1' || !result.ContractName) { - errors.push({item}); + errors.push({ item }); console.log(item.value, result); } else { if (!verified[item.chainId]) verified[item.chainId] = {}; diff --git a/tokenlist.json b/tokenlist.json index 23dc6d5f..e65b68d8 100644 --- a/tokenlist.json +++ b/tokenlist.json @@ -3552,6 +3552,20 @@ "underlyingAToken": "0x6ab707Aca953eDAeFBc4fD23bA73294241490620" } }, + { + "chainId": 137, + "address": "0x2eaD203C5C1C00612B1DdbBb20e4180dA822d6ff", + "name": "Wrapped Aave Polygon USDT", + "decimals": 6, + "symbol": "waPolUSDT", + "tags": ["aaveV3", "stataToken"], + "logoURI": "https://raw.githubusercontent.com/bgd-labs/web3-icons/main/icons/full/statausdt0.svg", + "extensions": { + "pool": "0x794a61358D6845594F94dc1DB02A252b5b4814aD", + "underlying": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F", + "underlyingAToken": "0x6ab707Aca953eDAeFBc4fD23bA73294241490620" + } + }, { "chainId": 137, "address": "0xf329e36C7bF6E5E86ce2150875a84Ce77f477375", @@ -8270,6 +8284,26 @@ "underlying": "0x5a0F93D040De44e78F251b03c43be9CF317Dcf64" } }, + { + "chainId": 1, + "address": "0x2255718832bC9fD3bE1CaF75084F4803DA14FF01", + "name": "VanEck Treasury Fund", + "decimals": 6, + "symbol": "VBILL", + "tags": ["underlying"] + }, + { + "chainId": 1, + "address": "0xE1CfD16b8E4B1C86Bb5b7A104cfEFbc7b09326dD", + "name": "Aave Horizon RWA VBILL", + "decimals": 6, + "symbol": "aHorRwaVBILL", + "tags": ["aTokenV3", "aaveV3"], + "extensions": { + "pool": "0xAe05Cd22df81871bc7cC2a04BeCfb516bFe332C8", + "underlying": "0x2255718832bC9fD3bE1CaF75084F4803DA14FF01" + } + }, { "chainId": 59144, "address": "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f", @@ -8842,7 +8876,8 @@ "name": "Kraken Wrapped Bitcoin", "decimals": 8, "symbol": "kBTC", - "tags": ["underlying"] + "tags": ["underlying"], + "logoURI": "https://raw.githubusercontent.com/bgd-labs/web3-icons/main/icons/full/kbtc.svg" }, { "chainId": 57073, @@ -8851,6 +8886,7 @@ "decimals": 8, "symbol": "aInkWlKBTC", "tags": ["aTokenV3", "aaveV3"], + "logoURI": "https://raw.githubusercontent.com/bgd-labs/web3-icons/main/icons/full/akbtc.svg", "extensions": { "pool": "0x2816cf15F6d2A220E789aA011D5EE4eB6c47FEbA", "underlying": "0x73E0C0d45E048D25Fc26Fa3159b0aA04BfA4Db98" @@ -9034,7 +9070,8 @@ "name": "XAUt0", "decimals": 6, "symbol": "XAUt0", - "tags": ["underlying"] + "tags": ["underlying"], + "logoURI": "https://raw.githubusercontent.com/bgd-labs/web3-icons/main/icons/full/xaut0.svg" }, { "chainId": 9745, @@ -9043,6 +9080,7 @@ "decimals": 6, "symbol": "aPlaXAUt0", "tags": ["aTokenV3", "aaveV3"], + "logoURI": "https://raw.githubusercontent.com/bgd-labs/web3-icons/main/icons/full/axaut0.svg", "extensions": { "pool": "0x925a2A7214Ed92428B5b1B090F80b25700095e12", "underlying": "0x1B64B9025EEbb9A6239575dF9Ea4b9Ac46D4d193" @@ -9055,6 +9093,7 @@ "decimals": 6, "symbol": "waPlaXAUt0", "tags": ["aaveV3", "stataToken"], + "logoURI": "https://raw.githubusercontent.com/bgd-labs/web3-icons/main/icons/full/stataxaut0.svg", "extensions": { "pool": "0x925a2A7214Ed92428B5b1B090F80b25700095e12", "underlying": "0x1B64B9025EEbb9A6239575dF9Ea4b9Ac46D4d193", @@ -9290,6 +9329,6 @@ } } ], - "version": { "major": 3, "minor": 0, "patch": 143 }, - "timestamp": "2025-10-27T13:51:27.646Z" + "version": { "major": 3, "minor": 0, "patch": 145 }, + "timestamp": "2025-11-04T11:24:56.277Z" }