forked from bgd-labs/aave-proposals-v3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ready for review * assume GHO<>USD is 1:1 * remove unneeded line in .md * remove unused import * deploy payload, update test & script --------- Co-authored-by: defijesus.eth <[email protected]>
- Loading branch information
Showing
5 changed files
with
164 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/20231114_AaveV3Ethereum_TokenLogicFunding/AaveV3Ethereum_TokenLogicFunding_20231114.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; | ||
import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol'; | ||
|
||
/** | ||
* @title TokenLogic Funding | ||
* @author TokenLogic | ||
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x66d766a8584ae23e137ca142902f68a6ba4fddf2874fa52815288b72ac9e84ce | ||
* - Discussion: https://governance.aave.com/t/arfc-retrospective-funding-proposal/15324 | ||
*/ | ||
contract AaveV3Ethereum_TokenLogicFunding_20231114 is IProposalGenericExecutor { | ||
|
||
uint256 public constant AMOUNT = 115_000 * 1e18; | ||
address public constant TOKENLOGIC = 0x3e4A9f478C0c13A15137Fc81e9d8269F127b4B40; | ||
address public constant GHO = AaveV3EthereumAssets.GHO_UNDERLYING; | ||
|
||
function execute() external { | ||
AaveV3Ethereum.COLLECTOR.transfer(GHO, TOKENLOGIC, AMOUNT); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...20231114_AaveV3Ethereum_TokenLogicFunding/AaveV3Ethereum_TokenLogicFunding_20231114.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {AaveV3Ethereum} from 'aave-address-book/AaveV3Ethereum.sol'; | ||
|
||
import 'forge-std/Test.sol'; | ||
import {CommonTestBase} from 'aave-helpers/CommonTestBase.sol'; | ||
import {AaveV3Ethereum_TokenLogicFunding_20231114} from './AaveV3Ethereum_TokenLogicFunding_20231114.sol'; | ||
import {IERC20} from 'solidity-utils/contracts/oz-common/interfaces/IERC20.sol'; | ||
|
||
/** | ||
* @dev Test for AaveV3Ethereum_TokenLogicFunding_20231114 | ||
* command: make test-contract filter=AaveV3Ethereum_TokenLogicFunding_20231114 | ||
*/ | ||
contract AaveV3Ethereum_TokenLogicFunding_20231114_Test is CommonTestBase { | ||
AaveV3Ethereum_TokenLogicFunding_20231114 internal proposal; | ||
|
||
function setUp() public { | ||
vm.createSelectFork(vm.rpcUrl('mainnet'), 18577793); | ||
proposal = AaveV3Ethereum_TokenLogicFunding_20231114(0x97D74bceC48b003FCd54Ae30e595028A38e8bBA1); | ||
} | ||
|
||
/** | ||
* @dev executes the generic test suite including e2e and config snapshots | ||
*/ | ||
function test_defaultProposalExecution() public { | ||
uint256 balanceBefore = IERC20(proposal.GHO()).balanceOf(proposal.TOKENLOGIC()); | ||
|
||
executePayload(vm, address(proposal)); | ||
|
||
uint256 balanceAfter = IERC20(proposal.GHO()).balanceOf(proposal.TOKENLOGIC()); | ||
|
||
assertEq(balanceAfter - balanceBefore, 115_000 * 1e18); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/20231114_AaveV3Ethereum_TokenLogicFunding/TokenLogicFunding.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: "TokenLogic Funding" | ||
author: "TokenLogic" | ||
discussions: "https://governance.aave.com/t/arfc-retrospective-funding-proposal/15324" | ||
--- | ||
|
||
## Simple Summary | ||
|
||
This AIP will transfer the equivalent of $115k USD to a TokenLogic address for services provided. | ||
|
||
## Motivation | ||
|
||
Over the last 6 months, TokenLogic has been contributing to the Aave DAO. This AIP implements the payment transaction as discussed on the governance forum and supported unanimously on Snapshot. | ||
|
||
## Specification | ||
|
||
This proposal encompasses the following actions: | ||
|
||
* Transfer 115,000 GHO to receiver address | ||
|
||
## References | ||
|
||
- Implementation: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20231114_AaveV3Ethereum_TokenLogicFunding/AaveV3Ethereum_TokenLogicFunding_20231114.sol) | ||
- Tests: [AaveV3Ethereum](https://github.com/bgd-labs/aave-proposals-v3/blob/main/src/20231114_AaveV3Ethereum_TokenLogicFunding/AaveV3Ethereum_TokenLogicFunding_20231114.t.sol) | ||
- [Snapshot](https://snapshot.org/#/aave.eth/proposal/0x66d766a8584ae23e137ca142902f68a6ba4fddf2874fa52815288b72ac9e84ce) | ||
- [Discussion](https://governance.aave.com/t/arfc-retrospective-funding-proposal/15324) | ||
|
||
The proposal payload was reviewed by [Bored Ghost Developing](https://bgdlabs.com/). | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
52 changes: 52 additions & 0 deletions
52
src/20231114_AaveV3Ethereum_TokenLogicFunding/TokenLogicFunding_20231114.s.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {GovV3Helpers, IPayloadsControllerCore, PayloadsControllerUtils} from 'aave-helpers/GovV3Helpers.sol'; | ||
import {EthereumScript} from 'aave-helpers/ScriptUtils.sol'; | ||
import {AaveV3Ethereum_TokenLogicFunding_20231114} from './AaveV3Ethereum_TokenLogicFunding_20231114.sol'; | ||
|
||
/** | ||
* @dev Deploy Ethereum | ||
* command: make deploy-ledger contract=src/20231114_AaveV3Ethereum_TokenLogicFunding/TokenLogicFunding_20231114.s.sol:DeployEthereum chain=mainnet | ||
*/ | ||
contract DeployEthereum is EthereumScript { | ||
function run() external broadcast { | ||
// deploy payloads | ||
AaveV3Ethereum_TokenLogicFunding_20231114 payload0 = new AaveV3Ethereum_TokenLogicFunding_20231114(); | ||
|
||
// compose action | ||
IPayloadsControllerCore.ExecutionAction[] | ||
memory actions = new IPayloadsControllerCore.ExecutionAction[](1); | ||
actions[0] = GovV3Helpers.buildAction(address(payload0)); | ||
|
||
// register action at payloadsController | ||
GovV3Helpers.createPayload(actions); | ||
} | ||
} | ||
|
||
/** | ||
* @dev Create Proposal | ||
* command: make deploy-ledger contract=src/20231114_AaveV3Ethereum_TokenLogicFunding/TokenLogicFunding_20231114.s.sol:CreateProposal chain=mainnet | ||
*/ | ||
contract CreateProposal is EthereumScript { | ||
function run() external { | ||
// create payloads | ||
PayloadsControllerUtils.Payload[] memory payloads = new PayloadsControllerUtils.Payload[](1); | ||
|
||
// compose actions for validation | ||
IPayloadsControllerCore.ExecutionAction[] | ||
memory actionsEthereum = new IPayloadsControllerCore.ExecutionAction[](1); | ||
actionsEthereum[0] = GovV3Helpers.buildAction(0x97D74bceC48b003FCd54Ae30e595028A38e8bBA1); | ||
payloads[0] = GovV3Helpers.buildMainnetPayload(vm, actionsEthereum); | ||
|
||
// create proposal | ||
vm.startBroadcast(); | ||
GovV3Helpers.createProposal2_5( | ||
payloads, | ||
GovV3Helpers.ipfsHashFile( | ||
vm, | ||
'src/20231114_AaveV3Ethereum_TokenLogicFunding/TokenLogicFunding.md' | ||
) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"rootOptions": { | ||
"pools": [ | ||
"AaveV3Ethereum" | ||
], | ||
"title": "TokenLogic Funding", | ||
"shortName": "TokenLogicFunding", | ||
"date": "20231114", | ||
"author": "TokenLogic", | ||
"discussion": "https://governance.aave.com/t/arfc-retrospective-funding-proposal/15324", | ||
"snapshot": "https://snapshot.org/#/aave.eth/proposal/0x66d766a8584ae23e137ca142902f68a6ba4fddf2874fa52815288b72ac9e84ce" | ||
}, | ||
"poolOptions": { | ||
"AaveV3Ethereum": { | ||
"configs": { | ||
"OTHERS": {} | ||
}, | ||
"features": [ | ||
"OTHERS" | ||
] | ||
} | ||
} | ||
} |