Skip to content

Commit

Permalink
TokenLogic Funding (bgd-labs#59)
Browse files Browse the repository at this point in the history
* 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
defijesus and defijesus authored Nov 15, 2023
1 parent 5d1359a commit cd6faae
Show file tree
Hide file tree
Showing 5 changed files with 164 additions and 0 deletions.
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);
}
}
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 src/20231114_AaveV3Ethereum_TokenLogicFunding/TokenLogicFunding.md
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/).
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'
)
);
}
}
23 changes: 23 additions & 0 deletions src/20231114_AaveV3Ethereum_TokenLogicFunding/config.json
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"
]
}
}
}

0 comments on commit cd6faae

Please sign in to comment.