/** * pop vote classes — N-class hybrid voting configuration. * * Two nested subcommands (template: task/perms.ts): * show — read-only table of the current class config or the snapshot * frozen for one proposal, plus the two distinct validity * parameters: support threshold (% of weighted power, * thresholdPct) and quorum (VOTER COUNT, quorum). * Served from the subgraph (VotingClass rows + * HybridVotingContract.thresholdPct/quorum — the same source * `pop vote results` uses), with getClasses()/ * getProposalClasses()/thresholdPct()/quorum() kept as the * fallback for un-indexed contracts and older deployments. * propose — replace the class config via setClasses(ClassConfig[]). * Gate VERIFIED against contracts origin/main src/HybridVoting.sol: * `function setClasses(ClassConfig[] calldata) external onlyExecutor` * → must ship as a governance proposal whose option-0 execution * batch calls the HybridVoting contract through the Executor * (same wrapping as vote propose-config / task perms propose-global). * * ClassConfig (verified origin/main src/HybridVoting.sol): * { ClassStrategy strategy; // DIRECT=0 (1 person → 100 raw points), * // ERC20_BAL=1 (balance or sqrt, scaled) * uint8 slicePct; // 1..100; all classes must sum to 100 * bool quadratic; // token strategies only * uint256 minBalance; // sybil floor for token strategies * address asset; // ERC20 token (required for ERC20_BAL) * uint256[] hatIds } // voter must wear ≥1 (union) * * Contract-side validation mirrored here (src/libs/HybridVotingConfig.sol): * 1..MAX_CLASSES(8) classes, each slicePct 1..100, slices sum exactly 100, * ERC20_BAL requires a non-zero asset. */ import type { Argv, ArgumentsCamelCase } from 'yargs'; import { CLASS_STRATEGY, MAX_CLASSES, parseClassConfigs, describeClass } from '@poa-box/core/tx/vote'; import type { ParsedClassConfig } from '@poa-box/core/tx/vote'; export { CLASS_STRATEGY, MAX_CLASSES, parseClassConfigs, describeClass }; export type { ParsedClassConfig }; interface ClassesShowArgs { org: string; proposal?: string; chain?: number; rpc?: string; } declare const classesShowHandler: { builder: (yargs: Argv) => Argv<{ proposal: string | undefined; }>; handler: (argv: ArgumentsCamelCase) => Promise; }; interface ClassesProposeArgs { org: string; file: string; duration: number; chain?: number; rpc?: string; 'private-key'?: string; 'dry-run'?: boolean; yes?: boolean; preflight?: boolean; 'idempotency-key'?: string; 'no-idempotency'?: boolean; } declare const classesProposeHandler: { builder: (yargs: Argv) => Argv<{ file: string; } & { duration: number; } & { "idempotency-key": string | undefined; } & { "no-idempotency": boolean; }>; handler: (argv: ArgumentsCamelCase) => Promise; }; export declare function registerClassesCommands(yargs: Argv): Argv<{}>; export { classesShowHandler, classesProposeHandler };