Go to file
2022-08-03 14:10:32 +03:00
.github/workflows update CI 2021-11-19 18:16:36 +01:00
.vscode gov v2 refactored 2022-03-15 11:21:22 +01:00
contracts add correct upgrade link 2022-03-15 11:21:22 +01:00
resources add version 2 2021-11-08 21:22:55 +01:00
scripts add version 2 2021-11-08 21:22:55 +01:00
test add V3 tests 2022-03-15 11:21:22 +01:00
.editorconfig add version 2 2021-11-08 21:22:55 +01:00
.env.example make it identical to mainnet; fix CI 2021-11-19 17:57:43 +01:00
.eslintrc add version 2 2021-11-08 21:22:55 +01:00
.gitattributes initial 2020-12-15 18:07:50 +03:00
.gitignore v1/v2 tests 2022-03-15 11:21:22 +01:00
.nvmrc add version 2 2021-11-08 21:22:55 +01:00
.prettierignore add version 2 2021-11-08 21:22:55 +01:00
.prettierrc initial 2020-12-15 18:07:50 +03:00
.solhint.json gov v2 refactored 2022-03-15 11:21:22 +01:00
config.js add V3 tests 2022-03-15 11:21:22 +01:00
hardhat.config.js add V3 tests 2022-03-15 11:21:22 +01:00
LICENSE initial 2020-12-15 18:07:50 +03:00
package.json v1/v2 tests 2022-03-15 11:21:22 +01:00
README.md TC-93-proposal-creation-manual 2022-08-03 14:10:32 +03:00
yarn.lock add version 2 2021-11-08 21:22:55 +01:00

Tornado governance

Description

This repository holds all the tornado.cash governance upgrades and original governance contracts.

Documentation

All high-level documentation can be find here.

Code architecture

Tornado governance infrastructure consists of two types of repository:

  1. Governance repository (this one) - contains the original governance contracts and parts of proposals that upgrade governance itself via loopback proxy. So here you can compile the actual version of the governance contract.
  2. Proposal repository - a separate repository for each governance proposal. It contains the full codebase of a proposal.

Loopback proxy

Loopback proxy is a special type of proxy contract that is used to add the ability to upgrade the proxy itself. This way governance proposals can upgrade governance implementation.

Proposal creation manual

To create your custom governance proposal you need to:

  1. Create a proposal repository:
  • a proposal is executed from the governance contract using delegatecall of executeProposal() method
  • as a proposal is executed using delegatecall, it should not store any storage variables - use constants and immutable variables instead
  1. If your proposal is upgrading governance itself, you need to create a pull request to the governance repository. PR should add folder with governance contract upgrade (separate folder in contracts folder - for example).
  2. Deploy proposal. The proposal must be smart contracts with verified code.
  3. Go to Tornado governance UI to start the proposal voting process.

Tests

git clone https://github.com/tornadocash/tornado-governance.git
yarn
cp .env.example .env # you must enter your details into .env
yarn test

Coverage