ETH Price: $2,532.94 (+3.76%)

Contract

0xBB25019498c3332424631dfCDC2AF4223df7cED1
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Round Root135524812021-11-04 21:02:531028 days ago1636059773IN
0xBB250194...23df7cED1
0 ETH0.00494518205.36480542
Purchase135519682021-11-04 19:06:191028 days ago1636052779IN
0xBB250194...23df7cED1
0.12 ETH0.04880453170.57903271
Purchase135497922021-11-04 10:53:091028 days ago1636023189IN
0xBB250194...23df7cED1
0.12 ETH0.03798259125.2463962
Purchase135482122021-11-04 4:54:591028 days ago1636001699IN
0xBB250194...23df7cED1
0.06 ETH0.0244695115.45380001
Purchase135479962021-11-04 4:05:521028 days ago1635998752IN
0xBB250194...23df7cED1
0.18 ETH0.0428223118.84982624
Purchase135476612021-11-04 2:44:471028 days ago1635993887IN
0xBB250194...23df7cED1
0.06 ETH0.03171318149.62013818
Purchase135468032021-11-03 23:20:531029 days ago1635981653IN
0xBB250194...23df7cED1
0.12 ETH0.03381663118.19081132
Purchase135467452021-11-03 23:08:371029 days ago1635980917IN
0xBB250194...23df7cED1
0.06 ETH0.02684941126.70076495
Purchase135466372021-11-03 22:45:551029 days ago1635979555IN
0xBB250194...23df7cED1
0.3 ETH0.07856865154.46901603
Purchase135466072021-11-03 22:39:241029 days ago1635979164IN
0xBB250194...23df7cED1
0.06 ETH0.03309922156.17702348
Purchase135465902021-11-03 22:35:581029 days ago1635978958IN
0xBB250194...23df7cED1
0.3 ETH0.09466411180.04818951
Purchase135465872021-11-03 22:34:501029 days ago1635978890IN
0xBB250194...23df7cED1
0.06 ETH0.03788129178.69546411
Purchase135465842021-11-03 22:33:591029 days ago1635978839IN
0xBB250194...23df7cED1
0.3 ETH0.08865499174.29984101
Purchase135465842021-11-03 22:33:591029 days ago1635978839IN
0xBB250194...23df7cED1
0.12 ETH0.05881068174.29984101
Set Round Root135464542021-11-03 22:05:381029 days ago1635977138IN
0xBB250194...23df7cED1
0 ETH0.00904098195
0x60a06040135464502021-11-03 22:05:051029 days ago1635977105IN
 Create: MerklePreSale1155
0 ETH0.194298195

Latest 13 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
135519682021-11-04 19:06:191028 days ago1636052779
0xBB250194...23df7cED1
0.12 ETH
135497922021-11-04 10:53:091028 days ago1636023189
0xBB250194...23df7cED1
0.12 ETH
135482122021-11-04 4:54:591028 days ago1636001699
0xBB250194...23df7cED1
0.06 ETH
135479962021-11-04 4:05:521028 days ago1635998752
0xBB250194...23df7cED1
0.18 ETH
135476612021-11-04 2:44:471028 days ago1635993887
0xBB250194...23df7cED1
0.06 ETH
135468032021-11-03 23:20:531029 days ago1635981653
0xBB250194...23df7cED1
0.12 ETH
135467452021-11-03 23:08:371029 days ago1635980917
0xBB250194...23df7cED1
0.06 ETH
135466372021-11-03 22:45:551029 days ago1635979555
0xBB250194...23df7cED1
0.3 ETH
135466072021-11-03 22:39:241029 days ago1635979164
0xBB250194...23df7cED1
0.06 ETH
135465902021-11-03 22:35:581029 days ago1635978958
0xBB250194...23df7cED1
0.3 ETH
135465872021-11-03 22:34:501029 days ago1635978890
0xBB250194...23df7cED1
0.06 ETH
135465842021-11-03 22:33:591029 days ago1635978839
0xBB250194...23df7cED1
0.3 ETH
135465842021-11-03 22:33:591029 days ago1635978839
0xBB250194...23df7cED1
0.12 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MerklePreSale1155

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 6 : MerklePreSale1155.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.7.6;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IMerklePreSale.sol";
import "./ISuper1155.sol";

