Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: multiple allowed cash tokens #143

Merged
merged 1 commit into from
Nov 25, 2023
Merged

feat: multiple allowed cash tokens #143

merged 1 commit into from
Nov 25, 2023

Conversation

deluca-mike
Copy link
Collaborator

@deluca-mike deluca-mike commented Nov 23, 2023

  • DualGovernorDeployer is now deployed with an array of allowedCashTokens_, which are a permanent set for the system.
  • This array is converted into a truthy hashmap in the DualGovernor storage in its constructor.
  • The first cash token in the array of allowedCashTokens_ is the default for any new DualGovernor deployment (i.e. post-reset).
  • Registrar no longer needs a cashToken in its constructor, as it is read when needed form the DualGovernorDeployer.
  • setCashToken(address newCashToken_) is now a Zero type proposal.
  • PowerToken has a method setNextCashToken that only its governor can call, which ensures the new cash token takes effect only in the next epoch and onwards, guaranteeing the continued and consistent expected operation of the in-progress auction.

@deluca-mike deluca-mike added the enhancement New feature or request label Nov 23, 2023
@deluca-mike deluca-mike self-assigned this Nov 23, 2023
Copy link

github-actions bot commented Nov 23, 2023

LCOV of commit 7da264d during Forge Coverage #566

Summary coverage rate:
  lines......: 67.1% (320 of 477 lines)
  functions..: 55.7% (123 of 221 functions)
  branches...: no data found

Files changed coverage rate:
                                         |Lines       |Functions  |Branches    
  Filename                               |Rate     Num|Rate    Num|Rate     Num
  =============================================================================
  src/DualGovernor.sol                   |66.2%    145|45.2%    73|    -      0
  src/DualGovernorDeployer.sol           |80.0%      5|75.0%     4|    -      0
  src/PowerToken.sol                     |83.6%     61|73.1%    26|    -      0
  src/Registrar.sol                      | 100%     18| 100%     7|    -      0

@deluca-mike deluca-mike force-pushed the refactore/remove-double branch from d3af886 to d89083c Compare November 23, 2023 07:45
@deluca-mike deluca-mike force-pushed the feat/setCash branch 2 times, most recently from fb95e7d to 1dc9308 Compare November 24, 2023 16:26
@toninorair toninorair self-requested a review November 24, 2023 18:30
toninorair
toninorair previously approved these changes Nov 24, 2023
Copy link
Contributor

@toninorair toninorair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. Let's see if there is a way to not set next cash token next week.

Base automatically changed from refactore/remove-double to main November 25, 2023 09:49
@deluca-mike deluca-mike dismissed toninorair’s stale review November 25, 2023 09:49

The base branch was changed.

@deluca-mike deluca-mike merged commit b59c921 into main Nov 25, 2023
3 checks passed
@deluca-mike deluca-mike deleted the feat/setCash branch November 25, 2023 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants