Contract 0x1e34a77868e19a6647b1f2f47b51ed72dede95dd 11

 

Txn Hash Method
Index
From
To
Value
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x93d482221fe1a99d3cb6491cd3a367996e9688d154ed1f2429217e1578ca071522437492022-01-12 12:00:49173 days 12 hrs ago 0xce0042b868300000d44a59004da54a005ffdcf9f  Contract Creation0 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ETHTornado

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at optimistic.etherscan.io on 2022-01-12
*/

// File: contracts/MerkleTreeWithHistory.sol

// https://tornado.cash
/*
 * d888888P                                           dP              a88888b.                   dP
 *    88                                              88             d8'   `88                   88
 *    88    .d8888b. 88d888b. 88d888b. .d8888b. .d888b88 .d8888b.    88        .d8888b. .d8888b. 88d888b.
 *    88    88'  `88 88'  `88 88'  `88 88'  `88 88'  `88 88'  `88    88        88'  `88 Y8ooooo. 88'  `88
 *    88    88.  .88 88       88    88 88.  .88 88.  .88 88.  .88 dP Y8.   .88 88.  .88       88 88    88
 *    dP    `88888P' dP       dP    dP `88888P8 `88888P8 `88888P' 88  Y88888P' `88888P8 `88888P' dP    dP
 * ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
 */

// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

interface IHasher {
  function MiMCSponge(uint256 in_xL, uint256 in_xR) external pure returns (uint256 xL, uint256 xR);
}

contract MerkleTreeWithHistory {
  uint256 public constant FIELD_SIZE = 21888242871839275222246405745257275088548364400416034343698204186575808495617;
  uint256 public constant ZERO_VALUE = 21663839004416932945382355908790599225266501822907911457504978515578255421292; // = keccak256("tornado") % FIELD_SIZE

  IHasher public immutable hasher;
  uint32 public immutable levels;

  // the following variables are made public for easier testing and debugging and
  // are not supposed to be accessed in regular code

  // filledSubtrees, zeros, and roots could be bytes32[size], but using mappings makes it cheaper because
  // it removes index range check on every interaction
  mapping(uint256 => bytes32) public filledSubtrees;
  mapping(uint256 => bytes32) public zeros;
  mapping(uint256 => bytes32) public roots;
  uint32 public constant ROOT_HISTORY_SIZE = 30;
  uint32 public currentRootIndex = 0;
  uint32 public nextIndex = 0;

  constructor(uint32 _levels, IHasher _hasher) {
    require(_levels > 0, "_levels should be greater than zero");
    require(_levels < 32, "_levels should be less than 32");
    levels = _levels;
    hasher = _hasher;

    bytes32 currentZero = bytes32(ZERO_VALUE);
    for (uint32 i = 0; i < _levels; i++) {
      zeros[i] = currentZero;
      filledSubtrees[i] = currentZero;
      currentZero = hashLeftRight(_hasher, currentZero, currentZero);
    }

    roots[0] = currentZero;
  }

  /**
    @dev Hash 2 tree leaves, returns MiMC(_left, _right)
  */
  function hashLeftRight(
    IHasher _hasher,
    bytes32 _left,
    bytes32 _right
  ) public pure returns (bytes32) {
    require(uint256(_left) < FIELD_SIZE, "_left should be inside the field");
    require(uint256(_right) < FIELD_SIZE, "_right should be inside the field");
    uint256 R = uint256(_left);
    uint256 C = 0;
    (R, C) = _hasher.MiMCSponge(R, C);
    R = addmod(R, uint256(_right), FIELD_SIZE);
    (R, C) = _hasher.MiMCSponge(R, C);
    return bytes32(R);
  }

  function _insert(bytes32 _leaf) internal returns (uint32 index) {
    uint32 _nextIndex = nextIndex;
    require(_nextIndex != uint32(2)**levels, "Merkle tree is full. No more leaves can be added");
    uint32 currentIndex = _nextIndex;
    bytes32 currentLevelHash = _leaf;
    bytes32 left;
    bytes32 right;

    for (uint32 i = 0; i < levels; i++) {
      if (currentIndex % 2 == 0) {
        left = currentLevelHash;
        right = zeros[i];
        filledSubtrees[i] = currentLevelHash;
      } else {
        left = filledSubtrees[i];
        right = currentLevelHash;
      }
      currentLevelHash = hashLeftRight(hasher, left, right);
      currentIndex /= 2;
    }

    uint32 newRootIndex = (currentRootIndex + 1) % ROOT_HISTORY_SIZE;
    currentRootIndex = newRootIndex;
    roots[newRootIndex] = currentLevelHash;
    nextIndex = _nextIndex + 1;
    return _nextIndex;
  }

  /**
    @dev Whether the root is present in the root history
  */
  function isKnownRoot(bytes32 _root) public view returns (bool) {
    if (_root == 0) {
      return false;
    }
    uint32 _currentRootIndex = currentRootIndex;
    uint32 i = _currentRootIndex;
    do {
      if (_root == roots[i]) {
        return true;
      }
      if (i == 0) {
        i = ROOT_HISTORY_SIZE;
      }
      i--;
    } while (i != _currentRootIndex);
    return false;
  }

  /**
    @dev Returns the last root
  */
  function getLastRoot() public view returns (bytes32) {
    return roots[currentRootIndex];
  }
}