contract MerklePreSale1155 is IMerklePreSale, Ownable {
    using SafeMath for uint256;

    address public immutable override token;

    address payable public receiver;

    uint256 public price;

    uint256 public purchaseLimit;

    //bytes32 public immutable override merkleRoot;
    mapping ( uint256 => bytes32 ) public merkleRoots;

    // This is a packed array of booleans.
    mapping( uint256 => mapping( uint256 => uint256) ) private purchasedBitMap;

    constructor( address _token, address payable _receiver, uint256 _price, uint256 _purchaseLimit) {
        token = _token;
        receiver = _receiver;
        price = _price;
        purchaseLimit = _purchaseLimit;
     }

    function setRoundRoot(uint256 groupId, bytes32 merkleRoot) external onlyOwner {
      merkleRoots[groupId] = merkleRoot;
    }

    function updateReceiver(address payable _receiver) external onlyOwner {
      receiver = _receiver;
    }

    function updatePrice(uint256 _price) external onlyOwner {
      price = _price;
    }

    function updatePurchaseLimit(uint256 _purchaseLimit) external onlyOwner {
      purchaseLimit = _purchaseLimit;
    }

    function isPurchased( uint256 groupId, uint256 index ) public view override returns ( bool ) {
        uint256 purchasedWordIndex = index / 256;
        uint256 purchasedBitIndex = index % 256;
        uint256 purchasedWord = purchasedBitMap[groupId][purchasedWordIndex];
        uint256 mask = ( 1 << purchasedBitIndex );
        return purchasedWord & mask == mask;
    }

    function _setPurchased( uint256 groupId, uint256 index ) private {
        uint256 purchasedWordIndex = index / 256;
        uint256 purchasedBitIndex = index % 256;
        purchasedBitMap[groupId][purchasedWordIndex] = purchasedBitMap[groupId][purchasedWordIndex] | ( 1 << purchasedBitIndex );
    }

    function purchase( uint256 groupId, uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof ) public payable override {
        require( !isPurchased( groupId, index ), 'MerklePreSale: Drop already purchased.' );
        require( amount <= purchaseLimit, 'MerklePreSale: Buy fewer items');
        uint256 totalCost = amount.mul(price);
        require( msg.value >= totalCost, 'MerklePreSale: Send more eth');
        // Verify the merkle proof.
        bytes32 node = keccak256(abi.encodePacked(index, account, uint(1)));
        uint256 path = index;
        for (uint16 i = 0; i < merkleProof.length; i++) {
            if ((path & 0x01) == 1) {
                node = keccak256(abi.encodePacked(merkleProof[i], node));
            } else {
                node = keccak256(abi.encodePacked(node, merkleProof[i]));
            }
            path /= 2;
        }

        // Check the merkle proof
        require(node == merkleRoots[groupId], 'MerklePreSale: Invalid proof.' );
        // Mark it purchased and send the token.
        _setPurchased(  groupId, index );

        uint256 newTokenIdBase = groupId << 128;
        uint256 currentMintCount = ISuper1155( token ).groupMintCount(groupId);

        uint256[] memory ids = new uint256[](amount);
        uint256[] memory amounts = new uint[](amount);
        for(uint256 i = 0; i < amount; i++) {
          ids[i] = newTokenIdBase.add(currentMintCount).add(i).add(1);
          amounts[i] = uint256(1);
        }
        (bool paymentSuccess, ) = receiver.call{ value: msg.value }("");
        require( paymentSuccess, 'MerklePreSale: payment failure');

        ISuper1155( token ).mintBatch( account, ids, amounts, "" );
        emit Purchased( index, account, amount );
    }
}

File 2 of 6 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 3 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../utils/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 4 of 6 : IMerklePreSale.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.5.0;

