diff --git a/.env.example b/.env.example index b931a83..48a8535 100644 --- a/.env.example +++ b/.env.example @@ -3,6 +3,7 @@ goerli_rpc_key= mainnet_rpc_key= goerli_account_pk= mainnet_account_pk= +use_latest_block=false PROXY=0x722122dF12D4e14e13Ac3b6895a86e84145b6967 DEPLOYER=0xCEe71753C9820f063b38FDbE4cFDAf1d3D928A80 diff --git a/.env.example.workflow b/.env.example.workflow index a745fea..50fdc29 100644 --- a/.env.example.workflow +++ b/.env.example.workflow @@ -1,3 +1,6 @@ +use_latest_block=false + +PROXY=0x722122dF12D4e14e13Ac3b6895a86e84145b6967 DEPLOYER=0xCEe71753C9820f063b38FDbE4cFDAf1d3D928A80 HASHER=0x83584f83f26aF4eDDA9CBe8C730bc87C364b28fe VERIFIER=0xce172ce1F20EC0B3728c9965470eaf994A03557A diff --git a/.github/workflows/build.js.yml b/.github/workflows/build.js.yml index cd5fa3b..7440c01 100644 --- a/.github/workflows/build.js.yml +++ b/.github/workflows/build.js.yml @@ -25,8 +25,7 @@ jobs: - run: cp .env.example.workflow .env - run: yarn prettier:fix - run: yarn lint - - run: yarn test test/test_proposal_with_factory.js - - run: yarn test test/test_proposal_with_factory2.js + - run: yarn test - name: Generate coverage run: yarn coverage diff --git a/.solcover.js b/.solcover.js index 9cce62d..db331df 100644 --- a/.solcover.js +++ b/.solcover.js @@ -4,5 +4,11 @@ module.exports = { 'tornado_proxy/ITornadoTrees.sol', 'tornado_proxy/ITornadoInstance.sol', 'ERC20TornadoVirtual.sol', + 'denomination_templates/Add1Instance.sol', + 'denomination_templates/Add2Instances.sol', + 'denomination_templates/Add3Instances.sol', + 'denomination_templates/Add4Instances.sol', + 'denomination_templates/Add5Instances.sol', + 'denomination_templates/Add6Instances.sol', ], } diff --git a/README.md b/README.md index 0b0afc5..38b585e 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ # Tornado Instances -[![build](https://img.shields.io/github/workflow/status/mirru2532/tornado-instances/build)](https://github.com/h-ivor/tornado-instances/actions) [![Coveralls](https://img.shields.io/coveralls/github/mirru2352/tornado-instances)](https://coveralls.io/github/mirru2352/tornado-instances) +[![build](https://img.shields.io/github/workflow/status/mirru2532/tornado-instances/build)](https://github.com/h-ivor/tornado-instances/actions) [![Coveralls](https://img.shields.io/coveralls/github/mirru2532/tornado-instances)](https://coveralls.io/github/mirru2532/tornado-instances) ## About -This repository serves as a general template for deploying a tornado instance factory, deploying a proposal for the addition of multiple ERC20 tornado instances and proposing the registration of these instances with the Tornado Proxy (0x722122dF12D4e14e13Ac3b6895a86e84145b6967) through governance vote. +This repository serves as a general template repository for deploying proposals for governance for the addition of new tornado ERC20 instances to the tornado proxy. -The scripts should help users do this programmatically, quickly. There are three tasks (scripts). Note that non-task scripts have been deprecated but are still kept for more insight into the working process. +The contracts offer a template for the addition of 4 new instances for an ERC20 token (the standard way to add new instances) and can also be slightly modified to add a custom amount. The scripts deploy the contracts. + +The resources folder contains data necessary for the instances to be deployed and must be filled out. They are initially filled out with the RAI instance data. ### How-To: @@ -19,7 +21,7 @@ yarn cp .env.example .env ``` -Please fill out .env according to the template provided in it. +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. ### Testing and running scripts: @@ -35,26 +37,20 @@ Running **tasks:** ```bash # a list of yarn scripts specifically for instance deployment -"deploy:factory": "yarn hardhat --network mainnet deploy_factory", "deploy:proposal": "yarn hardhat --network mainnet deploy_proposal --factory-address", -"deploy:factory:test": "yarn hardhat --network goerli deploy_factory", "deploy:proposal:test": "yarn hardhat --network goerli deploy_proposal --factory-address", -"propose": "yarn hardhat --network mainnet propose_proposal --proposal-address" +"deploy:proposal:factory": "yarn hardhat --network mainnet deploy_factory_proposal", +"deploy:proposal:factory:test": "yarn hardhat --network goerli deploy_factory_proposal", +"propose": "yarn hardhat --network mainnet propose_proposal --proposal-address", # as an example -yarn deploy:factory +yarn deploy:proposal:factory # to call a specific task yarn hardhat --network ``` -Running scripts (deprecated): - -```bash -yarn hardhat --network run scripts/