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

feat: add capo adapters for linea #56

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
[submodule "lib/aave-address-book"]
path = lib/aave-address-book
url = https://github.com/bgd-labs/aave-address-book
branch = feat/linea-contracts
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ deploy-rseth-mainnet :; forge script scripts/DeployEthereum.s.sol:DeployRsEthEth

deploy-ausd-avalanche :; forge script scripts/DeployAvalanche.s.sol:DeployAUSDAvalanche --rpc-url avalanche $(common-flags)

deploy-weeth-linea :; forge script scripts/DeployLinea.s.sol:DeployWeEthLinea --rpc-url linea $(common-flags)
deploy-ezeth-linea :; forge script scripts/DeployLinea.s.sol:DeployEzEthLinea --rpc-url linea $(common-flags)
deploy-usdc-linea :; forge script scripts/DeployLinea.s.sol:DeployUSDCLinea --rpc-url linea $(common-flags)
deploy-usdt-linea :; forge script scripts/DeployLinea.s.sol:DeployUSDTLinea --rpc-url linea $(common-flags)

# Utilities
download :; cast etherscan-source --chain ${chain} -d src/etherscan/${chain}_${address} ${address}
git-diff :
Expand Down
6 changes: 4 additions & 2 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ gnosis = "${RPC_GNOSIS}"
bnb = "${RPC_BNB}"
scroll="${RPC_SCROLL}"
zksync = "${RPC_ZKSYNC}"
linea = "${RPC_LINEA}"

[etherscan]
mainnet = { key="${ETHERSCAN_API_KEY_MAINNET}", chainId=1 }
Expand All @@ -54,8 +55,9 @@ metis = { key="any", chainId=1088, url='https://andromeda-explorer.metis.io/' }
base = { key="${ETHERSCAN_API_KEY_BASE}", chainId=8453 }
zkevm = { key="${ETHERSCAN_API_KEY_ZKEVM}", chainId=1101 }
gnosis = { key="${ETHERSCAN_API_KEY_GNOSIS}", chainId=100 }
bnb= { key="${ETHERSCAN_API_KEY_BNB}",chainId=56,url='https://api.bscscan.com/api'}
scroll={key="${ETHERSCAN_API_KEY_SCROLL}",chainId=534352}
bnb = { key="${ETHERSCAN_API_KEY_BNB}", chainId=56,url='https://api.bscscan.com/api' }
scroll = { key="${ETHERSCAN_API_KEY_SCROLL}", chainId=534352 }
zksync = { key="${ETHERSCAN_API_KEY_ZKSYNC}", chain = 324 }
linea = { key="${ETHERSCAN_API_KEY_LINEA}", chain = 59144 }

