ETH Price: $2,946.82 (-1.53%)
Gas: 49 Gwei

Contract

0xC4c4B17e8802855601C8f23bBFdA1fB9c2Ce5A97
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Withdraw171969602023-05-05 20:59:11293 days 10 hrs ago1683320351IN
0xC4c4B1...c2Ce5A97
0 ETH0.00606759146.8901769
Send Tokens And ...171052492023-04-22 23:47:47306 days 7 hrs ago1682207267IN
0xC4c4B1...c2Ce5A97
0 ETH0.9122010353.58851317
Send Tokens And ...171052412023-04-22 23:46:11306 days 7 hrs ago1682207171IN
0xC4c4B1...c2Ce5A97
0 ETH0.6203924951.24191218
Send Tokens And ...171050052023-04-22 22:58:23306 days 8 hrs ago1682204303IN
0xC4c4B1...c2Ce5A97
0 ETH0.9368493252.55483252
Send Tokens And ...171049942023-04-22 22:55:59306 days 8 hrs ago1682204159IN
0xC4c4B1...c2Ce5A97
0 ETH0.621232546.08521712
Send Tokens And ...171049782023-04-22 22:52:47306 days 8 hrs ago1682203967IN
0xC4c4B1...c2Ce5A97
0 ETH0.4091098947.91889251
Send Tokens And ...171049542023-04-22 22:47:59306 days 8 hrs ago1682203679IN
0xC4c4B1...c2Ce5A97
0 ETH0.6651808750.66297332
Send Tokens And ...171049352023-04-22 22:44:11306 days 8 hrs ago1682203451IN
0xC4c4B1...c2Ce5A97
0 ETH0.4430227142.48710744
Send Tokens And ...171049172023-04-22 22:40:23306 days 8 hrs ago1682203223IN
0xC4c4B1...c2Ce5A97
0 ETH0.3149016440.80847363
Send Tokens And ...171005182023-04-22 7:52:35306 days 23 hrs ago1682149955IN
0xC4c4B1...c2Ce5A97
0 ETH0.7289274930.53359438
Send Tokens And ...171004872023-04-22 7:46:23306 days 23 hrs ago1682149583IN
0xC4c4B1...c2Ce5A97
0 ETH0.4340308831.55320828
Send Tokens And ...171004702023-04-22 7:42:59306 days 23 hrs ago1682149379IN
0xC4c4B1...c2Ce5A97
0 ETH0.2127405729.66254459
Send Tokens And ...171003742023-04-22 7:23:47307 days 1 min ago1682148227IN
0xC4c4B1...c2Ce5A97
0 ETH0.3693682831.9003916
Send Tokens And ...171003412023-04-22 7:17:11307 days 7 mins ago1682147831IN
0xC4c4B1...c2Ce5A97
0 ETH0.006667332.72055672
Bid170978262023-04-21 22:50:11307 days 8 hrs ago1682117411IN
0xC4c4B1...c2Ce5A97
1 ETH0.0007688730
Send Tokens And ...170959942023-04-21 16:38:23307 days 14 hrs ago1682095103IN
0xC4c4B1...c2Ce5A97
0 ETH0.0505285533.68983628
Grant Role170959762023-04-21 16:34:47307 days 14 hrs ago1682094887IN
0xC4c4B1...c2Ce5A97
0 ETH0.001823935.47546622
Send Tokens And ...170959522023-04-21 16:29:59307 days 14 hrs ago1682094599IN
0xC4c4B1...c2Ce5A97
0 ETH0.0016915936.48191763
Grant Role170959412023-04-21 16:27:47307 days 14 hrs ago1682094467IN
0xC4c4B1...c2Ce5A97
0 ETH0.0019366837.66915581
Grant Role170959212023-04-21 16:23:47307 days 15 hrs ago1682094227IN
0xC4c4B1...c2Ce5A97
0 ETH0.001971238.34050792
Send Tokens And ...170959022023-04-21 16:19:59307 days 15 hrs ago1682093999IN
0xC4c4B1...c2Ce5A97
0 ETH0.0018877935.36055172
Grant Role170900222023-04-20 20:23:59308 days 11 hrs ago1682022239IN
0xC4c4B1...c2Ce5A97
0 ETH0.0039670377.74084512
Send Tokens170893552023-04-20 18:06:59308 days 13 hrs ago1682014019IN
0xC4c4B1...c2Ce5A97
0 ETH0.0143119963.38911712
Bid170888472023-04-20 16:21:35308 days 15 hrs ago1682007695IN
0xC4c4B1...c2Ce5A97
1.33 ETH0.0021625784.38004303
Withdraw170887522023-04-20 16:02:35308 days 15 hrs ago1682006555IN
0xC4c4B1...c2Ce5A97
0 ETH0.00473669113.81369966
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Txn Hash Block From To Value
171969602023-05-05 20:59:11293 days 10 hrs ago1683320351
0xC4c4B1...c2Ce5A97
0.1908 ETH
171052492023-04-22 23:47:47306 days 7 hrs ago1682207267
0xC4c4B1...c2Ce5A97
0.0736 ETH
171052412023-04-22 23:46:11306 days 7 hrs ago1682207171
0xC4c4B1...c2Ce5A97
0.1605 ETH
171052412023-04-22 23:46:11306 days 7 hrs ago1682207171
0xC4c4B1...c2Ce5A97
0.1333 ETH
171050052023-04-22 22:58:23306 days 8 hrs ago1682204303
0xC4c4B1...c2Ce5A97
0.1532 ETH
171050052023-04-22 22:58:23306 days 8 hrs ago1682204303
0xC4c4B1...c2Ce5A97
0.1532 ETH
171050052023-04-22 22:58:23306 days 8 hrs ago1682204303
0xC4c4B1...c2Ce5A97
0.0901 ETH
171050052023-04-22 22:58:23306 days 8 hrs ago1682204303
0xC4c4B1...c2Ce5A97
0.1339 ETH
171050052023-04-22 22:58:23306 days 8 hrs ago1682204303
0xC4c4B1...c2Ce5A97
0.1146 ETH
171049942023-04-22 22:55:59306 days 8 hrs ago1682204159
0xC4c4B1...c2Ce5A97
0.0304 ETH
171049942023-04-22 22:55:59306 days 8 hrs ago1682204159
0xC4c4B1...c2Ce5A97
0.0573 ETH
171049942023-04-22 22:55:59306 days 8 hrs ago1682204159
0xC4c4B1...c2Ce5A97
0.1456 ETH
171049942023-04-22 22:55:59306 days 8 hrs ago1682204159
0xC4c4B1...c2Ce5A97
0.1532 ETH
171049942023-04-22 22:55:59306 days 8 hrs ago1682204159
0xC4c4B1...c2Ce5A97
0.1532 ETH
171049782023-04-22 22:52:47306 days 8 hrs ago1682203967
0xC4c4B1...c2Ce5A97
0.0766 ETH
171049782023-04-22 22:52:47306 days 8 hrs ago1682203967
0xC4c4B1...c2Ce5A97
0.0766 ETH
171049782023-04-22 22:52:47306 days 8 hrs ago1682203967
0xC4c4B1...c2Ce5A97
0.0766 ETH
171049782023-04-22 22:52:47306 days 8 hrs ago1682203967
0xC4c4B1...c2Ce5A97
0.0966 ETH
171049782023-04-22 22:52:47306 days 8 hrs ago1682203967
0xC4c4B1...c2Ce5A97
0.0035 ETH
171049542023-04-22 22:47:59306 days 8 hrs ago1682203679
0xC4c4B1...c2Ce5A97
0.069 ETH
171049542023-04-22 22:47:59306 days 8 hrs ago1682203679
0xC4c4B1...c2Ce5A97
0.119 ETH
171049542023-04-22 22:47:59306 days 8 hrs ago1682203679
0xC4c4B1...c2Ce5A97
0.123 ETH
171049542023-04-22 22:47:59306 days 8 hrs ago1682203679
0xC4c4B1...c2Ce5A97
0.169 ETH
171049542023-04-22 22:47:59306 days 8 hrs ago1682203679
0xC4c4B1...c2Ce5A97
0.0959 ETH
171049542023-04-22 22:47:59306 days 8 hrs ago1682203679
0xC4c4B1...c2Ce5A97
0.0959 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BucketAuction

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 10 of 11 : BucketAuction.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "interfaces/IERC721Mintable.sol";