// File: @openzeppelin/contracts/utils/ReentrancyGuard.sol



pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

// File: contracts/Tornado.sol

// https://tornado.cash
/*
 * d888888P                                           dP              a88888b.                   dP
 *    88                                              88             d8'   `88                   88
 *    88    .d8888b. 88d888b. 88d888b. .d8888b. .d888b88 .d8888b.    88        .d8888b. .d8888b. 88d888b.
 *    88    88'  `88 88'  `88 88'  `88 88'  `88 88'  `88 88'  `88    88        88'  `88 Y8ooooo. 88'  `88
 *    88    88.  .88 88       88    88 88.  .88 88.  .88 88.  .88 dP Y8.   .88 88.  .88       88 88    88
 *    dP    `88888P' dP       dP    dP `88888P8 `88888P8 `88888P' 88  Y88888P' `88888P8 `88888P' dP    dP
 * ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
 */


pragma solidity ^0.7.0;



interface IVerifier {
  function verifyProof(bytes memory _proof, uint256[6] memory _input) external returns (bool);
}

abstract contract Tornado is MerkleTreeWithHistory, ReentrancyGuard {
  IVerifier public immutable verifier;
  uint256 public immutable denomination;

  mapping(bytes32 => bool) public nullifierHashes;
  // we store all commitments just to prevent accidental deposits with the same commitment
  mapping(bytes32 => bool) public commitments;

  event Deposit(bytes32 indexed commitment, uint32 leafIndex, uint256 timestamp);
  event Withdrawal(address to, bytes32 nullifierHash, address indexed relayer, uint256 fee);

  /**
    @dev The constructor
    @param _verifier the address of SNARK verifier for this contract
    @param _hasher the address of MiMC hash contract
    @param _denomination transfer amount for each deposit
    @param _merkleTreeHeight the height of deposits' Merkle Tree
  */
  constructor(
    IVerifier _verifier,
    IHasher _hasher,
    uint256 _denomination,
    uint32 _merkleTreeHeight
  ) MerkleTreeWithHistory(_merkleTreeHeight, _hasher) {
    require(_denomination > 0, "denomination should be greater than 0");
    verifier = _verifier;
    denomination = _denomination;
  }

  /**
    @dev Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance.
    @param _commitment the note commitment, which is PedersenHash(nullifier + secret)
  */
  function deposit(bytes32 _commitment) external payable nonReentrant {
    require(!commitments[_commitment], "The commitment has been submitted");

    uint32 insertedIndex = _insert(_commitment);
    commitments[_commitment] = true;
    _processDeposit();

    emit Deposit(_commitment, insertedIndex, block.timestamp);
  }

  /** @dev this function is defined in a child contract */
  function _processDeposit() internal virtual;

  /**
    @dev Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs
    `input` array consists of:
      - merkle root of all deposits in the contract
      - hash of unique deposit nullifier to prevent double spends
      - the recipient of funds
      - optional fee that goes to the transaction sender (usually a relay)
  */
  function withdraw(
    bytes calldata _proof,
    bytes32 _root,
    bytes32 _nullifierHash,
    address payable _recipient,
    address payable _relayer,
    uint256 _fee,
    uint256 _refund
  ) external payable nonReentrant {
    require(_fee <= denomination, "Fee exceeds transfer value");
    require(!nullifierHashes[_nullifierHash], "The note has been already spent");
    require(isKnownRoot(_root), "Cannot find your merkle root"); // Make sure to use a recent one
    require(
      verifier.verifyProof(
        _proof,
        [uint256(_root), uint256(_nullifierHash), uint256(_recipient), uint256(_relayer), _fee, _refund]
      ),
      "Invalid withdraw proof"
    );

    nullifierHashes[_nullifierHash] = true;
    _processWithdraw(_recipient, _relayer, _fee, _refund);
    emit Withdrawal(_recipient, _nullifierHash, _relayer, _fee);
  }

  /** @dev this function is defined in a child contract */
  function _processWithdraw(
    address payable _recipient,
    address payable _relayer,
    uint256 _fee,
    uint256 _refund
  ) internal virtual;

  /** @dev whether a note is already spent */
  function isSpent(bytes32 _nullifierHash) public view returns (bool) {
    return nullifierHashes[_nullifierHash];
  }

  /** @dev whether an array of notes is already spent */
  function isSpentArray(bytes32[] calldata _nullifierHashes) external view returns (bool[] memory spent) {
    spent = new bool[](_nullifierHashes.length);
    for (uint256 i = 0; i < _nullifierHashes.length; i++) {
      if (isSpent(_nullifierHashes[i])) {
        spent[i] = true;
      }
    }
  }
}

