Skip to content

Commit 09218a4

Browse files
committed
fix code after changing to 49
1 parent b46de78 commit 09218a4

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

foundry.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ solc = "0.8.24"
1111
remappings = ["forge-std/=lib/forge-std/src/"]
1212

1313
[fuzz]
14-
runs = 4096
14+
runs = 3072
1515

1616
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options

test/fuzz/FuzzVotingPowerExchange.t.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ contract VotingPwoerExchangeTest is Test {
6666
utilityToken.mint(participant2, 10_000 * 1e18);
6767
vm.stopPrank();
6868

69+
// set the voting power cap to 99e18
70+
vm.prank(manager);
71+
votingPowerExchange.setVotingPowerCap(99e18);
72+
6973
// set up the roles for exchange contract
7074

7175
helper = new VotingPowerExchangeTestHelper();

test/integration/VotingPowerExchange.t.sol

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ contract VotingPowerExchangeTest is Test {
6868

6969
helper = new VotingPowerExchangeTestHelper();
7070

71+
// set the voting power cap to 99e18
72+
vm.prank(manager);
73+
votingPowerExchange.setVotingPowerCap(99e18);
74+
7175
// other setup
7276
vm.label(participant, "participant");
7377
vm.label(participant2, "participant2");
@@ -208,7 +212,7 @@ contract VotingPowerExchangeTest is Test {
208212
VotingPowerExchange vpe =
209213
new VotingPowerExchange(address(utilityToken), address(govToken), admin, manager, exchanger);
210214
assertTrue(address(vpe) != address(0));
211-
assertEq(vpe.getVotingPowerCap(), 99 * 1e18);
215+
assertEq(vpe.getVotingPowerCap(), 49 * 1e18);
212216
}
213217

214218
function testBasicVotingPowerExchangeInfo() public view {

test/unit/VotingPowerExchange.t.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
77

88
contract VotingPowerExchangeUnitTest is Test {
99
VotingPowerExchange public votingPowerExchange;
10+
address public manager = makeAddr("manager");
1011

1112
function setUp() public {
1213
// We need to deploy VotingPowerExchange
1314
votingPowerExchange =
1415
new VotingPowerExchange(address(this), address(this), address(this), address(this), address(this));
16+
// set the cap to 99e18
17+
vm.prank(address(this));
18+
votingPowerExchange.setVotingPowerCap(99e18);
1519
}
1620

1721
function testConstructorValidation() public {

0 commit comments

Comments
 (0)