
Product
Introducing Manifest Alerts
Socket now detects supply chain risks in project manifests, starting with missing lockfiles that can make dependency installs non-reproducible.
@vocdoni/davinci-contracts
Advanced tools
DISCLAIMER: The code in this repository is a work-in-progress and it is not meant to be used in production environments.
Smart contracts powering DAVINCI's (Decentralized Autonomous Vote Integrity Network with Cryptographic Inference) digital voting protocol - a cutting-edge voting system that leverages zero-knowledge proofs and blockchain technology to enable secure, verifiable, coercion-resistant, and anonymous digital voting.
The Vocdoni DAVINCI contracts work together with a set of sequencers that implement a specialized zkRollup system that enables secure digital voting with complete privacy guarantees. The system uses multiple layers of cryptographic proofs:
0x1464bD48D1635E9B9F65cFd629d8E9f507A952dD0xd747896B912C1585b04007c103D10A04e71bfb250xE17D701EA8f34022F97fC2Ec68c73D42bF99D0BD0x2DaF913D423128258b2F378E320F9D9D3Be5eCf50xca08064a83C7Bea0DB7514eE37F6f4a193b2B53c0xDda6c75d32c375946C8ae9be41B2F3539dB1118A0x808276962217AD1ED3af7D51bFc791903CAd9389git clone https://github.com/vocdoni/davinci-contracts.git
cd davinci-contracts
npm install
forge install
cp .env.example .env
# Edit .env with your configuration
./build_all.sh
# Clean and build everything
./build_all.sh
# Or build individually
forge build
npx hardhat compile
# Linting
npm run lint:sol
npm run prettier
# Security analysis
npm run slither
npm run mythril
The project includes TypeScript bindings:
npm run typechain
Generate Go bindings for contract integration:
./go_bind.sh
Run the comprehensive test suite:
# Run all tests
forge test
# Run with verbosity
forge test -vvv
# Run specific test file
forge test --match-path test/ProcessRegistry.t.sol
# Gas reporting
forge test --gas-report
anvil
forge script script/DeployAll.s.sol --rpc-url http://localhost:8545 --broadcast
.env and chain-specific values in .env.<chain>.Shared .env:
PRIVATE_KEY=your_deployment_key
ETHERSCAN_API_KEY=your_explorer_key
VERIFY_MODE=auto
DEPLOY_CHAINS=base,sepolia
Chain file, for example .env.base:
RPC_URL=your_rpc_endpoint
CHAIN_ID=your_chain_id
ACTIVATE_BLOBS=True
# Optional: reuse already deployed libraries.
# If any of these are unset or point to an address without bytecode,
# deploy_all.sh will deploy that library and print export lines you can reuse.
POSEIDON_T3_ADDRESS=
POSEIDON_T4_ADDRESS=
STATE_ROOT_LIB_ADDRESS=
PROCESS_ID_LIB_ADDRESS=
BLOBS_LIB_ADDRESS=
./deploy_all.sh
deploy_all.sh loads .env first and then uses the currently exported
single-chain variables. For direct single-chain use, source one chain file into
your shell first or export the variables manually.
Use a shared .env plus one per-chain file for each target network.
Shared .env:
PRIVATE_KEY=your_deployment_key
LOCALHOST_RPC_URL=http://127.0.0.1:8545
ETHERSCAN_API_KEY=your_explorer_key
VERIFY_MODE=auto
DEPLOY_CHAINS=base,sepolia,arbitrum
Per-chain .env.<chain> files, for example .env.base:
CHAIN_ID=8453
RPC_URL=https://your-base-rpc
ACTIVATE_BLOBS=False
# Optional per-chain overrides
ETHERSCAN_API_URL=
POSEIDON_T3_ADDRESS=
POSEIDON_T4_ADDRESS=
STATE_ROOT_LIB_ADDRESS=
PROCESS_ID_LIB_ADDRESS=
BLOBS_LIB_ADDRESS=
Then run:
./deploy_all_contracts_to_all_chains.sh
The wrapper:
.env.env.<chain> for each chain listed in DEPLOY_CHAINS.env-<chain> if the dotted filename does not exist./deploy_all.sh once per chainThis means old single-chain values left in .env will not bleed into multi-chain runs.
deploy_all.sh resolves libraries in this order:
PoseidonT3PoseidonT4StateRootLib (linked against Poseidon)ProcessIdLibBlobsLibThen it deploys the main contracts with explicit linking for all of them.
Verification behavior is controlled by VERIFY_MODE:
auto: disable verification on local chains (31337, 1337), enable otherwisetrue: always attempt verificationfalse: never verifyWe welcome contributions!
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
Built with ❤️ by Vocdoni.
FAQs
Smart contracts powering DAVINCI's digital voting protocol
We found that @vocdoni/davinci-contracts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now detects supply chain risks in project manifests, starting with missing lockfiles that can make dependency installs non-reproducible.

Research
/Security News
The trojanized extensions use TinyGo-compiled WebAssembly and Solana transaction memos to resolve command-and-control infrastructure.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.