mirror of
https://github.com/tornadocash/tornado-pool-factory
synced 2024-02-02 15:04:08 +01:00
.github/workflows | ||
contracts | ||
scripts | ||
test | ||
.editorconfig | ||
.env.example | ||
.eslintrc | ||
.gitattributes | ||
.gitignore | ||
.nvmrc | ||
.prettierignore | ||
.prettierrc | ||
.solcover.js | ||
config.js | ||
hardhat.config.js | ||
package.json | ||
README.md | ||
yarn.lock |
Tornado Instances Factory
About
This repository contains governance proposal factory for the addition of new Tornado ERC20 instances to the Tornado router.
Anyone can create governance proposal for the addition of a new ERC20 instance by calling createProposalApprove/createProposalPermit
method of the factory with parameters:
address token
- address of ERC20 token for a new instanceuint24 uniswapPoolSwappingFee
- fee value of Uniswap instance which will be used forTORN/token
price determination.3000
means 0.3% fee Uniswap pool.uint256[] denominations
- list of denominations for each new instance (tokens can only be deposited in certain denominations into instances).uint32[] protocolFees
- list of protocol fees for each new instance (this fee is only charged from registrated relayer during withdrawal process).100
means 1% of instance denomination fee for withdrawal throw registrated relayer.
Factory parameters
max number of new instances in one proposal
- the current version supports the addition of a maximum of 3 instances at once.proposal creation fee
- this fee is charged from creator of proposal duringcreateProposalApprove/createProposalPermit
factory method execution. It can be changed by governance. Default value is stored inconfig.js
.
Tests
Setting up the repository:
git clone https://github.com/mirru2532/tornado-instances.git
cd tornado-instances
yarn
cp .env.example .env
Please fill out .env according to the template provided in it. Please ensure that all of the example values are set to the correct addresses.
To run test scripts:
yarn test
Test scripts cover instance factory deployment, proposal deployment and executing proposal.