Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LST exchange rate feeds #347

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions scripts/configs/networks/arbitrum.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import {Hex} from 'viem';
import {ChainId} from '@bgd-labs/js-utils';
import {NetworkAddresses} from '../types';

export const arbitrumAddresses: NetworkAddresses = {
export const arbitrumAddresses: NetworkAddresses<{
wstETH_stETH_AGGREGATOR: Hex;
rETH_ETH_AGGREGATOR: Hex;
}> = {
name: 'Arbitrum',
chainId: ChainId.arbitrum_one,
addresses: {
Expand All @@ -10,10 +14,11 @@ export const arbitrumAddresses: NetworkAddresses = {
PROXY_ADMIN: '0xD3cF979e676265e4f6379749DECe4708B9A22476',
CREATE_3_FACTORY: '0x3b56998Ec06477704622ca8e2eA1b4db134cec32',
PROTOCOL_GUARDIAN: '0xbbd9f90699c1fa0d7a65870d241dd1f1217c96eb',
wstETH_stETH_AGGREGATOR: '0xB1552C5e96B312d0Bf8b554186F846C40614a540',
rETH_ETH_AGGREGATOR: '0xF3272CAfe65b190e76caAF483db13424a3e23dD2',
},
};


export const arbitrumSepoliaAddresses: NetworkAddresses = {
name: 'ArbitrumSepolia',
chainId: ChainId.arbitrum_sepolia,
Expand Down
8 changes: 7 additions & 1 deletion scripts/configs/networks/base.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import {Hex} from 'viem';
import {ChainId} from '@bgd-labs/js-utils';
import {NetworkAddresses} from '../types';

export const baseAddresses: NetworkAddresses = {
export const baseAddresses: NetworkAddresses<{
wstETH_stETH_AGGREGATOR: Hex;
cbETH_ETH_AGGREGATOR: Hex;
}> = {
name: 'Base',
chainId: ChainId.base,
addresses: {
Expand All @@ -10,5 +14,7 @@ export const baseAddresses: NetworkAddresses = {
PROXY_ADMIN: '0xc85b1E333aecc99340b2320493Fe2d22b8734795',
CREATE_3_FACTORY: '0x3b56998Ec06477704622ca8e2eA1b4db134cec32',
PROTOCOL_GUARDIAN: '0x9e10C0A1Eb8FF6a0AaA53a62C7a338f35D7D9a2A',
wstETH_stETH_AGGREGATOR: '0xB88BAc61a4Ca37C43a3725912B1f472c9A5bc061',
cbETH_ETH_AGGREGATOR: '0x806b4Ac04501c29769051e42783cF04dCE41440b',
},
};
2 changes: 2 additions & 0 deletions scripts/configs/networks/ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const ethereumAddresses: NetworkAddresses<{
GSM_REGISTRY: Hex;
GSM_USDC: Hex;
GSM_USDT: Hex;
sDAI_POT: Hex;
}> = {
name: 'Ethereum',
chainId: ChainId.mainnet,
Expand All @@ -35,6 +36,7 @@ export const ethereumAddresses: NetworkAddresses<{
GSM_REGISTRY: '0x0d8eFfC11dF3F229AA1EA0509BC9DFa632A13578',
GSM_USDC: '0x0d8eFfC11dF3F229AA1EA0509BC9DFa632A13578',
GSM_USDT: '0x686F8D21520f4ecEc7ba577be08354F4d1EB8262',
sDAI_POT: '0x197E90f9FAD81970bA7976f33CbD77088E5D7cf7',
},
};

Expand Down
4 changes: 3 additions & 1 deletion scripts/configs/networks/gnosis.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import {Hex} from 'viem';
import {ChainId} from '@bgd-labs/js-utils';
import {NetworkAddresses} from '../types';

export const gnosisAddresses: NetworkAddresses = {
export const gnosisAddresses: NetworkAddresses<{wstETH_stETH_AGGREGATOR: Hex}> = {
name: 'Gnosis',
chainId: ChainId.gnosis,
addresses: {
TRANSPARENT_PROXY_FACTORY: '0x47aAdaAE1F05C978E6aBb7568d11B7F6e0FC4d6A',
PROXY_ADMIN: '0xe892E40C92c2E4D281Be59b2E6300F271d824E75',
CREATE_3_FACTORY: '0x2cC41488f4494c5e11cB6cbA82199442B9f495B6',
PROTOCOL_GUARDIAN: '0xF163b8698821cefbD33Cf449764d69Ea445cE23D',
wstETH_stETH_AGGREGATOR: '0x0064AC007fF665CF8D0D3Af5E0AD1c26a3f853eA',
},
};
8 changes: 7 additions & 1 deletion scripts/configs/networks/optimism.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import {Hex} from 'viem';
import {ChainId} from '@bgd-labs/js-utils';
import {NetworkAddresses} from '../types';

export const optimismAddresses: NetworkAddresses = {
export const optimismAddresses: NetworkAddresses<{
wstETH_stETH_AGGREGATOR: Hex;
rETH_ETH_AGGREGATOR: Hex;
}> = {
name: 'Optimism',
chainId: ChainId.optimism,
addresses: {
Expand All @@ -11,5 +15,7 @@ export const optimismAddresses: NetworkAddresses = {
CREATE_3_FACTORY: '0x3b56998Ec06477704622ca8e2eA1b4db134cec32',
PROTOCOL_GUARDIAN: '0xe50c8c619d05ff98b22adf991f17602c774f785c',
AAVE_MERKLE_DISTRIBUTOR: '0x1685D81212580DD4cDA287616C2f6F4794927e18',
wstETH_stETH_AGGREGATOR: '0xe59EBa0D492cA53C6f46015EEa00517F2707dc77',
rETH_ETH_AGGREGATOR: '0x22F3727be377781d1579B7C9222382b21c9d1a8f',
},
};
10 changes: 9 additions & 1 deletion scripts/configs/networks/polygon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import {Hex} from 'viem';
import {ChainId} from '@bgd-labs/js-utils';
import {NetworkAddresses} from '../types';

export const polygonAddresses: NetworkAddresses<{AAVE_POL_ETH_BRIDGE: Hex}> = {
export const polygonAddresses: NetworkAddresses<{
AAVE_POL_ETH_BRIDGE: Hex;
wstETH_stETH_AGGREGATOR: Hex;
MaticX_RATE_PROVIDER: Hex;
stMATIC_RATE_PROVIDER: Hex;
}> = {
name: 'Polygon',
chainId: ChainId.polygon,
addresses: {
Expand All @@ -13,6 +18,9 @@ export const polygonAddresses: NetworkAddresses<{AAVE_POL_ETH_BRIDGE: Hex}> = {
CREATE_3_FACTORY: '0x3b56998Ec06477704622ca8e2eA1b4db134cec32',
PROTOCOL_GUARDIAN: '0x1450F2898D6bA2710C98BE9CAF3041330eD5ae58',
AAVE_MERKLE_DISTRIBUTOR: '0x7A9ff54A6eE4a21223036890bB8c4ea2D62c686b',
wstETH_stETH_AGGREGATOR: '0x3Ea1eC855fBda8bA0396975eC260AD2e9B2Bc01c',
MaticX_RATE_PROVIDER: '0xeE652bbF72689AA59F0B8F981c9c90e2A8Af8d8f',
stMATIC_RATE_PROVIDER: '0xdEd6C522d803E35f65318a9a4d7333a22d582199',
},
};

Expand Down
6 changes: 6 additions & 0 deletions src/MiscArbitrum.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ library MiscArbitrum {

// https://arbiscan.io/address/0xbbd9f90699c1FA0D7A65870D241DD1f1217c96Eb
address internal constant PROTOCOL_GUARDIAN = 0xbbd9f90699c1FA0D7A65870D241DD1f1217c96Eb;

// https://arbiscan.io/address/0xB1552C5e96B312d0Bf8b554186F846C40614a540
address internal constant wstETH_stETH_AGGREGATOR = 0xB1552C5e96B312d0Bf8b554186F846C40614a540;

// https://arbiscan.io/address/0xF3272CAfe65b190e76caAF483db13424a3e23dD2
address internal constant rETH_ETH_AGGREGATOR = 0xF3272CAfe65b190e76caAF483db13424a3e23dD2;
}
6 changes: 6 additions & 0 deletions src/MiscBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ library MiscBase {

// https://basescan.org/address/0x9e10C0A1Eb8FF6a0AaA53a62C7a338f35D7D9a2A
address internal constant PROTOCOL_GUARDIAN = 0x9e10C0A1Eb8FF6a0AaA53a62C7a338f35D7D9a2A;

// https://basescan.org/address/0xB88BAc61a4Ca37C43a3725912B1f472c9A5bc061
address internal constant wstETH_stETH_AGGREGATOR = 0xB88BAc61a4Ca37C43a3725912B1f472c9A5bc061;

// https://basescan.org/address/0x806b4Ac04501c29769051e42783cF04dCE41440b
address internal constant cbETH_ETH_AGGREGATOR = 0x806b4Ac04501c29769051e42783cF04dCE41440b;
}
3 changes: 3 additions & 0 deletions src/MiscEthereum.sol
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,7 @@ library MiscEthereum {

// https://etherscan.io/address/0x686F8D21520f4ecEc7ba577be08354F4d1EB8262
address internal constant GSM_USDT = 0x686F8D21520f4ecEc7ba577be08354F4d1EB8262;

// https://etherscan.io/address/0x197E90f9FAD81970bA7976f33CbD77088E5D7cf7
address internal constant sDAI_POT = 0x197E90f9FAD81970bA7976f33CbD77088E5D7cf7;
}
3 changes: 3 additions & 0 deletions src/MiscGnosis.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ library MiscGnosis {

// https://gnosisscan.io/address/0xF163b8698821cefbD33Cf449764d69Ea445cE23D
address internal constant PROTOCOL_GUARDIAN = 0xF163b8698821cefbD33Cf449764d69Ea445cE23D;

// https://gnosisscan.io/address/0x0064AC007fF665CF8D0D3Af5E0AD1c26a3f853eA
address internal constant wstETH_stETH_AGGREGATOR = 0x0064AC007fF665CF8D0D3Af5E0AD1c26a3f853eA;
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think this one might be wrong

}
6 changes: 6 additions & 0 deletions src/MiscOptimism.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,10 @@ library MiscOptimism {

// https://optimistic.etherscan.io/address/0x1685D81212580DD4cDA287616C2f6F4794927e18
address internal constant AAVE_MERKLE_DISTRIBUTOR = 0x1685D81212580DD4cDA287616C2f6F4794927e18;

// https://optimistic.etherscan.io/address/0xe59EBa0D492cA53C6f46015EEa00517F2707dc77
address internal constant wstETH_stETH_AGGREGATOR = 0xe59EBa0D492cA53C6f46015EEa00517F2707dc77;

// https://optimistic.etherscan.io/address/0x22F3727be377781d1579B7C9222382b21c9d1a8f
address internal constant rETH_ETH_AGGREGATOR = 0x22F3727be377781d1579B7C9222382b21c9d1a8f;
}
9 changes: 9 additions & 0 deletions src/MiscPolygon.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@ library MiscPolygon {

// https://polygonscan.com/address/0x7A9ff54A6eE4a21223036890bB8c4ea2D62c686b
address internal constant AAVE_MERKLE_DISTRIBUTOR = 0x7A9ff54A6eE4a21223036890bB8c4ea2D62c686b;

// https://polygonscan.com/address/0x3Ea1eC855fBda8bA0396975eC260AD2e9B2Bc01c
address internal constant wstETH_stETH_AGGREGATOR = 0x3Ea1eC855fBda8bA0396975eC260AD2e9B2Bc01c;

// https://polygonscan.com/address/0xeE652bbF72689AA59F0B8F981c9c90e2A8Af8d8f
address internal constant MaticX_RATE_PROVIDER = 0xeE652bbF72689AA59F0B8F981c9c90e2A8Af8d8f;

// https://polygonscan.com/address/0xdEd6C522d803E35f65318a9a4d7333a22d582199
address internal constant stMATIC_RATE_PROVIDER = 0xdEd6C522d803E35f65318a9a4d7333a22d582199;
}
6 changes: 6 additions & 0 deletions src/ts/MiscArbitrum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ export const CREATE_3_FACTORY = '0x3b56998Ec06477704622ca8e2eA1b4db134cec32';
// https://arbiscan.io/address/0xbbd9f90699c1FA0D7A65870D241DD1f1217c96Eb
export const PROTOCOL_GUARDIAN = '0xbbd9f90699c1FA0D7A65870D241DD1f1217c96Eb';

// https://arbiscan.io/address/0xB1552C5e96B312d0Bf8b554186F846C40614a540
export const wstETH_stETH_AGGREGATOR = '0xB1552C5e96B312d0Bf8b554186F846C40614a540';

// https://arbiscan.io/address/0xF3272CAfe65b190e76caAF483db13424a3e23dD2
export const rETH_ETH_AGGREGATOR = '0xF3272CAfe65b190e76caAF483db13424a3e23dD2';

export const CHAIN_ID = 42161;
6 changes: 6 additions & 0 deletions src/ts/MiscBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ export const CREATE_3_FACTORY = '0x3b56998Ec06477704622ca8e2eA1b4db134cec32';
// https://basescan.org/address/0x9e10C0A1Eb8FF6a0AaA53a62C7a338f35D7D9a2A
export const PROTOCOL_GUARDIAN = '0x9e10C0A1Eb8FF6a0AaA53a62C7a338f35D7D9a2A';

// https://basescan.org/address/0xB88BAc61a4Ca37C43a3725912B1f472c9A5bc061
export const wstETH_stETH_AGGREGATOR = '0xB88BAc61a4Ca37C43a3725912B1f472c9A5bc061';

// https://basescan.org/address/0x806b4Ac04501c29769051e42783cF04dCE41440b
export const cbETH_ETH_AGGREGATOR = '0x806b4Ac04501c29769051e42783cF04dCE41440b';

export const CHAIN_ID = 8453;
3 changes: 3 additions & 0 deletions src/ts/MiscEthereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,7 @@ export const GSM_USDC = '0x0d8eFfC11dF3F229AA1EA0509BC9DFa632A13578';
// https://etherscan.io/address/0x686F8D21520f4ecEc7ba577be08354F4d1EB8262
export const GSM_USDT = '0x686F8D21520f4ecEc7ba577be08354F4d1EB8262';

// https://etherscan.io/address/0x197E90f9FAD81970bA7976f33CbD77088E5D7cf7
export const sDAI_POT = '0x197E90f9FAD81970bA7976f33CbD77088E5D7cf7';

export const CHAIN_ID = 1;
3 changes: 3 additions & 0 deletions src/ts/MiscGnosis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ export const CREATE_3_FACTORY = '0x2cC41488f4494c5e11cB6cbA82199442B9f495B6';
// https://gnosisscan.io/address/0xF163b8698821cefbD33Cf449764d69Ea445cE23D
export const PROTOCOL_GUARDIAN = '0xF163b8698821cefbD33Cf449764d69Ea445cE23D';

// https://gnosisscan.io/address/0x0064AC007fF665CF8D0D3Af5E0AD1c26a3f853eA
export const wstETH_stETH_AGGREGATOR = '0x0064AC007fF665CF8D0D3Af5E0AD1c26a3f853eA';

export const CHAIN_ID = 100;
6 changes: 6 additions & 0 deletions src/ts/MiscOptimism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@ export const PROTOCOL_GUARDIAN = '0xE50c8C619d05ff98b22Adf991F17602C774F785c';
// https://optimistic.etherscan.io/address/0x1685D81212580DD4cDA287616C2f6F4794927e18
export const AAVE_MERKLE_DISTRIBUTOR = '0x1685D81212580DD4cDA287616C2f6F4794927e18';

// https://optimistic.etherscan.io/address/0xe59EBa0D492cA53C6f46015EEa00517F2707dc77
export const wstETH_stETH_AGGREGATOR = '0xe59EBa0D492cA53C6f46015EEa00517F2707dc77';

// https://optimistic.etherscan.io/address/0x22F3727be377781d1579B7C9222382b21c9d1a8f
export const rETH_ETH_AGGREGATOR = '0x22F3727be377781d1579B7C9222382b21c9d1a8f';

export const CHAIN_ID = 10;
9 changes: 9 additions & 0 deletions src/ts/MiscPolygon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,13 @@ export const PROTOCOL_GUARDIAN = '0x1450F2898D6bA2710C98BE9CAF3041330eD5ae58';
// https://polygonscan.com/address/0x7A9ff54A6eE4a21223036890bB8c4ea2D62c686b
export const AAVE_MERKLE_DISTRIBUTOR = '0x7A9ff54A6eE4a21223036890bB8c4ea2D62c686b';

// https://polygonscan.com/address/0x3Ea1eC855fBda8bA0396975eC260AD2e9B2Bc01c
export const wstETH_stETH_AGGREGATOR = '0x3Ea1eC855fBda8bA0396975eC260AD2e9B2Bc01c';

// https://polygonscan.com/address/0xeE652bbF72689AA59F0B8F981c9c90e2A8Af8d8f
export const MaticX_RATE_PROVIDER = '0xeE652bbF72689AA59F0B8F981c9c90e2A8Af8d8f';

// https://polygonscan.com/address/0xdEd6C522d803E35f65318a9a4d7333a22d582199
export const stMATIC_RATE_PROVIDER = '0xdEd6C522d803E35f65318a9a4d7333a22d582199';

export const CHAIN_ID = 137;
Loading