accounting-remuneration-q1-.../test/Proposal.t.sol
2022-12-05 19:33:58 +00:00

31 lines
821 B
Solidity

pragma solidity ^0.8.1;
import "../src/Proposal.sol";
import "forge-std/Test.sol";
contract ProposalTest is Test, Proposal {
function testProposal() public {
uint256 balanceBefore = IERC20(tokenAddress).balanceOf(governanceAddress);
uint256 streamBalance = ISablier(sablierAddress).balanceOf(COMMUNITY_FUND_STREAM_ID, governanceAddress);
vm.startPrank(address(governanceAddress));
executeProposal();
vm.stopPrank();
uint256 balanceAfter = IERC20(tokenAddress).balanceOf(governanceAddress);
require(
RENUMERATION_AMOUNT - RENUMERATION_NORMALISED_AMOUNT < 1000 gwei,
"NORMALISED NUMBER BREACHES ROUNDING THRESHOLD"
);
require(
balanceBefore - RENUMERATION_NORMALISED_AMOUNT == balanceAfter - streamBalance,
"OUTFLOWS GREATER THAN INFLOWS"
);
}
}