Skip to content

Commit

Permalink
feat: chainlink pre-req have been performed
Browse files Browse the repository at this point in the history
  • Loading branch information
DhairyaSethi committed Jan 10, 2025
1 parent a5047b6 commit 1f934fa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,8 @@ contract AaveV3Arbitrum_GHOCCIP151Upgrade_20241209_Base is ProtocolV3TestBase {
event CCIPSendRequested(IInternal.EVM2EVMMessage message);

function setUp() public virtual {
vm.createSelectFork(vm.rpcUrl('arbitrum'), 293345614);
vm.createSelectFork(vm.rpcUrl('arbitrum'), 293994020);
proposal = new AaveV3Arbitrum_GHOCCIP151Upgrade_20241209();

// pre-req - chainlink transfers gho token pool ownership on token admin registry
address CLL_OWNER = TOKEN_ADMIN_REGISTRY.owner();
vm.startPrank(CLL_OWNER);
TOKEN_ADMIN_REGISTRY.transferAdminRole(address(GHO), GovernanceV3Arbitrum.EXECUTOR_LVL_1);
EXISTING_PROXY_POOL.transferOwnership(GovernanceV3Arbitrum.EXECUTOR_LVL_1);
vm.stopPrank();

_validateConstants();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ contract AaveV3E2E_GHOCCIP151Upgrade_20241209_Base is ProtocolV3TestBase {
event Minted(address indexed sender, address indexed recipient, uint256 amount);

function setUp() public virtual {
l1.c.forkId = vm.createFork(vm.rpcUrl('mainnet'), 21581477);
l2.c.forkId = vm.createFork(vm.rpcUrl('arbitrum'), 293345614);
l1.c.forkId = vm.createFork(vm.rpcUrl('mainnet'), 21594804);
l2.c.forkId = vm.createFork(vm.rpcUrl('arbitrum'), 293994020);

vm.selectFork(l1.c.forkId);
l1.proposal = new AaveV3Ethereum_GHOCCIP151Upgrade_20241209();
Expand Down Expand Up @@ -126,8 +126,6 @@ contract AaveV3E2E_GHOCCIP151Upgrade_20241209_Base is ProtocolV3TestBase {
l2.c.proxyPool = l2.existingTokenPool.getProxyPool();

_validateConfig({upgraded: false});

_performPoolTransferCLLPreReq(); // rm once CLL performs this action
}

function _getTokenMessage(
Expand Down Expand Up @@ -263,26 +261,6 @@ contract AaveV3E2E_GHOCCIP151Upgrade_20241209_Base is ProtocolV3TestBase {
executePayload(vm, address(l2.proposal));
}

function _performPoolTransferCLLPreReq() private {
vm.selectFork(l1.c.forkId);
vm.startPrank(l1.c.tokenAdminRegistry.owner());
l1.c.tokenAdminRegistry.transferAdminRole(
AaveV3EthereumAssets.GHO_UNDERLYING,
GovernanceV3Ethereum.EXECUTOR_LVL_1
);
IProxyPool(l1.c.proxyPool).transferOwnership(GovernanceV3Ethereum.EXECUTOR_LVL_1);
vm.stopPrank();

vm.selectFork(l2.c.forkId);
vm.startPrank(l2.c.tokenAdminRegistry.owner());
l2.c.tokenAdminRegistry.transferAdminRole(
AaveV3ArbitrumAssets.GHO_UNDERLYING,
GovernanceV3Arbitrum.EXECUTOR_LVL_1
);
IProxyPool(l2.c.proxyPool).transferOwnership(GovernanceV3Arbitrum.EXECUTOR_LVL_1);
vm.stopPrank();
}

function _getOutboundRefillTime(uint256 amount) internal pure returns (uint256) {
return (amount / CCIP_RATE_LIMIT_REFILL_RATE) + 1; // account for rounding
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,8 @@ contract AaveV3Ethereum_GHOCCIP151Upgrade_20241209_Base is ProtocolV3TestBase {
error BridgeLimitExceeded(uint256 limit);

function setUp() public virtual {
vm.createSelectFork(vm.rpcUrl('mainnet'), 21581477);
vm.createSelectFork(vm.rpcUrl('mainnet'), 21594804);
proposal = new AaveV3Ethereum_GHOCCIP151Upgrade_20241209();

// pre-req - chainlink transfers gho token pool ownership on token admin registry
address CLL_OWNER = TOKEN_ADMIN_REGISTRY.owner();
vm.startPrank(CLL_OWNER);
TOKEN_ADMIN_REGISTRY.transferAdminRole(address(GHO), GovernanceV3Ethereum.EXECUTOR_LVL_1);
EXISTING_PROXY_POOL.transferOwnership(GovernanceV3Ethereum.EXECUTOR_LVL_1);
vm.stopPrank();

_validateConstants();
}

Expand Down
4 changes: 2 additions & 2 deletions src/20241209_Multi_GHOCCIP151Upgrade/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const config: ConfigFile = {
votingNetwork: 'POLYGON',
},
poolOptions: {
AaveV3Ethereum: {configs: {OTHERS: {}}, cache: {blockNumber: 21581477}},
AaveV3Arbitrum: {configs: {OTHERS: {}}, cache: {blockNumber: 293345614}},
AaveV3Ethereum: {configs: {OTHERS: {}}, cache: {blockNumber: 21594804}},
AaveV3Arbitrum: {configs: {OTHERS: {}}, cache: {blockNumber: 293994020}},
},
};

0 comments on commit 1f934fa

Please sign in to comment.