// Allows anyone to purchase a token if they exist in a merkle root.
interface IMerklePreSale {
    // Returns the address of the token distributed by this contract.
    function token() external view returns (address);
    // Returns true if the index has been marked purchased.
    function isPurchased(uint256 groupId, uint256 index) external view returns (bool);
    // Claim the given amount of the token to the given address. Reverts if the inputs are invalid.
    function purchase(uint256 groupId, uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external payable;

    // This event is triggered whenever a call to #purchase succeeds.
    event Purchased(uint256 index, address account, uint256 amount);
}

File 5 of 6 : ISuper1155.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.7.6;

interface ISuper1155 {
  function BURN (  ) external view returns ( bytes32 );
  function CONFIGURE_GROUP (  ) external view returns ( bytes32 );
  function LOCK_CREATION (  ) external view returns ( bytes32 );
  function LOCK_ITEM_URI (  ) external view returns ( bytes32 );
  function LOCK_URI (  ) external view returns ( bytes32 );
  function MANAGER (  ) external view returns ( bytes32 );
  function MINT (  ) external view returns ( bytes32 );
  function SET_METADATA (  ) external view returns ( bytes32 );
  function SET_PROXY_REGISTRY (  ) external view returns ( bytes32 );
  function SET_URI (  ) external view returns ( bytes32 );
  function UNIVERSAL (  ) external view returns ( bytes32 );
  function ZERO_RIGHT (  ) external view returns ( bytes32 );