# See more config options https://github.com/gakonst/foundry/tree/master/config
2 changes: 1 addition & 1 deletion lib/aave-address-book
Submodule aave-address-book updated 256 files
2 changes: 1 addition & 1 deletion lib/aave-helpers
Submodule aave-helpers updated 81 files
+1 −0 .assets/17f6b65b666e033f6d757eab80af272608f3179e.svg
+1 −0 .assets/229e4f50d5cb7a04464c2bd175ef23d256e2d25d.svg
+1 −0 .assets/23e67c7d46dd80f36d580b243c5716c84080a34f.svg
+1 −0 .assets/3f4ff4e3916b8e502cabc40483a392da51ad678a.svg
+1 −0 .assets/4023527fa4852947cff1f02ae9ff00ea9bc77719.svg
+1 −0 .assets/47b0af3d54a5c5cfec9387787b9ad4e8de5bce63.svg
+1 −0 .assets/5f6eef0835ac19ee0c898e4b760d8970954291bf.svg
+1 −0 .assets/64fd6acec636adec0e975e8031f8e3f7fb87bb7d.svg
+1 −0 .assets/772fdedb24491c4dde9a73af5e1fd183523d5024.svg
+1 −0 .assets/838ead98a9ae093ded1390e58ff2a328cd8e29a4.svg
+1 −0 .assets/8a8a0e067285eb92c25c539be301949997ccd175.svg
+1 −0 .assets/8f48c9478437c54125028a1d71100121cc58dcd0.svg
+1 −0 .assets/952932c7b15c44b006f762abc15f3c37d87b04d9.svg
+1 −0 .assets/9b3ea57ff4b19f392d36203fa741c94e83a96393.svg
+1 −0 .assets/bf52f4b65079681aa65fd69327e3061d269fe51d.svg
+1 −0 .assets/c6f6294fedb5e5b5fc418d2c7861ece2c2bdef75.svg
+1 −0 .assets/ea9358e636f19fd911c6b5fcbe0f3b0c33f010bb.svg
+1 −0 .assets/ee98e9626d6dd42942fdaf5d08078961de8bf38f.svg
+1 −0 .assets/fefe2c9708de2db1319f2fac935bcc21796a28c0.svg
+8 −0 .github/workflows/comment.yml
+39 −12 .github/workflows/merge-main.yml
+0 −3 .gitmodules
+2 −2,086 diffs/default_before_default_after.md
+0 −1 foundry.toml
+1 −1 lib/aave-address-book
+1 −1 lib/forge-std
+0 −1 lib/solidity-utils
+2 −2 package.json
+2 −3 remappings.txt
+3 −3 scripts/AaveSwapperDeployment.s.sol
+4 −4 scripts/AaveWstethWithdrawerDeployment.s.sol
+1 −1 scripts/RiskStewards.s.sol
+2 −2 scripts/V2RateStrategyFactory.s.sol
+8 −0 src/CommonTestBase.sol
+13 −4 src/GovV3Helpers.sol
+9 −9 src/ProtocolV2TestBase.sol
+62 −41 src/ProtocolV3TestBase.sol
+0 −30 src/ProxyHelpers.sol
+19 −2 src/asset-manager/AaveWstethWithdrawer.sol
+1 −2 src/asset-manager/interfaces/IAaveWstethWithdrawer.sol
+8 −0 src/bridges/arbitrum/AaveArbEthERC20Bridge.sol
+8 −0 src/bridges/optimism/AaveOpEthERC20Bridge.sol
+8 −0 src/bridges/polygon/AavePolEthERC20Bridge.sol
+8 −0 src/bridges/polygon/AavePolEthPlasmaBridge.sol
+8 −8 src/dependencies/DefaultReserveInterestRateStrategy.sol
+4 −4 src/dependencies/IReserveInterestRateStrategy.sol
+2 −2 src/riskstewards/CapsPlusRiskSteward.sol
+2 −2 src/riskstewards/ICapsPlusRiskSteward.sol
+21 −19 src/swaps/AaveSwapper.sol
+109 −0 src/swaps/interfaces/IAaveSwapper.sol
+3 −0 src/swaps/interfaces/IMilkman.sol
+1 −1 src/v2-config-engine/AaveV2ConfigEngine.sol
+2 −2 src/v2-config-engine/AaveV2Payload.sol
+1 −1 src/v3-config-engine/AaveV3PayloadArbitrum.sol
+1 −1 src/v3-config-engine/AaveV3PayloadAvalanche.sol
+1 −1 src/v3-config-engine/AaveV3PayloadBNB.sol
+1 −1 src/v3-config-engine/AaveV3PayloadBase.sol
+1 −1 src/v3-config-engine/AaveV3PayloadEthereum.sol
+6 −3 src/v3-config-engine/AaveV3PayloadEthereumEtherFi.sol
+4 −2 src/v3-config-engine/AaveV3PayloadEthereumLido.sol
+1 −1 src/v3-config-engine/AaveV3PayloadGnosis.sol
+1 −1 src/v3-config-engine/AaveV3PayloadMetis.sol
+1 −1 src/v3-config-engine/AaveV3PayloadOptimism.sol
+1 −1 src/v3-config-engine/AaveV3PayloadPolygon.sol
+1 −1 src/v3-config-engine/AaveV3PayloadPolygonZkEvm.sol
+1 −1 src/v3-config-engine/AaveV3PayloadScroll.sol
+1 −1 src/v3-config-engine/AaveV3PayloadZkSync.sol
+3 −4 tests/ProtocolV3TestBase.t.sol
+1 −1 tests/ProxyHelpersTest.t.sol
+0 −1 tests/mocks/AaveV3AvalancheEModeCategoryUpdateNoChange.sol
+3 −1 tests/mocks/AaveV3EthereumAssetEModeUpdate.sol
+1 −2 tests/mocks/AaveV3PolygonBorrowUpdate.sol
+1 −2 tests/mocks/AaveV3PolygonBorrowUpdateNoChange.sol
+1 −3 tests/mocks/AaveV3PolygonEModeCategoryUpdate.sol
+1 −1 tests/mocks/AaveV3PolygonPriceFeedUpdate.sol
+4 −4 tests/riskstewards/CapsPlusRiskSteward.t.sol
+42 −45 tests/swaps/AaveSwapperTest.t.sol
+1 −1 tests/v2-config-engine/AaveV2ConfigEngineTest.t.sol
+119 −690 yarn.lock
+13 −17 zksync/src/ProtocolV3TestBase.sol
+69 −59 zksync/src/SnapshotHelpersV3.sol
4 changes: 2 additions & 2 deletions remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ forge-std/=lib/forge-std/src/
aave-address-book/=lib/aave-address-book/src/
cl-synchronicity-price-adapter/=lib/cl-synchronicity-price-adapter/src/
aave-helpers/=lib/aave-helpers/src/
solidity-utils/=lib/aave-helpers/lib/solidity-utils/src/
aave-v3-origin/=lib/aave-address-book/lib/aave-v3-origin/src/
solidity-utils/=lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/src/
aave-v3-origin/=lib/aave-address-book/lib/aave-v3-origin/src/
32 changes: 32 additions & 0 deletions reports/ezETH_linea.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Capo Report

