Skip to content

Commit

Permalink
fix: readd improved test
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra committed Apr 10, 2024
1 parent 958a81d commit 2ca2e4d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Raw diff

```json
{}
```
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {AaveV2Ethereum} from 'aave-address-book/AaveV2Ethereum.sol';
import {AaveV2Ethereum, AaveV2EthereumAssets} from 'aave-address-book/AaveV2Ethereum.sol';
import {GovernanceV3Ethereum} from 'aave-address-book/GovernanceV3Ethereum.sol';

import 'forge-std/Test.sol';
import {ProtocolV2TestBase, ReserveConfig} from 'aave-helpers/ProtocolV2TestBase.sol';
import {AaveV2Ethereum_InterimAAMPLDistribution_20240409} from './AaveV2Ethereum_InterimAAMPLDistribution_20240409.sol';
import {AaveV2Ethereum_InterimAAMPLDistribution_20240409, IDistributionCreator} from './AaveV2Ethereum_InterimAAMPLDistribution_20240409.sol';

/**
* @dev Test for AaveV2Ethereum_InterimAAMPLDistribution_20240409
Expand All @@ -29,4 +30,21 @@ contract AaveV2Ethereum_InterimAAMPLDistribution_20240409_Test is ProtocolV2Test
address(proposal)
);
}

function test_dataCorrectness() public {
executePayload(vm, address(proposal));

IDistributionCreator.CampaignParameters memory campaign = proposal
.DISTRIBUTION_CREATOR()
.campaign(bytes32(0xf9c2eb37d44c3495bb42c51d2483f332ace5f1a0e02d828a3bc6f32e5d02ab30));

assertEq(campaign.creator, GovernanceV3Ethereum.EXECUTOR_LVL_1);
assertEq(campaign.rewardToken, AaveV2EthereumAssets.USDC_UNDERLYING);
// assertEq(campaign.amount, 300_000e6);
assertEq(campaign.campaignType, 4);
assertGt(campaign.startTimestamp, block.timestamp);
assertEq(campaign.duration, 3600);
(string memory url, , ) = abi.decode(campaign.campaignData, (string, string, bytes));
assertEq(url, proposal.FILE_URL());
}
}

0 comments on commit 2ca2e4d

Please sign in to comment.