Skip to content

Add timestamp based Governor and Votes clock options#347

Merged
ericglau merged 21 commits intoOpenZeppelin:masterfrom
ericglau:clock
Apr 8, 2024
Merged

Add timestamp based Governor and Votes clock options#347
ericglau merged 21 commits intoOpenZeppelin:masterfrom
ericglau:clock

Conversation

@ericglau
Copy link
Member

@ericglau ericglau commented Mar 18, 2024

Fixes #225

  • For ERC20 and ERC721, under the Votes setting (which is now its own section), adds Block Number (default) and Timestamp options.
  • For Governor, under a new Token Clock Mode section, adds Block Number (default) and Timestamp options. Users must choose this to match what they are using in their token. If Timestamp is selected, GovernorSettings is initialized using timestamp-compatible values.

- [ ] Link the above options together if possible. I don't think we should link these options at this time. Current Wizard behaviour does not link settings between tabs, and users may not realize if certain settings are linked. For example, users may not notice if Wizard modifies their ERC20 votes option when they are on the Governor tab.

@socket-security
Copy link

socket-security bot commented Apr 8, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@nomicfoundation/hardhat-toolbox@5.0.0 environment Transitive: eval, filesystem, network, shell, unsafe +428 148 MB kanej

🚮 Removed packages: npm/@types/node@18.19.30, npm/has-bigints@1.0.2, npm/has-tostringtag@1.0.2, npm/highlight.js@11.9.0, npm/highlightjs-cairo@0.4.0, npm/highlightjs-solidity@2.0.6, npm/icss-utils@5.1.0, npm/immediate@3.0.6, npm/is-arguments@1.1.1, npm/is-callable@1.2.7, npm/is-generator-function@1.0.10, npm/is-shared-array-buffer@1.0.3, npm/is-string@1.0.7, npm/is-symbol@1.0.4, npm/is-typed-array@1.1.13, npm/isarray@2.0.5, npm/jackspeak@2.3.6, npm/jest-worker@26.6.2, npm/jiti@1.21.0, npm/jszip@3.10.1, npm/kleur@4.1.5, npm/lilconfig@3.1.1, npm/livereload-js@3.4.1, npm/livereload@0.9.3, npm/local-access@1.1.0, npm/magic-string@0.30.8, npm/mdn-data@2.0.30, npm/min-indent@1.0.1, npm/minipass@5.0.0, npm/mri@1.2.0, npm/mrmime@2.0.0, npm/mz@2.7.0, npm/normalize-url@6.1.0, npm/object-hash@3.0.0, npm/p-queue@6.6.2, npm/path-browserify@1.0.1, npm/path-key@2.0.1, npm/path-scurry@1.10.2, npm/pify@2.3.0, npm/pirates@4.0.6, npm/postcss-calc@9.0.1, npm/postcss-colormin@6.1.0, npm/postcss-convert-values@6.1.0, npm/postcss-discard-comments@6.0.2, npm/postcss-discard-duplicates@6.0.3, npm/postcss-discard-empty@6.0.3, npm/postcss-discard-overridden@6.0.2, npm/postcss-import@15.1.0, npm/postcss-js@4.0.1, npm/postcss-load-config@4.0.2, npm/postcss-load-config@5.0.3, npm/postcss-merge-longhand@6.0.5, npm/postcss-merge-rules@6.1.1, npm/postcss-minify-font-values@6.1.0, npm/postcss-minify-gradients@6.0.3, npm/postcss-minify-params@6.1.0, npm/postcss-minify-selectors@6.0.4, npm/postcss-modules-extract-imports@3.0.0, npm/postcss-modules-local-by-default@4.0.4, npm/postcss-modules-scope@3.1.1, npm/postcss-modules-values@4.0.0, npm/postcss-nested@6.0.1, npm/postcss-normalize-charset@6.0.2, npm/postcss-normalize-display-values@6.0.2, npm/postcss-normalize-positions@6.0.2, npm/postcss-normalize-repeat-style@6.0.2, npm/postcss-normalize-string@6.0.2, npm/postcss-normalize-timing-functions@6.0.2, npm/postcss-normalize-unicode@6.1.0, npm/postcss-normalize-url@6.0.2, npm/postcss-normalize-whitespace@6.0.2, npm/postcss-ordered-values@6.0.2, npm/postcss-reduce-initial@6.1.0, npm/postcss-reduce-transforms@6.0.2, npm/postcss-selector-parser@6.0.16, npm/postcss-svgo@6.0.3, npm/postcss-unique-selectors@6.0.4, npm/postcss-value-parser@4.2.0, npm/postcss@8.4.38, npm/query-string@7.1.3, npm/resolve.exports@2.0.2, npm/resolve@1.22.8, npm/rimraf@3.0.2, npm/rimraf@5.0.5, npm/rollup-plugin-livereload@2.0.5, npm/rollup-plugin-styles@4.0.0, npm/rollup-plugin-svelte@7.2.0, npm/rollup-plugin-terser@7.0.2, npm/rollup@2.79.1, npm/rollup@4.14.1, npm/sade@1.8.1, npm/sander@0.5.1, npm/semiver@1.1.0, npm/sirv-cli@2.0.2, npm/solidity-ast@0.4.56, npm/sorcery@0.11.0, npm/source-map-js@1.2.0, npm/string-width@3.1.0, npm/strip-ansi@5.2.0, npm/strip-indent@3.0.0, npm/sucrase@3.35.0, npm/svelte-check@3.6.8, npm/svelte-preprocess@5.1.3, npm/svelte@3.59.2, npm/svelte@4.2.12, npm/tailwindcss@3.4.3, npm/throat@4.1.0, npm/tippy.js@6.3.7, npm/tslib@2.6.2, npm/typescript@4.9.5, npm/typescript@5.4.4, npm/util@0.12.5, npm/uuid@9.0.1, npm/which-typed-array@1.1.15, npm/wsrun@5.2.4, npm/yaml@1.10.2, npm/yargs-parser@13.1.2

View full report↗︎

@ericglau ericglau changed the title Draft: Add timestamp based Governor and Votes clock options Add timestamp based Governor and Votes clock options Apr 8, 2024
@ericglau ericglau marked this pull request as ready for review April 8, 2024 15:09
@ericglau ericglau requested a review from a team April 8, 2024 15:09
Copy link
Contributor

@Amxx Amxx left a comment

Choose a reason for hiding this comment

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

LGTM

@ericglau ericglau enabled auto-merge (squash) April 8, 2024 16:00
@ericglau ericglau merged commit dfe6e7d into OpenZeppelin:master Apr 8, 2024
@ericglau ericglau deleted the clock branch April 8, 2024 16:07
@github-actions github-actions bot mentioned this pull request May 3, 2025
@github-actions github-actions bot mentioned this pull request Jun 19, 2025
This was referenced Aug 12, 2025
@github-actions github-actions bot mentioned this pull request Aug 28, 2025
This was referenced Sep 16, 2025
This was referenced Oct 29, 2025
This was referenced Nov 11, 2025
This was referenced Nov 26, 2025
@github-actions github-actions bot mentioned this pull request Jan 27, 2026
@github-actions github-actions bot mentioned this pull request Feb 17, 2026
@github-actions github-actions bot mentioned this pull request Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider adding Governor and Votes clock options

2 participants