-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathProposalPayloadAaveEcosystemReserveWithVoting.sol
40 lines (34 loc) · 1.37 KB
/
ProposalPayloadAaveEcosystemReserveWithVoting.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;
import {IInitializableAdminUpgradeabilityProxy} from './interfaces/IInitializableAdminUpgradeabilityProxy.sol';
import {IStreamable} from './AaveEcosystemReserveV2.sol';
/**
* @title ProposalPayloadAaveEcosystemReserveWithVoting
* @author BGD Labs
* @notice Aave Governance Proposal payload, upgrading the implementation of the AAVE Ecosystem Reserve
* The initialize() on the new implementation allows to vote on another Aave governance proposal
*/
contract ProposalPayloadAaveEcosystemReserveWithVoting {
address public immutable AAVE_ECOSYSTEM_RESERVE_V2_IMPL;
address public constant AAVE_GOVERNANCE_V2 =
0xEC568fffba86c094cf06b22134B23074DFE2252c;
IInitializableAdminUpgradeabilityProxy
public constant AAVE_ECOSYSTEM_RESERVE_PROXY =
IInitializableAdminUpgradeabilityProxy(
0x25F2226B597E8F9514B3F68F00f494cF4f286491
);
constructor(address aaveEcosystemReserveV2Impl) {
AAVE_ECOSYSTEM_RESERVE_V2_IMPL = aaveEcosystemReserveV2Impl;
}
function execute(uint256 payloadId) external {
require(payloadId != 0, 'PAYLOAD_ID_BIGGER_THAN_0');
AAVE_ECOSYSTEM_RESERVE_PROXY.upgradeToAndCall(
AAVE_ECOSYSTEM_RESERVE_V2_IMPL,
abi.encodeWithSelector(
IStreamable(AAVE_ECOSYSTEM_RESERVE_V2_IMPL).initialize.selector,
payloadId,
AAVE_GOVERNANCE_V2
)
);
}
}