add warnings

This commit is contained in:
Drygin 2022-02-23 17:03:05 +03:00
parent 53eae70de7
commit 657ad0a497
2 changed files with 7 additions and 2 deletions

View File

@ -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:

View File

@ -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");