This commit is contained in:
mirru2532 2021-10-28 13:45:16 +02:00
parent 3603b1c9e1
commit 5cb9d60178
3 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
contract ERC20Tornado is Tornado { contract ERC20Tornado is Tornado {
using SafeERC20 for IERC20; using SafeERC20 for IERC20;
IERC20 public immutable token; IERC20 public token;
constructor( constructor(
IVerifier _verifier, IVerifier _verifier,

View File

@ -19,9 +19,9 @@ interface IHasher {
contract MerkleTreeWithHistory { contract MerkleTreeWithHistory {
uint256 public constant FIELD_SIZE = 21888242871839275222246405745257275088548364400416034343698204186575808495617; uint256 public constant FIELD_SIZE = 21888242871839275222246405745257275088548364400416034343698204186575808495617;
uint256 public constant ZERO_VALUE = 21663839004416932945382355908790599225266501822907911457504978515578255421292; // = keccak256("tornado") % FIELD_SIZE uint256 public constant ZERO_VALUE = 21663839004416932945382355908790599225266501822907911457504978515578255421292; // = keccak256("tornado") % FIELD_SIZE
IHasher public immutable hasher; IHasher public immutable hasher;
uint32 public immutable levels;
uint32 public levels;
// the following variables are made public for easier testing and debugging and // the following variables are made public for easier testing and debugging and
// are not supposed to be accessed in regular code // are not supposed to be accessed in regular code

View File

@ -21,7 +21,7 @@ interface IVerifier {
abstract contract Tornado is MerkleTreeWithHistory, ReentrancyGuard { abstract contract Tornado is MerkleTreeWithHistory, ReentrancyGuard {
IVerifier public immutable verifier; IVerifier public immutable verifier;
uint256 public immutable denomination; uint256 public denomination;
mapping(bytes32 => bool) public nullifierHashes; mapping(bytes32 => bool) public nullifierHashes;
// we store all commitments just to prevent accidental deposits with the same commitment // we store all commitments just to prevent accidental deposits with the same commitment