| Capped ezETH / ETH / USD | ETH / USD | Diff | Date | 14-day growth in yearly % |
| --- | --- | --- | --- | --- |
| 3770.00194197 | 3665.15 | 2.82% | 30 Nov 2024 | 3.84% |
| 3830.48882182 | 3723.96 | 2.82% | 01 Dec 2024 | 3.78% |
| 3691.41415862 | 3586.89 | 2.87% | 02 Dec 2024 | 4.64% |
| 3675.49770077 | 3570.45 | 2.90% | 03 Dec 2024 | 5.20% |
| 3995.78720977 | 3880.863962 | 2.92% | 04 Dec 2024 | 5.28% |
| 3915.10724598 | 3802.457848 | 2.92% | 05 Dec 2024 | 4.93% |
| 4134.6643822 | 4015.57 | 2.92% | 07 Dec 2024 | 4.98% |
| 4114.15503156 | 3995.1925 | 2.93% | 08 Dec 2024 | 4.81% |
| 4039.40938764 | 3923.11 | 2.92% | 09 Dec 2024 | 4.37% |
| 3814.86076741 | 3704.76 | 2.93% | 10 Dec 2024 | 4.29% |
| 3767.95106589 | 3661.364462 | 2.87% | 11 Dec 2024 | 2.63% |
| 4042.97361668 | 3925.7999 | 2.94% | 12 Dec 2024 | 3.91% |
| 4005.24119365 | 3889.3902 | 2.93% | 13 Dec 2024 | 3.09% |
| 4039.57381507 | 3922.39255063 | 2.94% | 14 Dec 2024 | 3.16% |
| 3971.70756371 | 3855.595517 | 2.97% | 15 Dec 2024 | 3.63% |
| 4063.83857341 | 3944.28190958 | 2.99% | 16 Dec 2024 | 4.11% |
| 4145.21152209 | 4023.19 | 2.99% | 17 Dec 2024 | 2.87% |


* 14-day growth is calculated as an annualized percentage relative to the value of the rate 14 days prior.


