forked from bgd-labs/aave-proposals-v3
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GHO CCIP 1.5 Maintenance Upgrade (bgd-labs#512)
* Add proposal for Gho Incident Report 20231113 (#1) * chore: add payload and deploy script for update of GHO variable debt token * forge install: gho-core * chore: add gho-core to dependency * test: Add tests for update of gho variable token * test: Add tests for update of gho variable token * fix: add modifier in method of interface * fix: remove gho dependency from repo and fix test * fix: Remove unnecesary dependency * fix: Add latest details --------- Co-authored-by: miguelmtzinf <[email protected]> * fix: Make new impl constant (#3) * fix: Amend AIP text (#4) * fix: Make new impl constant * fix: Fix AIP text * test: Tweak default tests with borrow cap update (#5) * fix: lint issue (#6) * test: Add diffs from test running (#7) * fix: Add payload address (#8) * fix: Fix payload address in script (#9) * fix: Remove unneeded diff file (#10) * feat: install aave-ccip at latest commit on aave/ccip#18 * chore: upd remappings, lib/aave-helpers, .assets * new: add proposal for eth & arb * fix: arb test supply locked invariant * fix: rename, add discussion link * upd: aave-ccip module * feat: add proxy pool deployments * feat: add e2e tests * chore: fix license, explicit senders for expectEmit * ci: override rpc url in secrets * test: proxy pool can off ramp * chore: reorder deps * nit: utilize existing ierc20 import, style guide, use arb assets for gho addy * feat: add rate limit, use gho fascilitator for tests * feat: set in bound rate limit as well * chore: cleanup * test: check proxy initialized version * chore: inBetween => inFlight" * chore: test name consistency * test: dynamically fetch dest gas amt * test: execMsg post migration using legacy off ramp * test: ccip steward can disable rate limit * chore: cleanup * doc: add comment for fetching all offramps, use RISK_COUNCIL for clarity * test: ownership transfer after migration * chore: rm _readRiskAdmin, fix config * fix: ci test setup to stay compatible with bdg upstream * feat: rm aave-ccip dep * rft: use deployed token pools * tmp: fix ci for aave org, to rm for bdg * fix: ci to bdg setup * fix: update rate limit * test: fuzz amounts * chore: snapshot docs * chore: const cap rate * chore: fix type * fix: Fix rate limit config constants * fix: tests, impl correct solc * fix: tests * Update src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Ethereum_GHOCCIP150Upgrade_20241021.sol Co-authored-by: Harsh Pandey <[email protected]> * Update src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Arbitrum_GHOCCIP150Upgrade_20241021.sol Co-authored-by: Harsh Pandey <[email protected]> * doc: reference token pool contracts * doc: upgrade spec * doc: formatting * Update src/20241021_Multi_GHOCCIP150Upgrade/GHOCCIP150Upgrade.md Co-authored-by: miguelmtz <[email protected]> * Update src/20241021_Multi_GHOCCIP150Upgrade/GHOCCIP150Upgrade.md Co-authored-by: miguelmtz <[email protected]> * test: Refresh block number with ghostewards aip executed * fix: Remove unneeded script --------- Co-authored-by: Parth Patel <[email protected]> Co-authored-by: DhairyaSethi <[email protected]> Co-authored-by: Harsh Pandey <[email protected]>
- Loading branch information
1 parent
90866bf
commit c016f11
Showing
52 changed files
with
2,703 additions
and
42 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
...IP150Upgrade_20241021_before_AaveV3Arbitrum_GHOCCIP150Upgrade_20241021_after.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Emodes changes | ||
|
||
## Raw diff | ||
|
||
```json | ||
{} | ||
``` |
7 changes: 7 additions & 0 deletions
7
...IP150Upgrade_20241021_before_AaveV3Ethereum_GHOCCIP150Upgrade_20241021_after.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Emodes changes | ||
|
||
## Raw diff | ||
|
||
```json | ||
{} | ||
``` |
51 changes: 51 additions & 0 deletions
51
src/20241021_Multi_GHOCCIP150Upgrade/AaveV3Arbitrum_GHOCCIP150Upgrade_20241021.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {TransparentUpgradeableProxy} from 'solidity-utils/contracts/transparent-proxy/TransparentUpgradeableProxy.sol'; | ||
import {ProxyAdmin} from 'solidity-utils/contracts/transparent-proxy/ProxyAdmin.sol'; | ||
import {IProposalGenericExecutor} from 'aave-helpers/src/interfaces/IProposalGenericExecutor.sol'; | ||
import {MiscArbitrum} from 'aave-address-book/MiscArbitrum.sol'; | ||
import {IUpgradeableBurnMintTokenPool} from 'src/interfaces/ccip/IUpgradeableBurnMintTokenPool.sol'; | ||
import {IRateLimiter} from 'src/interfaces/ccip/IRateLimiter.sol'; | ||
|
||
/** | ||
* @title GHO CCIP 1.50 Upgrade | ||
* @author Aave Labs | ||
* - Discussion: https://governance.aave.com/t/bgd-technical-maintenance-proposals/15274/51 | ||
*/ | ||
contract AaveV3Arbitrum_GHOCCIP150Upgrade_20241021 is IProposalGenericExecutor { | ||
uint64 public constant ETH_CHAIN_SELECTOR = 5009297550715157269; | ||
|
||
// https://arbiscan.io/address/0xfc421aD3C883Bf9E7C4f42dE845C4e4405799e73 | ||
address public constant TOKEN_POOL_IMPL = 0xfc421aD3C883Bf9E7C4f42dE845C4e4405799e73; | ||
// https://arbiscan.io/address/0x26329558f08cbb40d6a4CCA0E0C67b29D64A8c50 | ||
address public constant GHO_CCIP_PROXY_POOL = 0x26329558f08cbb40d6a4CCA0E0C67b29D64A8c50; | ||
|
||
/// @dev Token Rate Limit Capacity: 300_000 GHO | ||
uint128 public constant CCIP_RATE_LIMIT_CAPACITY = 300_000e18; | ||
|
||
/// @dev Token Rate Limit Refill Rate: 60 GHO per second (=> 216_000 GHO per hour) | ||
uint128 public constant CCIP_RATE_LIMIT_REFILL_RATE = 60e18; | ||
|
||
function execute() external { | ||
IUpgradeableBurnMintTokenPool tokenPoolProxy = IUpgradeableBurnMintTokenPool( | ||
MiscArbitrum.GHO_CCIP_TOKEN_POOL | ||
); | ||
|
||
ProxyAdmin(MiscArbitrum.PROXY_ADMIN).upgrade( | ||
TransparentUpgradeableProxy(payable(address(tokenPoolProxy))), | ||
TOKEN_POOL_IMPL | ||
); | ||
|
||
// Update proxyPool address | ||
tokenPoolProxy.setProxyPool(GHO_CCIP_PROXY_POOL); | ||
|
||
// Set rate limit | ||
IRateLimiter.Config memory rateLimitConfig = IRateLimiter.Config({ | ||
isEnabled: true, | ||
capacity: CCIP_RATE_LIMIT_CAPACITY, | ||
rate: CCIP_RATE_LIMIT_REFILL_RATE | ||
}); | ||
tokenPoolProxy.setChainRateLimiterConfig(ETH_CHAIN_SELECTOR, rateLimitConfig, rateLimitConfig); | ||
} | ||
} |
Oops, something went wrong.