A voting module for deliberative decision-making using argument trees.
Deliberate lets participants build a tree of pro/con arguments below a debate thesis, stake vote tokens on
argument markets to rate them, and finally tally the tree to determine the outcome. The Deliberate contract
is deployed once, has no owner, and is not upgradeable (ADR-0006); moderation happens through the rating
markets themselves (ADR-0005).
-
Get an up-to-date version of Foundry with
curl -L https://foundry.paradigm.xyz | sh foundryup -
Optionally, to lint the contracts, install solhint using a JS package manager such as Bun with
curl -fsSL https://bun.sh/install | sh bun install -
Optionally, for static analysis, install Slither with
python3 -m pip install slither-analyzer
Install the dependencies (managed with Soldeer) with
forge soldeer installTo compile the contracts, run
forge buildTo run the tests, run
forge testTo show the coverage report, run
forge coverageTo run the linter and static analyzer, run
bunx solhint --config .solhint.json 'src/**/*.sol' && \
bunx solhint --config .solhint.other.json 'script/**/*.sol' 'test/**/*.sol' && \
slither .Deliberate takes the address of an identity registry (IIdentityRegistry) as its only constructor
argument — a personhood registry such as Proof of Humanity,
or an adapter like EASIdentityRegistry (attestation-based, e.g. Coinbase Verifications on Base).
Against a real registry:
forge script script/DeployDeliberate.s.sol:DeployDeliberate \
--sig "run(address)" <IDENTITY_REGISTRY> \
--rpc-url <network>On test networks without a registry, runWithMockRegistry() deploys a MockIdentityRegistry
(everyone counts as registered) alongside. For Base Sepolia, verified on Blockscout (keyless),
with a funded keystore account (cast wallet import):
forge script script/DeployDeliberate.s.sol:DeployDeliberate \
--sig "runWithMockRegistry()" \
--rpc-url https://sepolia.base.org \
--account <KEYSTORE_ACCOUNT> \
--broadcast \
--verify --verifier blockscout --verifier-url https://base-sepolia.blockscout.com/api/The script prints both addresses; the deliberate address and its deployment block feed the
indexer's config.base-sepolia.yaml and the frontend's VITE_DELIBERATE_ADDRESS
(deployment pipeline: contracts -> indexer -> frontend).
src/ The Deliberate contracts, interfaces, types, and utilities.
test/ Foundry tests and mocks.
script/ Deployment scripts.