generated from bgd-labs/bgd-forge-template
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Contango flash borrow New Pools whitelist - Review (#262)
* Code to add contango as flashborrower * scroll test * add MD file * rm Metis, Update addresses & md * Update src/20240319_Multi_ContangoFlashborrower/ContangoFlashborrower.md Co-authored-by: sendra <[email protected]> --------- Co-authored-by: Rozengarden <[email protected]> Co-authored-by: sendra <[email protected]>
- Loading branch information
1 parent
b981b8c
commit e5a6d3c
Showing
21 changed files
with
660 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...orrower_20240319_before_AaveV3Avalanche_ContangoFlashborrower_20240319_after.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,5 @@ | ||
## Raw diff | ||
|
||
```json | ||
{} | ||
``` |
5 changes: 5 additions & 0 deletions
5
...Flashborrower_20240319_before_AaveV3BNB_ContangoFlashborrower_20240319_after.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,5 @@ | ||
## Raw diff | ||
|
||
```json | ||
{} | ||
``` |
5 changes: 5 additions & 0 deletions
5
...lashborrower_20240319_before_AaveV3Base_ContangoFlashborrower_20240319_after.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,5 @@ | ||
## Raw diff | ||
|
||
```json | ||
{} | ||
``` |
5 changes: 5 additions & 0 deletions
5
...shborrower_20240319_before_AaveV3Gnosis_ContangoFlashborrower_20240319_after.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,5 @@ | ||
## Raw diff | ||
|
||
```json | ||
{} | ||
``` |
5 changes: 5 additions & 0 deletions
5
...hborrower_20240319_before_AaveV3Polygon_ContangoFlashborrower_20240319_after.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,5 @@ | ||
## Raw diff | ||
|
||
```json | ||
{} | ||
``` |
5 changes: 5 additions & 0 deletions
5
...shborrower_20240319_before_AaveV3Scroll_ContangoFlashborrower_20240319_after.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,5 @@ | ||
## Raw diff | ||
|
||
```json | ||
{} | ||
``` |
19 changes: 19 additions & 0 deletions
19
src/20240319_Multi_ContangoFlashborrower/AaveV3Avalanche_ContangoFlashborrower_20240319.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,19 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; | ||
import {AaveV3Avalanche} from 'aave-address-book/AaveV3Avalanche.sol'; | ||
|
||
/** | ||
* @title Contango FlashBorrower | ||
* @author Aave Chan Initiative | ||
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x09bb9e7cffc974d330d82ce7a0b0502b573d6f3b4f839ea15d6629613901e96d | ||
* - Discussion: https://governance.aave.com/t/arfc-add-contango-protocol-cian-protocol-and-index-coop-to-flashborrowers-on-aave-v3/16478 | ||
*/ | ||
contract AaveV3Avalanche_ContangoFlashborrower_20240319 is IProposalGenericExecutor { | ||
address public constant NEW_FLASH_BORROWER = 0x14F8e5Fe35b2d0D67dBcE9329f1b5d09f60c06C3; | ||
|
||
function execute() external { | ||
AaveV3Avalanche.ACL_MANAGER.addFlashBorrower(NEW_FLASH_BORROWER); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...20240319_Multi_ContangoFlashborrower/AaveV3Avalanche_ContangoFlashborrower_20240319.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,41 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {GovV3Helpers} from 'aave-helpers/GovV3Helpers.sol'; | ||
import {AaveV3Avalanche} from 'aave-address-book/AaveV3Avalanche.sol'; | ||
|
||
import 'forge-std/Test.sol'; | ||
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; | ||
import {AaveV3Avalanche_ContangoFlashborrower_20240319} from './AaveV3Avalanche_ContangoFlashborrower_20240319.sol'; | ||
|
||
/** | ||
* @dev Test for AaveV3Avalanche_ContangoFlashborrower_20240319 | ||
* command: make test-contract filter=AaveV3Avalanche_ContangoFlashborrower_20240319 | ||
*/ | ||
contract AaveV3Avalanche_ContangoFlashborrower_20240319_Test is ProtocolV3TestBase { | ||
AaveV3Avalanche_ContangoFlashborrower_20240319 internal proposal; | ||
|
||
function setUp() public { | ||
vm.createSelectFork(vm.rpcUrl('avalanche'), 43078653); | ||
proposal = new AaveV3Avalanche_ContangoFlashborrower_20240319(); | ||
} | ||
|
||
/** | ||
* @dev executes the generic test suite including e2e and config snapshots | ||
*/ | ||
function test_defaultProposalExecution() public { | ||
defaultTest( | ||
'AaveV3Avalanche_ContangoFlashborrower_20240319', | ||
AaveV3Avalanche.POOL, | ||
address(proposal) | ||
); | ||
} | ||
|
||
function test_isFlashBorrower() external { | ||
GovV3Helpers.executePayload(vm, address(proposal)); | ||
bool isFlashBorrower = AaveV3Avalanche.ACL_MANAGER.isFlashBorrower( | ||
proposal.NEW_FLASH_BORROWER() | ||
); | ||
assertEq(isFlashBorrower, true); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/20240319_Multi_ContangoFlashborrower/AaveV3BNB_ContangoFlashborrower_20240319.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,19 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {AaveV3BNB} from 'aave-address-book/AaveV3BNB.sol'; | ||
import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; | ||
|
||
/** | ||
* @title Contango FlashBorrower | ||
* @author Aave Chan Initiative | ||
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x09bb9e7cffc974d330d82ce7a0b0502b573d6f3b4f839ea15d6629613901e96d | ||
* - Discussion: https://governance.aave.com/t/arfc-add-contango-protocol-cian-protocol-and-index-coop-to-flashborrowers-on-aave-v3/16478 | ||
*/ | ||
contract AaveV3BNB_ContangoFlashborrower_20240319 is IProposalGenericExecutor { | ||
address public constant NEW_FLASH_BORROWER = 0x14F8e5Fe35b2d0D67dBcE9329f1b5d09f60c06C3; | ||
|
||
function execute() external { | ||
AaveV3BNB.ACL_MANAGER.addFlashBorrower(NEW_FLASH_BORROWER); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/20240319_Multi_ContangoFlashborrower/AaveV3BNB_ContangoFlashborrower_20240319.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 {GovV3Helpers} from 'aave-helpers/GovV3Helpers.sol'; | ||
import {AaveV3BNB} from 'aave-address-book/AaveV3BNB.sol'; | ||
|
||
import 'forge-std/Test.sol'; | ||
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; | ||
import {AaveV3BNB_ContangoFlashborrower_20240319} from './AaveV3BNB_ContangoFlashborrower_20240319.sol'; | ||
|
||
/** | ||
* @dev Test for AaveV3BNB_ContangoFlashborrower_20240319 | ||
* command: make test-contract filter=AaveV3BNB_ContangoFlashborrower_20240319 | ||
*/ | ||
contract AaveV3BNB_ContangoFlashborrower_20240319_Test is ProtocolV3TestBase { | ||
AaveV3BNB_ContangoFlashborrower_20240319 internal proposal; | ||
|
||
function setUp() public { | ||
vm.createSelectFork(vm.rpcUrl('bnb'), 37168106); | ||
proposal = new AaveV3BNB_ContangoFlashborrower_20240319(); | ||
} | ||
|
||
/** | ||
* @dev executes the generic test suite including e2e and config snapshots | ||
*/ | ||
function test_defaultProposalExecution() public { | ||
defaultTest('AaveV3BNB_ContangoFlashborrower_20240319', AaveV3BNB.POOL, address(proposal)); | ||
} | ||
|
||
function test_isFlashBorrower() external { | ||
GovV3Helpers.executePayload(vm, address(proposal)); | ||
bool isFlashBorrower = AaveV3BNB.ACL_MANAGER.isFlashBorrower(proposal.NEW_FLASH_BORROWER()); | ||
assertEq(isFlashBorrower, true); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/20240319_Multi_ContangoFlashborrower/AaveV3Base_ContangoFlashborrower_20240319.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,19 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; | ||
import {AaveV3Base} from 'aave-address-book/AaveV3Base.sol'; | ||
|
||
/** | ||
* @title Contango FlashBorrower | ||
* @author Aave Chan Initiative | ||
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x09bb9e7cffc974d330d82ce7a0b0502b573d6f3b4f839ea15d6629613901e96d | ||
* - Discussion: https://governance.aave.com/t/arfc-add-contango-protocol-cian-protocol-and-index-coop-to-flashborrowers-on-aave-v3/16478 | ||
*/ | ||
contract AaveV3Base_ContangoFlashborrower_20240319 is IProposalGenericExecutor { | ||
address public constant NEW_FLASH_BORROWER = 0xab515542d621574f9b5212d50593cD0C07e641bD; | ||
|
||
function execute() external { | ||
AaveV3Base.ACL_MANAGER.addFlashBorrower(NEW_FLASH_BORROWER); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/20240319_Multi_ContangoFlashborrower/AaveV3Base_ContangoFlashborrower_20240319.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 {GovV3Helpers} from 'aave-helpers/GovV3Helpers.sol'; | ||
import {AaveV3Base} from 'aave-address-book/AaveV3Base.sol'; | ||
|
||
import 'forge-std/Test.sol'; | ||
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; | ||
import {AaveV3Base_ContangoFlashborrower_20240319} from './AaveV3Base_ContangoFlashborrower_20240319.sol'; | ||
|
||
/** | ||
* @dev Test for AaveV3Base_ContangoFlashborrower_20240319 | ||
* command: make test-contract filter=AaveV3Base_ContangoFlashborrower_20240319 | ||
*/ | ||
contract AaveV3Base_ContangoFlashborrower_20240319_Test is ProtocolV3TestBase { | ||
AaveV3Base_ContangoFlashborrower_20240319 internal proposal; | ||
|
||
function setUp() public { | ||
vm.createSelectFork(vm.rpcUrl('base'), 12007301); | ||
proposal = new AaveV3Base_ContangoFlashborrower_20240319(); | ||
} | ||
|
||
/** | ||
* @dev executes the generic test suite including e2e and config snapshots | ||
*/ | ||
function test_defaultProposalExecution() public { | ||
defaultTest('AaveV3Base_ContangoFlashborrower_20240319', AaveV3Base.POOL, address(proposal)); | ||
} | ||
|
||
function test_isFlashBorrower() external { | ||
GovV3Helpers.executePayload(vm, address(proposal)); | ||
bool isFlashBorrower = AaveV3Base.ACL_MANAGER.isFlashBorrower(proposal.NEW_FLASH_BORROWER()); | ||
assertEq(isFlashBorrower, true); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/20240319_Multi_ContangoFlashborrower/AaveV3Gnosis_ContangoFlashborrower_20240319.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,19 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; | ||
import {AaveV3Gnosis} from 'aave-address-book/AaveV3Gnosis.sol'; | ||
|
||
/** | ||
* @title Contango FlashBorrower | ||
* @author Aave Chan Initiative | ||
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x09bb9e7cffc974d330d82ce7a0b0502b573d6f3b4f839ea15d6629613901e96d | ||
* - Discussion: https://governance.aave.com/t/arfc-add-contango-protocol-cian-protocol-and-index-coop-to-flashborrowers-on-aave-v3/16478 | ||
*/ | ||
contract AaveV3Gnosis_ContangoFlashborrower_20240319 is IProposalGenericExecutor { | ||
address public constant NEW_FLASH_BORROWER = 0xab515542d621574f9b5212d50593cD0C07e641bD; | ||
|
||
function execute() external { | ||
AaveV3Gnosis.ACL_MANAGER.addFlashBorrower(NEW_FLASH_BORROWER); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/20240319_Multi_ContangoFlashborrower/AaveV3Gnosis_ContangoFlashborrower_20240319.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,39 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {GovV3Helpers} from 'aave-helpers/GovV3Helpers.sol'; | ||
import {AaveV3Gnosis} from 'aave-address-book/AaveV3Gnosis.sol'; | ||
|
||
import 'forge-std/Test.sol'; | ||
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; | ||
import {AaveV3Gnosis_ContangoFlashborrower_20240319} from './AaveV3Gnosis_ContangoFlashborrower_20240319.sol'; | ||
|
||
/** | ||
* @dev Test for AaveV3Gnosis_ContangoFlashborrower_20240319 | ||
* command: make test-contract filter=AaveV3Gnosis_ContangoFlashborrower_20240319 | ||
*/ | ||
contract AaveV3Gnosis_ContangoFlashborrower_20240319_Test is ProtocolV3TestBase { | ||
AaveV3Gnosis_ContangoFlashborrower_20240319 internal proposal; | ||
|
||
function setUp() public { | ||
vm.createSelectFork(vm.rpcUrl('gnosis'), 32999851); | ||
proposal = new AaveV3Gnosis_ContangoFlashborrower_20240319(); | ||
} | ||
|
||
/** | ||
* @dev executes the generic test suite including e2e and config snapshots | ||
*/ | ||
function test_defaultProposalExecution() public { | ||
defaultTest( | ||
'AaveV3Gnosis_ContangoFlashborrower_20240319', | ||
AaveV3Gnosis.POOL, | ||
address(proposal) | ||
); | ||
} | ||
|
||
function test_isFlashBorrower() external { | ||
GovV3Helpers.executePayload(vm, address(proposal)); | ||
bool isFlashBorrower = AaveV3Gnosis.ACL_MANAGER.isFlashBorrower(proposal.NEW_FLASH_BORROWER()); | ||
assertEq(isFlashBorrower, true); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/20240319_Multi_ContangoFlashborrower/AaveV3Polygon_ContangoFlashborrower_20240319.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,19 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {AaveV3Polygon} from 'aave-address-book/AaveV3Polygon.sol'; | ||
import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; | ||
|
||
/** | ||
* @title Contango FlashBorrower | ||
* @author Aave Chan Initiative | ||
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x09bb9e7cffc974d330d82ce7a0b0502b573d6f3b4f839ea15d6629613901e96d | ||
* - Discussion: https://governance.aave.com/t/arfc-add-contango-protocol-cian-protocol-and-index-coop-to-flashborrowers-on-aave-v3/16478 | ||
*/ | ||
contract AaveV3Polygon_ContangoFlashborrower_20240319 is IProposalGenericExecutor { | ||
address public constant NEW_FLASH_BORROWER = 0xab515542d621574f9b5212d50593cD0C07e641bD; | ||
|
||
function execute() external { | ||
AaveV3Polygon.ACL_MANAGER.addFlashBorrower(NEW_FLASH_BORROWER); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/20240319_Multi_ContangoFlashborrower/AaveV3Polygon_ContangoFlashborrower_20240319.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,39 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {GovV3Helpers} from 'aave-helpers/GovV3Helpers.sol'; | ||
import {AaveV3Polygon} from 'aave-address-book/AaveV3Polygon.sol'; | ||
|
||
import 'forge-std/Test.sol'; | ||
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; | ||
import {AaveV3Polygon_ContangoFlashborrower_20240319} from './AaveV3Polygon_ContangoFlashborrower_20240319.sol'; | ||
|
||
/** | ||
* @dev Test for AaveV3Polygon_ContangoFlashborrower_20240319 | ||
* command: make test-contract filter=AaveV3Polygon_ContangoFlashborrower_20240319 | ||
*/ | ||
contract AaveV3Polygon_ContangoFlashborrower_20240319_Test is ProtocolV3TestBase { | ||
AaveV3Polygon_ContangoFlashborrower_20240319 internal proposal; | ||
|
||
function setUp() public { | ||
vm.createSelectFork(vm.rpcUrl('polygon'), 54819969); | ||
proposal = new AaveV3Polygon_ContangoFlashborrower_20240319(); | ||
} | ||
|
||
/** | ||
* @dev executes the generic test suite including e2e and config snapshots | ||
*/ | ||
function test_defaultProposalExecution() public { | ||
defaultTest( | ||
'AaveV3Polygon_ContangoFlashborrower_20240319', | ||
AaveV3Polygon.POOL, | ||
address(proposal) | ||
); | ||
} | ||
|
||
function test_isFlashBorrower() external { | ||
GovV3Helpers.executePayload(vm, address(proposal)); | ||
bool isFlashBorrower = AaveV3Polygon.ACL_MANAGER.isFlashBorrower(proposal.NEW_FLASH_BORROWER()); | ||
assertEq(isFlashBorrower, true); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/20240319_Multi_ContangoFlashborrower/AaveV3Scroll_ContangoFlashborrower_20240319.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,19 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {AaveV3Scroll} from 'aave-address-book/AaveV3Scroll.sol'; | ||
import {IProposalGenericExecutor} from 'aave-helpers/interfaces/IProposalGenericExecutor.sol'; | ||
|
||
/** | ||
* @title Contango FlashBorrower | ||
* @author Aave Chan Initiative | ||
* - Snapshot: https://snapshot.org/#/aave.eth/proposal/0x09bb9e7cffc974d330d82ce7a0b0502b573d6f3b4f839ea15d6629613901e96d | ||
* - Discussion: https://governance.aave.com/t/arfc-add-contango-protocol-cian-protocol-and-index-coop-to-flashborrowers-on-aave-v3/16478 | ||
*/ | ||
contract AaveV3Scroll_ContangoFlashborrower_20240319 is IProposalGenericExecutor { | ||
address public constant NEW_FLASH_BORROWER = 0x14F8e5Fe35b2d0D67dBcE9329f1b5d09f60c06C3; | ||
|
||
function execute() external { | ||
AaveV3Scroll.ACL_MANAGER.addFlashBorrower(NEW_FLASH_BORROWER); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/20240319_Multi_ContangoFlashborrower/AaveV3Scroll_ContangoFlashborrower_20240319.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,39 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {GovV3Helpers} from 'aave-helpers/GovV3Helpers.sol'; | ||
import {AaveV3Scroll} from 'aave-address-book/AaveV3Scroll.sol'; | ||
|
||
import 'forge-std/Test.sol'; | ||
import {ProtocolV3TestBase, ReserveConfig} from 'aave-helpers/ProtocolV3TestBase.sol'; | ||
import {AaveV3Scroll_ContangoFlashborrower_20240319} from './AaveV3Scroll_ContangoFlashborrower_20240319.sol'; | ||
|
||
/** | ||
* @dev Test for AaveV3Scroll_ContangoFlashborrower_20240319 | ||
* command: make test-contract filter=AaveV3Scroll_ContangoFlashborrower_20240319 | ||
*/ | ||
contract AaveV3Scroll_ContangoFlashborrower_20240319_Test is ProtocolV3TestBase { | ||
AaveV3Scroll_ContangoFlashborrower_20240319 internal proposal; | ||
|
||
function setUp() public { | ||
vm.createSelectFork(vm.rpcUrl('scroll'), 4244173); | ||
proposal = new AaveV3Scroll_ContangoFlashborrower_20240319(); | ||
} | ||
|
||
/** | ||
* @dev executes the generic test suite including e2e and config snapshots | ||
*/ | ||
function test_defaultProposalExecution() public { | ||
defaultTest( | ||
'AaveV3Scroll_ContangoFlashborrower_20240319', | ||
AaveV3Scroll.POOL, | ||
address(proposal) | ||
); | ||
} | ||
|
||
function test_isFlashBorrower() external { | ||
GovV3Helpers.executePayload(vm, address(proposal)); | ||
bool isFlashBorrower = AaveV3Scroll.ACL_MANAGER.isFlashBorrower(proposal.NEW_FLASH_BORROWER()); | ||
assertEq(isFlashBorrower, true); | ||
} | ||
} |
Oops, something went wrong.
e5a6d3c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Foundry report
Build log
Test success 🌈