  function balanceOf ( address _owner, uint256 _id ) external view returns ( uint256 );
  function balanceOfBatch ( address[] memory _owners, uint256[] memory _ids ) external view returns ( uint256[] memory );
  function burn ( address _burner, uint256 _id, uint256 _amount ) external;
  function burnBatch ( address _burner, uint256[] memory _ids, uint256[] memory _amounts ) external;
  function burnCount ( uint256 ) external view returns ( uint256 );
  function circulatingSupply ( uint256 ) external view returns ( uint256 );
  function configureGroup ( uint256 _groupId, bytes calldata _data ) external;
  function groupBalances ( uint256, address ) external view returns ( uint256 );
  function groupMintCount ( uint256 ) external view returns ( uint256 );
  function hasRightUntil ( address _address, bytes32 _circumstance, bytes32 _right ) external view returns ( uint256 );
  function isApprovedForAll ( address _owner, address _operator ) external view returns ( bool );
  function itemGroups ( uint256 ) external view returns ( bool initialized, string memory _name, uint8 supplyType, uint256 supplyData, uint8 itemType, uint256 itemData, uint8 burnType, uint256 burnData, uint256 _circulatingSupply, uint256 _mintCount, uint256 _burnCount );
  function lock (  ) external;
  function lockURI ( string memory _uri, uint256 _id ) external;
  function lockURI ( string memory _uri ) external;
  function locked (  ) external view returns ( bool );
  function managerRight ( bytes32 ) external view returns ( bytes32 );
  function metadata ( uint256 ) external view returns ( string memory );
  function metadataFrozen ( uint256 ) external view returns ( bool );
  function metadataUri (  ) external view returns ( string memory );
  function mintBatch ( address _recipient, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data ) external;
  function mintCount ( uint256 ) external view returns ( uint256 );
  function name (  ) external view returns ( string memory );
  function owner (  ) external view returns ( address );
  function permissions ( address, bytes32, bytes32 ) external view returns ( uint256 );
  function proxyRegistryAddress (  ) external view returns ( address );
  function renounceOwnership (  ) external;
  function safeBatchTransferFrom ( address _from, address _to, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data ) external;
  function safeTransferFrom ( address _from, address _to, uint256 _id, uint256 _amount, bytes memory _data ) external;
  function setApprovalForAll ( address _operator, bool _approved ) external;
  function setManagerRight ( bytes32 _managedRight, bytes32 _managerRight ) external;
  function setMetadata ( uint256 _id, string memory _metadata ) external;
  function setPermit ( address _address, bytes32 _circumstance, bytes32 _right, uint256 _expirationTime ) external;
  function setProxyRegistry ( address _proxyRegistryAddress ) external;
  function setURI ( string memory _uri ) external;
  function supportsInterface ( bytes4 interfaceId ) external view returns ( bool );
  function totalBalances ( address ) external view returns ( uint256 );
  function transferOwnership ( address newOwner ) external;
  function uri ( uint256 ) external view returns ( string memory );
  function uriLocked (  ) external view returns ( bool );
  function version (  ) external view returns ( uint256 );
}

File 6 of 6 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address payable","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_purchaseLimit","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Purchased","type":"event"},{"inputs":[{"internalType":"uint256","name":"groupId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"isPurchased","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"merkleRoots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"groupId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"purchase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"purchaseLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"receiver","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"groupId","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"setRoundRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"updatePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_purchaseLimit","type":"uint256"}],"name":"updatePurchaseLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_receiver","type":"address"}],"name":"updateReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405234801561001057600080fd5b506040516110653803806110658339818101604052608081101561003357600080fd5b508051602082015160408301516060909301519192909160006100546100dd565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060609390931b6001600160601b031916608052600180546001600160a01b0319166001600160a01b0393909316929092179091556002556003556100e1565b3390565b60805160601c610f5d6101086000398061060252806108245280610d885250610f5d6000f3fe6080604052600436106100dd5760003560e01c80637ba2196a1161007f578063a035b1fe11610059578063a035b1fe14610307578063f2fde38b1461031c578063f7260d3e1461034f578063fc0c546a14610364576100dd565b80637ba2196a146102795780638d6cc56d146102ac5780638da5cb5b146102d6576100dd565b806333d5c199116100bb57806333d5c199146101c65780635bf6fc701461020a578063715018a61461023a57806371c5ecb11461024f576100dd565b80630d29fe0a146100e257806318886657146101755780632f0f63411461019c575b600080fd5b610173600480360360a08110156100f857600080fd5b8135916020810135916001600160a01b036040830135169160608101359181019060a08101608082013564010000000081111561013457600080fd5b82018360208201111561014657600080fd5b8035906020019184602083028401116401000000008311171561016857600080fd5b509092509050610379565b005b34801561018157600080fd5b5061018a6109a6565b60408051918252519081900360200190f35b3480156101a857600080fd5b50610173600480360360208110156101bf57600080fd5b50356109ac565b3480156101d257600080fd5b506101f6600480360360408110156101e957600080fd5b5080359060200135610a13565b604080519115158252519081900360200190f35b34801561021657600080fd5b506101736004803603604081101561022d57600080fd5b5080359060200135610a43565b34801561024657600080fd5b50610173610ab7565b34801561025b57600080fd5b5061018a6004803603602081101561027257600080fd5b5035610b63565b34801561028557600080fd5b506101736004803603602081101561029c57600080fd5b50356001600160a01b0316610b75565b3480156102b857600080fd5b50610173600480360360208110156102cf57600080fd5b5035610bf9565b3480156102e257600080fd5b506102eb610c60565b604080516001600160a01b039092168252519081900360200190f35b34801561031357600080fd5b5061018a610c6f565b34801561032857600080fd5b506101736004803603602081101561033f57600080fd5b50356001600160a01b0316610c75565b34801561035b57600080fd5b506102eb610d77565b34801561037057600080fd5b506102eb610d86565b6103838686610a13565b156103bf5760405162461bcd60e51b8152600401808060200182810382526026815260200180610e9b6026913960400191505060405180910390fd5b600354831115610416576040805162461bcd60e51b815260206004820152601e60248201527f4d65726b6c6550726553616c653a20427579206665776572206974656d730000604482015290519081900360640190fd5b600061042d60025485610daa90919063ffffffff16565b905080341015610484576040805162461bcd60e51b815260206004820152601c60248201527f4d65726b6c6550726553616c653a2053656e64206d6f72652065746800000000604482015290519081900360640190fd5b6040805160208082018990526bffffffffffffffffffffffff19606089901b1682840152600160548084019190915283518084039091018152607490920190925280519101208660005b61ffff81168511156105885781600116600114156105325785858261ffff168181106104f657fe5b9050602002013583604051602001808381526020018281526020019250505060405160208183030381529060405280519060200120925061057a565b8286868361ffff1681811061054357fe5b9050602002013560405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b6002820491506001016104ce565b5060008981526004602052604090205482146105eb576040805162461bcd60e51b815260206004820152601d60248201527f4d65726b6c6550726553616c653a20496e76616c69642070726f6f662e000000604482015290519081900360640190fd5b6105f58989610e0a565b600060808a901b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d7b1c0e28c6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561066457600080fd5b505afa158015610678573d6000803e3d6000fd5b505050506040513d602081101561068e57600080fd5b5051905060008867ffffffffffffffff811180156106ab57600080fd5b506040519080825280602002602001820160405280156106d5578160200160208202803683370190505b50905060008967ffffffffffffffff811180156106f157600080fd5b5060405190808252806020026020018201604052801561071b578160200160208202803683370190505b50905060005b8a81101561077957610740600161073a83818989610e3c565b90610e3c565b83828151811061074c57fe5b602002602001018181525050600182828151811061076657fe5b6020908102919091010152600101610721565b506001546040516000916001600160a01b03169034908381818185875af1925050503d80600081146107c7576040519150601f19603f3d011682016040523d82523d6000602084013e6107cc565b606091505b5050905080610822576040805162461bcd60e51b815260206004820152601e60248201527f4d65726b6c6550726553616c653a207061796d656e74206661696c7572650000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631f7fdffa8d85856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001806020018060200180602001848103845286818151815260200191508051906020019060200280838360005b838110156108ba5781810151838201526020016108a2565b50505050905001848103835285818151815260200191508051906020019060200280838360005b838110156108f95781810151838201526020016108e1565b505050509050018481038252600081526020019650505050505050600060405180830381600087803b15801561092e57600080fd5b505af1158015610942573d6000803e3d6000fd5b505050507ffd51b2c9f55c42d2b72ac683526519563be02fc0107f034ff430c05185ff1b668d8d8d60405180848152602001836001600160a01b03168152602001828152602001935050505060405180910390a15050505050505050505050505050565b60035481565b6109b4610e96565b6001600160a01b03166109c5610c60565b6001600160a01b031614610a0e576040805162461bcd60e51b81526020600482018190526024820152600080516020610f08833981519152604482015290519081900360640190fd5b600355565b600082815260056020908152604080832061010085048452909152902054600160ff83161b908116145b92915050565b610a4b610e96565b6001600160a01b0316610a5c610c60565b6001600160a01b031614610aa5576040805162461bcd60e51b81526020600482018190526024820152600080516020610f08833981519152604482015290519081900360640190fd5b60009182526004602052604090912055565b610abf610e96565b6001600160a01b0316610ad0610c60565b6001600160a01b031614610b19576040805162461bcd60e51b81526020600482018190526024820152600080516020610f08833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60046020526000908152604090205481565b610b7d610e96565b6001600160a01b0316610b8e610c60565b6001600160a01b031614610bd7576040805162461bcd60e51b81526020600482018190526024820152600080516020610f08833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b610c01610e96565b6001600160a01b0316610c12610c60565b6001600160a01b031614610c5b576040805162461bcd60e51b81526020600482018190526024820152600080516020610f08833981519152604482015290519081900360640190fd5b600255565b6000546001600160a01b031690565b60025481565b610c7d610e96565b6001600160a01b0316610c8e610c60565b6001600160a01b031614610cd7576040805162461bcd60e51b81526020600482018190526024820152600080516020610f08833981519152604482015290519081900360640190fd5b6001600160a01b038116610d1c5760405162461bcd60e51b8152600401808060200182810382526026815260200180610ec16026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b7f000000000000000000000000000000000000000000000000000000000000000081565b600082610db957506000610a3d565b82820282848281610dc657fe5b0414610e035760405162461bcd60e51b8152600401808060200182810382526021815260200180610ee76021913960400191505060405180910390fd5b9392505050565b6000918252600560209081526040808420610100840485529091529091208054600160ff9093169290921b9091179055565b600082820183811015610e03576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b339056fe4d65726b6c6550726553616c653a2044726f7020616c7265616479207075726368617365642e4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212205999dd809a72272e8a70ac118f453c28cab190a2116f3f1a159b067353d0aec164736f6c6343000706003300000000000000000000000032a834a7f2c2a1f2e74bf7815d243eb73374fb1d00000000000000000000000058449889f53b22e35d501dda2f20a05680ea40e300000000000000000000000000000000000000000000000000d529ae9e8600000000000000000000000000000000000000000000000000000000000000000005

