diff --git a/contracts/TornadoTrees.sol b/contracts/TornadoTrees.sol index 061ef79..c491153 100644 --- a/contracts/TornadoTrees.sol +++ b/contracts/TornadoTrees.sol @@ -267,22 +267,6 @@ contract TornadoTrees is Initializable { (success, ) = address(_tornadoTreesV1).staticcall{ gas: 2500 }(abi.encodeWithSignature(_type, index)); } - function getRegisteredDeposits() external view returns (bytes32[] memory _deposits) { - uint256 count = depositsLength - lastProcessedDepositLeaf; - _deposits = new bytes32[](count); - for (uint256 i = 0; i < count; i++) { - _deposits[i] = deposits[lastProcessedDepositLeaf + i]; - } - } - - function getRegisteredWithdrawals() external view returns (bytes32[] memory _withdrawals) { - uint256 count = withdrawalsLength - lastProcessedWithdrawalLeaf; - _withdrawals = new bytes32[](count); - for (uint256 i = 0; i < count; i++) { - _withdrawals[i] = withdrawals[lastProcessedWithdrawalLeaf + i]; - } - } - function setTornadoProxyContract(address _tornadoProxy) external onlyGovernance { tornadoProxy = _tornadoProxy; emit ProxyUpdated(_tornadoProxy); diff --git a/contracts/mocks/TornadoTreesMock.sol b/contracts/mocks/TornadoTreesMock.sol index 70d2f35..cb65be3 100644 --- a/contracts/mocks/TornadoTreesMock.sol +++ b/contracts/mocks/TornadoTreesMock.sol @@ -97,4 +97,20 @@ contract TornadoTreesMock is TornadoTrees { } return data; } + + function getRegisteredDeposits() external view returns (bytes32[] memory _deposits) { + uint256 count = depositsLength - lastProcessedDepositLeaf; + _deposits = new bytes32[](count); + for (uint256 i = 0; i < count; i++) { + _deposits[i] = deposits[lastProcessedDepositLeaf + i]; + } + } + + function getRegisteredWithdrawals() external view returns (bytes32[] memory _withdrawals) { + uint256 count = withdrawalsLength - lastProcessedWithdrawalLeaf; + _withdrawals = new bytes32[](count); + for (uint256 i = 0; i < count; i++) { + _withdrawals[i] = withdrawals[lastProcessedWithdrawalLeaf + i]; + } + } }