| Max Yearly % | Max Day-to-day yearly % | Max 14-day yearly % |
| --- | --- | --- |
| 10.89% | 25.28% | 5.28% |


* Max day-to-day yearly % indicates the maximum growth between two emissions as an annualized percentage.
39 changes: 39 additions & 0 deletions reports/weETH_linea.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Capo Report

| Capped weETH / ETH / USD | ETH / USD | Diff | Date | 7-day growth in yearly % |
| --- | --- | --- | --- | --- |
| 3542.34792694 | 3362.53 | 5.21% | 23 Nov 2024 | 3.00% |
| 3557.09776461 | 3376.23 | 5.22% | 24 Nov 2024 | 3.04% |
| 3689.00188804 | 3501.18 | 5.22% | 25 Nov 2024 | 3.11% |
| 3490.27678812 | 3312.314206 | 5.23% | 26 Nov 2024 | 2.85% |
| 3681.32213097 | 3493.3843 | 5.24% | 27 Nov 2024 | 2.73% |
| 3785.35901733 | 3591.88 | 5.25% | 28 Nov 2024 | 2.79% |
| 3806.40678324 | 3611.63 | 5.25% | 29 Nov 2024 | 2.66% |
| 3863.16783347 | 3665.15 | 5.26% | 30 Nov 2024 | 2.63% |
| 3925.42373546 | 3723.96 | 5.27% | 01 Dec 2024 | 2.51% |
| 3781.19041512 | 3586.89 | 5.27% | 02 Dec 2024 | 2.49% |
| 3764.15002086 | 3570.45 | 5.28% | 03 Dec 2024 | 2.49% |
| 4092.06323209 | 3880.863962 | 5.30% | 04 Dec 2024 | 2.95% |
| 4009.69891287 | 3802.457848 | 5.31% | 05 Dec 2024 | 2.99% |
| 4234.64152435 | 4015.57 | 5.31% | 07 Dec 2024 | 2.93% |
| 4213.57352699 | 3995.1925 | 5.32% | 08 Dec 2024 | 2.96% |
| 4137.86255022 | 3923.11 | 5.33% | 09 Dec 2024 | 2.98% |
| 3907.88047386 | 3704.76 | 5.34% | 10 Dec 2024 | 3.05% |
| 3862.43345114 | 3661.364462 | 5.34% | 11 Dec 2024 | 3.10% |
| 4141.70158988 | 3925.7999 | 5.35% | 12 Dec 2024 | 2.69% |
| 4103.6040573 | 3889.3902 | 5.36% | 13 Dec 2024 | 2.70% |
| 4138.73258428 | 3922.39255063 | 5.37% | 14 Dec 2024 | 2.83% |
| 4068.53623873 | 3855.595517 | 5.37% | 15 Dec 2024 | 2.69% |
| 4162.45361466 | 3944.28190958 | 5.38% | 16 Dec 2024 | 2.73% |
| 4246.04269628 | 4023.19 | 5.39% | 17 Dec 2024 | 2.69% |


* 7-day growth is calculated as an annualized percentage relative to the value of the rate 7 days prior.


| Max Yearly % | Max Day-to-day yearly % | Max 7-day yearly % |
| --- | --- | --- |
| 8.75% | 5.53% | 3.11% |


* Max day-to-day yearly % indicates the maximum growth between two emissions as an annualized percentage.
113 changes: 113 additions & 0 deletions scripts/DeployLinea.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import {GovV3Helpers} from 'aave-helpers/GovV3Helpers.sol';
import {LineaScript} from 'solidity-utils/contracts/utils/ScriptUtils.sol';
import {AaveV3Linea} from 'aave-address-book/AaveV3Linea.sol';
import {CLRatePriceCapAdapter} from '../src/contracts/CLRatePriceCapAdapter.sol';
import {PriceCapAdapterStable, IPriceCapAdapterStable} from '../src/contracts/PriceCapAdapterStable.sol';
import {IPriceCapAdapter, IChainlinkAggregator} from '../src/interfaces/IPriceCapAdapter.sol';

