Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thurendous committed Nov 13, 2024
1 parent 50d34b9 commit 04d4f61
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions script/DeployContracts.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -167,22 +167,14 @@ contract DeployContracts is Script {
// give exchange the voting power exchange role of govToken
govToken.grantRole(govToken.VOTING_POWER_EXCHANGE_ROLE(), address(votingPowerExchange));

// give exchange the minter role of govToken
// govToken.grantRole(govToken.MINTER_ROLE(), address(votingPowerExchange));
// give exchange the burner role of utilityToken
// 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);
// give defender as exchanger some utility token
utilityToken.mint(defender, 100_000 * 1e18);
// NOTE: should let the outside exchanger to approve the exchange token.
// NOTE: And the exchanger address should hold some utility token for calling exchange function. (not needed anymore)
// NOTE: the defender is now holding the utility token
// NOTE: the defender is now holding the utility token so he is the exchanger now
vm.stopBroadcast();

return DeploymentResult({
Expand Down Expand Up @@ -267,7 +259,7 @@ contract DeployContracts is Script {
vm.stopBroadcast();
// NOTE: should let the outside exchanger to approve the exchange token.
// NOTE: And the exchanger address should hold some utility token for calling exchange function. (not needed anymore)
// NOTE: the defender is now holding the utility token
// NOTE: the defender is now holding the utility token so he is the exchanger now

return DeploymentResult({
utilityToken: address(utilityToken),
Expand Down

0 comments on commit 04d4f61

Please sign in to comment.