Deployed Bytecode

0x6080604052600436106100dd5760003560e01c80637ba2196a1161007f578063a035b1fe11610059578063a035b1fe14610307578063f2fde38b1461031c578063f7260d3e1461034f578063fc0c546a14610364576100dd565b80637ba2196a146102795780638d6cc56d146102ac5780638da5cb5b146102d6576100dd565b806333d5c199116100bb57806333d5c199146101c65780635bf6fc701461020a578063715018a61461023a57806371c5ecb11461024f576100dd565b80630d29fe0a146100e257806318886657146101755780632f0f63411461019c575b600080fd5b610173600480360360a08110156100f857600080fd5b8135916020810135916001600160a01b036040830135169160608101359181019060a08101608082013564010000000081111561013457600080fd5b82018360208201111561014657600080fd5b8035906020019184602083028401116401000000008311171561016857600080fd5b509092509050610379565b005b34801561018157600080fd5b5061018a6109a6565b60408051918252519081900360200190f35b3480156101a857600080fd5b50610173600480360360208110156101bf57600080fd5b50356109ac565b3480156101d257600080fd5b506101f6600480360360408110156101e957600080fd5b5080359060200135610a13565b604080519115158252519081900360200190f35b34801561021657600080fd5b506101736004803603604081101561022d57600080fd5b5080359060200135610a43565b34801561024657600080fd5b50610173610ab7565b34801561025b57600080fd5b5061018a6004803603602081101561027257600080fd5b5035610b63565b34801561028557600080fd5b506101736004803603602081101561029c57600080fd5b50356001600160a01b0316610b75565b3480156102b857600080fd5b50610173600480360360208110156102cf57600080fd5b5035610bf9565b3480156102e257600080fd5b506102eb610c60565b604080516001600160a01b039092168252519081900360200190f35b34801561031357600080fd5b5061018a610c6f565b34801561032857600080fd5b506101736004803603602081101561033f57600080fd5b50356001600160a01b0316610c75565b34801561035b57600080fd5b506102eb610d77565b34801561037057600080fd5b506102eb610d86565b6103838686610a13565b156103bf5760405162461bcd60e51b8152600401808060200182810382526026815260200180610e9b6026913960400191505060405180910390fd5b600354831115610416576040805162461bcd60e51b815260206004820152601e60248201527f4d65726b6c6550726553616c653a20427579206665776572206974656d730000604482015290519081900360640190fd5b600061042d60025485610daa90919063ffffffff16565b905080341015610484576040805162461bcd60e51b815260206004820152601c60248201527f4d65726b6c6550726553616c653a2053656e64206d6f72652065746800000000604482015290519081900360640190fd5b6040805160208082018990526bffffffffffffffffffffffff19606089901b1682840152600160548084019190915283518084039091018152607490920190925280519101208660005b61ffff81168511156105885781600116600114156105325785858261ffff168181106104f657fe5b9050602002013583604051602001808381526020018281526020019250505060405160208183030381529060405280519060200120925061057a565b8286868361ffff1681811061054357fe5b9050602002013560405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b6002820491506001016104ce565b5060008981526004602052604090205482146105eb576040805162461bcd60e51b815260206004820152601d60248201527f4d65726b6c6550726553616c653a20496e76616c69642070726f6f662e000000604482015290519081900360640190fd5b6105f58989610e0a565b600060808a901b905060007f00000000000000000000000032a834a7f2c2a1f2e74bf7815d243eb73374fb1d6001600160a01b031663d7b1c0e28c6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561066457600080fd5b505afa158015610678573d6000803e3d6000fd5b505050506040513d602081101561068e57600080fd5b5051905060008867ffffffffffffffff811180156106ab57600080fd5b506040519080825280602002602001820160405280156106d5578160200160208202803683370190505b50905060008967ffffffffffffffff811180156106f157600080fd5b5060405190808252806020026020018201604052801561071b578160200160208202803683370190505b50905060005b8a81101561077957610740600161073a83818989610e3c565b90610e3c565b83828151811061074c57fe5b602002602001018181525050600182828151811061076657fe5b6020908102919091010152600101610721565b506001546040516000916001600160a01b03169034908381818185875af1925050503d80600081146107c7576040519150601f19603f3d011682016040523d82523d6000602084013e6107cc565b606091505b5050905080610822576040805162461bcd60e51b815260206004820152601e60248201527f4d65726b6c6550726553616c653a207061796d656e74206661696c7572650000604482015290519081900360640190fd5b7f00000000000000000000000032a834a7f2c2a1f2e74bf7815d243eb73374fb1d6001600160a01b0316631f7fdffa8d85856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001806020018060200180602001848103845286818151815260200191508051906020019060200280838360005b838110156108ba5781810151838201526020016108a2565b50505050905001848103835285818151815260200191508051906020019060200280838360005b838110156108f95781810151838201526020016108e1565b505050509050018481038252600081526020019650505050505050600060405180830381600087803b15801561092e57600080fd5b505af1158015610942573d6000803e3d6000fd5b505050507ffd51b2c9f55c42d2b72ac683526519563be02fc0107f034ff430c05185ff1b668d8d8d60405180848152602001836001600160a01b03168152602001828152602001935050505060405180910390a15050505050505050505050505050565b60035481565b6109b4610e96565b6001600160a01b03166109c5610c60565b6001600160a01b031614610a0e576040805162461bcd60e51b81526020600482018190526024820152600080516020610f08833981519152604482015290519081900360640190fd5b600355565b600082815260056020908152604080832061010085048452909152902054600160ff83161b908116145b92915050565b610a4b610e96565b6001600160a01b0316610a5c610c60565b6001600160a01b031614610aa5576040805162461bcd60e51b81526020600482018190526024820152600080516020610f08833981519152604482015290519081900360640190fd5b60009182526004602052604090912055565b610abf610e96565b6001600160a01b0316610ad0610c60565b6001600160a01b031614610b19576040805162461bcd60e51b81526020600482018190526024820152600080516020610f08833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60046020526000908152604090205481565b610b7d610e96565b6001600160a01b0316610b8e610c60565b6001600160a01b031614610bd7576040805162461bcd60e51b81526020600482018190526024820152600080516020610f08833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b610c01610e96565b6001600160a01b0316610c12610c60565b6001600160a01b031614610c5b576040805162461bcd60e51b81526020600482018190526024820152600080516020610f08833981519152604482015290519081900360640190fd5b600255565b6000546001600160a01b031690565b60025481565b610c7d610e96565b6001600160a01b0316610c8e610c60565b6001600160a01b031614610cd7576040805162461bcd60e51b81526020600482018190526024820152600080516020610f08833981519152604482015290519081900360640190fd5b6001600160a01b038116610d1c5760405162461bcd60e51b8152600401808060200182810382526026815260200180610ec16026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031681565b7f00000000000000000000000032a834a7f2c2a1f2e74bf7815d243eb73374fb1d81565b600082610db957506000610a3d565b82820282848281610dc657fe5b0414610e035760405162461bcd60e51b8152600401808060200182810382526021815260200180610ee76021913960400191505060405180910390fd5b9392505050565b6000918252600560209081526040808420610100840485529091529091208054600160ff9093169290921b9091179055565b600082820183811015610e03576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b339056fe4d65726b6c6550726553616c653a2044726f7020616c7265616479207075726368617365642e4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212205999dd809a72272e8a70ac118f453c28cab190a2116f3f1a159b067353d0aec164736f6c63430007060033

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

00000000000000000000000032a834a7f2c2a1f2e74bf7815d243eb73374fb1d00000000000000000000000058449889f53b22e35d501dda2f20a05680ea40e300000000000000000000000000000000000000000000000000d529ae9e8600000000000000000000000000000000000000000000000000000000000000000005

-----Decoded View---------------
Arg [0] : _token (address): 0x32A834A7f2c2a1F2e74Bf7815d243Eb73374fB1D
Arg [1] : _receiver (address): 0x58449889F53b22E35D501ddA2F20A05680eA40e3
Arg [2] : _price (uint256): 60000000000000000
Arg [3] : _purchaseLimit (uint256): 5

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000032a834a7f2c2a1f2e74bf7815d243eb73374fb1d
Arg [1] : 00000000000000000000000058449889f53b22e35d501dda2f20a05680ea40e3
Arg [2] : 00000000000000000000000000000000000000000000000000d529ae9e860000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000005


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.