contract BucketAuction is ReentrancyGuard, AccessControl, Ownable {
    bytes32 public constant SUPPORT_ROLE = keccak256('SUPPORT');
    bytes32 public constant REFUND_ROLE = keccak256('REFUND');

    uint256 public minimumContribution = 0.1 ether;
    uint256 public maxSupply = 3000;

    string public provenance;
    string private _baseURIextended;

    // The block number when the auction end ends.
    uint256 public endTimestamp;

    // The block number when the auction starts.
    uint256 public startTimestamp;

    struct User {
        uint216 contribution; // cumulative sum of ETH bids
        uint32 tokensClaimed; // tracker for claimed tokens
        bool refundClaimed; // has user been refunded yet
    }
    mapping(address => User) public userData;

    uint256 public price;

    address payable public withdrawAddress;
    address payable public immutable erc721;
    uint256 public totalMinted;

    event Bid(address bidder, uint256 bidAmount, uint256 bidderTotal, uint256 bucketTotal);
    event NewMinimumContribution(uint256 minimumContributionInWei);
    event NewPrice(uint256 price);
    event TokensAndRefund(address to, uint256 refandValue, uint256 numNft);
    event NewStartAndEndTime(uint256 startTimestamp, uint256 endTimestamp);
    event NewMaxSupply(uint256 maxSupply);
    event NewWithdrawAddress(address withdrawAddress);

    constructor(address payable withdrawAddress_, address payable _erc721) {
        require(withdrawAddress_ != address(0));

        // set immutable variables
        withdrawAddress = withdrawAddress_;
        erc721 = _erc721;

        // set up roles
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setupRole(SUPPORT_ROLE, msg.sender);
    }

    modifier isAuctionActive() {
        require(block.timestamp >= startTimestamp && block.timestamp <= endTimestamp, "Auction has not started");
        _;
    }

    modifier isAuctionEnded() {
        require(block.timestamp > endTimestamp && endTimestamp != 0, "Auction has started");
        _;
    }

    /**
    * @notice place a bid in ETH or add to your existing bid. Calling this
    *   multiple times will increase your bid amount. All bids placed are final
    *   and cannot be reversed.
    */
    function bid() external payable isAuctionActive {
        User storage bidder = userData[msg.sender]; // get user's current bid total
        uint256 contribution_ = bidder.contribution; // bidder.contribution is uint216
        unchecked { // does not overflow
            contribution_ += msg.value;
        }
        require(contribution_ >= minimumContribution, "Lower than min bid amount");
        bidder.contribution = uint216(contribution_);
        emit Bid(msg.sender, msg.value, contribution_, address(this).balance);
    }

    
    /**
    * @notice set the minimum contribution required to place a bid
    * @dev set this price in wei, not eth!
    * @param minimumContributionInWei_ new price, set in wei
    */
    function setMinimumContribution(uint256 minimumContributionInWei_) external onlyRole(SUPPORT_ROLE) {
        minimumContribution = minimumContributionInWei_;
        emit NewMinimumContribution(minimumContribution);
    }

    /**
    * @notice set the clearing price after all bids have been placed.
    * @dev set this price in wei, not eth!
    * @param priceInWei_ new price, set in wei
    */
    function setPrice(uint256 priceInWei_) external onlyRole(SUPPORT_ROLE) isAuctionEnded {
        price = priceInWei_;
        emit NewPrice(priceInWei_);
    }

    /**
    * @dev handles all minting.
    * @param to address to mint tokens to.
    * @param numberOfTokens number of tokens to mint.
    */
    function _internalMint(address to, uint256 numberOfTokens) internal {
        uint256 ts = totalMinted; // ignore burn counter here
        require(ts + numberOfTokens <= maxSupply, 'Number would exceed max supply');
        totalMinted = totalMinted + numberOfTokens;
        IERC721Mintable(erc721).mintBucketSmurf(to, numberOfTokens);
    }

    /**
    * @dev handles multiple send tokens methods.
    * @param to address to send tokens to.
    * @param n number of tokens to send.
    */
    function _sendTokens(address to, uint256 n) internal {
        uint256 price_ = price; // storage to memory
        require(price_ != 0, "Price has not been set");

        User storage user = userData[to]; // get user data
        uint256 claimed_ = user.tokensClaimed; // user.tokensClaimed is uint32
        claimed_ += n; 
        
        require(
            claimed_ <= _amountPurchased(user.contribution, price_), 
            "Trying to send more than they purchased."
        );
        user.tokensClaimed = uint32(claimed_);
        _internalMint(to, n);
    }

    /**
    * @notice get the number of tokens purchased by an address, after the
    *   clearing price has been set.
    * @param a address to query.
    */
    function amountPurchased(address a) public view returns (uint256) {
        return userData[a].contribution / price;
    }

    /**
    * @dev use to get amountPurchased() for arbitrary contribution and price
    * @param _contribution theoretical bid contribution
    * @param _price theoretical clearing price
    */
    function _amountPurchased(uint256 _contribution, uint256 _price) 
        internal
        pure
        returns (uint256)
    {
        return _contribution / _price;
    }

    /**
    * @notice get the refund amount for an account, after the clearing price
    *   has been set.
    * @param a address to query.
    */
    function refundAmount(address a) public view returns (uint256) {
        return userData[a].contribution % price;
    }

    /**
    * @dev helper to get refundAmount() for arbitrary contribution and price 
    * @param _contribution theoretical bid contribution
    * @param _price theoretical clearing price
    */
    function _refundAmount(uint256 _contribution, uint256 _price) 
        internal
        pure
        returns (uint256)
    {
        return _contribution % _price;
    }

    // functions for project owner to pay to send tokens/refund

    /**
    * @notice mint tokens to an address.
    * @dev purchased amount for an address can be sent in multiple calls.
    *   Can only be called after clearing price has been set.
    * @param to address to send tokens to.
    * @param n number of tokens to send.
    */
    function sendTokens(address to, uint256 n) public onlyRole(REFUND_ROLE) {
        _sendTokens(to, n);
    }

    /**
    * @notice send all of an address's purchased tokens.
    * @dev if some tokens have already been sent, the remainder must be sent
    *   using sendTokens().
    * @param to address to send tokens to.
    */
    function sendAllTokens(address to) public onlyRole(REFUND_ROLE) {
        _sendTokens(to, amountPurchased(to));
    }

    /**
    * @notice send refund to an address. Refunds are unsuccessful bids or
    *   an address's remaining eth after all their tokens have been paid for.
    * @dev can only be called after the clearing price has been set.
    * @param to the address to refund.
    */
    function sendRefund(address to) public onlyRole(REFUND_ROLE) nonReentrant {
        uint256 price_ = price; // storage to memory
        require(price_ != 0, "Price has not been set");
        
        User storage user = userData[to]; // get user data
        require(!user.refundClaimed, "Address has already claimed their refund.");
        user.refundClaimed = true; 
        
        uint256 refundValue = _refundAmount(user.contribution, price_);
        (bool success, ) = to.call{value: refundValue}("");
        require(success, "Refund failed.");
    }

    /**
    * @notice send refunds to a batch of addresses.
    * @param addresses array of addresses to refund.
    */
    function sendRefundBatch(address[] calldata addresses) external onlyRole(REFUND_ROLE) {
        for (uint256 i; i < addresses.length; i++) {
            sendRefund(addresses[i]);
        }
    }

    /**
    * @notice send tokens to a batch of addresses.
    * @param addresses array of addresses to send tokens to.
    */
    function sendTokensBatch(address[] calldata addresses) external onlyRole(REFUND_ROLE) {
        for (uint256 i; i < addresses.length; i++) {
            _sendTokens(addresses[i], amountPurchased(addresses[i]));
        }
    }

    /**
    * @notice send refunds and tokens to an address.
    * @dev can only be called after the clearing price has been set.
    * @param to the address to refund.
    */
    function sendTokensAndRefund(address to) public onlyRole(REFUND_ROLE) nonReentrant {
        uint256 price_ = price;
        require(price_ != 0, "Price has not been set");

        User storage user = userData[to]; // get user data
        uint256 userContribution = user.contribution;

        // send refund
        require(!user.refundClaimed, "Already sent refunds to this address.");
        user.refundClaimed = true;
        uint256 refundValue = _refundAmount(userContribution, price_);
        (bool success, ) = to.call{value: refundValue}("");
        require(success, "Refund failed.");

        // send tokens
        uint256 n = _amountPurchased(userContribution, price_);
        if (n > 0) {
            require(user.tokensClaimed == 0, "Already sent tokens to this address.");
            user.tokensClaimed = uint32(n);
            _internalMint(to, n);
        }
        emit TokensAndRefund(to, refundValue, n);
    }

    /**
    * @notice send refunds and tokens to a batch of addresses.
    * @param addresses array of addresses to send tokens to.
    */
    function sendTokensAndRefundBatch(address[] calldata addresses) external onlyRole(REFUND_ROLE) {
        for (uint256 i; i < addresses.length; i++) {
            sendTokensAndRefund(addresses[i]);
        }
    }

    /**
    * @notice get refund amount for the users
    * @param addresses array of addresses to send tokens to.
    */
    function getRefundAmount(address[] calldata addresses) public view returns(uint256) {
        uint256 res = 0;
        for (uint256 i; i < addresses.length; i++) {
            User storage user = userData[addresses[i]]; // get user data
            uint256 userContribution = user.contribution;
            uint256 refundValue = _refundAmount(userContribution, price);
            res = res + refundValue;
        }
        return res;
    }

    /**
    * @notice get withdraw amount
    * @param addresses array of addresses with bids
    */
    function getWithdrawAmount(address[] calldata addresses) public view returns(uint256) {
        uint256 ref = getRefundAmount(addresses);
        return  address(this).balance - ref;
    }

    ////////////////
    // tokens
    ////////////////
    /**
     * @dev withdraw function for owner.
     */
    function withdraw() external onlyOwner {
        (bool success, ) = withdrawAddress.call{value: address(this).balance}("");
        require(success, "Transfer failed.");
    }

    /**
     * @dev withdraw function for owner.
     */
    function withdraw(uint256 amount) external onlyOwner {
        (bool success, ) = withdrawAddress.call{value: amount}("");
        require(success, "Transfer failed.");
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(AccessControl)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    /**
     * @notice It allows the admin to update start and end blocks
     * @dev This function is only callable by owner.
     * @param _startTimestamp: the new start timestamp
     * @param _hours: the duration in hours
     */
    function updateStartAndEndTimestamp(uint _startTimestamp, uint _hours) external onlyOwner {
        require(block.timestamp <= _startTimestamp || startTimestamp > 0, "New startBlock must be higher than current block");

        startTimestamp = _startTimestamp;
        uint256 _endTimestamp = _startTimestamp + _hours * 1 hours;
        endTimestamp = _endTimestamp;

        emit NewStartAndEndTime(_startTimestamp, _endTimestamp);
    }

    /**
     * @notice It sets the maximum supply limit
     * @dev This function is only callable by owner.
     * @param _maxSupply: the new max supply
     */
    function setMaxSupply(uint256 _maxSupply) external onlyOwner {
        // require(block.number < startBlock || _startBlock == 0, "Auction has started");
        maxSupply = _maxSupply;
        emit NewMaxSupply(_maxSupply);
    }

    /**
     * @notice It sets the withdraw address
     * @dev This function is only callable by owner.
     * @param _withdrawAddress: the new withdraw address
     */
    function setWithdrawAddress(address payable _withdrawAddress) external onlyOwner {
        // require(block.number < startBlock || _startBlock == 0, "Auction has started");
        withdrawAddress = _withdrawAddress;
        emit NewWithdrawAddress(_withdrawAddress);
    }
}

File 2 of 11 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 11 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 4 of 11 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 5 of 11 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^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() {
        _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 making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

File 6 of 11 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^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 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) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 7 of 11 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 8 of 11 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 9 of 11 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 10 of 11 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 11 of 11 : IERC721Mintable.sol
// SPDX-License-Identifier: MIT
// Creator: Vadim Fadeev
pragma solidity ^0.8.0;

interface IERC721Mintable {
    function mintBucketSmurf(address to, uint256 numberOfTokens) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address payable","name":"withdrawAddress_","type":"address"},{"internalType":"address payable","name":"_erc721","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"bidder","type":"address"},{"indexed":false,"internalType":"uint256","name":"bidAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bidderTotal","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bucketTotal","type":"uint256"}],"name":"Bid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxSupply","type":"uint256"}],"name":"NewMaxSupply","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minimumContributionInWei","type":"uint256"}],"name":"NewMinimumContribution","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"NewPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTimestamp","type":"uint256"}],"name":"NewStartAndEndTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"withdrawAddress","type":"address"}],"name":"NewWithdrawAddress","type":"event"},{"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":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"refandValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numNft","type":"uint256"}],"name":"TokensAndRefund","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REFUND_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUPPORT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"amountPurchased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"endTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc721","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"getRefundAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"getWithdrawAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumContribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"provenance","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"refundAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"sendAllTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"sendRefund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"sendRefundBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"n","type":"uint256"}],"name":"sendTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"sendTokensAndRefund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"sendTokensAndRefundBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"sendTokensBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minimumContributionInWei_","type":"uint256"}],"name":"setMinimumContribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"priceInWei_","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_withdrawAddress","type":"address"}],"name":"setWithdrawAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTimestamp","type":"uint256"},{"internalType":"uint256","name":"_hours","type":"uint256"}],"name":"updateStartAndEndTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userData","outputs":[{"internalType":"uint216","name":"contribution","type":"uint216"},{"internalType":"uint32","name":"tokensClaimed","type":"uint32"},{"internalType":"bool","name":"refundClaimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a060405267016345785d8a0000600355610bb86004553480156200002357600080fd5b5060405162002462380380620024628339810160408190526200004691620001d7565b60016000556200005633620000d0565b6001600160a01b0382166200006a57600080fd5b600b80546001600160a01b0319166001600160a01b038481169190911790915581166080526200009c60003362000122565b620000c87fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b3362000122565b50506200020f565b600280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200012e828262000132565b5050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166200012e5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b80516001600160a01b0381168114620001d257600080fd5b919050565b60008060408385031215620001eb57600080fd5b620001f683620001ba565b91506200020660208401620001ba565b90509250929050565b60805161223062000232600039600081816106b80152611c0201526122306000f3fe6080604052600436106102c65760003560e01c8063937e09b111610179578063c02bd9a5116100d6578063d5abeb011161008a578063e6fd48bc11610064578063e6fd48bc1461082c578063ece3bf7f14610842578063f2fde38b1461086257600080fd5b8063d5abeb01146107d6578063db422e0b146107ec578063dba3e7041461080c57600080fd5b8063cae4d676116100bb578063cae4d67614610776578063cc356c5914610796578063d547741f146107b657600080fd5b8063c02bd9a5146106da578063c8910913146106fa57600080fd5b8063a466cb1a1161012d578063a85adeab11610112578063a85adeab14610670578063acde5d2814610686578063bca6ce64146106a657600080fd5b8063a466cb1a14610630578063a718cd4e1461065057600080fd5b8063a035b1fe1161015e578063a035b1fe146105ef578063a217fddf14610605578063a2309ff81461061a57600080fd5b8063937e09b1146105a557806394b059ab146105bb57600080fd5b806336568abe116102275780636f8b44b0116101db5780638da5cb5b116101c05780638da5cb5b1461052157806391b7f5ed1461053f57806391d148541461055f57600080fd5b80636f8b44b0146104ec578063715018a61461050c57600080fd5b80633ccfd60b1161020c5780633ccfd60b146104835780635b91033614610498578063627c0906146104b857600080fd5b806336568abe146104435780633ab1a4941461046357600080fd5b80631581b6001161027e578063248a9ca311610263578063248a9ca3146103d25780632e1a7d4d146104035780632f2ff15d1461042357600080fd5b80631581b600146103925780631998aeef146103ca57600080fd5b806305ab421d116102af57806305ab421d1461032e578063074ba79d146103505780630f7309e81461037057600080fd5b8063019150a2146102cb57806301ffc9a7146102fe575b600080fd5b3480156102d757600080fd5b506102eb6102e6366004611e93565b610882565b6040519081526020015b60405180910390f35b34801561030a57600080fd5b5061031e610319366004611f08565b610923565b60405190151581526020016102f5565b34801561033a57600080fd5b5061034e610349366004611f47565b61092e565b005b34801561035c57600080fd5b506102eb61036b366004611f73565b610967565b34801561037c57600080fd5b50610385610997565b6040516102f59190611fb4565b34801561039e57600080fd5b50600b546103b2906001600160a01b031681565b6040516001600160a01b0390911681526020016102f5565b61034e610a25565b3480156103de57600080fd5b506102eb6103ed366004611fe7565b6000908152600160208190526040909120015490565b34801561040f57600080fd5b5061034e61041e366004611fe7565b610b77565b34801561042f57600080fd5b5061034e61043e366004612000565b610c19565b34801561044f57600080fd5b5061034e61045e366004612000565b610c3f565b34801561046f57600080fd5b5061034e61047e366004611f73565b610cc7565b34801561048f57600080fd5b5061034e610d31565b3480156104a457600080fd5b5061034e6104b3366004611e93565b610dd2565b3480156104c457600080fd5b506102eb7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e4881565b3480156104f857600080fd5b5061034e610507366004611fe7565b610e78565b34801561051857600080fd5b5061034e610eb5565b34801561052d57600080fd5b506002546001600160a01b03166103b2565b34801561054b57600080fd5b5061034e61055a366004611fe7565b610ec9565b34801561056b57600080fd5b5061031e61057a366004612000565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156105b157600080fd5b506102eb60035481565b3480156105c757600080fd5b506102eb7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b81565b3480156105fb57600080fd5b506102eb600a5481565b34801561061157600080fd5b506102eb600081565b34801561062657600080fd5b506102eb600c5481565b34801561063c57600080fd5b5061034e61064b366004611e93565b610f86565b34801561065c57600080fd5b5061034e61066b366004611e93565b610ff7565b34801561067c57600080fd5b506102eb60075481565b34801561069257600080fd5b506102eb6106a1366004611f73565b611068565b3480156106b257600080fd5b506103b27f000000000000000000000000000000000000000000000000000000000000000081565b3480156106e657600080fd5b5061034e6106f5366004611f73565b611098565b34801561070657600080fd5b5061074a610715366004611f73565b6009602052600090815260409020546001600160d81b03811690600160d81b810463ffffffff1690600160f81b900460ff1683565b604080516001600160d81b03909416845263ffffffff90921660208401521515908201526060016102f5565b34801561078257600080fd5b5061034e610791366004611f73565b6110cf565b3480156107a257600080fd5b5061034e6107b1366004612030565b6112ba565b3480156107c257600080fd5b5061034e6107d1366004612000565b6113a8565b3480156107e257600080fd5b506102eb60045481565b3480156107f857600080fd5b5061034e610807366004611f73565b6113ce565b34801561081857600080fd5b5061034e610827366004611fe7565b6116a7565b34801561083857600080fd5b506102eb60085481565b34801561084e57600080fd5b506102eb61085d366004611e93565b611706565b34801561086e57600080fd5b5061034e61087d366004611f73565b611727565b600080805b83811015610919576000600960008787858181106108a7576108a7612052565b90506020020160208101906108bc9190611f73565b6001600160a01b03168152602081019190915260400160009081208054600a549193506001600160d81b031691906108f59083906117b4565b9050610901818661207e565b9450505050808061091190612091565b915050610887565b5090505b92915050565b600061091d826117c7565b7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e48610958816117fc565b6109628383611806565b505050565b600a546001600160a01b038216600090815260096020526040812054909161091d916001600160d81b03166120c0565b600580546109a4906120d4565b80601f01602080910402602001604051908101604052809291908181526020018280546109d0906120d4565b8015610a1d5780601f106109f257610100808354040283529160200191610a1d565b820191906000526020600020905b815481529060010190602001808311610a0057829003601f168201915b505050505081565b6008544210158015610a3957506007544211155b610a8a5760405162461bcd60e51b815260206004820152601760248201527f41756374696f6e20686173206e6f74207374617274656400000000000000000060448201526064015b60405180910390fd5b33600090815260096020526040902080546003546001600160d81b03909116340190811015610afb5760405162461bcd60e51b815260206004820152601960248201527f4c6f776572207468616e206d696e2062696420616d6f756e74000000000000006044820152606401610a81565b81547fffffffffff000000000000000000000000000000000000000000000000000000166001600160d81b038216178255604080513381523460208201529081018290524760608201527f4dcc013473324698bfbe263facec4ea4b1bc43624236542deabec62c2122b305906080015b60405180910390a15050565b610b7f611945565b600b546040516000916001600160a01b03169083908381818185875af1925050503d8060008114610bcc576040519150601f19603f3d011682016040523d82523d6000602084013e610bd1565b606091505b5050905080610c155760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610a81565b5050565b60008281526001602081905260409091200154610c35816117fc565b610962838361199f565b6001600160a01b0381163314610cbd5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610a81565b610c158282611a26565b610ccf611945565b600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f29078d74804fa9696a0702065ea42798be4c4e2c4e9157c0f480d08d9d5500bf906020015b60405180910390a150565b610d39611945565b600b546040516000916001600160a01b03169047908381818185875af1925050503d8060008114610d86576040519150601f19603f3d011682016040523d82523d6000602084013e610d8b565b606091505b5050905080610dcf5760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610a81565b50565b7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e48610dfc816117fc565b60005b82811015610e7257610e60848483818110610e1c57610e1c612052565b9050602002016020810190610e319190611f73565b610e5b868685818110610e4657610e46612052565b905060200201602081019061036b9190611f73565b611806565b80610e6a81612091565b915050610dff565b50505050565b610e80611945565b60048190556040518181527f870e95cc902be0a1f894ff08bb13ab98999fdb581790629f18dd80eb4da06cca90602001610d26565b610ebd611945565b610ec76000611aa9565b565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b610ef3816117fc565b60075442118015610f05575060075415155b610f515760405162461bcd60e51b815260206004820152601360248201527f41756374696f6e206861732073746172746564000000000000000000000000006044820152606401610a81565b600a8290556040518281527f270b316b51ab2cf3a3bb8ca4d22e76a327d05e762fcaa8bd6afaf8cfde9270b790602001610b6b565b7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e48610fb0816117fc565b60005b82811015610e7257610fe5848483818110610fd057610fd0612052565b90506020020160208101906108079190611f73565b80610fef81612091565b915050610fb3565b7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e48611021816117fc565b60005b82811015610e725761105684848381811061104157611041612052565b90506020020160208101906107919190611f73565b8061106081612091565b915050611024565b600a546001600160a01b038216600090815260096020526040812054909161091d916001600160d81b031661210e565b7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e486110c2816117fc565b610c1582610e5b84610967565b7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e486110f9816117fc565b611101611b08565b600a5460008190036111555760405162461bcd60e51b815260206004820152601660248201527f507269636520686173206e6f74206265656e20736574000000000000000000006044820152606401610a81565b6001600160a01b03831660009081526009602052604090208054600160f81b900460ff16156111ec5760405162461bcd60e51b815260206004820152602960248201527f416464726573732068617320616c726561647920636c61696d6564207468656960448201527f7220726566756e642e00000000000000000000000000000000000000000000006064820152608401610a81565b80546001600160f81b038116600160f81b178255600090611216906001600160d81b0316846117b4565b90506000856001600160a01b03168260405160006040518083038185875af1925050503d8060008114611265576040519150601f19603f3d011682016040523d82523d6000602084013e61126a565b606091505b50509050806112ac5760405162461bcd60e51b815260206004820152600e60248201526d2932b33ab732103330b4b632b21760911b6044820152606401610a81565b50505050610c156001600055565b6112c2611945565b81421115806112d357506000600854115b6113455760405162461bcd60e51b815260206004820152603060248201527f4e6577207374617274426c6f636b206d7573742062652068696768657220746860448201527f616e2063757272656e7420626c6f636b000000000000000000000000000000006064820152608401610a81565b6008829055600061135882610e10612122565b611362908461207e565b600781905560408051858152602081018390529192507f5c01b94b69064839ba94f62882648b1559d3fac369986faa600b021e93196782910160405180910390a1505050565b600082815260016020819052604090912001546113c4816117fc565b6109628383611a26565b7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e486113f8816117fc565b611400611b08565b600a5460008190036114545760405162461bcd60e51b815260206004820152601660248201527f507269636520686173206e6f74206265656e20736574000000000000000000006044820152606401610a81565b6001600160a01b038316600090815260096020526040902080546001600160d81b03811690600160f81b900460ff16156114f65760405162461bcd60e51b815260206004820152602560248201527f416c72656164792073656e7420726566756e647320746f20746869732061646460448201527f726573732e0000000000000000000000000000000000000000000000000000006064820152608401610a81565b81546001600160f81b0316600160f81b178255600061151582856117b4565b90506000866001600160a01b03168260405160006040518083038185875af1925050503d8060008114611564576040519150601f19603f3d011682016040523d82523d6000602084013e611569565b606091505b50509050806115ab5760405162461bcd60e51b815260206004820152600e60248201526d2932b33ab732103330b4b632b21760911b6044820152606401610a81565b60006115b78487611b61565b9050801561164d578454600160d81b900463ffffffff16156116275760405162461bcd60e51b8152602060048201526024808201527f416c72656164792073656e7420746f6b656e7320746f2074686973206164647260448201526332b9b99760e11b6064820152608401610a81565b845463ffffffff60d81b1916600160d81b63ffffffff83160217855561164d8882611b6d565b604080516001600160a01b038a168152602081018590529081018290527f254cdeab69e9e4a5f3c95f57dfe7b96959b4d53b895bdbc4d24a5f3ddd70d9549060600160405180910390a1505050505050610c156001600055565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b6116d1816117fc565b60038290556040518281527fed7f407058dfae72c51bb6dba9e1a1a618e159f4528facceaeca03e64a27816e90602001610b6b565b6000806117138484610882565b905061171f8147612139565b949350505050565b61172f611945565b6001600160a01b0381166117ab5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a81565b610dcf81611aa9565b60006117c0828461210e565b9392505050565b60006001600160e01b03198216637965db0b60e01b148061091d57506301ffc9a760e01b6001600160e01b031983161461091d565b610dcf8133611c63565b600a54600081900361185a5760405162461bcd60e51b815260206004820152601660248201527f507269636520686173206e6f74206265656e20736574000000000000000000006044820152606401610a81565b6001600160a01b03831660009081526009602052604090208054600160d81b900463ffffffff1661188b848261207e565b82549091506118a3906001600160d81b031684611b61565b8111156119185760405162461bcd60e51b815260206004820152602860248201527f547279696e6720746f2073656e64206d6f7265207468616e207468657920707560448201527f726368617365642e0000000000000000000000000000000000000000000000006064820152608401610a81565b815463ffffffff60d81b1916600160d81b63ffffffff83160217825561193e8585611b6d565b5050505050565b6002546001600160a01b03163314610ec75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a81565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16610c155760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff1615610c155760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600280546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260005403611b5a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a81565b6002600055565b60006117c082846120c0565b600c54600454611b7d838361207e565b1115611bcb5760405162461bcd60e51b815260206004820152601e60248201527f4e756d62657220776f756c6420657863656564206d617820737570706c7900006044820152606401610a81565b81600c54611bd9919061207e565b600c55604051630d8f319360e21b81526001600160a01b038481166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063363cc64c90604401600060405180830381600087803b158015611c4657600080fd5b505af1158015611c5a573d6000803e3d6000fd5b50505050505050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16610c1557611c9681611cd8565b611ca1836020611cea565b604051602001611cb292919061214c565b60408051601f198184030181529082905262461bcd60e51b8252610a8191600401611fb4565b606061091d6001600160a01b03831660145b60606000611cf9836002612122565b611d0490600261207e565b67ffffffffffffffff811115611d1c57611d1c6121cd565b6040519080825280601f01601f191660200182016040528015611d46576020820181803683370190505b509050600360fc1b81600081518110611d6157611d61612052565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611d9057611d90612052565b60200101906001600160f81b031916908160001a9053506000611db4846002612122565b611dbf90600161207e565b90505b6001811115611e44577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611e0057611e00612052565b1a60f81b828281518110611e1657611e16612052565b60200101906001600160f81b031916908160001a90535060049490941c93611e3d816121e3565b9050611dc2565b5083156117c05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a81565b60008060208385031215611ea657600080fd5b823567ffffffffffffffff80821115611ebe57600080fd5b818501915085601f830112611ed257600080fd5b813581811115611ee157600080fd5b8660208260051b8501011115611ef657600080fd5b60209290920196919550909350505050565b600060208284031215611f1a57600080fd5b81356001600160e01b0319811681146117c057600080fd5b6001600160a01b0381168114610dcf57600080fd5b60008060408385031215611f5a57600080fd5b8235611f6581611f32565b946020939093013593505050565b600060208284031215611f8557600080fd5b81356117c081611f32565b60005b83811015611fab578181015183820152602001611f93565b50506000910152565b6020815260008251806020840152611fd3816040850160208701611f90565b601f01601f19169190910160400192915050565b600060208284031215611ff957600080fd5b5035919050565b6000806040838503121561201357600080fd5b82359150602083013561202581611f32565b809150509250929050565b6000806040838503121561204357600080fd5b50508035926020909101359150565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561091d5761091d612068565b6000600182016120a3576120a3612068565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826120cf576120cf6120aa565b500490565b600181811c908216806120e857607f821691505b60208210810361210857634e487b7160e01b600052602260045260246000fd5b50919050565b60008261211d5761211d6120aa565b500690565b808202811582820484141761091d5761091d612068565b8181038181111561091d5761091d612068565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612184816017850160208801611f90565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516121c1816028840160208801611f90565b01602801949350505050565b634e487b7160e01b600052604160045260246000fd5b6000816121f2576121f2612068565b50600019019056fea26469706673582212205db16d734c1d2d72a1b36f1e9e33453565dc884a7e58176d7940442ce825aedb64736f6c634300081100330000000000000000000000005b04bd4cf6ac8f976a1d578b7156206b781ca8610000000000000000000000009b7a60e76f59037d152adbbafa8c6db591b274ac

Deployed Bytecode

0x6080604052600436106102c65760003560e01c8063937e09b111610179578063c02bd9a5116100d6578063d5abeb011161008a578063e6fd48bc11610064578063e6fd48bc1461082c578063ece3bf7f14610842578063f2fde38b1461086257600080fd5b8063d5abeb01146107d6578063db422e0b146107ec578063dba3e7041461080c57600080fd5b8063cae4d676116100bb578063cae4d67614610776578063cc356c5914610796578063d547741f146107b657600080fd5b8063c02bd9a5146106da578063c8910913146106fa57600080fd5b8063a466cb1a1161012d578063a85adeab11610112578063a85adeab14610670578063acde5d2814610686578063bca6ce64146106a657600080fd5b8063a466cb1a14610630578063a718cd4e1461065057600080fd5b8063a035b1fe1161015e578063a035b1fe146105ef578063a217fddf14610605578063a2309ff81461061a57600080fd5b8063937e09b1146105a557806394b059ab146105bb57600080fd5b806336568abe116102275780636f8b44b0116101db5780638da5cb5b116101c05780638da5cb5b1461052157806391b7f5ed1461053f57806391d148541461055f57600080fd5b80636f8b44b0146104ec578063715018a61461050c57600080fd5b80633ccfd60b1161020c5780633ccfd60b146104835780635b91033614610498578063627c0906146104b857600080fd5b806336568abe146104435780633ab1a4941461046357600080fd5b80631581b6001161027e578063248a9ca311610263578063248a9ca3146103d25780632e1a7d4d146104035780632f2ff15d1461042357600080fd5b80631581b600146103925780631998aeef146103ca57600080fd5b806305ab421d116102af57806305ab421d1461032e578063074ba79d146103505780630f7309e81461037057600080fd5b8063019150a2146102cb57806301ffc9a7146102fe575b600080fd5b3480156102d757600080fd5b506102eb6102e6366004611e93565b610882565b6040519081526020015b60405180910390f35b34801561030a57600080fd5b5061031e610319366004611f08565b610923565b60405190151581526020016102f5565b34801561033a57600080fd5b5061034e610349366004611f47565b61092e565b005b34801561035c57600080fd5b506102eb61036b366004611f73565b610967565b34801561037c57600080fd5b50610385610997565b6040516102f59190611fb4565b34801561039e57600080fd5b50600b546103b2906001600160a01b031681565b6040516001600160a01b0390911681526020016102f5565b61034e610a25565b3480156103de57600080fd5b506102eb6103ed366004611fe7565b6000908152600160208190526040909120015490565b34801561040f57600080fd5b5061034e61041e366004611fe7565b610b77565b34801561042f57600080fd5b5061034e61043e366004612000565b610c19565b34801561044f57600080fd5b5061034e61045e366004612000565b610c3f565b34801561046f57600080fd5b5061034e61047e366004611f73565b610cc7565b34801561048f57600080fd5b5061034e610d31565b3480156104a457600080fd5b5061034e6104b3366004611e93565b610dd2565b3480156104c457600080fd5b506102eb7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e4881565b3480156104f857600080fd5b5061034e610507366004611fe7565b610e78565b34801561051857600080fd5b5061034e610eb5565b34801561052d57600080fd5b506002546001600160a01b03166103b2565b34801561054b57600080fd5b5061034e61055a366004611fe7565b610ec9565b34801561056b57600080fd5b5061031e61057a366004612000565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156105b157600080fd5b506102eb60035481565b3480156105c757600080fd5b506102eb7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b81565b3480156105fb57600080fd5b506102eb600a5481565b34801561061157600080fd5b506102eb600081565b34801561062657600080fd5b506102eb600c5481565b34801561063c57600080fd5b5061034e61064b366004611e93565b610f86565b34801561065c57600080fd5b5061034e61066b366004611e93565b610ff7565b34801561067c57600080fd5b506102eb60075481565b34801561069257600080fd5b506102eb6106a1366004611f73565b611068565b3480156106b257600080fd5b506103b27f0000000000000000000000009b7a60e76f59037d152adbbafa8c6db591b274ac81565b3480156106e657600080fd5b5061034e6106f5366004611f73565b611098565b34801561070657600080fd5b5061074a610715366004611f73565b6009602052600090815260409020546001600160d81b03811690600160d81b810463ffffffff1690600160f81b900460ff1683565b604080516001600160d81b03909416845263ffffffff90921660208401521515908201526060016102f5565b34801561078257600080fd5b5061034e610791366004611f73565b6110cf565b3480156107a257600080fd5b5061034e6107b1366004612030565b6112ba565b3480156107c257600080fd5b5061034e6107d1366004612000565b6113a8565b3480156107e257600080fd5b506102eb60045481565b3480156107f857600080fd5b5061034e610807366004611f73565b6113ce565b34801561081857600080fd5b5061034e610827366004611fe7565b6116a7565b34801561083857600080fd5b506102eb60085481565b34801561084e57600080fd5b506102eb61085d366004611e93565b611706565b34801561086e57600080fd5b5061034e61087d366004611f73565b611727565b600080805b83811015610919576000600960008787858181106108a7576108a7612052565b90506020020160208101906108bc9190611f73565b6001600160a01b03168152602081019190915260400160009081208054600a549193506001600160d81b031691906108f59083906117b4565b9050610901818661207e565b9450505050808061091190612091565b915050610887565b5090505b92915050565b600061091d826117c7565b7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e48610958816117fc565b6109628383611806565b505050565b600a546001600160a01b038216600090815260096020526040812054909161091d916001600160d81b03166120c0565b600580546109a4906120d4565b80601f01602080910402602001604051908101604052809291908181526020018280546109d0906120d4565b8015610a1d5780601f106109f257610100808354040283529160200191610a1d565b820191906000526020600020905b815481529060010190602001808311610a0057829003601f168201915b505050505081565b6008544210158015610a3957506007544211155b610a8a5760405162461bcd60e51b815260206004820152601760248201527f41756374696f6e20686173206e6f74207374617274656400000000000000000060448201526064015b60405180910390fd5b33600090815260096020526040902080546003546001600160d81b03909116340190811015610afb5760405162461bcd60e51b815260206004820152601960248201527f4c6f776572207468616e206d696e2062696420616d6f756e74000000000000006044820152606401610a81565b81547fffffffffff000000000000000000000000000000000000000000000000000000166001600160d81b038216178255604080513381523460208201529081018290524760608201527f4dcc013473324698bfbe263facec4ea4b1bc43624236542deabec62c2122b305906080015b60405180910390a15050565b610b7f611945565b600b546040516000916001600160a01b03169083908381818185875af1925050503d8060008114610bcc576040519150601f19603f3d011682016040523d82523d6000602084013e610bd1565b606091505b5050905080610c155760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610a81565b5050565b60008281526001602081905260409091200154610c35816117fc565b610962838361199f565b6001600160a01b0381163314610cbd5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610a81565b610c158282611a26565b610ccf611945565b600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f29078d74804fa9696a0702065ea42798be4c4e2c4e9157c0f480d08d9d5500bf906020015b60405180910390a150565b610d39611945565b600b546040516000916001600160a01b03169047908381818185875af1925050503d8060008114610d86576040519150601f19603f3d011682016040523d82523d6000602084013e610d8b565b606091505b5050905080610dcf5760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610a81565b50565b7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e48610dfc816117fc565b60005b82811015610e7257610e60848483818110610e1c57610e1c612052565b9050602002016020810190610e319190611f73565b610e5b868685818110610e4657610e46612052565b905060200201602081019061036b9190611f73565b611806565b80610e6a81612091565b915050610dff565b50505050565b610e80611945565b60048190556040518181527f870e95cc902be0a1f894ff08bb13ab98999fdb581790629f18dd80eb4da06cca90602001610d26565b610ebd611945565b610ec76000611aa9565b565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b610ef3816117fc565b60075442118015610f05575060075415155b610f515760405162461bcd60e51b815260206004820152601360248201527f41756374696f6e206861732073746172746564000000000000000000000000006044820152606401610a81565b600a8290556040518281527f270b316b51ab2cf3a3bb8ca4d22e76a327d05e762fcaa8bd6afaf8cfde9270b790602001610b6b565b7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e48610fb0816117fc565b60005b82811015610e7257610fe5848483818110610fd057610fd0612052565b90506020020160208101906108079190611f73565b80610fef81612091565b915050610fb3565b7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e48611021816117fc565b60005b82811015610e725761105684848381811061104157611041612052565b90506020020160208101906107919190611f73565b8061106081612091565b915050611024565b600a546001600160a01b038216600090815260096020526040812054909161091d916001600160d81b031661210e565b7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e486110c2816117fc565b610c1582610e5b84610967565b7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e486110f9816117fc565b611101611b08565b600a5460008190036111555760405162461bcd60e51b815260206004820152601660248201527f507269636520686173206e6f74206265656e20736574000000000000000000006044820152606401610a81565b6001600160a01b03831660009081526009602052604090208054600160f81b900460ff16156111ec5760405162461bcd60e51b815260206004820152602960248201527f416464726573732068617320616c726561647920636c61696d6564207468656960448201527f7220726566756e642e00000000000000000000000000000000000000000000006064820152608401610a81565b80546001600160f81b038116600160f81b178255600090611216906001600160d81b0316846117b4565b90506000856001600160a01b03168260405160006040518083038185875af1925050503d8060008114611265576040519150601f19603f3d011682016040523d82523d6000602084013e61126a565b606091505b50509050806112ac5760405162461bcd60e51b815260206004820152600e60248201526d2932b33ab732103330b4b632b21760911b6044820152606401610a81565b50505050610c156001600055565b6112c2611945565b81421115806112d357506000600854115b6113455760405162461bcd60e51b815260206004820152603060248201527f4e6577207374617274426c6f636b206d7573742062652068696768657220746860448201527f616e2063757272656e7420626c6f636b000000000000000000000000000000006064820152608401610a81565b6008829055600061135882610e10612122565b611362908461207e565b600781905560408051858152602081018390529192507f5c01b94b69064839ba94f62882648b1559d3fac369986faa600b021e93196782910160405180910390a1505050565b600082815260016020819052604090912001546113c4816117fc565b6109628383611a26565b7faa4e0f6cdcea7b211950e8a75e39146abfef1b33054a194490366571502a5e486113f8816117fc565b611400611b08565b600a5460008190036114545760405162461bcd60e51b815260206004820152601660248201527f507269636520686173206e6f74206265656e20736574000000000000000000006044820152606401610a81565b6001600160a01b038316600090815260096020526040902080546001600160d81b03811690600160f81b900460ff16156114f65760405162461bcd60e51b815260206004820152602560248201527f416c72656164792073656e7420726566756e647320746f20746869732061646460448201527f726573732e0000000000000000000000000000000000000000000000000000006064820152608401610a81565b81546001600160f81b0316600160f81b178255600061151582856117b4565b90506000866001600160a01b03168260405160006040518083038185875af1925050503d8060008114611564576040519150601f19603f3d011682016040523d82523d6000602084013e611569565b606091505b50509050806115ab5760405162461bcd60e51b815260206004820152600e60248201526d2932b33ab732103330b4b632b21760911b6044820152606401610a81565b60006115b78487611b61565b9050801561164d578454600160d81b900463ffffffff16156116275760405162461bcd60e51b8152602060048201526024808201527f416c72656164792073656e7420746f6b656e7320746f2074686973206164647260448201526332b9b99760e11b6064820152608401610a81565b845463ffffffff60d81b1916600160d81b63ffffffff83160217855561164d8882611b6d565b604080516001600160a01b038a168152602081018590529081018290527f254cdeab69e9e4a5f3c95f57dfe7b96959b4d53b895bdbc4d24a5f3ddd70d9549060600160405180910390a1505050505050610c156001600055565b7fd8acb51ff3d48f690a25887aaf234c4ae5a66ab9839243cd8e2b639cade0663b6116d1816117fc565b60038290556040518281527fed7f407058dfae72c51bb6dba9e1a1a618e159f4528facceaeca03e64a27816e90602001610b6b565b6000806117138484610882565b905061171f8147612139565b949350505050565b61172f611945565b6001600160a01b0381166117ab5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a81565b610dcf81611aa9565b60006117c0828461210e565b9392505050565b60006001600160e01b03198216637965db0b60e01b148061091d57506301ffc9a760e01b6001600160e01b031983161461091d565b610dcf8133611c63565b600a54600081900361185a5760405162461bcd60e51b815260206004820152601660248201527f507269636520686173206e6f74206265656e20736574000000000000000000006044820152606401610a81565b6001600160a01b03831660009081526009602052604090208054600160d81b900463ffffffff1661188b848261207e565b82549091506118a3906001600160d81b031684611b61565b8111156119185760405162461bcd60e51b815260206004820152602860248201527f547279696e6720746f2073656e64206d6f7265207468616e207468657920707560448201527f726368617365642e0000000000000000000000000000000000000000000000006064820152608401610a81565b815463ffffffff60d81b1916600160d81b63ffffffff83160217825561193e8585611b6d565b5050505050565b6002546001600160a01b03163314610ec75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a81565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16610c155760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff1615610c155760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600280546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600260005403611b5a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a81565b6002600055565b60006117c082846120c0565b600c54600454611b7d838361207e565b1115611bcb5760405162461bcd60e51b815260206004820152601e60248201527f4e756d62657220776f756c6420657863656564206d617820737570706c7900006044820152606401610a81565b81600c54611bd9919061207e565b600c55604051630d8f319360e21b81526001600160a01b038481166004830152602482018490527f0000000000000000000000009b7a60e76f59037d152adbbafa8c6db591b274ac169063363cc64c90604401600060405180830381600087803b158015611c4657600080fd5b505af1158015611c5a573d6000803e3d6000fd5b50505050505050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16610c1557611c9681611cd8565b611ca1836020611cea565b604051602001611cb292919061214c565b60408051601f198184030181529082905262461bcd60e51b8252610a8191600401611fb4565b606061091d6001600160a01b03831660145b60606000611cf9836002612122565b611d0490600261207e565b67ffffffffffffffff811115611d1c57611d1c6121cd565b6040519080825280601f01601f191660200182016040528015611d46576020820181803683370190505b509050600360fc1b81600081518110611d6157611d61612052565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611d9057611d90612052565b60200101906001600160f81b031916908160001a9053506000611db4846002612122565b611dbf90600161207e565b90505b6001811115611e44577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611e0057611e00612052565b1a60f81b828281518110611e1657611e16612052565b60200101906001600160f81b031916908160001a90535060049490941c93611e3d816121e3565b9050611dc2565b5083156117c05760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a81565b60008060208385031215611ea657600080fd5b823567ffffffffffffffff80821115611ebe57600080fd5b818501915085601f830112611ed257600080fd5b813581811115611ee157600080fd5b8660208260051b8501011115611ef657600080fd5b60209290920196919550909350505050565b600060208284031215611f1a57600080fd5b81356001600160e01b0319811681146117c057600080fd5b6001600160a01b0381168114610dcf57600080fd5b60008060408385031215611f5a57600080fd5b8235611f6581611f32565b946020939093013593505050565b600060208284031215611f8557600080fd5b81356117c081611f32565b60005b83811015611fab578181015183820152602001611f93565b50506000910152565b6020815260008251806020840152611fd3816040850160208701611f90565b601f01601f19169190910160400192915050565b600060208284031215611ff957600080fd5b5035919050565b6000806040838503121561201357600080fd5b82359150602083013561202581611f32565b809150509250929050565b6000806040838503121561204357600080fd5b50508035926020909101359150565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561091d5761091d612068565b6000600182016120a3576120a3612068565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826120cf576120cf6120aa565b500490565b600181811c908216806120e857607f821691505b60208210810361210857634e487b7160e01b600052602260045260246000fd5b50919050565b60008261211d5761211d6120aa565b500690565b808202811582820484141761091d5761091d612068565b8181038181111561091d5761091d612068565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612184816017850160208801611f90565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516121c1816028840160208801611f90565b01602801949350505050565b634e487b7160e01b600052604160045260246000fd5b6000816121f2576121f2612068565b50600019019056fea26469706673582212205db16d734c1d2d72a1b36f1e9e33453565dc884a7e58176d7940442ce825aedb64736f6c63430008110033

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

0000000000000000000000005b04bd4cf6ac8f976a1d578b7156206b781ca8610000000000000000000000009b7a60e76f59037d152adbbafa8c6db591b274ac

-----Decoded View---------------
Arg [0] : withdrawAddress_ (address): 0x5b04Bd4CF6ac8F976a1d578b7156206b781ca861
Arg [1] : _erc721 (address): 0x9B7A60e76f59037d152aDBBAFa8C6db591B274Ac

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000005b04bd4cf6ac8f976a1d578b7156206b781ca861
Arg [1] : 0000000000000000000000009b7a60e76f59037d152adbbafa8c6db591b274ac


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

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.