From a574110bf9b0f5a2c9efcd8cc66c8f05200baeb1 Mon Sep 17 00:00:00 2001 From: sendra Date: Tue, 23 Apr 2024 18:06:22 +0200 Subject: [PATCH] fix: Add payload already created check to createPayload method (#296) --- ...987481fcd21ac926a7663682a9aa4ac8703d67.svg | 1 + ...292b27a90b078d7d1b7766456c23c19546e2a4.svg | 1 + ...00854535bfbb5f41643954ec476f3f67788d90.svg | 1 + ...ae6206ef4795b7c2b4496958440424724f4f9e.svg | 1 + ...5ed58b79c16962a99bbc7421e94ea5f2815420.svg | 1 + ...16dad7140aff0fae9c6086df2ed135c2d25a6c.svg | 1 + ...8fac88a810e729d4ab675051bce37c536eabd3.svg | 1 + ...TestEngineListing_postTestEngineListing.md | 4 +- .../preTestEngineOptV3_postTestEngineOptV3.md | 38 ++++++++++------- ...EnginePriceFeed_postTestEnginePriceFeed.md | 6 +-- .../preTestEngineRates_postTestEngineRates.md | 12 +++--- lib/aave-address-book | 2 +- package.json | 2 +- src/CommonTestBase.sol | 2 +- src/GovV3Helpers.sol | 42 +++++++++++++++---- src/IpfsUtils.sol | 2 +- src/adi/test/ADITestBase.sol | 2 +- tests/GovV3Test.t.sol | 19 ++++++++- .../AaveV3ConfigEngineTest.t.sol | 2 +- .../V3RateStrategyFactory.t.sol | 2 +- yarn.lock | 38 ++++++++++------- 21 files changed, 123 insertions(+), 57 deletions(-) create mode 100644 .assets/5a987481fcd21ac926a7663682a9aa4ac8703d67.svg create mode 100644 .assets/5e292b27a90b078d7d1b7766456c23c19546e2a4.svg create mode 100644 .assets/5f00854535bfbb5f41643954ec476f3f67788d90.svg create mode 100644 .assets/8dae6206ef4795b7c2b4496958440424724f4f9e.svg create mode 100644 .assets/955ed58b79c16962a99bbc7421e94ea5f2815420.svg create mode 100644 .assets/b416dad7140aff0fae9c6086df2ed135c2d25a6c.svg create mode 100644 .assets/e38fac88a810e729d4ab675051bce37c536eabd3.svg diff --git a/.assets/5a987481fcd21ac926a7663682a9aa4ac8703d67.svg b/.assets/5a987481fcd21ac926a7663682a9aa4ac8703d67.svg new file mode 100644 index 00000000..4354cb37 --- /dev/null +++ b/.assets/5a987481fcd21ac926a7663682a9aa4ac8703d67.svg @@ -0,0 +1 @@ + Borrow APR, variableBorrow APR, stable0%25%50%75%100%0%50%100%uOptimal 90%uOptimal 90% \ No newline at end of file diff --git a/.assets/5e292b27a90b078d7d1b7766456c23c19546e2a4.svg b/.assets/5e292b27a90b078d7d1b7766456c23c19546e2a4.svg new file mode 100644 index 00000000..988e727a --- /dev/null +++ b/.assets/5e292b27a90b078d7d1b7766456c23c19546e2a4.svg @@ -0,0 +1 @@ + Borrow APR, variableBorrow APR, stable0%25%50%75%100%0%50%100%uOptimal 80%uOptimal 80% \ No newline at end of file diff --git a/.assets/5f00854535bfbb5f41643954ec476f3f67788d90.svg b/.assets/5f00854535bfbb5f41643954ec476f3f67788d90.svg new file mode 100644 index 00000000..a1ee31b7 --- /dev/null +++ b/.assets/5f00854535bfbb5f41643954ec476f3f67788d90.svg @@ -0,0 +1 @@ + Borrow APR, variableBorrow APR, stable0%25%50%75%100%0%50%100%uOptimal 90%uOptimal 90% \ No newline at end of file diff --git a/.assets/8dae6206ef4795b7c2b4496958440424724f4f9e.svg b/.assets/8dae6206ef4795b7c2b4496958440424724f4f9e.svg new file mode 100644 index 00000000..671189bf --- /dev/null +++ b/.assets/8dae6206ef4795b7c2b4496958440424724f4f9e.svg @@ -0,0 +1 @@ + Borrow APR, variableBorrow APR, stable0%25%50%75%100%0%100%200%300%uOptimal 45%uOptimal 45% \ No newline at end of file diff --git a/.assets/955ed58b79c16962a99bbc7421e94ea5f2815420.svg b/.assets/955ed58b79c16962a99bbc7421e94ea5f2815420.svg new file mode 100644 index 00000000..588e84c0 --- /dev/null +++ b/.assets/955ed58b79c16962a99bbc7421e94ea5f2815420.svg @@ -0,0 +1 @@ + Borrow APR, variableBorrow APR, stable0%25%50%75%100%0%50%100%uOptimal 90%uOptimal 90% \ No newline at end of file diff --git a/.assets/b416dad7140aff0fae9c6086df2ed135c2d25a6c.svg b/.assets/b416dad7140aff0fae9c6086df2ed135c2d25a6c.svg new file mode 100644 index 00000000..afc40739 --- /dev/null +++ b/.assets/b416dad7140aff0fae9c6086df2ed135c2d25a6c.svg @@ -0,0 +1 @@ + Borrow APR, variableBorrow APR, stable0%25%50%75%100%0%50%100%uOptimal 80%uOptimal 80% \ No newline at end of file diff --git a/.assets/e38fac88a810e729d4ab675051bce37c536eabd3.svg b/.assets/e38fac88a810e729d4ab675051bce37c536eabd3.svg new file mode 100644 index 00000000..6fedc0f3 --- /dev/null +++ b/.assets/e38fac88a810e729d4ab675051bce37c536eabd3.svg @@ -0,0 +1 @@ + Borrow APR, variableBorrow APR, stable0%25%50%75%100%0%20%40%60%80%uOptimal 90%uOptimal 90% \ No newline at end of file diff --git a/diffs/preTestEngineListing_postTestEngineListing.md b/diffs/preTestEngineListing_postTestEngineListing.md index f6a8df89..6ee76092 100644 --- a/diffs/preTestEngineListing_postTestEngineListing.md +++ b/diffs/preTestEngineListing_postTestEngineListing.md @@ -18,7 +18,7 @@ | oracle | [0x443C5116CdF663Eb387e72C688D276e702135C87](https://polygonscan.com/address/0x443C5116CdF663Eb387e72C688D276e702135C87) | | oracleDecimals | 8 | | oracleDescription | 1INCH / USD | -| oracleLatestAnswer | 0.54658874 | +| oracleLatestAnswer | 0.55575 | | usageAsCollateralEnabled | true | | ltv | 82.5 % | | liquidationThreshold | 86 % | @@ -98,7 +98,7 @@ "oracle": "0x443C5116CdF663Eb387e72C688D276e702135C87", "oracleDecimals": 8, "oracleDescription": "1INCH / USD", - "oracleLatestAnswer": 54658874, + "oracleLatestAnswer": 55575000, "reserveFactor": 1000, "stableBorrowRateEnabled": false, "stableDebtToken": "0x106Daa74Bd93f436D455953966ba6b70EBdCbFdb", diff --git a/diffs/preTestEngineOptV3_postTestEngineOptV3.md b/diffs/preTestEngineOptV3_postTestEngineOptV3.md index c40e4ed3..589b5157 100644 --- a/diffs/preTestEngineOptV3_postTestEngineOptV3.md +++ b/diffs/preTestEngineOptV3_postTestEngineOptV3.md @@ -6,20 +6,22 @@ | description | value before | value after | | --- | --- | --- | -| interestRateStrategy | [0x5f58C25D17C09c9e1892F45DE6dA45ed973A5326](https://optimistic.etherscan.io/address/0x5f58C25D17C09c9e1892F45DE6dA45ed973A5326) | [0xc76EF342898f1AE7E6C4632627Df683FAD8563DD](https://optimistic.etherscan.io/address/0xc76EF342898f1AE7E6C4632627Df683FAD8563DD) | +| interestRateStrategy | [0x16F9bBeE415e519F184Fe1c09d653C6567e4eb2f](https://optimistic.etherscan.io/address/0x16F9bBeE415e519F184Fe1c09d653C6567e4eb2f) | [0xc76EF342898f1AE7E6C4632627Df683FAD8563DD](https://optimistic.etherscan.io/address/0xc76EF342898f1AE7E6C4632627Df683FAD8563DD) | +| optimalUsageRatio | 90 % | 80 % | +| maxExcessUsageRatio | 10 % | 20 % | | baseVariableBorrowRate | 0 % | 1 % | -| variableRateSlope1 | 3.3 % | 3.8 % | -| baseStableBorrowRate | 6.3 % | 6.8 % | -| interestRate | ![before](/.assets/44f8b63555df7a9d81101549741bd958deb27588.svg) | ![after](/.assets/2bed3d1cc40e3ecced7768caf9f6695c5217d96f.svg) | +| variableRateSlope1 | 3 % | 3.8 % | +| baseStableBorrowRate | 6 % | 6.8 % | +| interestRate | ![before](/.assets/5a987481fcd21ac926a7663682a9aa4ac8703d67.svg) | ![after](/.assets/2bed3d1cc40e3ecced7768caf9f6695c5217d96f.svg) | #### USDT ([0x94b008aA00579c1307B0EF2c499aD98a8ce58e58](https://optimistic.etherscan.io/address/0x94b008aA00579c1307B0EF2c499aD98a8ce58e58)) | description | value before | value after | | --- | --- | --- | -| interestRateStrategy | [0xd5CA18a70189309664e34FB8150799ff13722308](https://optimistic.etherscan.io/address/0xd5CA18a70189309664e34FB8150799ff13722308) | [0x424883C7dD9Bd129BC346A65E8455CDe9fC0c43C](https://optimistic.etherscan.io/address/0x424883C7dD9Bd129BC346A65E8455CDe9fC0c43C) | +| interestRateStrategy | [0xdd5ee22CC6CbbB41518871D95558B648a3551b54](https://optimistic.etherscan.io/address/0xdd5ee22CC6CbbB41518871D95558B648a3551b54) | [0xcf3136a52e6a01C482EdA64d3F0242dc3DBAFa47](https://optimistic.etherscan.io/address/0xcf3136a52e6a01C482EdA64d3F0242dc3DBAFa47) | | optimalUsageRatio | 90 % | 80 % | | maxExcessUsageRatio | 10 % | 20 % | -| interestRate | ![before](/.assets/19d720ba733a698f9e5c8714853876f8759c351e.svg) | ![after](/.assets/4c96597d8e0f135353f37321358e767ebe5eb8a8.svg) | +| interestRate | ![before](/.assets/5f00854535bfbb5f41643954ec476f3f67788d90.svg) | ![after](/.assets/5e292b27a90b078d7d1b7766456c23c19546e2a4.svg) | ## Raw diff @@ -28,40 +30,48 @@ "reserves": { "0x4200000000000000000000000000000000000006": { "interestRateStrategy": { - "from": "0x5f58C25D17C09c9e1892F45DE6dA45ed973A5326", + "from": "0x16F9bBeE415e519F184Fe1c09d653C6567e4eb2f", "to": "0xc76EF342898f1AE7E6C4632627Df683FAD8563DD" } }, "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58": { "interestRateStrategy": { - "from": "0xd5CA18a70189309664e34FB8150799ff13722308", - "to": "0x424883C7dD9Bd129BC346A65E8455CDe9fC0c43C" + "from": "0xdd5ee22CC6CbbB41518871D95558B648a3551b54", + "to": "0xcf3136a52e6a01C482EdA64d3F0242dc3DBAFa47" } } }, "strategies": { "0x4200000000000000000000000000000000000006": { "address": { - "from": "0x5f58C25D17C09c9e1892F45DE6dA45ed973A5326", + "from": "0x16F9bBeE415e519F184Fe1c09d653C6567e4eb2f", "to": "0xc76EF342898f1AE7E6C4632627Df683FAD8563DD" }, "baseStableBorrowRate": { - "from": "63000000000000000000000000", + "from": "60000000000000000000000000", "to": "68000000000000000000000000" }, "baseVariableBorrowRate": { "from": 0, "to": "10000000000000000000000000" }, + "maxExcessUsageRatio": { + "from": "100000000000000000000000000", + "to": "200000000000000000000000000" + }, + "optimalUsageRatio": { + "from": "900000000000000000000000000", + "to": "800000000000000000000000000" + }, "variableRateSlope1": { - "from": "33000000000000000000000000", + "from": "30000000000000000000000000", "to": "38000000000000000000000000" } }, "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58": { "address": { - "from": "0xd5CA18a70189309664e34FB8150799ff13722308", - "to": "0x424883C7dD9Bd129BC346A65E8455CDe9fC0c43C" + "from": "0xdd5ee22CC6CbbB41518871D95558B648a3551b54", + "to": "0xcf3136a52e6a01C482EdA64d3F0242dc3DBAFa47" }, "maxExcessUsageRatio": { "from": "100000000000000000000000000", diff --git a/diffs/preTestEnginePriceFeed_postTestEnginePriceFeed.md b/diffs/preTestEnginePriceFeed_postTestEnginePriceFeed.md index 3173db2b..0eaf6913 100644 --- a/diffs/preTestEnginePriceFeed_postTestEnginePriceFeed.md +++ b/diffs/preTestEnginePriceFeed_postTestEnginePriceFeed.md @@ -8,7 +8,7 @@ | --- | --- | --- | | oracle | [0x72484B12719E23115761D5DA1646945632979bB6](https://polygonscan.com/address/0x72484B12719E23115761D5DA1646945632979bB6) | [0x17E33D122FC34c7ad8FBd4a1995Dff9c8aE675eb](https://polygonscan.com/address/0x17E33D122FC34c7ad8FBd4a1995Dff9c8aE675eb) | | oracleDescription | AAVE / USD | Capped USDC/USD | -| oracleLatestAnswer | 113.57664588 | 0.99991524 | +| oracleLatestAnswer | 117.06049662 | 0.99995124 | ## Raw diff @@ -26,8 +26,8 @@ "to": "Capped USDC/USD" }, "oracleLatestAnswer": { - "from": 11357664588, - "to": 99991524 + "from": 11706049662, + "to": 99995124 } } } diff --git a/diffs/preTestEngineRates_postTestEngineRates.md b/diffs/preTestEngineRates_postTestEngineRates.md index 527a1517..d90a1b6b 100644 --- a/diffs/preTestEngineRates_postTestEngineRates.md +++ b/diffs/preTestEngineRates_postTestEngineRates.md @@ -6,10 +6,10 @@ | description | value before | value after | | --- | --- | --- | -| interestRateStrategy | [0xd5CA18a70189309664e34FB8150799ff13722308](https://optimistic.etherscan.io/address/0xd5CA18a70189309664e34FB8150799ff13722308) | [0x424883C7dD9Bd129BC346A65E8455CDe9fC0c43C](https://optimistic.etherscan.io/address/0x424883C7dD9Bd129BC346A65E8455CDe9fC0c43C) | +| interestRateStrategy | [0xdd5ee22CC6CbbB41518871D95558B648a3551b54](https://optimistic.etherscan.io/address/0xdd5ee22CC6CbbB41518871D95558B648a3551b54) | [0xcf3136a52e6a01C482EdA64d3F0242dc3DBAFa47](https://optimistic.etherscan.io/address/0xcf3136a52e6a01C482EdA64d3F0242dc3DBAFa47) | | optimalUsageRatio | 90 % | 80 % | | maxExcessUsageRatio | 10 % | 20 % | -| interestRate | ![before](/.assets/19d720ba733a698f9e5c8714853876f8759c351e.svg) | ![after](/.assets/4c96597d8e0f135353f37321358e767ebe5eb8a8.svg) | +| interestRate | ![before](/.assets/5f00854535bfbb5f41643954ec476f3f67788d90.svg) | ![after](/.assets/5e292b27a90b078d7d1b7766456c23c19546e2a4.svg) | ## Raw diff @@ -18,16 +18,16 @@ "reserves": { "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58": { "interestRateStrategy": { - "from": "0xd5CA18a70189309664e34FB8150799ff13722308", - "to": "0x424883C7dD9Bd129BC346A65E8455CDe9fC0c43C" + "from": "0xdd5ee22CC6CbbB41518871D95558B648a3551b54", + "to": "0xcf3136a52e6a01C482EdA64d3F0242dc3DBAFa47" } } }, "strategies": { "0x94b008aA00579c1307B0EF2c499aD98a8ce58e58": { "address": { - "from": "0xd5CA18a70189309664e34FB8150799ff13722308", - "to": "0x424883C7dD9Bd129BC346A65E8455CDe9fC0c43C" + "from": "0xdd5ee22CC6CbbB41518871D95558B648a3551b54", + "to": "0xcf3136a52e6a01C482EdA64d3F0242dc3DBAFa47" }, "maxExcessUsageRatio": { "from": "100000000000000000000000000", diff --git a/lib/aave-address-book b/lib/aave-address-book index c173b177..405e6b4b 160000 --- a/lib/aave-address-book +++ b/lib/aave-address-book @@ -1 +1 @@ -Subproject commit c173b1772b4f6c21866eebcfcdb8e21f4eef69ee +Subproject commit 405e6b4b94ada8f9b7b9f8aa3d1ec8fc48519ba6 diff --git a/package.json b/package.json index 779f0d95..568a901b 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,6 @@ "prettier-plugin-solidity": "^1.1.3" }, "dependencies": { - "@bgd-labs/aave-cli": "0.9.3" + "@bgd-labs/aave-cli": "0.12.0" } } diff --git a/src/CommonTestBase.sol b/src/CommonTestBase.sol index 9635e7ba..52b0a4c5 100644 --- a/src/CommonTestBase.sol +++ b/src/CommonTestBase.sol @@ -171,7 +171,7 @@ contract CommonTestBase is Test { string[] memory inputs = new string[](7); inputs[0] = 'npx'; - inputs[1] = '@bgd-labs/aave-cli@^0.9.3'; + inputs[1] = '@bgd-labs/aave-cli@^0.12.0'; inputs[2] = 'diff-snapshots'; inputs[3] = beforePath; inputs[4] = afterPath; diff --git a/src/GovV3Helpers.sol b/src/GovV3Helpers.sol index 456ac7cc..ab82572d 100644 --- a/src/GovV3Helpers.sol +++ b/src/GovV3Helpers.sol @@ -69,6 +69,7 @@ library GovV3Helpers { error ExecutorNotFound(); error LongBytesNotSupportedYet(); error FfiFailed(); + error PayloadAlreadyCreated(); struct StorageRootResponse { address account; @@ -94,7 +95,7 @@ library GovV3Helpers { ) internal returns (IVotingMachineWithProofs.VotingBalanceProof[] memory) { string[] memory inputs = new string[](8); inputs[0] = 'npx'; - inputs[1] = '@bgd-labs/aave-cli@^0.9.3'; + inputs[1] = '@bgd-labs/aave-cli@^0.12.0'; inputs[2] = 'governance'; inputs[3] = 'getVotingProofs'; inputs[4] = '--proposalId'; @@ -120,7 +121,7 @@ library GovV3Helpers { ) internal returns (StorageRootResponse[] memory) { string[] memory inputs = new string[](6); inputs[0] = 'npx'; - inputs[1] = '@bgd-labs/aave-cli@^0.9.3'; + inputs[1] = '@bgd-labs/aave-cli@^0.12.0'; inputs[2] = 'governance'; inputs[3] = 'getStorageRoots'; inputs[4] = '--proposalId'; @@ -271,11 +272,19 @@ library GovV3Helpers { */ function createPayload( IPayloadsControllerCore.ExecutionAction[] memory actions - ) internal returns (uint40) { + ) public returns (uint40) { IPayloadsControllerCore payloadsController = getPayloadsController(block.chainid); require(actions.length > 0, 'INVALID ACTIONS'); - return payloadsController.createPayload(actions); + (, IPayloadsControllerCore.Payload memory payload, bool payloadCreated) = _findCreatedPayload( + payloadsController, + actions + ); + if (payloadCreated && payload.createdAt > block.timestamp - 7 days) { + revert PayloadAlreadyCreated(); + } else { + return payloadsController.createPayload(actions); + } } function createPayload( @@ -781,20 +790,37 @@ library GovV3Helpers { return (payload.maximumAccessLevelRequired, payloadId); } - function _findPayloadId( + function _findCreatedPayload( IPayloadsControllerCore payloadsController, IPayloadsControllerCore.ExecutionAction[] memory actions - ) private view returns (uint40, IPayloadsControllerCore.Payload memory) { + ) private view returns (uint40, IPayloadsControllerCore.Payload memory, bool) { uint40 count = payloadsController.getPayloadsCount(); for (uint40 payloadId = count; payloadId > 0; payloadId--) { IPayloadsControllerCore.Payload memory payload = payloadsController.getPayloadById( payloadId - 1 ); if (_actionsAreEqual(actions, payload.actions)) { - return (payloadId - 1, payload); + return (payloadId - 1, payload, true); } } - revert CannotFindPayload(); + IPayloadsControllerCore.Payload memory emptyPayload; + return (type(uint40).max, emptyPayload, false); + } + + function _findPayloadId( + IPayloadsControllerCore payloadsController, + IPayloadsControllerCore.ExecutionAction[] memory actions + ) private view returns (uint40, IPayloadsControllerCore.Payload memory) { + ( + uint40 payloadId, + IPayloadsControllerCore.Payload memory payload, + bool payloadCreated + ) = _findCreatedPayload(payloadsController, actions); + if (payloadCreated) { + return (payloadId, payload); + } else { + revert CannotFindPayload(); + } } function _actionsAreEqual( diff --git a/src/IpfsUtils.sol b/src/IpfsUtils.sol index 8f96b8c5..5dabfd98 100644 --- a/src/IpfsUtils.sol +++ b/src/IpfsUtils.sol @@ -9,7 +9,7 @@ library IpfsUtils { function ipfsHashFile(Vm vm, string memory filePath, bool upload) internal returns (bytes32) { string[] memory inputs = new string[](5); inputs[0] = 'npx'; - inputs[1] = '@bgd-labs/aave-cli@^0.9.3'; + inputs[1] = '@bgd-labs/aave-cli@^0.12.0'; inputs[2] = 'ipfs'; inputs[3] = filePath; if (upload) { diff --git a/src/adi/test/ADITestBase.sol b/src/adi/test/ADITestBase.sol index cbc901dc..5346fa29 100644 --- a/src/adi/test/ADITestBase.sol +++ b/src/adi/test/ADITestBase.sol @@ -76,7 +76,7 @@ contract ADITestBase is Test { string[] memory inputs = new string[](7); inputs[0] = 'npx'; - inputs[1] = '@bgd-labs/aave-cli@0.10.0'; + inputs[1] = '@bgd-labs/aave-cli@^0.12.0'; inputs[2] = 'adi-diff-snapshots'; inputs[3] = beforePath; inputs[4] = afterPath; diff --git a/tests/GovV3Test.t.sol b/tests/GovV3Test.t.sol index 845ff645..a9968985 100644 --- a/tests/GovV3Test.t.sol +++ b/tests/GovV3Test.t.sol @@ -94,7 +94,7 @@ contract GovernanceV3Test is ProtocolV3TestBase { assertEq(pl.queuedAt, 1705004722); assertEq(uint256(pl.maximumAccessLevelRequired), 1); assertEq(pl.createdAt, block.timestamp); - assertEq(pl.creator, address(0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496)); + assertEq(pl.creator, address(this)); } /** @@ -150,6 +150,23 @@ contract GovernanceV3Test is ProtocolV3TestBase { vm.stopPrank(); } + function test_payloadCreationWhenPayloadAlreadyCreated() public { + // 1. deploy payloads + PayloadWithEmit pl1 = new PayloadWithEmit(); + PayloadWithEmit pl2 = new PayloadWithEmit(); + + // 2. create action & register action + IPayloadsControllerCore.ExecutionAction[] + memory actions = new IPayloadsControllerCore.ExecutionAction[](2); + actions[0] = GovV3Helpers.buildAction(address(pl1)); + actions[1] = GovV3Helpers.buildAction(address(pl2)); + GovV3Helpers.createPayload(actions); + + // 3. create same payload + vm.expectRevert(GovV3Helpers.PayloadAlreadyCreated.selector); + GovV3Helpers.createPayload(actions); + } + function test_helpers() public { defaultTest('default', AaveV3Ethereum.POOL, address(payload)); } diff --git a/tests/v3-config-engine/AaveV3ConfigEngineTest.t.sol b/tests/v3-config-engine/AaveV3ConfigEngineTest.t.sol index 4ca0362c..16c21669 100644 --- a/tests/v3-config-engine/AaveV3ConfigEngineTest.t.sol +++ b/tests/v3-config-engine/AaveV3ConfigEngineTest.t.sol @@ -40,7 +40,7 @@ contract AaveV3ConfigEngineTest is ProtocolV3TestBase { function setUp() public { mainnetFork = vm.createSelectFork(vm.rpcUrl('mainnet'), 18515746); - optimismFork = vm.createSelectFork(vm.rpcUrl('optimism'), 115008197); + optimismFork = vm.createSelectFork(vm.rpcUrl('optimism'), 119144694); polygonFork = vm.createSelectFork(vm.rpcUrl('polygon'), 55734786); avalancheFork = vm.createSelectFork(vm.rpcUrl('avalanche'), 37426577); arbitrumFork = vm.createSelectFork(vm.rpcUrl('arbitrum'), 147823152); diff --git a/tests/v3-config-engine/V3RateStrategyFactory.t.sol b/tests/v3-config-engine/V3RateStrategyFactory.t.sol index 81b4a826..d891ad2b 100644 --- a/tests/v3-config-engine/V3RateStrategyFactory.t.sol +++ b/tests/v3-config-engine/V3RateStrategyFactory.t.sol @@ -12,7 +12,7 @@ contract V3RateStrategyFactoryTest is ProtocolV3TestBase { V3RateStrategyFactory rateStrategyFactory; function setUp() public { - vm.createSelectFork(vm.rpcUrl('mainnet'), 19036639); + vm.createSelectFork(vm.rpcUrl('mainnet'), 19719160); rateStrategyFactory = new V3RateStrategyFactory(AaveV3Ethereum.POOL_ADDRESSES_PROVIDER); } diff --git a/yarn.lock b/yarn.lock index 8957945c..779aab07 100644 --- a/yarn.lock +++ b/yarn.lock @@ -34,17 +34,18 @@ chalk "^2.4.2" js-tokens "^4.0.0" -"@bgd-labs/aave-address-book@^2.24.1": - version "2.24.1" - resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-2.24.1.tgz#e88e2de8f734e9a19b0766b8082bcdff3564276c" - integrity sha512-1myxGPBOJiyJUBD7SoCYMm38NQSZwUgHeOEw5e7XXy+G0BurZ68gGXKv0q26/JfEE0Biwt2yjg41mOq0cZxc+g== - -"@bgd-labs/aave-cli@0.9.3": - version "0.9.3" - resolved "https://registry.yarnpkg.com/@bgd-labs/aave-cli/-/aave-cli-0.9.3.tgz#59dfc916954710230259efe70c44c8771dd8e24b" - integrity sha512-WPxj0OrZbLUEwgarelCkDsMcB9FZHpPPo5XAlvzot6Yy9ybSnY8LwMY44JgUiFteMSr/HD87ckPxhfvVk0GtEA== - dependencies: - "@bgd-labs/aave-address-book" "^2.24.1" +"@bgd-labs/aave-address-book@^2.25.1": + version "2.26.1" + resolved "https://registry.yarnpkg.com/@bgd-labs/aave-address-book/-/aave-address-book-2.26.1.tgz#f1238a1a0826c26a2dd4090c59755e9d1079457a" + integrity sha512-HkFgIZvZu8Kry+lXh+LuNcCHKf7sQQXjrxGHsh5AJgtdaOpiY76fFQUnZKIe3VaF84hABujB6QfKhNEaQxQIPw== + +"@bgd-labs/aave-cli@0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@bgd-labs/aave-cli/-/aave-cli-0.12.0.tgz#fa191cd9482de3424d6a587e9a76750638139351" + integrity sha512-enloPqeCMMh/I311PNshoGcvBwiy0PMJ0J1w9mhpNwf4pDAVBGMbWjZsi5/vglNQJ5VqrJw91MqWe6o8LeovfA== + dependencies: + "@bgd-labs/aave-address-book" "^2.25.1" + "@bgd-labs/aave-v3-governance-cache" "^0.0.13" "@bgd-labs/js-utils" "^1.3.0" "@commander-js/extra-typings" "^11.1.0" "@inquirer/prompts" "^3.3.2" @@ -57,9 +58,14 @@ ipfs-only-hash "^4.0.0" json-bigint "^1.0.0" object-hash "^3.0.0" - viem "^2.8.6" + viem "^2.9.20" zod "^3.22.4" +"@bgd-labs/aave-v3-governance-cache@^0.0.13": + version "0.0.13" + resolved "https://registry.yarnpkg.com/@bgd-labs/aave-v3-governance-cache/-/aave-v3-governance-cache-0.0.13.tgz#f63d0fe9b9f03b8605e2524b35a51aa9490ac2f4" + integrity sha512-kXezI2gN6IeFQHOO2cjbIrrHmos2QuGTCKnn7t2nQcQHJ35wNBCX9+AZymoqROd6fyIgz7qTpatj+0/K5ifhdg== + "@bgd-labs/js-utils@^1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@bgd-labs/js-utils/-/js-utils-1.3.0.tgz#0cb7649acf175c5127a5077f4a8168118a8966c2" @@ -1542,10 +1548,10 @@ varint@^6.0.0: resolved "https://registry.yarnpkg.com/varint/-/varint-6.0.0.tgz#9881eb0ce8feaea6512439d19ddf84bf551661d0" integrity sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg== -viem@^2.8.6: - version "2.8.6" - resolved "https://registry.yarnpkg.com/viem/-/viem-2.8.6.tgz#7467a0f113b4b13dd53fde4797aec1e686672f03" - integrity sha512-LqxLOSFtXfbC3tsiZ8Km8jKR4ktTOLfigL2dR9IN28He2+QrNhYvvwGPz3P4hbfU12Wvuxo6mWGZ2L1lpNtvrA== +viem@^2.9.20: + version "2.9.25" + resolved "https://registry.yarnpkg.com/viem/-/viem-2.9.25.tgz#afcf320790e175b2afc83d29819f56cb50906f0d" + integrity sha512-W0QOXCsYQppnV89PQP0EnCvfZIEsDYqmpVakLPNrok4Q4B7651M3MV/sYifYcLWv3Mn4KUyMCUlVxlej6CfC/w== dependencies: "@adraffy/ens-normalize" "1.10.0" "@noble/curves" "1.2.0"