Skip to content

Commit

Permalink
Merge pull request #16 from aave/new/ccip_1_5_maintenance
Browse files Browse the repository at this point in the history
GHO CCIP 1.5 Maintenance Upgrade
  • Loading branch information
miguelmtzinf authored Nov 4, 2024
2 parents 82dfded + 870aed7 commit 3eedaf5
Show file tree
Hide file tree
Showing 54 changed files with 2,529 additions and 15 deletions.
1 change: 1 addition & 0 deletions .assets/02a040db3fc4a88618783a9156e7fb51928e1ede.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/03dc42930b2b94af37ef869d012c4734aedb52e6.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/0afe490affc1bc77fe6675127b18e9aeeb4b1404.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/0fcfb1e84443509c42e21db9e4320c00e1db6098.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/1899e5ae4f4fd5b0d2565edd912a160acb2d0b78.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/18e6ba583d4d35e38cb678120492b2b4d52d19ea.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/1aa0fb636d34a35d35ce67919bc0d7d2e36d3839.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/1c1fbd79406b4b3a8c64ec79ef429f7c422d0387.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/2e9d5ba5e949c7896bc79e7fdd98872cb43375b0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/39a3707c0ded91bbfde8953567853db55452a227.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/39d5ff798c0771402486c6f1ca63f2a1868d80d9.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/4820a9e881eaa3f3def4916e47e0c330b34ab151.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/5dbd5b9335471c83b44949206c9b2186657b836f.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/5f455cedf818a43aba043e71714721fd1e844501.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/7bc797fb2b1f421fa40a6d9a0028d1f78db71dc0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/7ee454df22dbd82f0c1929bc14104d54c7081a49.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/8aa25c38caec024924773d1a5c7c63ab45c4eecf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/8fc705464b3515a654de9893168a1b1321feccb4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/9c784d12784a084406c3794fbe177e93da4c3479.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/a4faa118ed690be4e95fae01b8535036cda67e3d.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/a9a0275265838d424840d721917e0a4e3a5d8044.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/ac33ca939f6fc30c2fd799aaa6f59b0521c19e9f.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/c229e34ea67f12eea11bf5403763207eeab38cff.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/c277de9f9a155f6a0e47e0443845a3c9de5f6b84.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/ceb223a18f5aad36d9f6087d1d468b4dd5ba56a1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .assets/d8d51b9f960b17304a3bdcaf8922d3ae84b3c30f.svg

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .assets/dcedb30554ccb68f317b952113777790df5ca547.svg

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .assets/e6c7eef36a7e70a1f1b35633097516fe5e21508b.svg

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .assets/ec2b4dc8236ac87f8058f121d86de1d99e029c5c.svg

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .assets/fb6ebf3fa05cf980f374598b56757dbc5cae3662.svg

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .assets/fe79e1c7a3e943262824d4f683059c85d91a233d.svg

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,19 @@ jobs:

test-sol:
uses: bgd-labs/github-workflows/.github/workflows/foundry-test.yml@main
secrets: inherit
secrets:
RPC_MAINNET: "https://eth-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_KEY }}"
RPC_ARBITRUM: "https://arb-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_KEY }}"
RPC_POLYGON: "https://polygon-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_KEY }}"
RPC_AVALANCHE: "https://avax-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_KEY }}"
RPC_OPTIMISM: "https://opt-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_KEY }}"
RPC_METIS: "https://metis-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_KEY }}"
RPC_BASE: "https://base-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_KEY }}"
RPC_GNOSIS: "https://gnosis-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_KEY }}"
RPC_BNB: "https://bnb-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_KEY }}"
RPC_ZKEVM: "https://polygonzkevm-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_KEY }}"
RPC_SCROLL: "https://scroll-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_KEY }}"
RPC_ZKSYNC: "https://zksync-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_KEY }}"
with:
mode: "CHANGED"

Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "lib/aave-helpers"]
path = lib/aave-helpers
url = https://github.com/bgd-labs/aave-helpers
[submodule "lib/aave-ccip"]
path = lib/aave-ccip
url = https://github.com/aave/ccip
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Emodes changes

## Raw diff

```json
{}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Emodes changes

## Raw diff

```json
{}
```
1 change: 1 addition & 0 deletions lib/aave-ccip
Submodule aave-ccip added at 47a535
1 change: 1 addition & 0 deletions remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ aave-helpers/=lib/aave-helpers/
aave-v3-origin/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/src/
forge-std/=lib/aave-helpers/lib/forge-std/src/
solidity-utils/=lib/aave-helpers/lib/aave-address-book/lib/aave-v3-origin/lib/solidity-utils/src
aave-ccip/=lib/aave-ccip/contracts/src/
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// 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 {UpgradeableBurnMintTokenPool} from 'aave-ccip/v0.8/ccip/pools/GHO/UpgradeableBurnMintTokenPool.sol';
import {RateLimiter} from 'aave-ccip/v0.8/ccip/libraries/RateLimiter.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 {
address public constant GHO_CCIP_PROXY_POOL = 0x26329558f08cbb40d6a4CCA0E0C67b29D64A8c50;
uint64 public constant ETH_CHAIN_SELECTOR = 5009297550715157269;

function execute() external {
UpgradeableBurnMintTokenPool tokenPoolProxy = UpgradeableBurnMintTokenPool(
MiscArbitrum.GHO_CCIP_TOKEN_POOL
);

// Deploy new tokenPool implementation, retain existing immutable configuration
address tokenPoolImpl = address(
new UpgradeableBurnMintTokenPool(
address(tokenPoolProxy.getToken()),
tokenPoolProxy.getArmProxy(),
tokenPoolProxy.getAllowListEnabled()
)
);

ProxyAdmin(MiscArbitrum.PROXY_ADMIN).upgrade(
TransparentUpgradeableProxy(payable(address(tokenPoolProxy))),
tokenPoolImpl
);

// Update proxyPool address
tokenPoolProxy.setProxyPool(GHO_CCIP_PROXY_POOL);

// Set rate limit
tokenPoolProxy.setChainRateLimiterConfig(
ETH_CHAIN_SELECTOR,
getOutBoundRateLimiterConfig(),
getInBoundRateLimiterConfig()
);
}

/// @notice Returns the rate limiter configuration for the outbound rate limiter
/// The onRamp rate limit for ARB => ETH will be as follows:
/// Capacity: 350_000 GHO
/// Rate: 100 GHO per second (=> 360_000 GHO per hour)
/// @return The rate limiter configuration
function getOutBoundRateLimiterConfig() public pure returns (RateLimiter.Config memory) {
return RateLimiter.Config({isEnabled: true, capacity: 350_000e18, rate: 100e18});
}

/// @notice Returns the rate limiter configuration for the inbound rate limiter
/// The offRamp rate limit for ETH => ARB will be as follows:
/// Capacity: 350_000 GHO
/// Rate: 100 GHO per second (=> 360_000 GHO per hour)
/// @return The rate limiter configuration
function getInBoundRateLimiterConfig() public pure returns (RateLimiter.Config memory) {
return RateLimiter.Config({isEnabled: true, capacity: 350_000e18, rate: 100e18});
}
}
Loading

0 comments on commit 3eedaf5

Please sign in to comment.