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

Extend Steward To Support CCIP Controls #400

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion lib/aave-helpers
Submodule aave-helpers updated 904 files
2 changes: 1 addition & 1 deletion lib/gho-core
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol';
/**
* @title Gho Steward CCIP Extension
* @author Aave Labs
* - Snapshot: TODO
* - Discussion: https://governance.aave.com/t/arfc-extend-gho-stewards-to-arbitrum/18298
*/
contract AaveV3Arbitrum_GhoStewardCCIPExtension_20240726 is IProposalGenericExecutor {
function execute() external {
// Existing remote pool
UpgradeableBurnMintTokenPool remotePool = UpgradeableBurnMintTokenPool(
0xF168B83598516A532a85995b52504a2Fa058C068
);
// TODO: Get address
// Assume new implementation deployed
UpgradeableBurnMintTokenPool tokenPoolImpl = UpgradeableBurnMintTokenPool(
0x1F168B83598516A532a85995b52504a2Fa058C068
);

// Upgrade remote pool to new implementation
TransparentUpgradeableProxy(payable(address(remotePool))).upgradeTo(address(tokenPoolImpl));

// TODO: Grant appropriate access to remote pool

// TODO: Deploy steward(s)

// TODO: Grant ratelimitadmin to appropriate steward
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Arbitrum} from 'aave-address-book/AaveV3Arbitrum.sol';

import 'forge-std/Test.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';
import {AaveV3Arbitrum_GhoStewardCCIPExtension_20240726} from './AaveV3Arbitrum_GhoStewardCCIPExtension_20240726.sol';

/**
* @dev Test for AaveV3Arbitrum_GhoStewardCCIPExtension_20240726
* command: FOUNDRY_PROFILE=arbitrum forge test --match-path=src/20240726_Multi_GhoStewardCCIPExtension/AaveV3Arbitrum_GhoStewardCCIPExtension_20240726.t.sol -vv
*/
contract AaveV3Arbitrum_GhoStewardCCIPExtension_20240726_Test is ProtocolV3TestBase {
AaveV3Arbitrum_GhoStewardCCIPExtension_20240726 internal proposal;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('arbitrum'), 236392797);
proposal = new AaveV3Arbitrum_GhoStewardCCIPExtension_20240726();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Arbitrum_GhoStewardCCIPExtension_20240726',
AaveV3Arbitrum.POOL,
address(proposal)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol';
/**
* @title Gho Steward CCIP Extension
* @author Aave Labs
* - Snapshot: TODO
* - Discussion: https://governance.aave.com/t/arfc-extend-gho-stewards-to-arbitrum/18298
*/
contract AaveV3Ethereum_GhoStewardCCIPExtension_20240726 is IProposalGenericExecutor {
function execute() external {
// TODO: Assume existing stewards
// TODO: Revoke roles of other stewards
// TODO: Grant roles to new stewards
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol';

import 'forge-std/Test.sol';
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol';
import {AaveV3Ethereum_GhoStewardCCIPExtension_20240726} from './AaveV3Ethereum_GhoStewardCCIPExtension_20240726.sol';

/**
* @dev Test for AaveV3Ethereum_GhoStewardCCIPExtension_20240726
* command: FOUNDRY_PROFILE=mainnet forge test --match-path=src/20240726_Multi_GhoStewardCCIPExtension/AaveV3Ethereum_GhoStewardCCIPExtension_20240726.t.sol -vv
*/
contract AaveV3Ethereum_GhoStewardCCIPExtension_20240726_Test is ProtocolV3TestBase {
AaveV3Ethereum_GhoStewardCCIPExtension_20240726 internal proposal;

function setUp() public {
vm.createSelectFork(vm.rpcUrl('mainnet'), 20393794);
proposal = new AaveV3Ethereum_GhoStewardCCIPExtension_20240726();
}

/**
* @dev executes the generic test suite including e2e and config snapshots
*/
function test_defaultProposalExecution() public {
defaultTest(
'AaveV3Ethereum_GhoStewardCCIPExtension_20240726',
AaveV3Ethereum.POOL,
address(proposal)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: "Gho Steward CCIP Extension"
author: "Aave Labs"
discussions: "https://governance.aave.com/t/arfc-extend-gho-stewards-to-arbitrum/18298"
---

## Simple Summary

## Motivation

## Specification

## References

- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240726_Multi_GhoStewardCCIPExtension/AaveV3Ethereum_GhoStewardCCIPExtension_20240726.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240726_Multi_GhoStewardCCIPExtension/AaveV3Arbitrum_GhoStewardCCIPExtension_20240726.sol)
- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240726_Multi_GhoStewardCCIPExtension/AaveV3Ethereum_GhoStewardCCIPExtension_20240726.t.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240726_Multi_GhoStewardCCIPExtension/AaveV3Arbitrum_GhoStewardCCIPExtension_20240726.t.sol)
- [Snapshot](TODO)
- [Discussion](https://governance.aave.com/t/arfc-extend-gho-stewards-to-arbitrum/18298)

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';
import {EthereumScript, ArbitrumScript} from 'aave-helpers/ScriptUtils.sol';
import {AaveV3Ethereum_GhoStewardCCIPExtension_20240726} from './AaveV3Ethereum_GhoStewardCCIPExtension_20240726.sol';
import {AaveV3Arbitrum_GhoStewardCCIPExtension_20240726} from './AaveV3Arbitrum_GhoStewardCCIPExtension_20240726.sol';

/**
* @dev Deploy Ethereum
* deploy-command: make deploy-ledger contract=src/20240726_Multi_GhoStewardCCIPExtension/GhoStewardCCIPExtension_20240726.s.sol:DeployEthereum chain=mainnet
* verify-command: FOUNDRY_PROFILE=mainnet npx catapulta-verify -b broadcast/GhoStewardCCIPExtension_20240726.s.sol/1/run-latest.json
*/
contract DeployEthereum is EthereumScript {
function run() external broadcast {
// deploy payloads
address payload0 = GovV3Helpers.deployDeterministic(
type(AaveV3Ethereum_GhoStewardCCIPExtension_20240726).creationCode
);

// compose action
IPayloadsControllerCore.ExecutionAction[]
memory actions = new IPayloadsControllerCore.ExecutionAction[](1);
actions[0] = GovV3Helpers.buildAction(payload0);

// register action at payloadsController
GovV3Helpers.createPayload(actions);
}
}

/**
* @dev Deploy Arbitrum
* deploy-command: make deploy-ledger contract=src/20240726_Multi_GhoStewardCCIPExtension/GhoStewardCCIPExtension_20240726.s.sol:DeployArbitrum chain=arbitrum
* verify-command: FOUNDRY_PROFILE=arbitrum npx catapulta-verify -b broadcast/GhoStewardCCIPExtension_20240726.s.sol/42161/run-latest.json
*/
contract DeployArbitrum is ArbitrumScript {
function run() external broadcast {
// deploy payloads
address payload0 = GovV3Helpers.deployDeterministic(
type(AaveV3Arbitrum_GhoStewardCCIPExtension_20240726).creationCode
);

// compose action
IPayloadsControllerCore.ExecutionAction[]
memory actions = new IPayloadsControllerCore.ExecutionAction[](1);
actions[0] = GovV3Helpers.buildAction(payload0);

// register action at payloadsController
GovV3Helpers.createPayload(actions);
}
}

/**
* @dev Create Proposal
* command: make deploy-ledger contract=src/20240726_Multi_GhoStewardCCIPExtension/GhoStewardCCIPExtension_20240726.s.sol:CreateProposal chain=mainnet
*/
contract CreateProposal is EthereumScript {
function run() external {
// create payloads
PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](2);

// compose actions for validation
IPayloadsControllerCore.ExecutionAction[]
memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1);
actionsEthereum[0] = GovV3Helpers.buildAction(
type(AaveV3Ethereum_GhoStewardCCIPExtension_20240726).creationCode
);
payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum);

IPayloadsControllerCore.ExecutionAction[]
memory actionsArbitrum = new IPayloadsControllerCore.ExecutionAction[](1);
actionsArbitrum[0] = GovV3Helpers.buildAction(
type(AaveV3Arbitrum_GhoStewardCCIPExtension_20240726).creationCode
);
payloads[1] = GovV3Helpers.buildArbitrumPayload(vm, actionsArbitrum);

// create proposal
vm.startBroadcast();
GovV3Helpers.createProposal(
vm,
payloads,
GovernanceV3Ethereum.VOTING_PORTAL_ETH_POL,
GovV3Helpers.ipfsHashFile(
vm,
'src/20240726_Multi_GhoStewardCCIPExtension/GhoStewardCCIPExtension.md'
)
);
}
}
17 changes: 17 additions & 0 deletions src/20240726_Multi_GhoStewardCCIPExtension/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {ConfigFile} from '../../generator/types';
export const config: ConfigFile = {
rootOptions: {
title: 'Gho Steward CCIP Extension',
author: 'Aave Labs',
discussion: 'https://governance.aave.com/t/arfc-extend-gho-stewards-to-arbitrum/18298',
snapshot: '',
pools: ['AaveV3Ethereum', 'AaveV3Arbitrum'],
shortName: 'GhoStewardCCIPExtension',
date: '20240726',
votingNetwork: 'POLYGON',
},
poolOptions: {
AaveV3Ethereum: {configs: {OTHERS: {}}, cache: {blockNumber: 20393794}},
AaveV3Arbitrum: {configs: {OTHERS: {}}, cache: {blockNumber: 236392797}},
},
};