Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
thurendous committed Oct 2, 2024
1 parent ad1c5c8 commit c695723
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 7 additions & 0 deletions script/DeployContracts.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ contract DeployContracts is Script {
utilityToken.grantRole(utilityToken.BURNER_ROLE(), address(votingPowerExchange));
// give defender the exchanger role
votingPowerExchange.grantRole(votingPowerExchange.EXCHANGER_ROLE(), defender);

// give exchanger some utility token
utilityToken.mint(exchanger, 10_000 * 1e18);
// exchanger should approve the votingPowerExchange to spend the utility token
// here exchanger is deployer so we do this directly
// change this method when exchanger is not deployer
utilityToken.approve(address(votingPowerExchange), 10_000 * 1e18);
vm.stopBroadcast();

return DeploymentResult({
Expand Down
1 change: 0 additions & 1 deletion test/fuzz/FuzzVotingPowerExchange.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ contract VotingPwoerExchangeTest is Test {
}

function testExchangeWithAnyAmountWhichIsInRangeWillSucceed(uint256 amount) public {

// mint 75240 utility token to the exchanger
vm.startPrank(minter);
utilityToken.mint(exchanger, 75240 * 1e18);
Expand Down
2 changes: 1 addition & 1 deletion test/integration/VotingPowerExchange.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ contract VotingPowerExchangeTest is Test {
vm.prank(minter);
// exchanger has already got 10_000 utility token
utilityToken.mint(exchanger, 65_300 * 1e18);
// approve
// approve
vm.startPrank(exchanger);
utilityToken.approve(address(votingPowerExchange), 75_300 * 1e18);

Expand Down

0 comments on commit c695723

Please sign in to comment.