Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
brotherlymite committed Oct 26, 2023
1 parent 712d99e commit 90ed0a3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ contract AaveV3Gnosis_AaveV3GnosisActivation_20231026 is AaveV3PayloadGnosis {
AaveV3Gnosis.ACL_MANAGER.addRiskAdmin(AaveV3Gnosis.CAPS_PLUS_RISK_STEWARD);

IERC20(WETH).approve(address(AaveV3Gnosis.POOL), 0.01 * 1e18);
AaveV3Gnosis.POOL.supply(WETH, 0.01 * 1e18, address(AaveV3Gnosis.COLLECTOR), 0);
AaveV3Gnosis.POOL.supply(WETH, 0.01 * 1e18, address(AaveV3Gnosis.COLLECTOR), 0);

IERC20(wstETH).approve(address(AaveV3Gnosis.POOL), 0.01 * 1e18);
AaveV3Gnosis.POOL.supply(wstETH, 0.01 * 1e18, address(AaveV3Gnosis.COLLECTOR), 0);
IERC20(wstETH).approve(address(AaveV3Gnosis.POOL), 0.01 * 1e18);
AaveV3Gnosis.POOL.supply(wstETH, 0.01 * 1e18, address(AaveV3Gnosis.COLLECTOR), 0);

IERC20(GNO).approve(address(AaveV3Gnosis.POOL), 0.1 * 1e18);
IERC20(GNO).approve(address(AaveV3Gnosis.POOL), 0.1 * 1e18);
AaveV3Gnosis.POOL.supply(GNO, 0.1 * 1e18, address(AaveV3Gnosis.COLLECTOR), 0);

IERC20(USDC).approve(address(AaveV3Gnosis.POOL), 10 * 1e6);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ contract AaveV3Gnosis_AaveV3GnosisActivation_20231026_Test is ProtocolV3TestBase

// TODO: remove after transferring the ownership
vm.startPrank(DEPLOYER);
IOwnable(GovernanceV3Gnosis.EXECUTOR_LVL_1).transferOwnership(address(GovernanceV3Gnosis.PAYLOADS_CONTROLLER));
IOwnable(GovernanceV3Gnosis.EXECUTOR_LVL_1).transferOwnership(
address(GovernanceV3Gnosis.PAYLOADS_CONTROLLER)
);
vm.stopPrank();
}

Expand All @@ -44,65 +46,58 @@ contract AaveV3Gnosis_AaveV3GnosisActivation_20231026_Test is ProtocolV3TestBase

function test_collectorHasWETHFunds() public {
GovV3Helpers.executePayload(vm, address(proposal));
(address aTokenAddress, ,) = AaveV3Gnosis.AAVE_PROTOCOL_DATA_PROVIDER.getReserveTokensAddresses(proposal.WETH());
assertGe(
IERC20(aTokenAddress).balanceOf(address(AaveV3Gnosis.COLLECTOR)),
0.01 * 1e18
);
(address aTokenAddress, , ) = AaveV3Gnosis
.AAVE_PROTOCOL_DATA_PROVIDER
.getReserveTokensAddresses(proposal.WETH());
assertGe(IERC20(aTokenAddress).balanceOf(address(AaveV3Gnosis.COLLECTOR)), 0.01 * 1e18);
}

function test_collectorHaswstETHFunds() public {
GovV3Helpers.executePayload(vm, address(proposal));
(address aTokenAddress, ,) = AaveV3Gnosis.AAVE_PROTOCOL_DATA_PROVIDER.getReserveTokensAddresses(proposal.wstETH());
assertGe(
IERC20(aTokenAddress).balanceOf(address(AaveV3Gnosis.COLLECTOR)),
0.01 * 1e18
);
(address aTokenAddress, , ) = AaveV3Gnosis
.AAVE_PROTOCOL_DATA_PROVIDER
.getReserveTokensAddresses(proposal.wstETH());
assertGe(IERC20(aTokenAddress).balanceOf(address(AaveV3Gnosis.COLLECTOR)), 0.01 * 1e18);
}

