Skip to content
New issue

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

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

Already on GitHub? # to your account

[Feature] WIP improvements #14

Open
cyraxred opened this issue Sep 19, 2022 · 1 comment
Open

[Feature] WIP improvements #14

cyraxred opened this issue Sep 19, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@cyraxred
Copy link

Feature Description

Notes on
https://github.com/windranger-io/windranger-mass-delegation-contracts/blob/jo-delegate2/contracts/MerkleDelegation.sol

  • use verifyCalldata instead of verify - there will be a considerable gas difference for longer proofs
  • governance token can be hash at the root, not at leafs (https://github.com/windranger-io/windranger-mass-delegation-contracts/blob/jo-delegate2/contracts/MerkleDelegation.sol#L91) - it will speed up building of a large trie a bit
  • you dont need checkpoints actually, because you can call a contract with a blockTag. Also using blockTag is supported by snapshot.org and will not waste gas on lookup
  • it will be better to support multiple governance tokens by a single contract to avoid deployment gas costs
  • there is no need for OwnerInitialized event as Ownable emits OwnershipTransferred on construction
  • do not include test methods into prod version inherit a test/mock contract and put such methods there
@cyraxred cyraxred added the enhancement New feature or request label Sep 19, 2022
@CjHare
Copy link

CjHare commented Sep 19, 2022

@joigno ^^^

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants