Solidity: Governor absolute quorum values accepted by validation generate code that does not compile
I maintainer di solito rispondono entro 1 giorno
@RaphaelFakhri ci sta già lavorando.
Dal 27/10/2026.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 62/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- solidity, typescript
- Ambito
- blockchain
Direzione di ricerca
Start with the Governor option validation: numberPattern and the quorum() code generation, where ${quorumAbsolute}e${decimals} is printed, both in the Solidity generator in this repository. Reproduce each row of the table (for example 1e3, 010, and 1.5 with erc721votes) and check the generated line against solc. Done when those inputs either produce a valid literal (such as return 1e21; for 1e3 with 18 decimals) or are rejected with an option error like premint's Too many decimals.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The Governor quorumAbsolute option is checked against numberPattern (/^(?!$)(\d*)(?:\.(\d+))?(?:e(\d+))?$/), and the value is then printed into quorum() as ${quorumAbsolute}e${decimals}, or as-is when decimals is 0 or votes is erc721votes. Some values that pass validation produce a literal that solc rejects:
| Options | Generated line | solc 0.8.26 error |
|---|---|---|
quorumAbsolute: '1e3' (18 decimals) |
return 1e3e18; |
Identifier-start is not allowed at end of a number. |
quorumAbsolute: '010' (18 decimals) |
return 010e18; |
Octal numbers not allowed. |
quorumAbsolute: '1.5', votes: 'erc721votes' (or decimals: 0) |
return 1.5; |
Return argument type rational_const 3 / 2 is not implicitly convertible to expected type ... uint256. |
The UI's absolute quorum field is a text input, so these values can be typed in the Governor tab and produce a contract that does not compile, with no error shown.
Expected behavior
Values in scientific notation or with leading zeros generate a valid literal (for example return 1e21; for 1e3 with 18 decimals), and a quorum that is not a whole number of votes is rejected with an option error, as premint does with Too many decimals.
- Lingua principale
- TypeScript
- Stelle
- 296
- Fork
- 188
- Merge medio
- 3h 24m
- PR unite (30g)
- 11
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenZeppelin/contracts-wizard
-
Stellar: Generated test asserts against the contract identifier instead of the stored token nameAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
OpenZeppelin/contracts-wizard#805 ·
I maintainer di solito rispondono entro 1 giorno
-
Document properly that yarn classic is required (v1.X)Forse già presa @0xMayurrr l’ha presa 245 giorni fa. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 68/100
OpenZeppelin/contracts-wizard#739 ·
I maintainer di solito rispondono entro 1 giorno
-
Solidity: Premint amounts below 1 with a leading fractional zero generate code that does not compileForse già presa @RaphaelFakhri l’ha presa 20 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 20/100
OpenZeppelin/contracts-wizard#893 ·
I maintainer di solito rispondono entro 1 giorno
-
Follow-ups from the Chainlink CCIP and ACE integration (#880)Forse già presa @nahimterrazas l’ha presa 25 giorni fa. Aperta
OpenZeppelin/contracts-wizard#881 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Solidity: Validate user-supplied option strings at build entry pointsForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
OpenZeppelin/contracts-wizard#804 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di OpenZeppelin/contracts-wizard
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
jeanibarz/knowledge-base-mcp-server#1268 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
Koenkk/zigbee-herdsman-converters#13820 ·
I maintainer di solito rispondono entro 2 giorni
-
[prefer-expect-resolves] autofix leaves a stray ")" when the awaited expression is parenthesizedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jest-community/eslint-plugin-jest#2052 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Wallet functions throws TypeError when the wallet has no account IDForse già presa @Medhansh-741 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
hiero-ledger/hiero-sdk-js#4781 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno