-
Notifications
You must be signed in to change notification settings - Fork 12
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: add multiple update* methods #149
Conversation
Codecov Report
@@ Coverage Diff @@
## main #149 +/- ##
==========================================
- Coverage 84.35% 83.96% -0.39%
==========================================
Files 28 28
Lines 409 424 +15
Branches 91 101 +10
==========================================
+ Hits 345 356 +11
- Misses 54 55 +1
- Partials 10 13 +3
|
Agree with this PR, adding and removing strategies separately was bad UX. Do we need to keep the original single use entry points now then? |
I originally thought "yes" because it would provide more granularity but if we wish to reduce code bloat then maybe we could remove them indeed. |
yeah i say we remove them. I think we should have just a single entry point |
…_add_update_settings_entrypoint
Removed the external granular entrypoints and decided to keep only If you wish to ignore some fields, use:
Also removed the |
Are no-update keys the best solution to this? I feel like the experience for anyone not using sx frontend is not intuitive. |
Have you got any other ideas? Its not ideal, but as 99%+ of use will be through our UI i feel the ux improvement is worth it. |
…_add_update_settings_entrypoint
Even with our frontend, for users who check what they sign, it will be very confusing. There could be a uint8 where you set update bit flags (this is still not good ui). We could also just have a bunch of update booleans as parameters and it wouldn't cause such a large increase in gas (assuming a chain with cheap calldata). Considering these options, current approach may be best (definitely should comment in values of no update keys though) |
7ae1324
to
835262b
Compare
…_add_update_settings_entrypoint
…_add_update_settings_entrypoint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK
* feat: add updateAuthenticators, updateVotingStrategies and updateSettings * feat: add updateAuthenticatorsAndVotingStrategies * fix: add --via-ir to forge coverage * fix: add via_ir in foundry.toml * refactor: split the functions into updateSettings and updateStrategies * fix: check for metadatauriupdated event when testing * fix: check for _min and _max and do not use internal setters * refactor: move back from votingStrategiesMetadataURIs to votingStrategyMetadataURIs * refactor: remove set* entrypoints * refactor: remove EmptyArray check in internal functions * fix: Differentiate NO_UPDATE_METADATA_URI and NO_UPDATE_METADATA_URI_HASH * fix: fix NO_UPDATE_METADATA_URI_HASH * fix: remove useless comments * refactor: changing magic values for NO_UPDATE * refactor: use types instead of variables for no_update * refactor: use input struct for update settings * fix: remove extra comments on UpdateSettingsInput * chore: remove extra comment in updateSettings function * chore: add comments on values of NO_UPDATE_* * chore: fix typo in Space.col comments * chore: updated comments --------- Co-authored-by: Orland0x <[email protected]>
* chore: readme 1 * chore: moved proposal validation utils to common utils dir * chore: renamed WhitelistStrategy to WhitelistVotingStrategy * chore updated readme * fix: casing * refactor: move len checks to top of initializer * feat: check array lengths match * chore: updated tests * fix: readme typo * chore: added usage intructions to readme * feat(proposal validation): metadata uri (#157) * feat: proposal validation metadata * chore: updated tests --------- Co-authored-by: Orlando <[email protected]> * refactor: moved active proposal limitier params to space level (#155) * refactor: moved active proposal limitier params to space level * fix: limit active proposals per space not globally * fix: forked test error --------- Co-authored-by: Orlando <[email protected]> * feat: erc4824 support (#159) * feat: erc4824 interface * feat: space implements erc4824 * chore: dao uri setter tests * feat: add daoURI to space creation event * chore: fixed conflict issues --------- Co-authored-by: Orlando <[email protected]> * feat: set veto guardian in execution strategy setup (#163) * feat: veto guardian in timelock setup * feat: veto guardian in comp timelock setup * chore: updated tests * chore: fixed tests * feat: setup events in timelock exec strats * chore: inccrease codecov threshold * chore: increased coverage * chore: removed patch cov requirement --------- Co-authored-by: Orlando <[email protected]> * feat: add multiple update* methods (#149) * feat: add updateAuthenticators, updateVotingStrategies and updateSettings * feat: add updateAuthenticatorsAndVotingStrategies * fix: add --via-ir to forge coverage * fix: add via_ir in foundry.toml * refactor: split the functions into updateSettings and updateStrategies * fix: check for metadatauriupdated event when testing * fix: check for _min and _max and do not use internal setters * refactor: move back from votingStrategiesMetadataURIs to votingStrategyMetadataURIs * refactor: remove set* entrypoints * refactor: remove EmptyArray check in internal functions * fix: Differentiate NO_UPDATE_METADATA_URI and NO_UPDATE_METADATA_URI_HASH * fix: fix NO_UPDATE_METADATA_URI_HASH * fix: remove useless comments * refactor: changing magic values for NO_UPDATE * refactor: use types instead of variables for no_update * refactor: use input struct for update settings * fix: remove extra comments on UpdateSettingsInput * chore: remove extra comment in updateSettings function * chore: add comments on values of NO_UPDATE_* * chore: fix typo in Space.col comments * chore: updated comments --------- Co-authored-by: Orland0x <[email protected]> * refactor: move len checks to top of initializer * feat: check array lengths match * chore: updated tests --------- Co-authored-by: Orlando <[email protected]> Co-authored-by: pscott <[email protected]>
I initially wanted to go for an
updateSettings
that encompasses all the settings we have, however it is currently not possible because it would break theforge coverage
tool we are using (indeed, the optimizer isn't used when usingforge coverage
, which results in astack too deep
).So I've decided to go for:
Closes #148