library CapAdaptersCodeLinea {
address public constant ezETH_ETH_AGGREGATOR = 0xb71F79770BA599940F454c70e63d4DE0E8606731;
address public constant weETH_eETH_AGGREGATOR = 0x1FBc7d24654b10c71fd74d3730d9Df17836181EF;
address public constant WETH_PRICE_FEED = 0x3c6Cd9Cc7c7a4c2Cf5a82734CD249D7D593354dA;
address public constant USDC_PRICE_FEED = 0xAADAa473C1bDF7317ec07c915680Af29DeBfdCb5;
address public constant USDT_PRICE_FEED = 0xefCA2bbe0EdD0E22b2e0d2F8248E99F4bEf4A7dB;

function weETHAdapterCode() internal pure returns (bytes memory) {
return
abi.encodePacked(
type(CLRatePriceCapAdapter).creationCode,
abi.encode(
IPriceCapAdapter.CapAdapterParams({
aclManager: AaveV3Linea.ACL_MANAGER,
baseAggregatorAddress: WETH_PRICE_FEED,
ratioProviderAddress: weETH_eETH_AGGREGATOR,
pairDescription: 'Capped weETH / eETH(ETH) / USD',
minimumSnapshotDelay: 7 days,
priceCapParams: IPriceCapAdapter.PriceCapUpdateParams({
snapshotRatio: 1054169605180649721,
snapshotTimestamp: 1733109809,
maxYearlyRatioGrowthPercent: 8_75
})
})
)
);
}

function ezETHAdapterCode() internal pure returns (bytes memory) {
return
abi.encodePacked(
type(CLRatePriceCapAdapter).creationCode,
abi.encode(
IPriceCapAdapter.CapAdapterParams({
aclManager: AaveV3Linea.ACL_MANAGER,
baseAggregatorAddress: WETH_PRICE_FEED,
ratioProviderAddress: ezETH_ETH_AGGREGATOR,
pairDescription: 'Capped ezETH / ETH / USD',
minimumSnapshotDelay: 14 days,
priceCapParams: IPriceCapAdapter.PriceCapUpdateParams({
snapshotRatio: 1029140608890425422,
snapshotTimestamp: 1733109809,
maxYearlyRatioGrowthPercent: 10_89
})
})
)
);
}

function USDCAdapterCode() internal pure returns (bytes memory) {
return
abi.encodePacked(
type(PriceCapAdapterStable).creationCode,
abi.encode(
IPriceCapAdapterStable.CapAdapterStableParams({
aclManager: AaveV3Linea.ACL_MANAGER,
assetToUsdAggregator: IChainlinkAggregator(USDC_PRICE_FEED),
adapterDescription: 'Capped USDC/USD',
priceCap: int256(1.04 * 1e8)
})
)
);
}

function USDTAdapterCode() internal pure returns (bytes memory) {
return
abi.encodePacked(
type(PriceCapAdapterStable).creationCode,
abi.encode(
IPriceCapAdapterStable.CapAdapterStableParams({
aclManager: AaveV3Linea.ACL_MANAGER,
assetToUsdAggregator: IChainlinkAggregator(USDT_PRICE_FEED),
adapterDescription: 'Capped USDT/USD',
priceCap: int256(1.04 * 1e8)
})
)
);
}
}

contract DeployWeEthLinea is LineaScript {
function run() external broadcast {
GovV3Helpers.deployDeterministic(CapAdaptersCodeLinea.weETHAdapterCode());
}
}

contract DeployEzEthLinea is LineaScript {
function run() external broadcast {
GovV3Helpers.deployDeterministic(CapAdaptersCodeLinea.ezETHAdapterCode());
}
}

contract DeployUSDCLinea is LineaScript {
function run() external broadcast {
GovV3Helpers.deployDeterministic(CapAdaptersCodeLinea.USDCAdapterCode());
}
}

