Skip to content

Commit

Permalink
fix: update addresses (#663)
Browse files Browse the repository at this point in the history
* fix: update addresses

* fix: update generator
  • Loading branch information
sakulstra authored Oct 28, 2024
1 parent 5d6bac1 commit bbbfa22
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 9 deletions.
5 changes: 5 additions & 0 deletions safe.csv
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,11 @@ address,name,chainId
0xeD90dE2D824Ee766c6Fd22E90b12e598f681dc9F,AaveV3EthereumLido ASSETS USDC V_TOKEN,1
0x8958b1C39269167527821f8c276Ef7504883f2fa,AaveV3EthereumLido ASSETS USDC INTEREST_RATE_STRATEGY,1
0x736bF902680e68989886e9807CD7Db4B3E015d3C,AaveV3EthereumLido ASSETS USDC ORACLE,1
0xbf5495Efe5DB9ce00f80364C8B423567e58d2110,AaveV3EthereumLido ASSETS ezETH UNDERLYING,1
0x74e5664394998f13B07aF42446380ACef637969f,AaveV3EthereumLido ASSETS ezETH A_TOKEN,1
0x08e1bba76D27841dD91FAb4b3a636A0D5CF8c3E9,AaveV3EthereumLido ASSETS ezETH V_TOKEN,1
0x8958b1C39269167527821f8c276Ef7504883f2fa,AaveV3EthereumLido ASSETS ezETH INTEREST_RATE_STRATEGY,1
0x68C9c7Bf43DBd0EBab102116bc7C3C9f7d9297Ee,AaveV3EthereumLido ASSETS ezETH ORACLE,1
0x3843b29118fFC18d5d12EE079d0324E1bF115e69,AaveV3EthereumLido CAPS_PLUS_RISK_STEWARD,1
0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c,AaveV3EthereumLido COLLECTOR,1
0x1097eDb85392932b7dCB630baDDC8A6D73585218,AaveV3EthereumLido CONFIG_ENGINE,1
Expand Down
1 change: 0 additions & 1 deletion scripts/clients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ function getRPCUrl(chainId: number): string | undefined {
const clientCache: Record<number, Client> = {};

export function getClient(chainId: number) {
console.log(chainId, getRPCUrl(chainId));
if (!clientCache[chainId]) {
clientCache[chainId] = createClient({
chain: CHAIN_ID_CHAIN_MAP[chainId],
Expand Down
2 changes: 1 addition & 1 deletion scripts/generator/protocol-v3-generator/fetchEModes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function generateEmodeLibrary(
) {
const sorted = Array.from(eModes).sort(([keyA], [keyB]) => keyA - keyB);
const formatted = sorted.reduce((acc, [value, eMode]) => {
acc[eMode.label.toUpperCase().replace('-', '_').replace(' ', '_')] = {
acc[eMode.label.toUpperCase().replace(/[^A-Z0-9]+/gi, '_')] = {
value,
type: 'uint8',
};
Expand Down
22 changes: 22 additions & 0 deletions src/AaveV3EthereumLido.sol
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,34 @@ library AaveV3EthereumLidoAssets {
// https://etherscan.io/address/0x8958b1C39269167527821f8c276Ef7504883f2fa
address internal constant USDC_INTEREST_RATE_STRATEGY =
0x8958b1C39269167527821f8c276Ef7504883f2fa;

// https://etherscan.io/address/0xbf5495Efe5DB9ce00f80364C8B423567e58d2110
address internal constant ezETH_UNDERLYING = 0xbf5495Efe5DB9ce00f80364C8B423567e58d2110;

uint8 internal constant ezETH_DECIMALS = 18;

// https://etherscan.io/address/0x74e5664394998f13B07aF42446380ACef637969f
address internal constant ezETH_A_TOKEN = 0x74e5664394998f13B07aF42446380ACef637969f;

// https://etherscan.io/address/0x08e1bba76D27841dD91FAb4b3a636A0D5CF8c3E9
address internal constant ezETH_V_TOKEN = 0x08e1bba76D27841dD91FAb4b3a636A0D5CF8c3E9;

// https://etherscan.io/address/0x68C9c7Bf43DBd0EBab102116bc7C3C9f7d9297Ee
address internal constant ezETH_ORACLE = 0x68C9c7Bf43DBd0EBab102116bc7C3C9f7d9297Ee;

// https://etherscan.io/address/0x8958b1C39269167527821f8c276Ef7504883f2fa
address internal constant ezETH_INTEREST_RATE_STRATEGY =
0x8958b1C39269167527821f8c276Ef7504883f2fa;
}

library AaveV3EthereumLidoEModes {
uint8 internal constant NONE = 0;

uint8 internal constant ETH_CORRELATED = 1;

uint8 internal constant LRT_STABLECOINS_MAIN = 2;

uint8 internal constant LRT_WSTETH_MAIN = 3;
}

library AaveV3EthereumLidoExternalLibraries {
Expand Down
36 changes: 31 additions & 5 deletions src/ts/AaveV3EthereumLido.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ export const ASSETS = {
INTEREST_RATE_STRATEGY: '0x8958b1C39269167527821f8c276Ef7504883f2fa',
ORACLE: '0x736bF902680e68989886e9807CD7Db4B3E015d3C',
},
ezETH: {
decimals: 18,
id: 4,
UNDERLYING: '0xbf5495Efe5DB9ce00f80364C8B423567e58d2110',
A_TOKEN: '0x74e5664394998f13B07aF42446380ACef637969f',
V_TOKEN: '0x08e1bba76D27841dD91FAb4b3a636A0D5CF8c3E9',
INTEREST_RATE_STRATEGY: '0x8958b1C39269167527821f8c276Ef7504883f2fa',
ORACLE: '0x68C9c7Bf43DBd0EBab102116bc7C3C9f7d9297Ee',
},
} as const;
export const E_MODES = {
'1': {
Expand All @@ -121,14 +130,31 @@ export const E_MODES = {
'0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
'0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
],
borrowableBitmap: '3',
borrowableAssets: [
'0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
'0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
],
borrowableBitmap: '2',
borrowableAssets: ['0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'],
ltv: 9350,
liquidationThreshold: 9550,
liquidationBonus: 10100,
},
'2': {
label: 'LRT Stablecoins main',
collateralBitmap: '16',
collateralAssets: ['0xbf5495Efe5DB9ce00f80364C8B423567e58d2110'],
borrowableBitmap: '4',
borrowableAssets: ['0xdC035D45d973E3EC169d2276DDab16f1e407384F'],
ltv: 7500,
liquidationThreshold: 7800,
liquidationBonus: 10750,
},
'3': {
label: 'LRT wstETH main',
collateralBitmap: '16',
collateralAssets: ['0xbf5495Efe5DB9ce00f80364C8B423567e58d2110'],
borrowableBitmap: '1',
borrowableAssets: ['0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0'],
ltv: 9300,
liquidationThreshold: 9500,
liquidationBonus: 10100,
},
} as const;
export const EXTERNAL_LIBRARIES = {} as const;
24 changes: 22 additions & 2 deletions tokenlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -6594,6 +6594,26 @@
"underlying": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
}
},
{
"chainId": 1,
"address": "0xbf5495Efe5DB9ce00f80364C8B423567e58d2110",
"name": "Renzo Restaked ETH",
"decimals": 18,
"symbol": "ezETH",
"tags": ["underlying"]
},
{
"chainId": 1,
"address": "0x74e5664394998f13B07aF42446380ACef637969f",
"name": "Aave Ethereum Lido ezETH",
"decimals": 18,
"symbol": "aEthLidoezETH",
"tags": ["aTokenV3", "aaveV3"],
"extensions": {
"pool": "0x4e033931ad43597d96D6bcc25c280717730B58B1",
"underlying": "0xbf5495Efe5DB9ce00f80364C8B423567e58d2110"
}
},
{
"chainId": 1,
"address": "0xbe1F842e7e0afd2c2322aae5d34bA899544b29db",
Expand Down Expand Up @@ -6647,6 +6667,6 @@
}
}
],
"version": { "major": 3, "minor": 0, "patch": 55 },
"timestamp": "2024-10-16T14:02:42.858Z"
"version": { "major": 3, "minor": 0, "patch": 56 },
"timestamp": "2024-10-27T21:53:47.751Z"
}

0 comments on commit bbbfa22

Please sign in to comment.