tornado-pool-factory/contracts/MultipleInstanceFactory.sol

26 lines
724 B
Solidity
Raw Normal View History

2022-03-31 21:40:12 +02:00
// SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
import "./InstanceFactory.sol";
contract MultipleInstanceFactory is InstanceFactory {
constructor(
address _verifier,
address _hasher,
uint32 _merkleTreeHeight,
address _owner
) InstanceFactory(_verifier, _hasher, _merkleTreeHeight, _owner) {}
/**
* @dev Creates new Tornado instances.
* @param _token address of ERC20 token for a new instance
* @param _denominations list of denominations for each new instance
*/
function createInstanceClones(address _token, uint256[] memory _denominations) external {
for (uint256 i = 0; i < _denominations.length; i++) {
createInstanceClone(_denominations[i], _token);
}
}
}