From 232ceaea2e9eb0b3e9dd7f2f8ba01f94c8abea15 Mon Sep 17 00:00:00 2001 From: defi jesus Date: Mon, 4 Mar 2024 15:46:15 +0000 Subject: [PATCH] Assign Emission Admin - Ethereum, Arbitrum and Optimism (#229) --- ...inEthereumArbitrumAndOptimism_20240229.sol | 24 ++++ ...EthereumArbitrumAndOptimism_20240229.t.sol | 44 +++++++ ...inEthereumArbitrumAndOptimism_20240229.sol | 35 ++++++ ...EthereumArbitrumAndOptimism_20240229.t.sol | 61 +++++++++ ...inEthereumArbitrumAndOptimism_20240229.sol | 24 ++++ ...EthereumArbitrumAndOptimism_20240229.t.sol | 42 +++++++ ...missionAdminEthereumArbitrumAndOptimism.md | 73 +++++++++++ ...EthereumArbitrumAndOptimism_20240229.s.sol | 118 ++++++++++++++++++ .../config.ts | 17 +++ 9 files changed, 438 insertions(+) create mode 100644 src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol create mode 100644 src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol create mode 100644 src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol create mode 100644 src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol create mode 100644 src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol create mode 100644 src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol create mode 100644 src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AssignEmissionAdminEthereumArbitrumAndOptimism.md create mode 100644 src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.s.sol create mode 100644 src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/config.ts diff --git a/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol new file mode 100644 index 000000000..7fdfac7e2 --- /dev/null +++ b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; +import {AaveV3Arbitrum, AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol'; +import {IEmissionManager} from '@aave/periphery-v3/contracts/rewards/interfaces/IEmissionManager.sol'; + +/** + * @title Assign Emission Admin - Ethereum, Arbitrum and Optimism + * @author karpatkey-TokenLogic & ACI + * - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x4518ee2130b2299fdf0827aa6a97b8211b3273f5b07b6f13b8141e5b9ad89e5f + * - Discussion: https://governance.aave.com/t/arfc-set-arb-emission-admin-to-gauntlet/16554 + */ +contract AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229 is + IProposalGenericExecutor +{ + IEmissionManager public constant EMISSION_MANAGER = + IEmissionManager(AaveV3Arbitrum.EMISSION_MANAGER); + address public constant EMISSION_ADMIN = 0xE79C65a313a1f4Ca5D1d15414E0c515056dA90b4; + + function execute() external { + EMISSION_MANAGER.setEmissionAdmin(AaveV3ArbitrumAssets.ARB_UNDERLYING, EMISSION_ADMIN); + } +} diff --git a/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol new file mode 100644 index 000000000..a668f4187 --- /dev/null +++ b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3Arbitrum, AaveV3ArbitrumAssets} from 'aave-address-book/AaveV3Arbitrum.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; +import {AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229} from './AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol'; +import {IEmissionManager} from '@aave/periphery-v3/contracts/rewards/interfaces/IEmissionManager.sol'; + +/** + * @dev Test for AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229 + * command: make test-contract filter=AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229 + */ +contract AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229_Test is + ProtocolV3TestBase +{ + AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229 internal proposal; + + address internal arbEmissionAdmin = 0xE79C65a313a1f4Ca5D1d15414E0c515056dA90b4; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('arbitrum'), 185767002); + proposal = new AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229', + AaveV3Arbitrum.POOL, + address(proposal) + ); + + address admin = IEmissionManager(AaveV3Arbitrum.EMISSION_MANAGER).getEmissionAdmin( + AaveV3ArbitrumAssets.ARB_UNDERLYING + ); + + assertEq(admin, arbEmissionAdmin); + assertEq(admin, proposal.EMISSION_ADMIN()); + } +} diff --git a/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol new file mode 100644 index 000000000..9f3c23579 --- /dev/null +++ b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; +import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol'; +import {IEmissionManager} from '@aave/periphery-v3/contracts/rewards/interfaces/IEmissionManager.sol'; + +/** + * @title Assign Emission Admin - Ethereum, Arbitrum and Optimism + * @author karpatkey-TokenLogic & ACI + * - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x0d83730d546d74d463f045697e9ea6b1708b5c833a40e09e4f87f1804177f5a6 & https://snapshot.org/#/aave.eth/proposal/0xe0579b1efa1f26237104632f4ccddac0158866a18061b27a634634fa9d31e250 + * - Discussion: https://governance.aave.com/t/arfc-set-ethx-and-sd-emission-admin-to-stader-labs/16599 & https://governance.aave.com/t/arfc-set-oseth-swise-emission-admin-to-stakewise/16590 + */ +contract AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229 is + IProposalGenericExecutor +{ + IEmissionManager public constant EMISSION_MANAGER = + IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER); + + address public constant SD = 0x30D20208d987713f46DFD34EF128Bb16C404D10f; + address public constant ETHX = 0xA35b1B31Ce002FBF2058D22F30f95D405200A15b; + address public constant EMISSION_ADMIN_SD_ETHX = 0xbDa6C9cd7eD043CB739ca2C748dAbd1fCA397132; + + address public constant SWISE = 0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2; + address public constant OSETH = 0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38; + address public constant EMISSION_ADMIN_SWISE_OSETH = 0x189Cb93839AD52b5e955ddA254Ed7212ae1B1f61; + + function execute() external { + EMISSION_MANAGER.setEmissionAdmin(SD, EMISSION_ADMIN_SD_ETHX); + EMISSION_MANAGER.setEmissionAdmin(ETHX, EMISSION_ADMIN_SD_ETHX); + + EMISSION_MANAGER.setEmissionAdmin(SWISE, EMISSION_ADMIN_SWISE_OSETH); + EMISSION_MANAGER.setEmissionAdmin(OSETH, EMISSION_ADMIN_SWISE_OSETH); + } +} diff --git a/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol new file mode 100644 index 000000000..0467a83bb --- /dev/null +++ b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol @@ -0,0 +1,61 @@ +// 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_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229} from './AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol'; +import {IEmissionManager} from '@aave/periphery-v3/contracts/rewards/interfaces/IEmissionManager.sol'; + +/** + * @dev Test for AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229 + * command: make test-contract filter=AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229 + */ +contract AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229_Test is + ProtocolV3TestBase +{ + AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229 internal proposal; + + address internal sdEthxEmissionAdmin = 0xbDa6C9cd7eD043CB739ca2C748dAbd1fCA397132; + address internal swiseOsethEmissionAdmin = 0x189Cb93839AD52b5e955ddA254Ed7212ae1B1f61; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('mainnet'), 19335100); + proposal = new AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229', + AaveV3Ethereum.POOL, + address(proposal) + ); + + assertEq(sdEthxEmissionAdmin, proposal.EMISSION_ADMIN_SD_ETHX()); + assertEq(swiseOsethEmissionAdmin, proposal.EMISSION_ADMIN_SWISE_OSETH()); + + address sdAdmin = IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).getEmissionAdmin( + proposal.SD() + ); + assertEq(sdAdmin, proposal.EMISSION_ADMIN_SD_ETHX()); + + address ethxAdmin = IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).getEmissionAdmin( + proposal.ETHX() + ); + assertEq(ethxAdmin, proposal.EMISSION_ADMIN_SD_ETHX()); + + address swiseAdmin = IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).getEmissionAdmin( + proposal.SWISE() + ); + assertEq(swiseAdmin, proposal.EMISSION_ADMIN_SWISE_OSETH()); + + address osethAdmin = IEmissionManager(AaveV3Ethereum.EMISSION_MANAGER).getEmissionAdmin( + proposal.OSETH() + ); + assertEq(osethAdmin, proposal.EMISSION_ADMIN_SWISE_OSETH()); + } +} diff --git a/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol new file mode 100644 index 000000000..f5725d6eb --- /dev/null +++ b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; +import {AaveV3Optimism, AaveV3OptimismAssets} from 'aave-address-book/AaveV3Optimism.sol'; +import {IEmissionManager} from '@aave/periphery-v3/contracts/rewards/interfaces/IEmissionManager.sol'; + +/** + * @title Assign Emission Admin - Ethereum, Arbitrum and Optimism + * @author karpatkey-TokenLogic & ACI + * - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x66040ad4d46ba756365fbe5c2ed5957d17a3e70db5a00ec532fdc725251d2327 + * - Discussion: https://governance.aave.com/t/arfc-set-op-emission-admin/16621 + */ +contract AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229 is + IProposalGenericExecutor +{ + IEmissionManager public constant EMISSION_MANAGER = + IEmissionManager(AaveV3Optimism.EMISSION_MANAGER); + address public constant EMISSION_ADMIN = 0x3479CEb4b1fcaDC586d4c5F1c16b4d8c0D70Bc71; + + function execute() external { + EMISSION_MANAGER.setEmissionAdmin(AaveV3OptimismAssets.OP_UNDERLYING, EMISSION_ADMIN); + } +} diff --git a/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol new file mode 100644 index 000000000..118435104 --- /dev/null +++ b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {AaveV3Optimism, AaveV3OptimismAssets} from 'aave-address-book/AaveV3Optimism.sol'; + +import 'forge-std/Test.sol'; +import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; +import {AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229} from './AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol'; +import {IEmissionManager} from '@aave/periphery-v3/contracts/rewards/interfaces/IEmissionManager.sol'; + +/** + * @dev Test for AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229 + * command: make test-contract filter=AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229 + */ +contract AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229_Test is + ProtocolV3TestBase +{ + AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229 internal proposal; + address internal opEmissionsAdmin = 0x3479CEb4b1fcaDC586d4c5F1c16b4d8c0D70Bc71; + + function setUp() public { + vm.createSelectFork(vm.rpcUrl('optimism'), 116817141); + proposal = new AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229(); + } + + /** + * @dev executes the generic test suite including e2e and config snapshots + */ + function test_defaultProposalExecution() public { + defaultTest( + 'AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229', + AaveV3Optimism.POOL, + address(proposal) + ); + + address admin = IEmissionManager(AaveV3Optimism.EMISSION_MANAGER).getEmissionAdmin( + AaveV3OptimismAssets.OP_UNDERLYING + ); + assertEq(admin, opEmissionsAdmin); + assertEq(admin, proposal.EMISSION_ADMIN()); + } +} diff --git a/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AssignEmissionAdminEthereumArbitrumAndOptimism.md b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AssignEmissionAdminEthereumArbitrumAndOptimism.md new file mode 100644 index 000000000..3fc59293d --- /dev/null +++ b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AssignEmissionAdminEthereumArbitrumAndOptimism.md @@ -0,0 +1,73 @@ +--- +title: "Assign Emission Admin - Ethereum, Arbitrum and Optimism" +author: "karpatkey-TokenLogic & ACI" +discussions: "https://governance.aave.com/t/arfc-set-op-emission-admin/16621" +--- + +## Simple Summary + +This enables various teams to distribute rewards across Aave v3 Ethereum. + +## Motivation + +This AIP integrates four separate ARFC that each propose granting a team the privileges to distribute there chosen asset across an Aave v3 deployment. The below summaries each initiative: + +- ETHx & SD rewards by Stader Labs +- osETH & SWISE by Stakewise DAO +- OP reward via an Aave Community SAFE +- ARB rewards via Gauntlet + +The two LST providers are intending on using rewards to bootstrap the growth and adoption of there resepective LST. + +The OP and ARB incentives are being distributed with the intent of migrating USDC.e to USDC on each respective network. These ARB and OP rewards were originally provide by the respective foundation and are not those belonging to the Aave DAO. + +## Specification + +The `setEmissionAdmin`, a governance controlled function, assigns the `EMISSION_ADMIN` role for a specified token on the respective network. + +The `EMISSION_ADMIN` role controls the distribution of the specified token across the specified Aave v3 deployment. + +The `EMISSION_ADMIN` can distribute the specified token anywhere across the Aave v3 deployment on the respective Liquidity Pool. + +## Implementation + +Set `EMISSION_ADMIN` permission for ETHx, SD, SWISE, osETH, OP and ARB to the following address: + +**Aave v3 Ethereum** + +Address Reward (SD): [0x30D20208d987713f46DFD34EF128Bb16C404D10f](https://etherscan.io/address/0x30D20208d987713f46DFD34EF128Bb16C404D10f) +Address Reward (ETHx): [0xA35b1B31Ce002FBF2058D22F30f95D405200A15b](https://etherscan.io/address/0xA35b1B31Ce002FBF2058D22F30f95D405200A15b) +SD & ETHx EMISSION_ADMIN: [0xbDa6C9cd7eD043CB739ca2C748dAbd1fCA397132](https://etherscan.io/address/0xbDa6C9cd7eD043CB739ca2C748dAbd1fCA397132) + +Address Reward (SWISE): [0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2](https://etherscan.io/address/0x48C3399719B582dD63eB5AADf12A40B4C3f52FA2) +Address Reward (osETH): [0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38](https://etherscan.io/address/0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38) +SWISE & osETH EMISSION_ADMIN:[0x189Cb93839AD52b5e955ddA254Ed7212ae1B1f61](https://etherscan.io/address/0x189Cb93839AD52b5e955ddA254Ed7212ae1B1f61) + +**Aave v3 Arbitrum** + +Address Reward (ARB): [0x912CE59144191C1204E64559FE8253a0e49E6548](https://arbiscan.io/address/0x912CE59144191C1204E64559FE8253a0e49E6548) +EMISSION_ADMIN: [0xE79C65a313a1f4Ca5D1d15414E0c515056dA90b4](https://arbiscan.io/address/0xE79C65a313a1f4Ca5D1d15414E0c515056dA90b4) + +**Aave v3 Optimism** + +Address Reward (OP): [0x4200000000000000000000000000000000000042](https://optimistic.etherscan.io/address/0x4200000000000000000000000000000000000042) +EMISSION_ADMIN: [0x3479CEb4b1fcaDC586d4c5F1c16b4d8c0D70Bc71](https://optimistic.etherscan.io/address/0x3479CEb4b1fcaDC586d4c5F1c16b4d8c0D70Bc71) + +The AIP calls setEmissionAdmin() method in the EMISSION_MANAGER contract. + +EMISSION_MANAGER.setEmissionAdmin(REWARD_ASSET,EMISSION_ADMIN); + +## References + +- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol) +- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol), [AaveV3Optimism](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol), [AaveV3Arbitrum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.t.sol) +- Snapshot: [SD + ETHx](https://snapshot.org/#/aave.eth/proposal/0x0d83730d546d74d463f045697e9ea6b1708b5c833a40e09e4f87f1804177f5a6), [SWISE + osETH](https://snapshot.org/#/aave.eth/proposal/0xe0579b1efa1f26237104632f4ccddac0158866a18061b27a634634fa9d31e250), [OP](https://snapshot.org/#/aave.eth/proposal/0x66040ad4d46ba756365fbe5c2ed5957d17a3e70db5a00ec532fdc725251d2327) and [ARB](https://snapshot.org/#/aave.eth/proposal/0x4518ee2130b2299fdf0827aa6a97b8211b3273f5b07b6f13b8141e5b9ad89e5f) +- Discussion: [SD + ETHx](https://governance.aave.com/t/arfc-set-ethx-and-sd-emission-admin-to-stader-labs/16599), [SWISE + osETH](https://governance.aave.com/t/arfc-set-oseth-swise-emission-admin-to-stakewise/16590), [OP](https://governance.aave.com/t/arfc-set-op-emission-admin/16621) and [ARB](https://governance.aave.com/t/arfc-set-arb-emission-admin-to-gauntlet/16554) + +# Disclosure + +TokenLogic, karpatkey and ACI receive no payment for this proposal. TokenLogic and karpatkey are both delegates within the Aave community. + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.s.sol b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.s.sol new file mode 100644 index 000000000..1f3bcb0ee --- /dev/null +++ b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.s.sol @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol'; +import {EthereumScript, OptimismScript, ArbitrumScript} from 'aave-helpers/ScriptUtils.sol'; +import {AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229} from './AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol'; +import {AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229} from './AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol'; +import {AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229} from './AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.sol'; + +/** + * @dev Deploy Ethereum + * deploy-command: make deploy-ledger contract=src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.s.sol:DeployEthereum chain=mainnet + * verify-command: npx catapulta-verify -b broadcast/AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.s.sol/1/run-latest.json + */ +contract DeployEthereum is EthereumScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229).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 Optimism + * deploy-command: make deploy-ledger contract=src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.s.sol:DeployOptimism chain=optimism + * verify-command: npx catapulta-verify -b broadcast/AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.s.sol/10/run-latest.json + */ +contract DeployOptimism is OptimismScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229).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/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.s.sol:DeployArbitrum chain=arbitrum + * verify-command: npx catapulta-verify -b broadcast/AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.s.sol/42161/run-latest.json + */ +contract DeployArbitrum is ArbitrumScript { + function run() external broadcast { + // deploy payloads + address payload0 = GovV3Helpers.deployDeterministic( + type(AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229).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/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AssignEmissionAdminEthereumArbitrumAndOptimism_20240229.s.sol:CreateProposal chain=mainnet + */ +contract CreateProposal is EthereumScript { + function run() external { + // create payloads + PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](3); + + // compose actions for validation + IPayloadsControllerCore.ExecutionAction[] + memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1); + actionsEthereum[0] = GovV3Helpers.buildAction( + type(AaveV3Ethereum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229).creationCode + ); + payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsOptimism = new IPayloadsControllerCore.ExecutionAction[](1); + actionsOptimism[0] = GovV3Helpers.buildAction( + type(AaveV3Optimism_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229).creationCode + ); + payloads[1] = GovV3Helpers.buildOptimismPayload(vm, actionsOptimism); + + IPayloadsControllerCore.ExecutionAction[] + memory actionsArbitrum = new IPayloadsControllerCore.ExecutionAction[](1); + actionsArbitrum[0] = GovV3Helpers.buildAction( + type(AaveV3Arbitrum_AssignEmissionAdminEthereumArbitrumAndOptimism_20240229).creationCode + ); + payloads[2] = GovV3Helpers.buildArbitrumPayload(vm, actionsArbitrum); + + // create proposal + vm.startBroadcast(); + GovV3Helpers.createProposal( + vm, + payloads, + GovV3Helpers.ipfsHashFile( + vm, + 'src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/AssignEmissionAdminEthereumArbitrumAndOptimism.md' + ) + ); + } +} diff --git a/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/config.ts b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/config.ts new file mode 100644 index 000000000..4fb02a9c0 --- /dev/null +++ b/src/20240229_Multi_AssignEmissionAdminEthereumArbitrumAndOptimism/config.ts @@ -0,0 +1,17 @@ +import {ConfigFile} from '../../generator/types'; +export const config: ConfigFile = { + rootOptions: { + pools: ['AaveV3Ethereum', 'AaveV3Optimism', 'AaveV3Arbitrum'], + title: 'Assign Emission Admin - Ethereum, Arbitrum and Optimism', + shortName: 'AssignEmissionAdminEthereumArbitrumAndOptimism', + date: '20240229', + author: 'karpatkey-TokenLogic & ACI', + discussion: 'TODO', + snapshot: 'TODO', + }, + poolOptions: { + AaveV3Ethereum: {configs: {OTHERS: {}}, cache: {blockNumber: 19335100}}, + AaveV3Optimism: {configs: {OTHERS: {}}, cache: {blockNumber: 116817141}}, + AaveV3Arbitrum: {configs: {OTHERS: {}}, cache: {blockNumber: 185767002}}, + }, +};