Deduplicate code in scripts/helpers and test/helpers/iterate (#4895)

Co-authored-by: ernestognw <ernestognw@gmail.com>
This commit is contained in:
Hadrien Croubois
2024-02-16 00:40:48 +01:00
committed by GitHub
parent 4e7e6e54da
commit 96e5c0830a
5 changed files with 44 additions and 45 deletions

View File

@ -175,7 +175,7 @@ class GovernorHelper {
const statesCount = ethers.toBigInt(Object.keys(ProposalState).length);
let result = 0n;
for (const state of unique(...proposalStates)) {
for (const state of unique(proposalStates)) {
if (state < 0n || state >= statesCount) {
expect.fail(`ProposalState ${state} out of possible states (0...${statesCount}-1)`);
} else {