From 657ad0a497ec833917b01c5118e4e33cc50f4ac2 Mon Sep 17 00:00:00 2001 From: Drygin Date: Wed, 23 Feb 2022 17:03:05 +0300 Subject: [PATCH] add warnings --- README.md | 5 +++++ contracts/InstanceFactory.sol | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d746d1d..ccfdc1f 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,11 @@ Anyone can create governance proposal for the addition of a new ERC20 instance b 1. `max number of new instances in one proposal` - the current version supports the addition of a maximum of 3 instances at once. 2. `proposal creation fee` - this fee is charged from creator of proposal during `createProposalApprove/createProposalPermit` factory method execution. It can be changed by governance. Default value is stored in `config.js`. +## Warnings + +1. This version of the factory creates a proposal for **immutable** Tornado instance initialization. +2. Users should manually propose a proposal after its creation using the factory (in governance UI for example). As `propose()` method caller must have 1000 TORN locked in the governance. Moreover, the proposer can't propose more than one proposal simultaneously. + ## Tests Setting up the repository: diff --git a/contracts/InstanceFactory.sol b/contracts/InstanceFactory.sol index c7d9d66..a820b59 100644 --- a/contracts/InstanceFactory.sol +++ b/contracts/InstanceFactory.sol @@ -105,8 +105,8 @@ contract InstanceFactory is Ownable { uint256[] memory _denominations, uint32[] memory _protocolFees ) internal returns (address) { - require(_token.isContract(), "Token is not contract"); // TODO should we check that such instance already exist? - require(_uniswapPoolSwappingFee > 0, "uniswapPoolSwappingFee is zero"); // TODO should we check > 0 ? + require(_token.isContract(), "Token is not contract"); + require(_uniswapPoolSwappingFee > 0, "uniswapPoolSwappingFee is zero"); require(_denominations.length > 0, "Empty denominations"); require(_denominations.length == _protocolFees.length, "Incorrect denominations/fees length");