Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

feat: support for minimal proxies #18

Merged
merged 45 commits into from
Dec 9, 2023
Merged

Conversation

0xrajath
Copy link
Contributor

@0xrajath 0xrajath commented Dec 7, 2023

Motivation:

The TokenVotingFactory is over the 24kb size limit. We need to convert the token voting modules into minimal proxies and also support deterministic deployments.

Modifications:

  • All token voting modules are now minimal proxies
  • Logic contracts are deployed in the script and then passed in as parameters to the Factory.
  • _getCastDisapprovalTypedDataHash in TokenholderCaster had a typo. Changed role to support.
  • Role is now stored as a public variable (Not immutable due to minimal proxies) in ActionCreator. And is passed in as a parameter in the Factory deploy.
  • Fix in *bySig tests.
  • Refactored test suite to be more modular.

Result:

Closes #4
Closes #11

@0xrajath 0xrajath self-assigned this Dec 7, 2023
Copy link
Contributor

@dd0sxx dd0sxx left a comment

Choose a reason for hiding this comment

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

A lot of these changes break the test suite, would be great if you could address that in this pr, or let us know if you're working on it in a follow up

@0xrajath
Copy link
Contributor Author

0xrajath commented Dec 7, 2023

A lot of these changes break the test suite, would be great if you could address that in this pr, or let us know if you're working on it in a follow up

Yeah I'm going to address the test suite fixes in this PR.

@0xrajath 0xrajath marked this pull request as ready for review December 9, 2023 05:08
Copy link

github-actions bot commented Dec 9, 2023

Coverage after merging rajath/minimal-proxies into main will be

97.40%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src/token-voting
   ERC20TokenholderActionCreator.sol87.50%50%100%100%37–38
   ERC20TokenholderCaster.sol92.31%50%100%100%39
   ERC721TokenholderActionCreator.sol84.21%50%100%100%37, 39–40
   ERC721TokenholderCaster.sol91.67%50%100%100%39
   LlamaTokenVotingFactory.sol100%100%100%100%
   TokenholderActionCreator.sol90.91%83.33%83.33%97.56%117–118, 223–224
   TokenholderCaster.sol91.58%86.76%84.21%96.12%197–201, 281–282, 315–316, 363–364, 388–389

@AustinGreen AustinGreen merged commit 51c1890 into main Dec 9, 2023
5 checks passed
@AustinGreen AustinGreen deleted the rajath/minimal-proxies branch December 9, 2023 15:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants