From eca31a997e5f7de9ce6a5b36d4d04110c2ee2440 Mon Sep 17 00:00:00 2001 From: T-Hax <> Date: Tue, 13 Jun 2023 20:02:45 +0000 Subject: [PATCH] function visibility and inheritability Signed-off-by: T-Hax <> --- contracts/instances/ERC20TornadoCloneable.sol | 6 +++--- contracts/instances/ETHTornadoCloneable.sol | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/instances/ERC20TornadoCloneable.sol b/contracts/instances/ERC20TornadoCloneable.sol index 20c609f..8947ffa 100644 --- a/contracts/instances/ERC20TornadoCloneable.sol +++ b/contracts/instances/ERC20TornadoCloneable.sol @@ -63,7 +63,7 @@ contract ERC20TornadoCloneable is ERC20Tornado { address _token, uint256 _denomination, uint32 _merkleTreeHeight - ) external { + ) public virtual { // Part of ERC20TornadoCloneable.sol, denomination and levels is obviously // in all older code set once and never changed again, as such, we can use // these for `initialize`. The question comes, why is it set to 1 above? @@ -107,7 +107,7 @@ contract ERC20TornadoCloneable is ERC20Tornado { system which will require the relayers to have a wallet-like smart contract, because then frontends will be able to build proofs for it, and as such there will be no need for this bullshit. */ - function checkInfrastructureIsDead() external { + function checkInfrastructureIsDead() public virtual { require(router != address(0), "infrastructure already dead"); try @@ -160,7 +160,7 @@ contract ERC20TornadoCloneable is ERC20Tornado { address payable _relayer, uint256 _fee, uint256 _refund - ) internal override { + ) internal virtual override { // This is the part which we don't check if infra is down if (router != address(0)) { require(msg.sender == router, "if infrastructure not dead, router must be caller"); diff --git a/contracts/instances/ETHTornadoCloneable.sol b/contracts/instances/ETHTornadoCloneable.sol index b68cb2a..b69a609 100644 --- a/contracts/instances/ETHTornadoCloneable.sol +++ b/contracts/instances/ETHTornadoCloneable.sol @@ -28,7 +28,7 @@ contract ETHTornadoCloneable is ETHTornado { * @param _merkleTreeHeight The merkle tree height of the instance. Usually 20. */ - function initialize(uint256 _denomination, uint32 _merkleTreeHeight) external { + function initialize(uint256 _denomination, uint32 _merkleTreeHeight) public virtual { // Part of ERC20TornadoCloneable.sol, denomination and levels is obviously // in all older code set once and never changed again, as such, we can use // these for `initialize`. The question comes, why is it set to 1 above?