function visibility and inheritability

Signed-off-by: T-Hax <>
This commit is contained in:
T-Hax 2023-06-13 20:02:45 +00:00
parent f5a302910a
commit eca31a997e
2 changed files with 4 additions and 4 deletions

@ -63,7 +63,7 @@ contract ERC20TornadoCloneable is ERC20Tornado {
address _token, address _token,
uint256 _denomination, uint256 _denomination,
uint32 _merkleTreeHeight uint32 _merkleTreeHeight
) external { ) public virtual {
// Part of ERC20TornadoCloneable.sol, denomination and levels is obviously // Part of ERC20TornadoCloneable.sol, denomination and levels is obviously
// in all older code set once and never changed again, as such, we can use // 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? // 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 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. 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"); require(router != address(0), "infrastructure already dead");
try try
@ -160,7 +160,7 @@ contract ERC20TornadoCloneable is ERC20Tornado {
address payable _relayer, address payable _relayer,
uint256 _fee, uint256 _fee,
uint256 _refund uint256 _refund
) internal override { ) internal virtual override {
// This is the part which we don't check if infra is down // This is the part which we don't check if infra is down
if (router != address(0)) { if (router != address(0)) {
require(msg.sender == router, "if infrastructure not dead, router must be caller"); require(msg.sender == router, "if infrastructure not dead, router must be caller");

@ -28,7 +28,7 @@ contract ETHTornadoCloneable is ETHTornado {
* @param _merkleTreeHeight The merkle tree height of the instance. Usually * @param _merkleTreeHeight The merkle tree height of the instance. Usually
20. 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 // Part of ERC20TornadoCloneable.sol, denomination and levels is obviously
// in all older code set once and never changed again, as such, we can use // 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? // these for `initialize`. The question comes, why is it set to 1 above?