IVerifier ->IBatchTreeUpdateVerifier

This commit is contained in:
Alexey 2021-02-10 20:45:19 +03:00
parent 4d75035fab
commit a4b98dd195
3 changed files with 7 additions and 7 deletions

@ -4,7 +4,7 @@ pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2; pragma experimental ABIEncoderV2;
import "./interfaces/ITornadoTreesV1.sol"; import "./interfaces/ITornadoTreesV1.sol";
import "./interfaces/IVerifier.sol"; import "./interfaces/IBatchTreeUpdateVerifier.sol";
contract TornadoTrees { contract TornadoTrees {
address public immutable governance; address public immutable governance;
@ -13,7 +13,7 @@ contract TornadoTrees {
bytes32 public withdrawalRoot; bytes32 public withdrawalRoot;
bytes32 public previousWithdrawalRoot; bytes32 public previousWithdrawalRoot;
address public tornadoProxy; address public tornadoProxy;
IVerifier public treeUpdateVerifier; IBatchTreeUpdateVerifier public treeUpdateVerifier;
ITornadoTreesV1 public immutable tornadoTreesV1; ITornadoTreesV1 public immutable tornadoTreesV1;
// make sure CHUNK_TREE_HEIGHT has the same value in BatchTreeUpdate.circom // make sure CHUNK_TREE_HEIGHT has the same value in BatchTreeUpdate.circom
@ -70,7 +70,7 @@ contract TornadoTrees {
address _governance, address _governance,
address _tornadoProxy, address _tornadoProxy,
ITornadoTreesV1 _tornadoTreesV1, ITornadoTreesV1 _tornadoTreesV1,
IVerifier _treeUpdateVerifier, IBatchTreeUpdateVerifier _treeUpdateVerifier,
SearchParams memory _searchParams SearchParams memory _searchParams
) public { ) public {
governance = _governance; governance = _governance;
@ -271,7 +271,7 @@ contract TornadoTrees {
tornadoProxy = _tornadoProxy; tornadoProxy = _tornadoProxy;
} }
function setVerifierContract(IVerifier _treeUpdateVerifier) external onlyGovernance { function setVerifierContract(IBatchTreeUpdateVerifier _treeUpdateVerifier) external onlyGovernance {
treeUpdateVerifier = _treeUpdateVerifier; treeUpdateVerifier = _treeUpdateVerifier;
} }

@ -2,6 +2,6 @@
pragma solidity ^0.6.0; pragma solidity ^0.6.0;
interface IVerifier { interface IBatchTreeUpdateVerifier {
function verifyProof(bytes calldata proof, uint256[1] calldata input) external view returns (bool); function verifyProof(bytes calldata proof, uint256[1] calldata input) external view returns (bool);
} }

@ -5,7 +5,7 @@ pragma experimental ABIEncoderV2;
import "../TornadoTrees.sol"; import "../TornadoTrees.sol";
import "../interfaces/ITornadoTreesV1.sol"; import "../interfaces/ITornadoTreesV1.sol";
import "../interfaces/IVerifier.sol"; import "../interfaces/IBatchTreeUpdateVerifier.sol";
contract TornadoTreesMock is TornadoTrees { contract TornadoTreesMock is TornadoTrees {
uint256 public currentBlock; uint256 public currentBlock;
@ -14,7 +14,7 @@ contract TornadoTreesMock is TornadoTrees {
address _governance, address _governance,
address _tornadoProxy, address _tornadoProxy,
ITornadoTreesV1 _tornadoTreesV1, ITornadoTreesV1 _tornadoTreesV1,
IVerifier _treeUpdateVerifier, IBatchTreeUpdateVerifier _treeUpdateVerifier,
SearchParams memory _searchParams SearchParams memory _searchParams
) public TornadoTrees(_governance, _tornadoProxy, _tornadoTreesV1, _treeUpdateVerifier, _searchParams) {} ) public TornadoTrees(_governance, _tornadoProxy, _tornadoTreesV1, _treeUpdateVerifier, _searchParams) {}