Snapshot voting power wrappers for QuickSwap governance.
| Module | Chains | Description |
|---|---|---|
WalletAndDQuickModule |
Polygon | Wallet QUICK + Dragon's Lair |
WalletQuickModule |
Base, Eth, Manta | Wallet QUICK only |
SyrupStakingModule |
Polygon | Syrup pools (factory + legacy) |
AlgebraV3Module |
Polygon | Algebra V3 LP positions |
AlgebraIntegralV4Module |
Base | Algebra v4 LP positions |
LiquidityManagersModule |
All | ALM vaults (Gamma, Steer, ICHI) |
V2LPStakingModule |
All | V2 LP staking pools |
pnpm install
pnpm exec hardhat compile
pnpm testAll configuration is in config/chains.json (single source of truth).
pnpm exec tsx scripts/create-keystore.ts
# Add to .env:
KEYSTORE_PATH=keystores/deployer-0x<address>.json- Source of truth:
config/chains.json - Local backups:
deployments/*.json(gitignored)
Deploys all modules + aggregator:
pnpm exec hardhat run scripts/deploy/chain.ts --network polygon
pnpm exec hardhat run scripts/deploy/chain.ts --network baseReuses existing modules, only deploys new aggregator:
pnpm exec hardhat run scripts/deploy/redeploy-aggregator.ts --network polygon
pnpm exec hardhat run scripts/deploy/redeploy-aggregator.ts --network basepnpm exec hardhat run scripts/deploy/wallet-quick-only.ts --network ethereumDefault owner: 0xDA1077c4b0dd6da1BDF166F30aa4BDbF517d637b
Override with your Safe multisig:
OWNER_ADDRESS=0xYourSafe pnpm exec hardhat run scripts/deploy/chain.ts --network polygonpnpm exec hardhat verify --network <chain> <ADDRESS> <ARGS>{
"name": "erc20-balance-of",
"network": "<CHAIN_ID>",
"params": {
"address": "<AGGREGATOR_ADDRESS>",
"symbol": "QUICK",
"decimals": 18
}
}Get the aggregator address from config/chains.json → chains.<chain>.deployed.aggregator.
quickswap-voting/
├── config/ # Configuration (JSON)
│ └── chains.json # Single source of truth for all chain configs
├── contracts/ # Solidity contracts
│ ├── aggregators/ # Chain-specific aggregator contracts
│ ├── modules/ # Voting power modules
│ └── mocks/ # Mock contracts for testing
├── lib/ # Shared TypeScript code
│ └── abis/ # Centralized ABI definitions
│ ├── common.ts # ERC20, balanceOf, Dragon's Lair
│ ├── aggregator.ts # Aggregator ABIs per chain
│ ├── algebra.ts # NFT Position Manager, Pool, Factory
│ ├── syrup.ts # Staking Rewards Factory
│ └── index.ts # Re-exports all ABIs
├── scripts/ # CLI scripts (deployment, validation, admin)
├── test/ # Tests
│ ├── integration/ # Integration tests (require RPC)
│ └── utils/ # Test utilities
└── deployments/ # Local deployment artifacts (gitignored)
| Script | Purpose | Usage |
|---|---|---|
check-voting-power.ts |
Analyze voting power breakdown for any user | pnpm exec tsx scripts/check-voting-power.ts <address> [--chain <polygon|base>] |
check-aggregator-module.ts |
Verify which modules are connected to aggregator | pnpm exec tsx scripts/check-aggregator-module.ts [--chain <polygon|base>] |
check-config.ts |
Validate chains.json configuration | pnpm exec tsx scripts/check-config.ts |
check-deployment-ready.ts |
Pre-deployment checklist validator | pnpm exec tsx scripts/check-deployment-ready.ts [chain] |
check-snapshot-space.ts |
Show current Snapshot Hub settings | pnpm exec tsx scripts/check-snapshot-space.ts |
check-syrup-module-status.ts |
Inspect syrup staking module state | pnpm exec tsx scripts/check-syrup-module-status.ts |
inspect-positions.ts |
Debug Algebra positions in detail | pnpm exec tsx scripts/inspect-positions.ts <address> |
| Script | Purpose | Usage |
|---|---|---|
test/integration/strategies.test.ts |
Test all Snapshot strategies | pnpm exec tsx test/integration/strategies.test.ts |
test/integration/algebra-modules.test.ts |
Verify Algebra V3/V4 math correctness | pnpm exec tsx test/integration/algebra-modules.test.ts |
| Script | Purpose | Usage |
|---|---|---|
verify-latest.ts |
Verify latest deployed contract | pnpm exec tsx scripts/verify-latest.ts |
verify-algebra-v3.ts |
Verify AlgebraV3Module on Polygonscan | pnpm exec tsx scripts/verify-algebra-v3.ts |
| Script | Purpose | Usage |
|---|---|---|
generate-safe-txs.ts |
Generate Safe transaction JSON for allowlist updates | pnpm exec tsx scripts/generate-safe-txs.ts <chain> |
update-aggregator-module.ts |
Generate Safe tx to update aggregator modules | pnpm exec tsx scripts/update-aggregator-module.ts |
create-keystore.ts |
Create encrypted keystore for deployment | pnpm exec tsx scripts/create-keystore.ts |
publish-snapshot-settings.ts |
Publish Snapshot settings via Safe signature | See below |
test/utils/capture-baseline.ts |
Capture baseline scores for regression testing | pnpm exec tsx test/utils/capture-baseline.ts [block] |
| Script | Purpose | Usage |
|---|---|---|
monitor-pool-limits.ts |
Monitor factory pool enumeration limits | pnpm exec tsx scripts/monitor-pool-limits.ts |
To confirm what Snapshot Hub currently has stored for a space:
pnpm exec tsx scripts/check-snapshot-space.ts
SPACE=quickvote.eth pnpm exec tsx scripts/check-snapshot-space.tsWhen using Safe multi-sig, Snapshot space updates are signed as a Safe “message”, but the signed payload still needs to be broadcast to Snapshot Hub.
-
Save the typed-data JSON you signed (the object with
domain,types,primaryType,message) to a file, e.g.space-message.json. -
Publish it using the Safe prepared signature:
pnpm exec tsx scripts/publish-snapshot-settings.ts --file ./space-message.json --sig 0x<preparedSignature>- Verify it’s live:
pnpm exec tsx scripts/check-snapshot-space.tspnpm testUpdate allowlists via Safe multisig:
liquidityManagersModule.setVaults(address[] vaults);
v2LPStakingModule.setPools(address[] pools);
syrupStakingModule.setLegacyPools(address[] pools);Generate Safe transaction JSON:
pnpm exec tsx scripts/generate-safe-txs.ts <chain>MIT
