Skip to content

Commit

Permalink
fix: patch arbitrum USDC
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Jun 29, 2023
1 parent 12b54b7 commit 4be5fea
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
10 changes: 9 additions & 1 deletion scripts/generator_v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,16 @@ export async function fetchPoolV3Addresses(pool: Pool): Promise<PoolV3WithAddres
);
reservesData = (await uiPoolDataProvider.getReservesData(pool.addressProvider))[0].map(
(reserve: any) => {
let symbol = reserve.symbol;
// patch for
if (
reserve.symbol === 'USDC' &&
reserve.underlyingAsset === '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
) {
symbol = 'USDCn';
}
return {
symbol: reserve.symbol,
symbol,
underlyingAsset: reserve.underlyingAsset,
decimals: reserve.decimals,
aTokenAddress: reserve.aTokenAddress,
Expand Down
12 changes: 6 additions & 6 deletions src/AaveV3Arbitrum.sol
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ library AaveV3ArbitrumAssets {
address internal constant LUSD_INTEREST_RATE_STRATEGY =
0x07Fa3744FeC271F80c2EA97679823F65c13CCDf4;

address internal constant USDC_UNDERLYING = 0xaf88d065e77c8cC2239327C5EDb3A432268e5831;
address internal constant USDC_A_TOKEN = 0x724dc807b04555b71ed48a6896b6F41593b8C637;
address internal constant USDC_V_TOKEN = 0xf611aEb5013fD2c0511c9CD55c7dc5C1140741A6;
address internal constant USDC_S_TOKEN = 0xDC1fad70953Bb3918592b6fCc374fe05F5811B6a;
address internal constant USDC_ORACLE = 0x50834F3163758fcC1Df9973b6e91f0F0F0434aD3;
address internal constant USDC_INTEREST_RATE_STRATEGY =
address internal constant USDCn_UNDERLYING = 0xaf88d065e77c8cC2239327C5EDb3A432268e5831;
address internal constant USDCn_A_TOKEN = 0x724dc807b04555b71ed48a6896b6F41593b8C637;
address internal constant USDCn_V_TOKEN = 0xf611aEb5013fD2c0511c9CD55c7dc5C1140741A6;
address internal constant USDCn_S_TOKEN = 0xDC1fad70953Bb3918592b6fCc374fe05F5811B6a;
address internal constant USDCn_ORACLE = 0x50834F3163758fcC1Df9973b6e91f0F0F0434aD3;
address internal constant USDCn_INTEREST_RATE_STRATEGY =
0xf6733B9842883BFE0e0a940eA2F572676af31bde;
}
12 changes: 6 additions & 6 deletions src/ts/AaveV3ArbitrumAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ export const AaveV3ArbitrumAssets_LUSD_ORACLE = '0x0411D28c94d85A36bC72Cb0f875df
export const AaveV3ArbitrumAssets_LUSD_INTEREST_RATE_STRATEGY =
'0x07Fa3744FeC271F80c2EA97679823F65c13CCDf4';

export const AaveV3ArbitrumAssets_USDC_UNDERLYING = '0xaf88d065e77c8cC2239327C5EDb3A432268e5831';
export const AaveV3ArbitrumAssets_USDC_A_TOKEN = '0x724dc807b04555b71ed48a6896b6F41593b8C637';
export const AaveV3ArbitrumAssets_USDC_V_TOKEN = '0xf611aEb5013fD2c0511c9CD55c7dc5C1140741A6';
export const AaveV3ArbitrumAssets_USDC_S_TOKEN = '0xDC1fad70953Bb3918592b6fCc374fe05F5811B6a';
export const AaveV3ArbitrumAssets_USDC_ORACLE = '0x50834F3163758fcC1Df9973b6e91f0F0F0434aD3';
export const AaveV3ArbitrumAssets_USDC_INTEREST_RATE_STRATEGY =
export const AaveV3ArbitrumAssets_USDCn_UNDERLYING = '0xaf88d065e77c8cC2239327C5EDb3A432268e5831';
export const AaveV3ArbitrumAssets_USDCn_A_TOKEN = '0x724dc807b04555b71ed48a6896b6F41593b8C637';
export const AaveV3ArbitrumAssets_USDCn_V_TOKEN = '0xf611aEb5013fD2c0511c9CD55c7dc5C1140741A6';
export const AaveV3ArbitrumAssets_USDCn_S_TOKEN = '0xDC1fad70953Bb3918592b6fCc374fe05F5811B6a';
export const AaveV3ArbitrumAssets_USDCn_ORACLE = '0x50834F3163758fcC1Df9973b6e91f0F0F0434aD3';
export const AaveV3ArbitrumAssets_USDCn_INTEREST_RATE_STRATEGY =
'0xf6733B9842883BFE0e0a940eA2F572676af31bde';

1 comment on commit 4be5fea

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Foundry report

forge 0.2.0 (f9fc929 2023-06-29T00:04:16.248089700Z)
Build log
installing solc version "0.8.20"
Successfully installed solc 0.8.20
Compiling 64 files with 0.8.20
Solc 0.8.20 finished in 3.58s
Compiler run successful!
| Contract                   | Size (kB) | Margin (kB) |
|----------------------------|-----------|-------------|
| AaveGovernanceV2           | 0.285     | 24.291      |
| AaveMisc                   | 0.086     | 24.49       |
| AaveV2Avalanche            | 0.086     | 24.49       |
| AaveV2AvalancheAssets      | 0.086     | 24.49       |
| AaveV2Ethereum             | 0.086     | 24.49       |
| AaveV2EthereumAMM          | 0.086     | 24.49       |
| AaveV2EthereumAMMAssets    | 0.086     | 24.49       |
| AaveV2EthereumArc          | 0.086     | 24.49       |
| AaveV2EthereumAssets       | 0.086     | 24.49       |
| AaveV2Fuji                 | 0.086     | 24.49       |
| AaveV2FujiAssets           | 0.086     | 24.49       |
| AaveV2Goerli               | 0.086     | 24.49       |
| AaveV2GoerliAssets         | 0.086     | 24.49       |
| AaveV2Mumbai               | 0.086     | 24.49       |
| AaveV2MumbaiAssets         | 0.086     | 24.49       |
| AaveV2Polygon              | 0.086     | 24.49       |
| AaveV2PolygonAssets        | 0.086     | 24.49       |
| AaveV3Arbitrum             | 0.086     | 24.49       |
| AaveV3ArbitrumAssets       | 0.086     | 24.49       |
| AaveV3ArbitrumGoerli       | 0.086     | 24.49       |
| AaveV3ArbitrumGoerliAssets | 0.086     | 24.49       |
| AaveV3Avalanche            | 0.086     | 24.49       |
| AaveV3AvalancheAssets      | 0.086     | 24.49       |
| AaveV3Ethereum             | 0.086     | 24.49       |
| AaveV3EthereumAssets       | 0.086     | 24.49       |
| AaveV3Fantom               | 0.086     | 24.49       |
| AaveV3FantomAssets         | 0.086     | 24.49       |
| AaveV3FantomTestnet        | 0.086     | 24.49       |
| AaveV3FantomTestnetAssets  | 0.086     | 24.49       |
| AaveV3Fuji                 | 0.086     | 24.49       |
| AaveV3FujiAssets           | 0.086     | 24.49       |
| AaveV3Goerli               | 0.086     | 24.49       |
| AaveV3GoerliAssets         | 0.086     | 24.49       |
| AaveV3GoerliGho            | 0.086     | 24.49       |
| AaveV3GoerliGhoAssets      | 0.086     | 24.49       |
| AaveV3Harmony              | 0.086     | 24.49       |
| AaveV3HarmonyAssets        | 0.086     | 24.49       |
| AaveV3Metis                | 0.086     | 24.49       |
| AaveV3MetisAssets          | 0.086     | 24.49       |
| AaveV3Mumbai               | 0.086     | 24.49       |
| AaveV3MumbaiAssets         | 0.086     | 24.49       |
| AaveV3Optimism             | 0.086     | 24.49       |
| AaveV3OptimismAssets       | 0.086     | 24.49       |
| AaveV3OptimismGoerli       | 0.086     | 24.49       |
| AaveV3OptimismGoerliAssets | 0.086     | 24.49       |
| AaveV3Polygon              | 0.086     | 24.49       |
| AaveV3PolygonAssets        | 0.086     | 24.49       |
| AaveV3ScrollAlpha          | 0.086     | 24.49       |
| AaveV3ScrollAlphaAssets    | 0.086     | 24.49       |
| AaveV3Sepolia              | 0.086     | 24.49       |
| AaveV3SepoliaAssets        | 0.086     | 24.49       |
| ConfiguratorInputTypes     | 0.086     | 24.49       |
| DataTypes                  | 0.086     | 24.49       |
| StdInvariant               | 2.323     | 22.253      |
| StdStyle                   | 0.086     | 24.49       |
| console                    | 0.086     | 24.49       |
| console2                   | 0.086     | 24.49       |
| stdError                   | 0.713     | 23.863      |
| stdJson                    | 0.086     | 24.49       |
| stdMath                    | 0.086     | 24.49       |
| stdStorage                 | 0.086     | 24.49       |
| stdStorageSafe             | 0.086     | 24.49       |
Test success 🌈
No files changed, compilation skipped

Running 8 tests for src/test/AaveV2Ethereum.t.sol:AaveAddressBookTest
[PASS] testAaveProtocolDataProviderIsCorrect() (gas: 280)
[PASS] testCollectorIsCorrect() (gas: 280)
[PASS] testEmergencyAdminIsCorrect() (gas: 237)
[PASS] testOracleIsCorrect() (gas: 258)
[PASS] testPoolAddressIsCorrect() (gas: 281)
[PASS] testPoolAddressProviderIsCorrect() (gas: 302)
[PASS] testPoolAdminIsCorrect() (gas: 302)
[PASS] testPoolConfiguratorIsCorrect() (gas: 268)
Test result: ok. 8 passed; 0 failed; 0 skipped; finished in 654.80µs

Running 8 tests for src/test/AaveV3Avalanche.t.sol:AaveAddressBookTest
[PASS] testACLAdminIsCorrect() (gas: 303)
[PASS] testACLManagerIsCorrect() (gas: 259)
[PASS] testCollectorIsCorrect() (gas: 302)
[PASS] testEmissionManagerIsCorrect() (gas: 280)
[PASS] testOracleIsCorrect() (gas: 280)
[PASS] testPoolAddressIsCorrect() (gas: 258)
[PASS] testPoolAddressProviderIsCorrect() (gas: 302)
[PASS] testPoolConfiguratorIsCorrect() (gas: 268)
Test result: ok. 8 passed; 0 failed; 0 skipped; finished in 519.80µs

Running 1 test for src/test/AaveV2Misfits.t.sol:AaveAddressMisfitsTest
[PASS] testArcPoolAdminIsCorrect() (gas: 258)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 327.00µs

Please sign in to comment.