Contract 0xe1376DeF383D1656f5a40B6ba31F8C035BFc26Aa

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xca7580f8ab3968a6774b8ecf80e67df669a3c90f199661c777bee36a5ea77d720x6080604027146432021-07-19 17:48:39305 days 13 hrs ago0x027588afac1eedb7d3d329a9b60c530aa3fadbbf IN  Create: ETHSherpa0 AVAX0.69403185
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x3ce84cede13bfa3b1515efdbf8610c9aa5815168ad42a78deed5962dcb5bc85e149453162022-05-20 13:43:0417 hrs 13 mins ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0x0403665a5e553743d1a4b0c57be556503a920f1e0.10000000007875 AVAX
0x3ce84cede13bfa3b1515efdbf8610c9aa5815168ad42a78deed5962dcb5bc85e149453162022-05-20 13:43:0417 hrs 13 mins ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0x69aa48af6cf6694fb8bd5f6b29e058e164054eae9.89999999992125 AVAX
0xe34ea721385285d47e565f9342e2d2041fc3d24afcbcba20daf8d501fd669079149452022022-05-20 13:39:1817 hrs 16 mins ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0x0403665a5e553743d1a4b0c57be556503a920f1e0.10000000007875 AVAX
0xe34ea721385285d47e565f9342e2d2041fc3d24afcbcba20daf8d501fd669079149452022022-05-20 13:39:1817 hrs 16 mins ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0x69aa48af6cf6694fb8bd5f6b29e058e164054eae9.89999999992125 AVAX
0x3e275c0cd38d774a9a686c16a075596e43594fa0c16c7d7f47e90fb512c944c0149230592022-05-20 1:22:271 day 5 hrs ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0x0403665a5e553743d1a4b0c57be556503a920f1e0.10000000007875 AVAX
0x3e275c0cd38d774a9a686c16a075596e43594fa0c16c7d7f47e90fb512c944c0149230592022-05-20 1:22:271 day 5 hrs ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0xc5f9e11fc211a2990cada2b33bfc9b2f5e23280a9.89999999992125 AVAX
0x3da0acb65e645f255c3c52664b1bb1f29d6b1d52f3ce11ee09052c956aa65dd5149202202022-05-19 23:47:521 day 7 hrs ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0x9c28a2bfcb9842c83f1e221a2881da3b0399bbe410 AVAX
0x5d09b6d63b3ed4d20619877da8e0d3b873488f3d2ef3902acbd1fc20889e9a91149201932022-05-19 23:46:561 day 7 hrs ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0x9c28a2bfcb9842c83f1e221a2881da3b0399bbe410 AVAX
0x5fee6dbb1abbba12f560a598d8321ae01b002918f8200f27aa2097a2c60f13ea149179312022-05-19 22:32:121 day 8 hrs ago 0x171fb28ebffcb2737e530e1fd48cb4ef12e5031e 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa10 AVAX
0x964cbebe1702929e64802b2e41a23b758620b515516c2818553d8c0355a9204c149178992022-05-19 22:31:081 day 8 hrs ago 0x171fb28ebffcb2737e530e1fd48cb4ef12e5031e 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa10 AVAX
0x4c4d7945f4ad06199cc14aae74a741e1481f4535877152543455e2591fc75958149120992022-05-19 19:16:521 day 11 hrs ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0x0403665a5e553743d1a4b0c57be556503a920f1e0.10000000007875 AVAX
0x4c4d7945f4ad06199cc14aae74a741e1481f4535877152543455e2591fc75958149120992022-05-19 19:16:521 day 11 hrs ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0xb29c752a1fab3cb99b049041ec4c01d38e2a9fd09.89999999992125 AVAX
0xbe023f596531a099f3e223e7902bfca8c19238e08fe1f17e5a296805d6d186fd149120722022-05-19 19:15:591 day 11 hrs ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0x0403665a5e553743d1a4b0c57be556503a920f1e0.10000000007875 AVAX
0xbe023f596531a099f3e223e7902bfca8c19238e08fe1f17e5a296805d6d186fd149120722022-05-19 19:15:591 day 11 hrs ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0xb29c752a1fab3cb99b049041ec4c01d38e2a9fd09.89999999992125 AVAX
0xed9bb2980967d7e39e9d1f7d88be52d6b3ff624539ec2c68d5aa4fded0a99755149120122022-05-19 19:13:591 day 11 hrs ago 0x171fb28ebffcb2737e530e1fd48cb4ef12e5031e 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa10 AVAX
0xf3ce6beedf0c39ffb9009c98cc2b165d5d9bfe4810b79f706b921b0fda907512149119952022-05-19 19:13:251 day 11 hrs ago 0x171fb28ebffcb2737e530e1fd48cb4ef12e5031e 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa10 AVAX
0xef4d3d1d864ed2c22172fe47e78dd2fd02dc14dc5e36c0c3187693ae1bfd6201148884352022-05-19 6:13:142 days 42 mins ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0x9c28a2bfcb9842c83f1e221a2881da3b0399bbe410 AVAX
0x9e7ee82d942af531aebc8c91acc290101db44559644591eeea181f734eb4f784148835342022-05-19 3:29:232 days 3 hrs ago 0x171fb28ebffcb2737e530e1fd48cb4ef12e5031e 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa10 AVAX
0x3fbf37b2a7565e3ab57e4a5944eebfbb7d883bf0404eea1bf7acbb21116bf270148835252022-05-19 3:29:052 days 3 hrs ago 0x171fb28ebffcb2737e530e1fd48cb4ef12e5031e 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa10 AVAX
0xa47ef2f2ac8efdbf46a1bb1e58f42d4b1d0d598559e817565738dcd858dfa10e148835042022-05-19 3:28:232 days 3 hrs ago 0x171fb28ebffcb2737e530e1fd48cb4ef12e5031e 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa10 AVAX
0x011574496566b0686fb3218d2f07ed933cb1ae28dc266c52c6fd953c007cf923148767682022-05-18 23:42:562 days 7 hrs ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0x0403665a5e553743d1a4b0c57be556503a920f1e0.10000000007875 AVAX
0x011574496566b0686fb3218d2f07ed933cb1ae28dc266c52c6fd953c007cf923148767682022-05-18 23:42:562 days 7 hrs ago 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa0x0f206ced2f276514e2c73d78294028ebaee27d669.89999999992125 AVAX
0x42fa076aed4444b05ed2ef7bfa371a4fe34ed9f73cc1e91bff5035827046b619148767222022-05-18 23:41:232 days 7 hrs ago 0x171fb28ebffcb2737e530e1fd48cb4ef12e5031e 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa10 AVAX
0x98381c3ab822467836559e9a5889700a5cd53eb7984a078ac5b64c87894af442148221832022-05-17 17:09:003 days 13 hrs ago 0x171fb28ebffcb2737e530e1fd48cb4ef12e5031e 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa10 AVAX
0xe3b72a9bdf7d5bee7c75799c4ec034951b0f26fafda0d3b197a6319f8c8212d8148082412022-05-17 9:23:003 days 21 hrs ago 0x171fb28ebffcb2737e530e1fd48cb4ef12e5031e 0xe1376def383d1656f5a40b6ba31f8c035bfc26aa10 AVAX
[ Download CSV Export 
Loading
This contract contains unverified libraries: Hasher

Contract Source Code Verified (Exact Match)

Contract Name:
ETHSherpa

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 99999 runs

Other Settings:
default evmVersion
File 1 of 4 : ETHSherpa.sol
// https://sherpa.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.5.17;

import "./Sherpa.sol";

contract ETHSherpa is Sherpa {
  constructor(
    IVerifier _verifier,
    uint256 _denomination,
    uint32 _merkleTreeHeight
  ) Sherpa(_verifier, _denomination, _merkleTreeHeight) public {
  }

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

  function _processWithdraw(address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund) internal {
    // 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");
    }
  }
}