contract DeployUSDTLinea is LineaScript {
function run() external broadcast {
GovV3Helpers.deployDeterministic(CapAdaptersCodeLinea.USDTAdapterCode());
}
}
15 changes: 15 additions & 0 deletions tests/linea/USDCPriceCapAdapterTest.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import '../BaseStableTest.sol';
import {CapAdaptersCodeLinea} from '../../scripts/DeployLinea.s.sol';

contract USDCLineaPriceCapAdapterTest is BaseStableTest {
constructor()
BaseStableTest(
CapAdaptersCodeLinea.USDCAdapterCode(),
10,
ForkParams({network: 'linea', blockNumber: 13432357})
)
{}
}
15 changes: 15 additions & 0 deletions tests/linea/USDTPriceCapAdapterTest.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import '../BaseStableTest.sol';
import {CapAdaptersCodeLinea} from '../../scripts/DeployLinea.s.sol';

contract USDTLineaPriceCapAdapterTest is BaseStableTest {
constructor()
BaseStableTest(
CapAdaptersCodeLinea.USDTAdapterCode(),
10,
ForkParams({network: 'linea', blockNumber: 13432357})
)
{}
}
16 changes: 16 additions & 0 deletions tests/linea/ezETHLineaPriceCapAdapterTest.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import {CLAdapterBaseTest} from '../CLAdapterBaseTest.sol';
import {CapAdaptersCodeLinea} from '../../scripts/DeployLinea.s.sol';

contract ezETHLineaPriceCapAdapterTest is CLAdapterBaseTest {
constructor()
CLAdapterBaseTest(
CapAdaptersCodeLinea.ezETHAdapterCode(),
30,
ForkParams({network: 'linea', blockNumber: 13423434}),
'ezETH_Linea'
)
{}
}
16 changes: 16 additions & 0 deletions tests/linea/weETHLineaPriceCapAdapterTest.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import {CLAdapterBaseTest} from '../CLAdapterBaseTest.sol';
import {CapAdaptersCodeLinea} from '../../scripts/DeployLinea.s.sol';

contract weETHLineaPriceCapAdapterTest is CLAdapterBaseTest {
constructor()
CLAdapterBaseTest(
CapAdaptersCodeLinea.weETHAdapterCode(),
30,
ForkParams({network: 'linea', blockNumber: 13423434}),
'weETH_Linea'
)
{}
}
4 changes: 4 additions & 0 deletions tests/utils/BlockUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ library BlockUtils {
return 80_000;
}

if (keccak256(bytes(network)) == keccak256(bytes('linea'))) {
return 43_200;
}

return 7300;
}
}
22 changes: 22 additions & 0 deletions tests/utils/GetExchangeRatesTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {CapAdaptersCodeBase} from '../../scripts/DeployBase.s.sol';
import {CapAdaptersCodeScroll} from '../../scripts/DeployScroll.s.sol';
import {CapAdaptersCodeBNB} from '../../scripts/DeployBnb.s.sol';
import {CapAdaptersCodeZkSync} from '../../scripts/DeployZkSync.s.sol';
import {CapAdaptersCodeLinea} from '../../scripts/DeployLinea.s.sol';

contract ExchangeRatesEth is Test {
function setUp() public {
Expand Down Expand Up @@ -281,3 +282,24 @@ contract ExchangeRatesZKSync is Test {
console.log(block.timestamp);
}
}

contract ExchangeRatesLinea is Test {
function setUp() public {
vm.createSelectFork(vm.rpcUrl('linea'), 12792222); // Dec-02-2024
}

function test_getExchangeRate() public view {
uint256 ezETHRate = uint256(
IChainlinkAggregator(CapAdaptersCodeLinea.ezETH_ETH_AGGREGATOR).latestAnswer()
);

uint256 weETHRate = uint256(
IChainlinkAggregator(CapAdaptersCodeLinea.weETH_eETH_AGGREGATOR).latestAnswer()
);

console.log('Linea');
console.log('ezETHRate', ezETHRate);
console.log('weETHRate', weETHRate);
console.log(block.timestamp);
}
}
Loading