// File: contracts/ETHTornado.sol

// https://tornado.cash
/*
 * d888888P                                           dP              a88888b.                   dP
 *    88                                              88             d8'   `88                   88
 *    88    .d8888b. 88d888b. 88d888b. .d8888b. .d888b88 .d8888b.    88        .d8888b. .d8888b. 88d888b.
 *    88    88'  `88 88'  `88 88'  `88 88'  `88 88'  `88 88'  `88    88        88'  `88 Y8ooooo. 88'  `88
 *    88    88.  .88 88       88    88 88.  .88 88.  .88 88.  .88 dP Y8.   .88 88.  .88       88 88    88
 *    dP    `88888P' dP       dP    dP `88888P8 `88888P8 `88888P' 88  Y88888P' `88888P8 `88888P' dP    dP
 * ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
 */


pragma solidity ^0.7.0;


contract ETHTornado is Tornado {
  constructor(
    IVerifier _verifier,
    IHasher _hasher,
    uint256 _denomination,
    uint32 _merkleTreeHeight
  ) Tornado(_verifier, _hasher, _denomination, _merkleTreeHeight) {}

  function _processDeposit() internal override {
    require(msg.value == denomination, "Please send `mixDenomination` ETH along with transaction");
  }

  function _processWithdraw(
    address payable _recipient,
    address payable _relayer,
    uint256 _fee,
    uint256 _refund
  ) internal override {
    // sanity checks
    require(msg.value == 0, "Message value is supposed to be zero for ETH instance");
    require(_refund == 0, "Refund value is supposed to be zero for ETH instance");

    (bool success, ) = _recipient.call{ value: denomination - _fee }("");
    require(success, "payment to _recipient did not go thru");
    if (_fee > 0) {
      (success, ) = _relayer.call{ value: _fee }("");
      require(success, "payment to _relayer did not go thru");
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IVerifier","name":"_verifier","type":"address"},{"internalType":"contract IHasher","name":"_hasher","type":"address"},{"internalType":"uint256","name":"_denomination","type":"uint256"},{"internalType":"uint32","name":"_merkleTreeHeight","type":"uint32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"commitment","type":"bytes32"},{"indexed":false,"internalType":"uint32","name":"leafIndex","type":"uint32"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"bytes32","name":"nullifierHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"relayer","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[],"name":"FIELD_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROOT_HISTORY_SIZE","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ZERO_VALUE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"commitments","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRootIndex","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"denomination","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_commitment","type":"bytes32"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"filledSubtrees","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IHasher","name":"_hasher","type":"address"},{"internalType":"bytes32","name":"_left","type":"bytes32"},{"internalType":"bytes32","name":"_right","type":"bytes32"}],"name":"hashLeftRight","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"hasher","outputs":[{"internalType":"contract IHasher","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"isKnownRoot","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_nullifierHash","type":"bytes32"}],"name":"isSpent","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_nullifierHashes","type":"bytes32[]"}],"name":"isSpentArray","outputs":[{"internalType":"bool[]","name":"spent","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"levels","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextIndex","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"nullifierHashes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"roots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"verifier","outputs":[{"internalType":"contract IVerifier","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_proof","type":"bytes"},{"internalType":"bytes32","name":"_root","type":"bytes32"},{"internalType":"bytes32","name":"_nullifierHash","type":"bytes32"},{"internalType":"address payable","name":"_recipient","type":"address"},{"internalType":"address payable","name":"_relayer","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"uint256","name":"_refund","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"zeros","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]

610100604052600380546001600160401b03191690553480156200002257600080fd5b50604051620018c5380380620018c5833981810160405260808110156200004857600080fd5b508051602082015160408301516060909301519192909183838383808363ffffffff8216620000a95760405162461bcd60e51b8152600401808060200182810382526023815260200180620018a26023913960400191505060405180910390fd5b60208263ffffffff161062000105576040805162461bcd60e51b815260206004820152601e60248201527f5f6c6576656c732073686f756c64206265206c657373207468616e2033320000604482015290519081900360640190fd5b6001600160e01b031960e083901b1660a0526001600160601b0319606082901b166080527f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60005b8363ffffffff168163ffffffff1610156200019e5763ffffffff811660009081526001602090815260408083208590559082905290208290556200019383838062000232565b91506001016200014d565b506000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b5550506001600455816200020f5760405162461bcd60e51b81526004018080602001828103825260258152602001806200183c6025913960400191505060405180910390fd5b5060609290921b6001600160601b03191660c0525060e052506200040a92505050565b600060008051602062001882833981519152831062000298576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b600080516020620018828339815191528210620002e75760405162461bcd60e51b8152600401808060200182810382526021815260200180620018616021913960400191505060405180910390fd5b6040805163f47d33b560e01b8152600481018590526000602482018190528251869391926001600160a01b0389169263f47d33b592604480840193829003018186803b1580156200033757600080fd5b505afa1580156200034c573d6000803e3d6000fd5b505050506040513d60408110156200036357600080fd5b5080516020909101519092509050600080516020620018828339815191528483089150856001600160a01b031663f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015620003d257600080fd5b505afa158015620003e7573d6000803e3d6000fd5b505050506040513d6040811015620003fe57600080fd5b50519695505050505050565b60805160601c60a05160e01c60c05160601c60e0516113d06200046c600039806105b852806109c75280610ed452806111c15250806106eb52806108e652508061091c52806110295280611095525080610e00528061111d52506113d06000f3fe60806040526004361061012a5760003560e01c80639fa12d0b116100ab578063e5285dcc1161006f578063e5285dcc14610487578063e8295588146104b1578063ec732959146104db578063ed33639f146104f0578063f178e47c14610505578063fc7e9c6f1461052f5761012a565b80639fa12d0b1461034b578063b214faa514610416578063ba70f75714610433578063c2b40ae414610448578063cd87a3b4146104725761012a565b80636d9833e3116100f25780636d9833e31461028e578063839df945146102b85780638bca6d16146102e25780638ea3099e146102f757806390eeb02b146103365761012a565b806317cc915c1461012f57806321a0adb61461016d5780632b7ac3f314610208578063414a37ba146102395780634ecf518b14610260575b600080fd5b34801561013b57600080fd5b506101596004803603602081101561015257600080fd5b5035610544565b604080519115158252519081900360200190f35b610206600480360360e081101561018357600080fd5b810190602081018135600160201b81111561019d57600080fd5b8201836020820111156101af57600080fd5b803590602001918460018302840111600160201b831117156101d057600080fd5b91935091508035906020810135906001600160a01b03604082013581169160608101359091169060808101359060a00135610559565b005b34801561021457600080fd5b5061021d6108e4565b604080516001600160a01b039092168252519081900360200190f35b34801561024557600080fd5b5061024e610908565b60408051918252519081900360200190f35b34801561026c57600080fd5b5061027561091a565b6040805163ffffffff9092168252519081900360200190f35b34801561029a57600080fd5b50610159600480360360208110156102b157600080fd5b503561093e565b3480156102c457600080fd5b50610159600480360360208110156102db57600080fd5b50356109b0565b3480156102ee57600080fd5b5061024e6109c5565b34801561030357600080fd5b5061024e6004803603606081101561031a57600080fd5b506001600160a01b0381351690602081013590604001356109e9565b34801561034257600080fd5b50610275610bb5565b34801561035757600080fd5b506103c66004803603602081101561036e57600080fd5b810190602081018135600160201b81111561038857600080fd5b82018360208201111561039a57600080fd5b803590602001918460208302840111600160201b831117156103bb57600080fd5b509092509050610bc1565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104025781810151838201526020016103ea565b505050509050019250505060405180910390f35b6102066004803603602081101561042c57600080fd5b5035610c60565b34801561043f57600080fd5b5061024e610d81565b34801561045457600080fd5b5061024e6004803603602081101561046b57600080fd5b5035610d9c565b34801561047e57600080fd5b50610275610dae565b34801561049357600080fd5b50610159600480360360208110156104aa57600080fd5b5035610db3565b3480156104bd57600080fd5b5061024e600480360360208110156104d457600080fd5b5035610dc8565b3480156104e757600080fd5b5061024e610dda565b3480156104fc57600080fd5b5061021d610dfe565b34801561051157600080fd5b5061024e6004803603602081101561052857600080fd5b5035610e22565b34801561053b57600080fd5b50610275610e34565b60056020526000908152604090205460ff1681565b600260045414156105b1576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026004557f000000000000000000000000000000000000000000000000000000000000000082111561062b576040805162461bcd60e51b815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b60008581526005602052604090205460ff161561068f576040805162461bcd60e51b815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b6106988661093e565b6106e9576040805162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663695ef6f989896040518060c001604052808b60001c81526020018a60001c8152602001896001600160a01b03168152602001886001600160a01b03168152602001878152602001868152506040518463ffffffff1660e01b8152600401808060200183600660200280838360005b8381101561079a578181015183820152602001610782565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b1580156107ec57600080fd5b505af1158015610800573d6000803e3d6000fd5b505050506040513d602081101561081657600080fd5b5051610862576040805162461bcd60e51b815260206004820152601660248201527524b73b30b634b2103bb4ba34323930bb90383937b7b360511b604482015290519081900360640190fd5b6000858152600560205260409020805460ff1916600117905561088784848484610e47565b604080516001600160a01b038681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a250506001600455505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000805160206112ad83398151915281565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008161094d575060006109ab565b60035463ffffffff16805b63ffffffff8116600090815260026020526040902054841415610980576001925050506109ab565b63ffffffff811661098f5750601e5b6000190163ffffffff8082169083161415610958576000925050505b919050565b60066020526000908152604090205460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006000805160206112ad8339815191528310610a4d576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b6000805160206112ad8339815191528210610a995760405162461bcd60e51b81526004018080602001828103825260218152602001806112586021913960400191505060405180910390fd5b6040805163f47d33b560e01b8152600481018590526000602482018190528251869391926001600160a01b0389169263f47d33b592604480840193829003018186803b158015610ae857600080fd5b505afa158015610afc573d6000803e3d6000fd5b505050506040513d6040811015610b1257600080fd5b50805160209091015190925090506000805160206112ad8339815191528483089150856001600160a01b031663f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610b7f57600080fd5b505afa158015610b93573d6000803e3d6000fd5b505050506040513d6040811015610ba957600080fd5b50519695505050505050565b60035463ffffffff1681565b60608167ffffffffffffffff81118015610bda57600080fd5b50604051908082528060200260200182016040528015610c04578160200160208202803683370190505b50905060005b82811015610c5957610c2d848483818110610c2157fe5b90506020020135610db3565b15610c51576001828281518110610c4057fe5b911515602092830291909101909101525b600101610c0a565b5092915050565b60026004541415610cb8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260045560008181526006602052604090205460ff1615610d0b5760405162461bcd60e51b81526004018080602001828103825260218152602001806112cd6021913960400191505060405180910390fd5b6000610d1682611011565b6000838152600660205260409020805460ff191660011790559050610d396111bf565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a250506001600455565b60035463ffffffff1660009081526002602052604090205490565b60026020526000908152604090205481565b601e81565b60009081526005602052604090205460ff1690565b60016020526000908152604090205481565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006020819052908152604090205481565b600354600160201b900463ffffffff1681565b3415610e845760405162461bcd60e51b81526004018080602001828103825260358152602001806113666035913960400191505060405180910390fd5b8015610ec15760405162461bcd60e51b81526004018080602001828103825260348152602001806112796034913960400191505060405180910390fd5b6040516000906001600160a01b038616907f0000000000000000000000000000000000000000000000000000000000000000859003908381818185875af1925050503d8060008114610f2f576040519150601f19603f3d011682016040523d82523d6000602084013e610f34565b606091505b5050905080610f745760405162461bcd60e51b81526004018080602001828103825260258152602001806112ee6025913960400191505060405180910390fd5b821561100a576040516001600160a01b038516908490600081818185875af1925050503d8060008114610fc3576040519150601f19603f3d011682016040523d82523d6000602084013e610fc8565b606091505b5050809150508061100a5760405162461bcd60e51b81526004018080602001828103825260238152602001806113136023913960400191505060405180910390fd5b5050505050565b60035460009063ffffffff600160201b9091048116907f0000000000000000000000000000000000000000000000000000000000000000811660020a1681141561108c5760405162461bcd60e51b81526004018080602001828103825260308152602001806113366030913960400191505060405180910390fd5b8083600080805b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff168163ffffffff16101561115957600185166110fc5763ffffffff8116600090815260016020908152604080832054918390529091208590558493509150611118565b63ffffffff811660009081526020819052604090205492508391505b6111437f000000000000000000000000000000000000000000000000000000000000000084846109e9565b9350600263ffffffff8616049450600101611093565b505060038054601e63ffffffff8083166001908101821692909206811663ffffffff199093168317845560009283526002602052604090922094909455815493860116600160201b0267ffffffff00000000199093169290921790915550909392505050565b7f0000000000000000000000000000000000000000000000000000000000000000341461121d5760405162461bcd60e51b81526004018080602001828103825260388152602001806112206038913960400191505060405180910390fd5b56fe506c656173652073656e6420606d697844656e6f6d696e6174696f6e602045544820616c6f6e672077697468207472616e73616374696f6e5f72696768742073686f756c6420626520696e7369646520746865206669656c64526566756e642076616c756520697320737570706f73656420746f206265207a65726f20666f722045544820696e7374616e636530644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000154686520636f6d6d69746d656e7420686173206265656e207375626d69747465647061796d656e7420746f205f726563697069656e7420646964206e6f7420676f20746872757061796d656e7420746f205f72656c6179657220646964206e6f7420676f20746872754d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c65617665732063616e2062652061646465644d6573736167652076616c756520697320737570706f73656420746f206265207a65726f20666f722045544820696e7374616e6365a26469706673582212208ceda25717bed5d981a763bf8fc532aaf1c7aafa06a512f58b473b522acadc9964736f6c6343000706003364656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e20305f72696768742073686f756c6420626520696e7369646520746865206669656c6430644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000015f6c6576656c732073686f756c642062652067726561746572207468616e207a65726f000000000000000000000000fc9859303c0ac1a7721ece639f2e249d8fd72ac6000000000000000000000000baffbe0e6c73d4dad3f813194695fdc5829c962a0000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000014

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000fc9859303c0ac1a7721ece639f2e249d8fd72ac6000000000000000000000000baffbe0e6c73d4dad3f813194695fdc5829c962a0000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000014

-----Decoded View---------------
Arg [0] : _verifier (address): 0xfc9859303c0ac1a7721ece639f2e249d8fd72ac6
Arg [1] : _hasher (address): 0xbaffbe0e6c73d4dad3f813194695fdc5829c962a
Arg [2] : _denomination (uint256): 100000000000000000000
Arg [3] : _merkleTreeHeight (uint32): 20

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000fc9859303c0ac1a7721ece639f2e249d8fd72ac6
Arg [1] : 000000000000000000000000baffbe0e6c73d4dad3f813194695fdc5829c962a
Arg [2] : 0000000000000000000000000000000000000000000000056bc75e2d63100000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000014


Deployed ByteCode Sourcemap

12992:1032:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8425:47;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8425:47:0;;:::i;:::-;;;;;;;;;;;;;;;;;;10505:878;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10505:878:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10505:878:0;;;;;;;;;;;;-1:-1:-1;10505:878:0;-1:-1:-1;10505:878:0;;;;;;;;-1:-1:-1;;;;;10505:878:0;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;8341:35;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;8341:35:0;;;;;;;;;;;;;;1045:114;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;1360:30;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4032:410;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4032:410:0;;:::i;8569:43::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8569:43:0;;:::i;8381:37::-;;;;;;;;;;;;;:::i;2542:493::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2542:493:0;;;;;;;;;;;;;:::i;1893:34::-;;;;;;;;;;;;;:::i;11838:305::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11838:305:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11838:305:0;;;;;;;;;;-1:-1:-1;11838:305:0;;-1:-1:-1;11838:305:0;-1:-1:-1;11838:305:0;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9656:332;;;;;;;;;;;;;;;;-1:-1:-1;9656:332:0;;:::i;4493:96::-;;;;;;;;;;;;;:::i;1798:40::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1798:40:0;;:::i;1843:45::-;;;;;;;;;;;;;:::i;11655:119::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11655:119:0;;:::i;1753:40::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1753:40:0;;:::i;1164:114::-;;;;;;;;;;;;;:::i;1324:31::-;;;;;;;;;;;;;:::i;1699:49::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1699:49:0;;:::i;1932:27::-;;;;;;;;;;;;;:::i;8425:47::-;;;;;;;;;;;;;;;:::o;10505:878::-;6348:1;6954:7;;:19;;6946:63;;;;;-1:-1:-1;;;6946:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;6348:1;7087:7;:18;10763:12:::1;10755:20:::0;::::1;;10747:59;;;::::0;;-1:-1:-1;;;10747:59:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;10822:31;::::0;;;:15:::1;:31;::::0;;;;;::::1;;10821:32;10813:76;;;::::0;;-1:-1:-1;;;10813:76:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;10904:18;10916:5;10904:11;:18::i;:::-;10896:59;;;::::0;;-1:-1:-1;;;10896:59:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;11011:8;-1:-1:-1::0;;;;;11011:20:0::1;;11042:6;;11011:153;;;;;;;;11068:5;11060:14;;11011:153;;;;11084:14;11076:23;;11011:153;;;;11109:10;-1:-1:-1::0;;;;;11101:19:0::1;11011:153;;;;11130:8;-1:-1:-1::0;;;;;11122:17:0::1;11011:153;;;;11141:4;11011:153;;;;11147:7;11011:153;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;11011:153:0;10995:209:::1;;;::::0;;-1:-1:-1;;;10995:209:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;10995:209:0;;;;;;;;;;;;;::::1;;11213:31;::::0;;;:15:::1;:31;::::0;;;;:38;;-1:-1:-1;;11213:38:0::1;11247:4;11213:38;::::0;;11258:53:::1;11275:10:::0;11287:8;11297:4;11303:7;11258:16:::1;:53::i;:::-;11323:54;::::0;;-1:-1:-1;;;;;11323:54:0;;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;;;;;::::1;::::0;::::1;::::0;;;;;;;::::1;-1:-1:-1::0;;6304:1:0;7266:7;:22;-1:-1:-1;;;;;;10505:878:0:o;8341:35::-;;;:::o;1045:114::-;-1:-1:-1;;;;;;;;;;;1045:114:0;:::o;1360:30::-;;;:::o;4032:410::-;4089:4;4106:10;4102:45;;-1:-1:-1;4134:5:0;4127:12;;4102:45;4180:16;;;;;4238:180;4263:8;;;;;;;:5;:8;;;;;;4254:17;;4250:55;;;4291:4;4284:11;;;;;;4250:55;4317:6;;;4313:54;;-1:-1:-1;1886:2:0;4313:54;-1:-1:-1;;4375:3:0;4394:22;;;;;;;;;4238:180;;4431:5;4424:12;;;;4032:410;;;;:::o;8569:43::-;;;;;;;;;;;;;;;:::o;8381:37::-;;;:::o;2542:493::-;2654:7;-1:-1:-1;;;;;;;;;;;2678:27:0;;2670:72;;;;;-1:-1:-1;;;2670:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2757:28:0;;2749:74;;;;-1:-1:-1;;;2749:74:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2892:24;;;-1:-1:-1;;;2892:24:0;;;;;;;;2830:9;2892:24;;;;;;;;2850:5;;2830:9;;-1:-1:-1;;;;;2892:18:0;;;;;:24;;;;;;;;;;:18;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2892:24:0;;;;;;;;;-1:-1:-1;2892:24:0;-1:-1:-1;;;;;;;;;;;;2945:6:0;2934:1;2927:38;2923:42;;2981:7;-1:-1:-1;;;;;2981:18:0;;3000:1;3003;2981:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2981:24:0;;2542:493;-1:-1:-1;;;;;;2542:493:0:o;1893:34::-;;;;;;:::o;11838:305::-;11920:19;11967:16;11956:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11956:35:0;;11948:43;;12003:9;11998:140;12018:27;;;11998:140;;;12065:28;12073:16;;12090:1;12073:19;;;;;;;;;;;;;12065:7;:28::i;:::-;12061:70;;;12117:4;12106:5;12112:1;12106:8;;;;;;;;:15;;;:8;;;;;;;;;;;:15;12061:70;12047:3;;11998:140;;;;11838:305;;;;:::o;9656:332::-;6348:1;6954:7;;:19;;6946:63;;;;;-1:-1:-1;;;6946:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;6348:1;7087:7;:18;9740:24:::1;::::0;;;:11:::1;:24;::::0;;;;;::::1;;9739:25;9731:71;;;;-1:-1:-1::0;;;9731:71:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9811:20;9834;9842:11;9834:7;:20::i;:::-;9861:24;::::0;;;:11:::1;:24;::::0;;;;:31;;-1:-1:-1;;9861:31:0::1;9888:4;9861:31;::::0;;9811:43;-1:-1:-1;9899:17:0::1;:15;:17::i;:::-;9930:52;::::0;;::::1;::::0;::::1;::::0;;9966:15:::1;9930:52;::::0;::::1;::::0;;;9938:11;;9930:52:::1;::::0;;;;;;::::1;-1:-1:-1::0;;6304:1:0;7266:7;:22;9656:332::o;4493:96::-;4566:16;;;;4537:7;4560:23;;;:5;:23;;;;;;4493:96;:::o;1798:40::-;;;;;;;;;;;;;:::o;1843:45::-;1886:2;1843:45;:::o;11655:119::-;11717:4;11737:31;;;:15;:31;;;;;;;;;11655:119::o;1753:40::-;;;;;;;;;;;;;:::o;1164:114::-;1201:77;1164:114;:::o;1324:31::-;;;:::o;1699:49::-;;;;;;;;;;;;;;:::o;1932:27::-;;;-1:-1:-1;;;1932:27:0;;;;;:::o;13380:641::-;13571:9;:14;13563:80;;;;-1:-1:-1;;;13563:80:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13658:12;;13650:77;;;;-1:-1:-1;;;13650:77:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13755:49;;13737:12;;-1:-1:-1;;;;;13755:15:0;;;13779:12;:19;;;;13737:12;13755:49;13737:12;13755:49;13779:19;13755:15;:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13736:68;;;13819:7;13811:57;;;;-1:-1:-1;;;13811:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13879:8;;13875:141;;13912:32;;-1:-1:-1;;;;;13912:13:0;;;13934:4;;13912:32;;;;13934:4;13912:13;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13898:46;;;;;13961:7;13953:55;;;;-1:-1:-1;;;13953:55:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13380:641;;;;;:::o;3041:914::-;3132:9;;3091:12;;3132:9;-1:-1:-1;;;3132:9:0;;;;;;3181:6;3170:17;;3177:1;3170:17;3156:31;;;;3148:92;;;;-1:-1:-1;;;3148:92:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3269:10;3313:5;3247:19;;;3366:371;3389:6;3385:10;;:1;:10;;;3366:371;;;3415:16;;;3411:231;;3491:8;;;;;;;:5;:8;;;;;;;;;3510:17;;;;;;;:36;;;3456:16;;-1:-1:-1;3491:8:0;-1:-1:-1;3411:231:0;;;3580:17;;;:14;:17;;;;;;;;;;;;-1:-1:-1;3616:16:0;;-1:-1:-1;3411:231:0;3669:34;3683:6;3691:4;3697:5;3669:13;:34::i;:::-;3650:53;-1:-1:-1;3728:1:0;3712:17;;;;;-1:-1:-1;3397:3:0;;3366:371;;;-1:-1:-1;;3768:16:0;;;1886:2;3767:42;3768:16;;;;:20;;;3767:42;;;;;;3816:31;;-1:-1:-1;;3816:31:0;;;;;;;-1:-1:-1;3854:19:0;;;:5;:19;;;;;;:38;;;;3899:26;;3911:14;;;3899:26;-1:-1:-1;;;3899:26:0;-1:-1:-1;;3899:26:0;;;;;;;;;;-1:-1:-1;3911:14:0;;;-1:-1:-1;;;3041:914:0:o;13222:152::-;13295:12;13282:9;:25;13274:94;;;;-1:-1:-1;;;13274:94:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13222:152::o

Swarm Source

ipfs://8ceda25717bed5d981a763bf8fc532aaf1c7aafa06a512f58b473b522acadc99
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.