function test_collectorHasGNOFunds() public {
GovV3Helpers.executePayload(vm, address(proposal));
(address aTokenAddress, ,) = AaveV3Gnosis.AAVE_PROTOCOL_DATA_PROVIDER.getReserveTokensAddresses(proposal.GNO());
assertGe(
IERC20(aTokenAddress).balanceOf(address(AaveV3Gnosis.COLLECTOR)),
0.1 * 1e18
);
(address aTokenAddress, , ) = AaveV3Gnosis
.AAVE_PROTOCOL_DATA_PROVIDER
.getReserveTokensAddresses(proposal.GNO());
assertGe(IERC20(aTokenAddress).balanceOf(address(AaveV3Gnosis.COLLECTOR)), 0.1 * 1e18);
}

function test_collectorHasUSDCFunds() public {
GovV3Helpers.executePayload(vm, address(proposal));
(address aTokenAddress, ,) = AaveV3Gnosis.AAVE_PROTOCOL_DATA_PROVIDER.getReserveTokensAddresses(proposal.USDC());
assertGe(
IERC20(aTokenAddress).balanceOf(address(AaveV3Gnosis.COLLECTOR)),
10 * 1e6
);
(address aTokenAddress, , ) = AaveV3Gnosis
.AAVE_PROTOCOL_DATA_PROVIDER
.getReserveTokensAddresses(proposal.USDC());
assertGe(IERC20(aTokenAddress).balanceOf(address(AaveV3Gnosis.COLLECTOR)), 10 * 1e6);
}

function test_collectorHasWXDAIFunds() public {
GovV3Helpers.executePayload(vm, address(proposal));
(address aTokenAddress, ,) = AaveV3Gnosis.AAVE_PROTOCOL_DATA_PROVIDER.getReserveTokensAddresses(proposal.WXDAI());
assertGe(
IERC20(aTokenAddress).balanceOf(address(AaveV3Gnosis.COLLECTOR)),
10 * 1e18
);
(address aTokenAddress, , ) = AaveV3Gnosis
.AAVE_PROTOCOL_DATA_PROVIDER
.getReserveTokensAddresses(proposal.WXDAI());
assertGe(IERC20(aTokenAddress).balanceOf(address(AaveV3Gnosis.COLLECTOR)), 10 * 1e18);
}

function test_collectorHasEUReFunds() public {
GovV3Helpers.executePayload(vm, address(proposal));
(address aTokenAddress, ,) = AaveV3Gnosis.AAVE_PROTOCOL_DATA_PROVIDER.getReserveTokensAddresses(proposal.EURe());
assertGe(
IERC20(aTokenAddress).balanceOf(address(AaveV3Gnosis.COLLECTOR)),
10 * 1e18
);
(address aTokenAddress, , ) = AaveV3Gnosis
.AAVE_PROTOCOL_DATA_PROVIDER
.getReserveTokensAddresses(proposal.EURe());
assertGe(IERC20(aTokenAddress).balanceOf(address(AaveV3Gnosis.COLLECTOR)), 10 * 1e18);
}

function test_collectorHasSDAIFunds() public {
GovV3Helpers.executePayload(vm, address(proposal));
(address aTokenAddress, ,) = AaveV3Gnosis.AAVE_PROTOCOL_DATA_PROVIDER.getReserveTokensAddresses(proposal.sDAI());
assertGe(
IERC20(aTokenAddress).balanceOf(address(AaveV3Gnosis.COLLECTOR)),
10 * 1e18
);
(address aTokenAddress, , ) = AaveV3Gnosis
.AAVE_PROTOCOL_DATA_PROVIDER
.getReserveTokensAddresses(proposal.sDAI());
assertGe(IERC20(aTokenAddress).balanceOf(address(AaveV3Gnosis.COLLECTOR)), 10 * 1e18);
}

function _fundExecutorWithAssetsToList() internal {
Expand Down

0 comments on commit 90ed0a3

Please sign in to comment.