Documentation Index
Fetch the complete documentation index at: https://mintlify.com/covenant-gov/pacto-app/llms.txt
Use this file to discover all available pages before exploring further.
Pacto’s on-chain governance stack is built from three composable layers: pacto-gov for modular voting and decision rules, Gnosis Safe for multi-signature treasury management, and Hats Protocol for on-chain role assignment and revocation. Together they give squads auditable, on-chain governance without forcing a single monolithic “regime” — each piece can be deployed independently as the squad’s needs grow.
pacto-gov
pacto-gov is Pacto’s in-house governance contract library. It handles hat-governed roles, treasury procedures, and SquadAdmin-style executor roles (SquadAdminBase patterns).
Canonical source: github.com/covenant-gov/pacto-gov (dev branch during active development). The contract sources are not vendored inside the app repo.
| Concern | Where in Pacto |
|---|
| Alloy bindings (deploy surface) | src-tauri/src/evm/contracts/pacto_gov/mod.rs — hand-maintained sol! macros aligned with upstream interfaces |
| Deployed factory / master copy addresses | src/lib/evm/pacto-protocol-addresses.json (compile-time in Rust); optional PACTO_* env overrides — see PROTOCOL_ADDRESS_BOOK.md |
| Audit trail on deploy | Optional pacto_gov_revision field on governance rows and announces — stores the upstream git commit SHA, not a local submodule pin |
How to deploy: Dashboard → Squad → Governance. When upstream interfaces change, update the bindings in evm/contracts/pacto_gov/ against the reviewed commit on GitHub.
The pacto_gov_revision field on governance rows provides an optional audit trail linking a deployment to a specific reviewed commit in the upstream pacto-gov repo.
pacto-squad-sponsor provides ERC-4337 gas sponsorship through a paymaster and a per-squad clone factory. It handles the infrastructure that allows squad operations to be sponsored on-chain.
Canonical source: github.com/covenant-gov/pacto-squad-sponsor (dev branch). Not vendored in the app repo.
| Concern | Where in Pacto |
|---|
| Alloy bindings | src-tauri/src/evm/contracts/pacto_sponsor/mod.rs |
| Deploy + read | src-tauri/src/evm/squad_sponsor_deploy.rs, squad_sponsor_deposit.rs, squad_sponsor_read.rs |
| Deployed factory / paymaster addresses | src/lib/evm/pacto-protocol-addresses.json — see PROTOCOL_ADDRESS_BOOK.md |
On-chain squad key: squadId = keccak256(utf8(parent_id)), where parent_id is the squad or network root ID in the app.
First-ship deploy path: ISquadSponsorFactory.createSquadSponsorExt(squadId) — deploys an address-list Ext clone; no hat tree is required yet.
Gnosis Safe treasury
Each squad can deploy a Gnosis Safe multi-signature treasury that requires threshold approval from squad members before any funds move.
| Concern | Where in Pacto |
|---|
| Alloy bindings | src-tauri/src/evm/contracts/safe/mod.rs |
| On-chain state reads (balance, owners, nonce) | src/lib/evm/read-plane.ts via viem; 30-second in-memory SWR + 15-minute disk TTL |
How to deploy: Dashboard → Treasury tab → Deploy Safe. The deployed Safe address is recorded in the squad_infra SQLite table.
Hats Protocol
Hats Protocol provides on-chain role management. A “hat” is an on-chain role that can be granted to or revoked from an address, and contracts can gate actions based on hat ownership.
| Concern | Where in Pacto |
|---|
| Alloy bindings | src-tauri/src/evm/contracts/hats/mod.rs |
| Usage | SquadAdmin roles, executor gates on governance modules |
Alignment with Modular Politics
Pacto’s governance architecture is loosely aligned with the Modular Politics framework (Schneider et al.), which argues for composable, portable, interoperable governance building blocks rather than a single imposed regime per platform.
| ModPol idea | Pacto direction |
|---|
| Platform / Instance | The Pacto client + MLS/Nostr layer hosts squads and networks; what is binding for in-app behavior is defined by product policy, not every connector being an ACL source. |
| Composable modules | Governance tools are treated as launchable modules (MVP: pacto-gov / Nave Pirata, Gnosis Safe treasury flows). More tools — Governor Bravo, Moloch-style adapters — are plausible later as UX connectors. |
| Orgs / nested arenas | Squads and networks are the primary parent unit; sub-teams and multiple vaults can coexist; dashboard Structure and Permissions views surface on-chain shape where pacto-gov is deployed. |
| Interoperability | Contract repos (e.g. pacto-gov) and subgraphs (e.g. Hats) integrate read-paths; announces and DMs remain coordination rails. |
Squad infra persistence
All on-chain artifacts deployed for a squad — Safe treasury, governance module, Hats tree — are recorded as squad_infra rows in the per-account SQLite database. The relevant Tauri commands are:
// List infra for a squad
invoke("list_squad_infra", { parentId })
// Persist a new or updated infra entry
invoke("upsert_squad_infra", { entry })
The infra_type column distinguishes entries: sponsor, safe, gov, etc.
pacto-gov and pacto-squad-sponsor contracts have not yet undergone an independent security audit. Do not deploy significant treasury value until an audit is complete. See docs/audits/README.md for the current status.