diff --git a/scripts/generator/assetsLibraryGenerator.ts b/scripts/generator/assetsLibraryGenerator.ts index 1b5ad1ae..afa15135 100644 --- a/scripts/generator/assetsLibraryGenerator.ts +++ b/scripts/generator/assetsLibraryGenerator.ts @@ -52,6 +52,7 @@ export function fixSymbol(symbol: string, _underlying: string) { return 'BPT_BAL_WETH'; case '0xaf88d065e77c8cc2239327c5edb3a432268e5831': case '0x0b2c639c533813f4aa9d7837caf62653d097ff85': + case '0x3c499c542cef5e3811e1192ce70d8cc03d5c3359': // polygon return 'USDCn'; } return symbol.replace('-', '_').replace('.', '').replace(' ', '_').replace('1', 'ONE_'); diff --git a/scripts/generator/clients.ts b/scripts/generator/clients.ts index f65d4f2c..99a383bd 100644 --- a/scripts/generator/clients.ts +++ b/scripts/generator/clients.ts @@ -26,10 +26,7 @@ import {ChainId} from './chains'; export const RPC_PROVIDERS = { [ChainId.mainnet]: createPublicClient({ chain: mainnet, - transport: fallback([ - http('https://ethereum.publicnode.com'), - http('https://cloudflare-eth.com'), - ]), + transport: http(process.env.RPC_MAINNET), batch: { multicall: true, }, @@ -53,7 +50,7 @@ export const RPC_PROVIDERS = { }), [ChainId.polygon]: createPublicClient({ chain: polygon, - transport: http(), + transport: http(process.env.RPC_POLYGON), batch: { multicall: true, }, @@ -67,14 +64,14 @@ export const RPC_PROVIDERS = { }), [ChainId.avalanche]: createPublicClient({ chain: avalanche, - transport: http(), + transport: http(process.env.RPC_AVALANCHE), batch: { multicall: true, }, }), [ChainId.arbitrum_one]: createPublicClient({ chain: arbitrum, - transport: http(), + transport: http(process.env.RPC_ARBITRUM), batch: { multicall: true, }, @@ -95,17 +92,14 @@ export const RPC_PROVIDERS = { }), [ChainId.optimism]: createPublicClient({ chain: optimism, - transport: fallback([ - http('https://mainnet.optimism.io'), - http('https://optimism.publicnode.com'), - ]), + transport: http(process.env.RPC_OPTIMISM), batch: { multicall: true, }, }), [ChainId.optimism_goerli]: createPublicClient({ chain: optimismGoerli, - transport: http(), + transport: http('https://optimism-goerli.publicnode.com '), batch: { multicall: true, }, diff --git a/src/AaveV3Arbitrum.sol b/src/AaveV3Arbitrum.sol index 18730f16..11da83fb 100644 --- a/src/AaveV3Arbitrum.sol +++ b/src/AaveV3Arbitrum.sol @@ -168,9 +168,9 @@ library AaveV3ArbitrumAssets { // https://arbiscan.io/address/0x50834F3163758fcC1Df9973b6e91f0F0F0434aD3 address internal constant USDC_ORACLE = 0x50834F3163758fcC1Df9973b6e91f0F0F0434aD3; - // https://arbiscan.io/address/0x53b13a6D43F647D788411Abfd28D229C274AfBF9 + // https://arbiscan.io/address/0x642a8DAcC59b73491Dcaa3BCeF046D660901fCc1 address internal constant USDC_INTEREST_RATE_STRATEGY = - 0x53b13a6D43F647D788411Abfd28D229C274AfBF9; + 0x642a8DAcC59b73491Dcaa3BCeF046D660901fCc1; // https://arbiscan.io/address/0x0Bc9E52051f553E75550CA22C196bf132c52Cf0B address internal constant USDC_STATA_TOKEN = 0x0Bc9E52051f553E75550CA22C196bf132c52Cf0B; diff --git a/src/AaveV3Base.sol b/src/AaveV3Base.sol index 10b1e28d..f5fbaf3d 100644 --- a/src/AaveV3Base.sol +++ b/src/AaveV3Base.sol @@ -169,9 +169,9 @@ library AaveV3BaseAssets { // https://basescan.org/address/0x7e860098F58bBFC8648a4311b374B1D669a2bc6B address internal constant USDbC_ORACLE = 0x7e860098F58bBFC8648a4311b374B1D669a2bc6B; - // https://basescan.org/address/0x8c63A1b0721D5776Ae5ed1Be8dc7f2A1e7312Ed3 + // https://basescan.org/address/0xDBea12F69D3Fcb4Be9FD14dd450AAe2B2a3d4de7 address internal constant USDbC_INTEREST_RATE_STRATEGY = - 0x8c63A1b0721D5776Ae5ed1Be8dc7f2A1e7312Ed3; + 0xDBea12F69D3Fcb4Be9FD14dd450AAe2B2a3d4de7; // https://basescan.org/address/0x6fCe2756794128B1771324caA860965801DCbCdB address internal constant USDbC_STATA_TOKEN = 0x6fCe2756794128B1771324caA860965801DCbCdB; @@ -196,6 +196,27 @@ library AaveV3BaseAssets { // https://basescan.org/address/0x2f51b00eC4912874DFDBd8dC3C8e390c21e77aF9 address internal constant wstETH_INTEREST_RATE_STRATEGY = 0x2f51b00eC4912874DFDBd8dC3C8e390c21e77aF9; + + // https://basescan.org/address/0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 + address internal constant USDC_UNDERLYING = 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913; + + uint8 internal constant USDC_DECIMALS = 6; + + // https://basescan.org/address/0x4e65fE4DbA92790696d040ac24Aa414708F5c0AB + address internal constant USDC_A_TOKEN = 0x4e65fE4DbA92790696d040ac24Aa414708F5c0AB; + + // https://basescan.org/address/0x59dca05b6c26dbd64b5381374aAaC5CD05644C28 + address internal constant USDC_V_TOKEN = 0x59dca05b6c26dbd64b5381374aAaC5CD05644C28; + + // https://basescan.org/address/0x03506214379aA86ad1176af71c260278cfa10B38 + address internal constant USDC_S_TOKEN = 0x03506214379aA86ad1176af71c260278cfa10B38; + + // https://basescan.org/address/0x7e860098F58bBFC8648a4311b374B1D669a2bc6B + address internal constant USDC_ORACLE = 0x7e860098F58bBFC8648a4311b374B1D669a2bc6B; + + // https://basescan.org/address/0x50eC656Ba67885D0937b5f549f3104ea15E75588 + address internal constant USDC_INTEREST_RATE_STRATEGY = + 0x50eC656Ba67885D0937b5f549f3104ea15E75588; } library AaveV3BaseEModes { diff --git a/src/AaveV3Gnosis.sol b/src/AaveV3Gnosis.sol index 73645d8b..9776b2ea 100644 --- a/src/AaveV3Gnosis.sol +++ b/src/AaveV3Gnosis.sol @@ -156,8 +156,8 @@ library AaveV3GnosisAssets { // https://blockscout.com/xdai/mainnet/address/0x22441d81416430A54336aB28765abd31a792Ad37 address internal constant GNO_ORACLE = 0x22441d81416430A54336aB28765abd31a792Ad37; - // https://blockscout.com/xdai/mainnet/address/0x9E57695Dab0DCdb42BC220ff1E9eb2e22a31209b - address internal constant GNO_INTEREST_RATE_STRATEGY = 0x9E57695Dab0DCdb42BC220ff1E9eb2e22a31209b; + // https://blockscout.com/xdai/mainnet/address/0x777fDAB3C03aA63d7d7CbCbaB22724cEe50F1731 + address internal constant GNO_INTEREST_RATE_STRATEGY = 0x777fDAB3C03aA63d7d7CbCbaB22724cEe50F1731; // https://blockscout.com/xdai/mainnet/address/0x2D737e2B0e175f05D0904C208d6C4e40da570f65 address internal constant GNO_STATA_TOKEN = 0x2D737e2B0e175f05D0904C208d6C4e40da570f65; diff --git a/src/AaveV3Optimism.sol b/src/AaveV3Optimism.sol index 97b2558e..de8a2e44 100644 --- a/src/AaveV3Optimism.sol +++ b/src/AaveV3Optimism.sol @@ -168,9 +168,9 @@ library AaveV3OptimismAssets { // https://explorer.optimism.io/address/0x16a9FA2FDa030272Ce99B29CF780dFA30361E0f3 address internal constant USDC_ORACLE = 0x16a9FA2FDa030272Ce99B29CF780dFA30361E0f3; - // https://explorer.optimism.io/address/0x3832311560d3B457E9cC35e5b8e06EB167D8c17D + // https://explorer.optimism.io/address/0x769EbC5106bF09D9A665CCb691e1907612b57F16 address internal constant USDC_INTEREST_RATE_STRATEGY = - 0x3832311560d3B457E9cC35e5b8e06EB167D8c17D; + 0x769EbC5106bF09D9A665CCb691e1907612b57F16; // https://explorer.optimism.io/address/0x9F281eb58fd98ad98EDe0fc4C553AD4D73e7Ca2C address internal constant USDC_STATA_TOKEN = 0x9F281eb58fd98ad98EDe0fc4C553AD4D73e7Ca2C; @@ -430,9 +430,9 @@ library AaveV3OptimismAssets { // https://explorer.optimism.io/address/0x16a9FA2FDa030272Ce99B29CF780dFA30361E0f3 address internal constant USDCn_ORACLE = 0x16a9FA2FDa030272Ce99B29CF780dFA30361E0f3; - // https://explorer.optimism.io/address/0x5eE947d920643cCd3e2c54eAAd8F260FC8Add3b4 + // https://explorer.optimism.io/address/0xB57Ff919A953424d6B143ABfD6740A225eab953e address internal constant USDCn_INTEREST_RATE_STRATEGY = - 0x5eE947d920643cCd3e2c54eAAd8F260FC8Add3b4; + 0xB57Ff919A953424d6B143ABfD6740A225eab953e; } library AaveV3OptimismEModes { diff --git a/src/AaveV3Polygon.sol b/src/AaveV3Polygon.sol index 24c5ed98..e3412f35 100644 --- a/src/AaveV3Polygon.sol +++ b/src/AaveV3Polygon.sol @@ -165,9 +165,9 @@ library AaveV3PolygonAssets { // https://polygonscan.com/address/0xfE4A8cc5b5B2366C1B58Bea3858e81843581b2F7 address internal constant USDC_ORACLE = 0xfE4A8cc5b5B2366C1B58Bea3858e81843581b2F7; - // https://polygonscan.com/address/0x9a158802cD924747EF336cA3F9DE3bdb60Cf43D3 + // https://polygonscan.com/address/0x588b62C84533232E3A881e096E5D639Fa754F093 address internal constant USDC_INTEREST_RATE_STRATEGY = - 0x9a158802cD924747EF336cA3F9DE3bdb60Cf43D3; + 0x588b62C84533232E3A881e096E5D639Fa754F093; // https://polygonscan.com/address/0x1017F4a86Fc3A3c824346d0b8C5e96A5029bDAf9 address internal constant USDC_STATA_TOKEN = 0x1017F4a86Fc3A3c824346d0b8C5e96A5029bDAf9; @@ -576,6 +576,27 @@ library AaveV3PolygonAssets { // https://polygonscan.com/address/0x5274453F4CD5dD7280011a1Cca3B9e1b78EC59A6 address internal constant wstETH_STATA_TOKEN = 0x5274453F4CD5dD7280011a1Cca3B9e1b78EC59A6; + + // https://polygonscan.com/address/0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359 + address internal constant USDCn_UNDERLYING = 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359; + + uint8 internal constant USDCn_DECIMALS = 6; + + // https://polygonscan.com/address/0xA4D94019934D8333Ef880ABFFbF2FDd611C762BD + address internal constant USDCn_A_TOKEN = 0xA4D94019934D8333Ef880ABFFbF2FDd611C762BD; + + // https://polygonscan.com/address/0xE701126012EC0290822eEA17B794454d1AF8b030 + address internal constant USDCn_V_TOKEN = 0xE701126012EC0290822eEA17B794454d1AF8b030; + + // https://polygonscan.com/address/0xc889e9f8370D14A428a9857205d99BFdB400b757 + address internal constant USDCn_S_TOKEN = 0xc889e9f8370D14A428a9857205d99BFdB400b757; + + // https://polygonscan.com/address/0xfE4A8cc5b5B2366C1B58Bea3858e81843581b2F7 + address internal constant USDCn_ORACLE = 0xfE4A8cc5b5B2366C1B58Bea3858e81843581b2F7; + + // https://polygonscan.com/address/0x53b13a6D43F647D788411Abfd28D229C274AfBF9 + address internal constant USDCn_INTEREST_RATE_STRATEGY = + 0x53b13a6D43F647D788411Abfd28D229C274AfBF9; } library AaveV3PolygonEModes { diff --git a/src/ts/AaveV3Arbitrum.ts b/src/ts/AaveV3Arbitrum.ts index 20371e06..e691ed76 100644 --- a/src/ts/AaveV3Arbitrum.ts +++ b/src/ts/AaveV3Arbitrum.ts @@ -114,7 +114,7 @@ export const ASSETS = { A_TOKEN: '0x625E7708f30cA75bfd92586e17077590C60eb4cD', S_TOKEN: '0x307ffe186F84a3bc2613D1eA417A5737D69A7007', V_TOKEN: '0xFCCf3cAbbe80101232d343252614b6A3eE81C989', - INTEREST_RATE_STRATEGY: '0x53b13a6D43F647D788411Abfd28D229C274AfBF9', + INTEREST_RATE_STRATEGY: '0x642a8DAcC59b73491Dcaa3BCeF046D660901fCc1', ORACLE: '0x50834F3163758fcC1Df9973b6e91f0F0F0434aD3', STATA_TOKEN: '0x0Bc9E52051f553E75550CA22C196bf132c52Cf0B', }, diff --git a/src/ts/AaveV3Base.ts b/src/ts/AaveV3Base.ts index 2d26151c..e72c6801 100644 --- a/src/ts/AaveV3Base.ts +++ b/src/ts/AaveV3Base.ts @@ -114,7 +114,7 @@ export const ASSETS = { A_TOKEN: '0x0a1d576f3eFeF75b330424287a95A366e8281D54', S_TOKEN: '0xBBaDd47fbaFa9dE717FE203e4707DEB893C64654', V_TOKEN: '0x7376b2F323dC56fCd4C191B34163ac8a84702DAB', - INTEREST_RATE_STRATEGY: '0x8c63A1b0721D5776Ae5ed1Be8dc7f2A1e7312Ed3', + INTEREST_RATE_STRATEGY: '0xDBea12F69D3Fcb4Be9FD14dd450AAe2B2a3d4de7', ORACLE: '0x7e860098F58bBFC8648a4311b374B1D669a2bc6B', STATA_TOKEN: '0x6fCe2756794128B1771324caA860965801DCbCdB', }, @@ -128,6 +128,16 @@ export const ASSETS = { ORACLE: '0x945fD405773973d286De54E44649cc0d9e264F78', STATA_TOKEN: '0x0000000000000000000000000000000000000000', }, + USDC: { + decimals: 6, + UNDERLYING: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', + A_TOKEN: '0x4e65fE4DbA92790696d040ac24Aa414708F5c0AB', + S_TOKEN: '0x03506214379aA86ad1176af71c260278cfa10B38', + V_TOKEN: '0x59dca05b6c26dbd64b5381374aAaC5CD05644C28', + INTEREST_RATE_STRATEGY: '0x50eC656Ba67885D0937b5f549f3104ea15E75588', + ORACLE: '0x7e860098F58bBFC8648a4311b374B1D669a2bc6B', + STATA_TOKEN: '0x0000000000000000000000000000000000000000', + }, } as const; export const E_MODES = { NONE: 0, diff --git a/src/ts/AaveV3Gnosis.ts b/src/ts/AaveV3Gnosis.ts index 31c47296..983b8014 100644 --- a/src/ts/AaveV3Gnosis.ts +++ b/src/ts/AaveV3Gnosis.ts @@ -102,7 +102,7 @@ export const ASSETS = { A_TOKEN: '0xA1Fa064A85266E2Ca82DEe5C5CcEC84DF445760e', S_TOKEN: '0x1A126F613D7705E59ADb39909b25E1223aDF05dd', V_TOKEN: '0xBc59E99198DbA71985A66E1713cC89FFEC53f7FC', - INTEREST_RATE_STRATEGY: '0x9E57695Dab0DCdb42BC220ff1E9eb2e22a31209b', + INTEREST_RATE_STRATEGY: '0x777fDAB3C03aA63d7d7CbCbaB22724cEe50F1731', ORACLE: '0x22441d81416430A54336aB28765abd31a792Ad37', STATA_TOKEN: '0x2D737e2B0e175f05D0904C208d6C4e40da570f65', }, diff --git a/src/ts/AaveV3Optimism.ts b/src/ts/AaveV3Optimism.ts index 604d1e6a..a734f789 100644 --- a/src/ts/AaveV3Optimism.ts +++ b/src/ts/AaveV3Optimism.ts @@ -114,7 +114,7 @@ export const ASSETS = { A_TOKEN: '0x625E7708f30cA75bfd92586e17077590C60eb4cD', S_TOKEN: '0x307ffe186F84a3bc2613D1eA417A5737D69A7007', V_TOKEN: '0xFCCf3cAbbe80101232d343252614b6A3eE81C989', - INTEREST_RATE_STRATEGY: '0x3832311560d3B457E9cC35e5b8e06EB167D8c17D', + INTEREST_RATE_STRATEGY: '0x769EbC5106bF09D9A665CCb691e1907612b57F16', ORACLE: '0x16a9FA2FDa030272Ce99B29CF780dFA30361E0f3', STATA_TOKEN: '0x9F281eb58fd98ad98EDe0fc4C553AD4D73e7Ca2C', }, @@ -224,7 +224,7 @@ export const ASSETS = { A_TOKEN: '0x38d693cE1dF5AaDF7bC62595A37D667aD57922e5', S_TOKEN: '0x8a9FdE6925a839F6B1932d16B36aC026F8d3FbdB', V_TOKEN: '0x5D557B07776D12967914379C71a1310e917C7555', - INTEREST_RATE_STRATEGY: '0x5eE947d920643cCd3e2c54eAAd8F260FC8Add3b4', + INTEREST_RATE_STRATEGY: '0xB57Ff919A953424d6B143ABfD6740A225eab953e', ORACLE: '0x16a9FA2FDa030272Ce99B29CF780dFA30361E0f3', STATA_TOKEN: '0x0000000000000000000000000000000000000000', }, diff --git a/src/ts/AaveV3Polygon.ts b/src/ts/AaveV3Polygon.ts index 29b4e629..3d50623a 100644 --- a/src/ts/AaveV3Polygon.ts +++ b/src/ts/AaveV3Polygon.ts @@ -111,7 +111,7 @@ export const ASSETS = { A_TOKEN: '0x625E7708f30cA75bfd92586e17077590C60eb4cD', S_TOKEN: '0x307ffe186F84a3bc2613D1eA417A5737D69A7007', V_TOKEN: '0xFCCf3cAbbe80101232d343252614b6A3eE81C989', - INTEREST_RATE_STRATEGY: '0x9a158802cD924747EF336cA3F9DE3bdb60Cf43D3', + INTEREST_RATE_STRATEGY: '0x588b62C84533232E3A881e096E5D639Fa754F093', ORACLE: '0xfE4A8cc5b5B2366C1B58Bea3858e81843581b2F7', STATA_TOKEN: '0x1017F4a86Fc3A3c824346d0b8C5e96A5029bDAf9', }, @@ -285,6 +285,16 @@ export const ASSETS = { ORACLE: '0xe34949A48cd2E6f5CD41753e449bd2d43993C9AC', STATA_TOKEN: '0x5274453F4CD5dD7280011a1Cca3B9e1b78EC59A6', }, + USDCn: { + decimals: 6, + UNDERLYING: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359', + A_TOKEN: '0xA4D94019934D8333Ef880ABFFbF2FDd611C762BD', + S_TOKEN: '0xc889e9f8370D14A428a9857205d99BFdB400b757', + V_TOKEN: '0xE701126012EC0290822eEA17B794454d1AF8b030', + INTEREST_RATE_STRATEGY: '0x53b13a6D43F647D788411Abfd28D229C274AfBF9', + ORACLE: '0xfE4A8cc5b5B2366C1B58Bea3858e81843581b2F7', + STATA_TOKEN: '0x0000000000000000000000000000000000000000', + }, } as const; export const E_MODES = { NONE: 0,