File 2 of 4 : Sherpa.sol
// https://sherpa.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.5.17;

import "./MerkleTreeWithHistory.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";

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

contract Sherpa is MerkleTreeWithHistory, ReentrancyGuard {
  uint256 public denomination;
  mapping(bytes32 => bool) public nullifierHashes;
  // we store all commitments just to prevent accidental deposits with the same commitment
  mapping(bytes32 => bool) public commitments;
  IVerifier public verifier;

  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 _denomination transfer amount for each deposit
    @param _merkleTreeHeight the height of deposits' Merkle Tree
  */
  constructor(
    IVerifier _verifier,
    uint256 _denomination,
    uint32 _merkleTreeHeight
  ) MerkleTreeWithHistory(_merkleTreeHeight) public {
    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;

  /**
    @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;

  /** @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(uint i = 0; i < _nullifierHashes.length; i++) {
      if (isSpent(_nullifierHashes[i])) {
        spent[i] = true;
      }
    }
  }
}

File 3 of 4 : MerkleTreeWithHistory.sol
// https://sherpa.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.5.17;

library Hasher {
  function MiMCSponge(uint256 in_xL, uint256 in_xR) public pure returns (uint256 xL, uint256 xR);
}

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

  uint32 public levels;

  // the following variables are made public for easier testing and debugging and
  // are not supposed to be accessed in regular code
  bytes32[] public filledSubtrees;
  bytes32[] public zeros;
  uint32 public currentRootIndex = 0;
  uint32 public nextIndex = 0;
  uint32 public constant ROOT_HISTORY_SIZE = 100;
  bytes32[ROOT_HISTORY_SIZE] public roots;

  constructor(uint32 _treeLevels) public {
    require(_treeLevels > 0, "_treeLevels should be greater than zero");
    require(_treeLevels < 32, "_treeLevels should be less than 32");
    levels = _treeLevels;

    bytes32 currentZero = bytes32(ZERO_VALUE);
    zeros.push(currentZero);
    filledSubtrees.push(currentZero);

    for (uint32 i = 1; i < levels; i++) {
      currentZero = hashLeftRight(currentZero, currentZero);
      zeros.push(currentZero);
      filledSubtrees.push(currentZero);
    }

    roots[0] = hashLeftRight(currentZero, currentZero);
  }

  /**
    @dev Hash 2 tree leaves, returns MiMC(_left, _right)
  */
  function hashLeftRight(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 currentIndex = nextIndex;
    require(currentIndex != uint32(2)**levels, "Merkle tree is full. No more leafs can be added");
    nextIndex += 1;
    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(left, right);

      currentIndex /= 2;
    }

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

  /**
    @dev Whether the root is present in the root history
  */
  function isKnownRoot(bytes32 _root) public view returns(bool) {
    if (_root == 0) {
      return false;
    }
    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 4 of 4 : ReentrancyGuard.sol
pragma solidity ^0.5.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].
 *
 * _Since v2.5.0:_ this module is now much more gas efficient, given net gas
 * metering changes introduced in the Istanbul hardfork.
 */
contract ReentrancyGuard {
    bool private _notEntered;

    constructor () internal {
        // Storing an initial 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 percetange 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.
        _notEntered = true;
    }

    /**
     * @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(_notEntered, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _notEntered = false;

        _;

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

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 99999
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {
    "contracts/MerkleTreeWithHistory.sol": {
      "Hasher": "0x11735d37f9f4833d6fc6c81634e24d5ce25afe1d"
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"contract IVerifier","name":"_verifier","type":"address"},{"internalType":"uint256","name":"_denomination","type":"uint256"},{"internalType":"uint32","name":"_merkleTreeHeight","type":"uint32"}],"payable":false,"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"},{"constant":true,"inputs":[],"name":"FIELD_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ROOT_HISTORY_SIZE","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ZERO_VALUE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"commitments","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentRootIndex","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"denomination","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_commitment","type":"bytes32"}],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"filledSubtrees","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getLastRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_left","type":"bytes32"},{"internalType":"bytes32","name":"_right","type":"bytes32"}],"name":"hashLeftRight","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"isKnownRoot","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_nullifierHash","type":"bytes32"}],"name":"isSpent","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32[]","name":"_nullifierHashes","type":"bytes32[]"}],"name":"isSpentArray","outputs":[{"internalType":"bool[]","name":"spent","type":"bool[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"levels","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextIndex","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"nullifierHashes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"roots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"verifier","outputs":[{"internalType":"contract IVerifier","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"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":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"zeros","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"}]

6080604052600380546001600160401b03191690553480156200002157600080fd5b5060405162001bbe38038062001bbe833981810160405260608110156200004757600080fd5b50805160208201516040909201519091908282828063ffffffff8116620000a05760405162461bcd60e51b815260040180806020018281038252602781526020018062001b356027913960400191505060405180910390fd5b60208163ffffffff1610620000e75760405162461bcd60e51b815260040180806020018281038252602281526020018062001b7c6022913960400191505060405180910390fd5b6000805463ffffffff191663ffffffff83161781556002805460018181019092557f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c60008051602062001af4833981519152909101819055815480830183559282905260008051602062001b9e8339815191529092018290555b60005463ffffffff9081169082161015620001d5576200018b82806001600160e01b036200026d16565b60028054600181810190925560008051602062001af48339815191520182905580548082018255600082905260008051602062001b9e833981519152018290559092500162000161565b50620001eb81806001600160e01b036200026d16565b60046000015550506068805460ff19166001179055816200023e5760405162461bcd60e51b815260040180806020018281038252602581526020018062001acf6025913960400191505060405180910390fd5b50606c80546001600160a01b0319166001600160a01b039390931692909217909155606955506200045a915050565b600060008051602062001b5c8339815191528310620002d3576040805162461bcd60e51b815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b60008051602062001b5c8339815191528210620003225760405162461bcd60e51b815260040180806020018281038252602181526020018062001b146021913960400191505060405180910390fd5b6040805163f47d33b560e01b8152600481018590526000602482018190528251869391927311735d37f9f4833d6fc6c81634e24d5ce25afe1d9263f47d33b592604480840193829003018186803b1580156200037d57600080fd5b505af415801562000392573d6000803e3d6000fd5b505050506040513d6040811015620003a957600080fd5b508051602090910151909250905060008051602062001b5c83398151915284830891507311735d37f9f4833d6fc6c81634e24d5ce25afe1d63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b1580156200042357600080fd5b505af415801562000438573d6000803e3d6000fd5b505050506040513d60408110156200044f57600080fd5b505195945050505050565b611665806200046a6000396000f3fe60806040526004361061015f5760003560e01c80639fa12d0b116100c0578063e5285dcc11610074578063ec73295911610059578063ec7329591461051f578063f178e47c14610534578063fc7e9c6f1461055e5761015f565b8063e5285dcc146104cb578063e8295588146104f55761015f565b8063ba70f757116100a5578063ba70f75714610477578063c2b40ae41461048c578063cd87a3b4146104b65761015f565b80639fa12d0b1461038d578063b214faa51461045a5761015f565b80634ecf518b11610117578063839df945116100fc578063839df945146103395780638bca6d161461036357806390eeb02b146103785761015f565b80634ecf518b146102e15780636d9833e31461030f5761015f565b80632b7ac3f3116101485780632b7ac3f31461024c57806338bf282e1461028a578063414a37ba146102cc5761015f565b806317cc915c1461016457806321a0adb6146101a2575b600080fd5b34801561017057600080fd5b5061018e6004803603602081101561018757600080fd5b5035610573565b604080519115158252519081900360200190f35b61024a600480360360e08110156101b857600080fd5b8101906020810181356401000000008111156101d357600080fd5b8201836020820111156101e557600080fd5b8035906020019184600183028401116401000000008311171561020757600080fd5b919350915080359060208101359073ffffffffffffffffffffffffffffffffffffffff604082013581169160608101359091169060808101359060a00135610588565b005b34801561025857600080fd5b506102616109eb565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561029657600080fd5b506102ba600480360360408110156102ad57600080fd5b5080359060200135610a07565b60408051918252519081900360200190f35b3480156102d857600080fd5b506102ba610c6b565b3480156102ed57600080fd5b506102f6610c8f565b6040805163ffffffff9092168252519081900360200190f35b34801561031b57600080fd5b5061018e6004803603602081101561033257600080fd5b5035610c9b565b34801561034557600080fd5b5061018e6004803603602081101561035c57600080fd5b5035610d2c565b34801561036f57600080fd5b506102ba610d41565b34801561038457600080fd5b506102f6610d47565b34801561039957600080fd5b5061040a600480360360208110156103b057600080fd5b8101906020810181356401000000008111156103cb57600080fd5b8201836020820111156103dd57600080fd5b803590602001918460208302840111640100000000831117156103ff57600080fd5b509092509050610d53565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561044657818101518382015260200161042e565b505050509050019250505060405180910390f35b61024a6004803603602081101561047057600080fd5b5035610ddb565b34801561048357600080fd5b506102ba610f96565b34801561049857600080fd5b506102ba600480360360208110156104af57600080fd5b5035610fb6565b3480156104c257600080fd5b506102f6610fca565b3480156104d757600080fd5b5061018e600480360360208110156104ee57600080fd5b5035610fcf565b34801561050157600080fd5b506102ba6004803603602081101561051857600080fd5b5035610fe4565b34801561052b57600080fd5b506102ba611002565b34801561054057600080fd5b506102ba6004803603602081101561055757600080fd5b5035611026565b34801561056a57600080fd5b506102f6611033565b606a6020526000908152604090205460ff1681565b60685460ff166105f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b606880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560695482111561069257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4665652065786365656473207472616e736665722076616c7565000000000000604482015290519081900360640190fd5b6000858152606a602052604090205460ff161561071057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f546865206e6f746520686173206265656e20616c7265616479207370656e7400604482015290519081900360640190fd5b61071986610c9b565b61078457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f43616e6e6f742066696e6420796f7572206d65726b6c6520726f6f7400000000604482015290519081900360640190fd5b606c546040805160c080820183528982526020820189905273ffffffffffffffffffffffffffffffffffffffff8881168385015287811660608401526080830187905260a0830186905292517f695ef6f9000000000000000000000000000000000000000000000000000000008152929093169263695ef6f9928c928c9290916004810191829160240190849080838360005b8381101561082f578181015183820152602001610817565b505050509050018281038252858582818152602001925080828437600081840152601f19601f820116905080830192505050945050505050602060405180830381600087803b15801561088157600080fd5b505af1158015610895573d6000803e3d6000fd5b505050506040513d60208110156108ab57600080fd5b505161091857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c69642077697468647261772070726f6f6600000000000000000000604482015290519081900360640190fd5b6000858152606a6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561095b84848484611047565b6040805173ffffffffffffffffffffffffffffffffffffffff8681168252602082018890528183018590529151918516917fe9e508bad6d4c3227e881ca19068f099da81b5164dd6d62b2eaf1e8bc6c349319181900360600190a25050606880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055505050505050565b606c5473ffffffffffffffffffffffffffffffffffffffff1681565b60007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018310610a9757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5f6c6566742073686f756c6420626520696e7369646520746865206669656c64604482015290519081900360640190fd5b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018210610b0f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061153e6021913960400191505060405180910390fd5b604080517ff47d33b5000000000000000000000000000000000000000000000000000000008152600481018590526000602482018190528251869391927311735d37f9f4833d6fc6c81634e24d5ce25afe1d9263f47d33b592604480840193829003018186803b158015610b8257600080fd5b505af4158015610b96573d6000803e3d6000fd5b505050506040513d6040811015610bac57600080fd5b50805160209091015190925090507f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000184830891507311735d37f9f4833d6fc6c81634e24d5ce25afe1d63f47d33b583836040518363ffffffff1660e01b81526004018083815260200182815260200192505050604080518083038186803b158015610c3657600080fd5b505af4158015610c4a573d6000803e3d6000fd5b505050506040513d6040811015610c6057600080fd5b505195945050505050565b7f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000181565b60005463ffffffff1681565b600081610caa57506000610d27565b60035463ffffffff165b60048163ffffffff1660648110610cc757fe5b0154831415610cda576001915050610d27565b63ffffffff8116610ce9575060645b6003547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9091019063ffffffff80831691161415610cb45760009150505b919050565b606b6020526000908152604090205460ff1681565b60695481565b60035463ffffffff1681565b604080518281526020808402820101909152606090828015610d7f578160200160208202803883390190505b50905060005b82811015610dd457610da8848483818110610d9c57fe5b90506020020135610fcf565b15610dcc576001828281518110610dbb57fe5b911515602092830291909101909101525b600101610d85565b5092915050565b60685460ff16610e4c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b606880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556000818152606b602052604090205460ff1615610edc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806115936021913960400191505060405180910390fd5b6000610ee782611276565b6000838152606b6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790559050610f2861147a565b6040805163ffffffff83168152426020820152815184927fa945e51eec50ab98c161376f0db4cf2aeba3ec92755fe2fcd388bdbbb80ff196928290030190a25050606880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60035460009060049063ffffffff1660648110610faf57fe5b0154905090565b60048160648110610fc357fe5b0154905081565b606481565b6000908152606a602052604090205460ff1690565b60028181548110610ff157fe5b600091825260209091200154905081565b7f2fe54c60d3acabf3343a35b6eba15db4821b340f76e741e2249685ed4899af6c81565b60018181548110610ff157fe5b600354640100000000900463ffffffff1681565b341561109e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260358152602001806115fc6035913960400191505060405180910390fd5b80156110f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603481526020018061155f6034913960400191505060405180910390fd5b60695460405160009173ffffffffffffffffffffffffffffffffffffffff87169190859003908381818185875af1925050503d8060008114611153576040519150601f19603f3d011682016040523d82523d6000602084013e611158565b606091505b50509050806111b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806115b46025913960400191505060405180910390fd5b821561126f5760405173ffffffffffffffffffffffffffffffffffffffff8516908490600081818185875af1925050503d806000811461120e576040519150601f19603f3d011682016040523d82523d6000602084013e611213565b606091505b5050809150508061126f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806115d96023913960400191505060405180910390fd5b5050505050565b60035460008054909163ffffffff640100000000909104811691811660020a168114156112ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806114d7602f913960400191505060405180910390fd5b6003805463ffffffff6401000000008083048216600101909116027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff90911617905582600080805b60005463ffffffff90811690821610156113de576001851661139a5783925060028163ffffffff168154811061136857fe5b906000526020600020015491508360018263ffffffff168154811061138957fe5b6000918252602090912001556113be565b60018163ffffffff16815481106113ad57fe5b906000526020600020015492508391505b6113c88383610a07565b9350600263ffffffff8616049450600101611336565b5060035460649063ffffffff90811660010116600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000169290910663ffffffff90811692909217908190558491600491166064811061143b57fe5b01555050600354640100000000900463ffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01949350505050565b60695434146114d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806115066038913960400191505060405180910390fd5b56fe4d65726b6c6520747265652069732066756c6c2e204e6f206d6f7265206c656166732063616e206265206164646564506c656173652073656e6420606d697844656e6f6d696e6174696f6e602045544820616c6f6e672077697468207472616e73616374696f6e5f72696768742073686f756c6420626520696e7369646520746865206669656c64526566756e642076616c756520697320737570706f73656420746f206265207a65726f20666f722045544820696e7374616e636554686520636f6d6d69746d656e7420686173206265656e207375626d69747465647061796d656e7420746f205f726563697069656e7420646964206e6f7420676f20746872757061796d656e7420746f205f72656c6179657220646964206e6f7420676f20746872754d6573736167652076616c756520697320737570706f73656420746f206265207a65726f20666f722045544820696e7374616e6365a265627a7a72315820ca2616b9498dffd41c69894465f848b2af3723dc7fdb9b530c2cd783b51e555864736f6c6343000511003264656e6f6d696e6174696f6e2073686f756c642062652067726561746572207468616e2030405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5f72696768742073686f756c6420626520696e7369646520746865206669656c645f747265654c6576656c732073686f756c642062652067726561746572207468616e207a65726f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000015f747265654c6576656c732073686f756c64206265206c657373207468616e203332b10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6000000000000000000000000fc0829e792b0d10df95b895d56fad4712da30b250000000000000000000000000000000000000000000000008ac7230489e800000000000000000000000000000000000000000000000000000000000000000014

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

000000000000000000000000fc0829e792b0d10df95b895d56fad4712da30b250000000000000000000000000000000000000000000000008ac7230489e800000000000000000000000000000000000000000000000000000000000000000014

-----Decoded View---------------
Arg [0] : _verifier (address): 0xfc0829e792b0d10df95b895d56fad4712da30b25
Arg [1] : _denomination (uint256): 10000000000000000000
Arg [2] : _merkleTreeHeight (uint32): 20

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000fc0829e792b0d10df95b895d56fad4712da30b25
Arg [1] : 0000000000000000000000000000000000000000000000008ac7230489e80000
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000014


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.