AVAX Price: $22.35 (+4.61%)
Gas: 1.1 nAVAX
 

Overview

AVAX Balance

Avalanche C-Chain LogoAvalanche C-Chain LogoAvalanche C-Chain Logo0 AVAX

AVAX Value

$0.00

Token Holdings

Multichain Info

No addresses found
Age:7D
Reset Filter

Transaction Hash
Method
Block
From
To

There are no matching entries

> 10 Internal Transactions and 1 Token Transfer found.

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
490274502024-08-09 2:55:03257 days ago1723172103
0xABf548b0...8Ff866cE2
0.132 AVAX
490274502024-08-09 2:55:03257 days ago1723172103
0xABf548b0...8Ff866cE2
0.0075 AVAX
490274502024-08-09 2:55:03257 days ago1723172103
0xABf548b0...8Ff866cE2
0.0105 AVAX
490274352024-08-09 2:54:31257 days ago1723172071
0xABf548b0...8Ff866cE2
0.1245 AVAX
490274352024-08-09 2:54:31257 days ago1723172071
0xABf548b0...8Ff866cE2
0.0075 AVAX
490274352024-08-09 2:54:31257 days ago1723172071
0xABf548b0...8Ff866cE2
0.018 AVAX
487967202024-08-03 14:33:17263 days ago1722695597
0xABf548b0...8Ff866cE2
3.5625 AVAX
487967202024-08-03 14:33:17263 days ago1722695597
0xABf548b0...8Ff866cE2
0.1875 AVAX
487899752024-08-03 10:37:41263 days ago1722681461
0xABf548b0...8Ff866cE2
0.22875 AVAX
487899752024-08-03 10:37:41263 days ago1722681461
0xABf548b0...8Ff866cE2
0.0125 AVAX
487899752024-08-03 10:37:41263 days ago1722681461
0xABf548b0...8Ff866cE2
0.00875 AVAX
487899272024-08-03 10:35:53263 days ago1722681353
0xABf548b0...8Ff866cE2
0.13725 AVAX
487899272024-08-03 10:35:53263 days ago1722681353
0xABf548b0...8Ff866cE2
0.0075 AVAX
487899272024-08-03 10:35:53263 days ago1722681353
0xABf548b0...8Ff866cE2
0.00525 AVAX
487712062024-08-02 23:47:27263 days ago1722642447
0xABf548b0...8Ff866cE2
0.22875 AVAX
487712062024-08-02 23:47:27263 days ago1722642447
0xABf548b0...8Ff866cE2
0.0125 AVAX
487712062024-08-02 23:47:27263 days ago1722642447
0xABf548b0...8Ff866cE2
0.00875 AVAX
487363182024-08-02 3:48:29264 days ago1722570509
0xABf548b0...8Ff866cE2
0.1647 AVAX
487363182024-08-02 3:48:29264 days ago1722570509
0xABf548b0...8Ff866cE2
0.009 AVAX
487363182024-08-02 3:48:29264 days ago1722570509
0xABf548b0...8Ff866cE2
0.0063 AVAX
486813322024-07-31 20:09:45265 days ago1722456585
0xABf548b0...8Ff866cE2
0.75 AVAX
486813322024-07-31 20:09:45265 days ago1722456585
0xABf548b0...8Ff866cE2
0.05 AVAX
486813322024-07-31 20:09:45265 days ago1722456585
0xABf548b0...8Ff866cE2
0.2 AVAX
486812892024-07-31 20:08:16265 days ago1722456496
0xABf548b0...8Ff866cE2
2.49 AVAX
486812892024-07-31 20:08:16265 days ago1722456496
0xABf548b0...8Ff866cE2
0.15 AVAX
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CampfireMarket

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
london EvmVersion
File 1 of 13 : CampfireMarket.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "./IERC721Royalties.sol";
import "./CustomRoyalties.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

// MARKET VERSION 2
contract CampfireMarket is Ownable, ReentrancyGuard {
  using ECDSA for bytes32;

  mapping (bytes32 => bool) private _saltUsed;
  mapping (bytes32 => bool) private _saltCancelled;

  address public _customRoyaltiesAddress;
  address private _stakingContractAddress;
  address private _wavaxAddress;
  bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
  bool private _active;

  uint256 private _fee;
  address private _feeReceiver;
  uint256 private _stakingReward;

  event Sale(
    address indexed buyer,
    address indexed seller,
    address indexed nftContractAddress,
    uint256 nftTokenId,
    uint256 price,
    uint kind,
    bytes32 salt
  );

  event CancelListing(
    address indexed creator,
    address indexed nftContractAddress,
    uint256 nftTokenId,
    uint256 price,
    bytes32 salt
  );
  
  event CancelOffer(
    address indexed creator,
    address indexed nftContractAddress,
    uint256[] nftTokenIds,
    uint256 price,
    bytes32 salt
  );

  constructor(address feeReceiver_) {
    _active = true;
    _fee = 500; // 5%
    _stakingReward = 100; // 1%
    _feeReceiver = feeReceiver_;
  }

  function purchase(address _seller, address _contractAddress, uint256 _tokenId, uint256 _price, uint256 _expiration, bytes32 _salt, bytes memory _signature) public nonReentrant payable {
    require(_active, "Campfire Market: Contract is not active.");
    require(msg.value >= _price, "Campfire Market: Not enough AVAX sent.");
    _purchase(_seller, _contractAddress, _tokenId, _price, _expiration, _salt, _signature);
  }

  function purchaseBatch(address[] memory _sellers, address[] memory _contractAddresses, uint256[] memory _tokenIds, uint256[] memory _prices, uint256[] memory _expirations, bytes32[] memory _salts, bytes[] memory _signatures) public nonReentrant payable {
    require(_active, "Campfire Market: Contract is not active.");

    uint256 totalPrice = 0;
    for (uint i = 0; i < _prices.length; i++) {
      totalPrice += _prices[i];
    }
    
    require(msg.value >= totalPrice, "Campfire Market: Not enough AVAX sent.");

    for (uint i = 0; i < _tokenIds.length; i++) {
      _purchase(_sellers[i], _contractAddresses[i], _tokenIds[i], _prices[i], _expirations[i], _salts[i], _signatures[i]);
    }
  }

  function acceptOffer(address _buyer, address _contractAddress, uint256 _tokenId, uint256[] memory _tokenIds, uint256 _price, uint256 _expiration, bytes32 _salt, bytes memory _signature) public nonReentrant {
    require(_active, "Campfire Market: Contract is not active.");
    _acceptOffer(_buyer, _contractAddress, _tokenId, _tokenIds, _price, _expiration, _salt, _signature);
  }

  function acceptOffers(address[] memory _buyers, address[] memory _contractAddresses, uint256[] memory _tokenIds, uint256[][] memory _tokenIdSets, uint256[] memory _prices, uint256[] memory _expirations, bytes32[] memory _salts, bytes[] memory _signatures) public nonReentrant {
    require(_active, "Campfire Market: Contract is not active.");
    
    for (uint i = 0; i < _tokenIds.length; i++) {
      _acceptOffer(_buyers[i], _contractAddresses[i], _tokenIds[i], _tokenIdSets[i], _prices[i], _expirations[i], _salts[i], _signatures[i]);
    }
  }

  function validListing(address _seller, address _contractAddress, uint256 _tokenId, uint256 _price, uint256 _expiration, bytes32 _salt, bytes memory _signature) public view returns (bool) {
    address signer = getListingSigner(_seller, _contractAddress, _tokenId, _price, _expiration, _salt, _signature);

    bool approved = nftContract(_contractAddress).isApprovedForAll(signer, address(this)) || nftContract(_contractAddress).getApproved(_tokenId) == address(this);

    return !_saltUsed[_salt] && !_saltCancelled[_salt] && (block.timestamp <= _expiration) && (signer == nftContract(_contractAddress).ownerOf(_tokenId) && signer == _seller) && approved;
  }

  function validOffer(address _buyer, address _contractAddress, uint256[] memory _tokenIds, uint256 _price, uint256 _expiration, bytes32 _salt, bytes memory _signature) public view returns (bool) {
    address signer = getOfferSigner(_buyer, _contractAddress, _tokenIds, _price, _expiration, _salt, _signature);
    bool correctWavax = wavax().allowance(signer, address(this)) >= _price && wavax().balanceOf(signer) >= _price;
    return !_saltUsed[_salt] && !_saltCancelled[_salt] && (block.timestamp <= _expiration) && signer == _buyer && correctWavax;
  }

  function cancelListing(address _seller, address _contractAddress, uint256 _tokenId, uint256 _price, uint256 _expiration, bytes32 _salt, bytes memory _signature) public nonReentrant {
    address signer = getListingSigner(_seller, _contractAddress, _tokenId, _price, _expiration, _salt, _signature);
    require(msg.sender == signer && signer == _seller, "Campfire Market: You didn't create that listing.");
    
    _saltCancelled[_salt] = true;
    emit CancelListing(_seller, _contractAddress, _tokenId, _price, _salt);
  }

  function cancelOffer(address _buyer, address _contractAddress, uint256[] memory _tokenIds, uint256 _price, uint256 _expiration, bytes32 _salt, bytes memory _signature) public nonReentrant {
    address signer = getOfferSigner(_buyer, _contractAddress, _tokenIds, _price, _expiration, _salt, _signature);
    require(msg.sender == signer && signer == _buyer, "Campfire Market: You didn't create that offer.");
    
    _saltCancelled[_salt] = true;
    emit CancelOffer(_buyer, _contractAddress, _tokenIds, _price, _salt);
  }

  function saltUsed(bytes32 salt) public view returns (bool) {
    return _saltUsed[salt];
  }

  function hasBeenCancelled(bytes32 salt) public view returns (bool) {
    return _saltCancelled[salt];
  }

  function getRoyaltyInfo(address _contractAddress, uint256 _tokenId, uint256 _price) public view returns (address, uint256) {
     CustomRoyalties customRoyalties = CustomRoyalties(_customRoyaltiesAddress);

     address receiver = address(0);
     uint256 royaltyAmount = 0;

    if (customRoyalties.royaltiesSet(_contractAddress)) {
      (receiver, royaltyAmount) = customRoyalties.royaltyInfo(_contractAddress, _price);
    } else if (nftContract(_contractAddress).supportsInterface(_INTERFACE_ID_ERC2981)) {
      (receiver, royaltyAmount) = nftContract(_contractAddress).royaltyInfo(_tokenId, _price);
    }

    return (receiver, royaltyAmount);
  }

  function getSaleInfo(address _contractAddress, uint256 _tokenId, uint256 _price) public view returns (uint256, uint256, uint256, uint256) {
    (address _receiver, uint256 royaltyAmount) = getRoyaltyInfo(_contractAddress, _tokenId, _price);
    uint256 fee = getFee(_price);
    uint256 stakingReward = 0;
    if (_stakingContractAddress != address(0)) {
      stakingReward = getStakingReward(_price);
    }
    uint256 receivableAmount = getReceivableAmount(_price, royaltyAmount);

    return (receivableAmount, royaltyAmount, fee, stakingReward);
  }

  // PRIVATE

  function _purchase(address _seller, address _contractAddress, uint256 _tokenId, uint256 _price, uint256 _expiration, bytes32 _salt, bytes memory _signature) private {
    require(!_saltUsed[_salt], "Campfire Market: Salt has already been used.");
    require(!_saltCancelled[_salt], "Campfire Market: Listing has been cancelled.");
    require(block.timestamp <= _expiration, "Campfire Market: This listing has expired.");

    address signer = getListingSigner(_seller, _contractAddress, _tokenId, _price, _expiration, _salt, _signature);
    require(signer == nftContract(_contractAddress).ownerOf(_tokenId) && signer == _seller, "Campfire Market: Signature does not match.");

    _saltUsed[_salt] = true;

    (address receiver, uint256 royaltyAmount) = getRoyaltyInfo(_contractAddress, _tokenId, _price);
    
    if (royaltyAmount > 0 && receiver != address(0)) {
      _xfer_(receiver, royaltyAmount);
    }

    if (_stakingContractAddress != address(0)) {
      _xfer_(_stakingContractAddress, getStakingReward(_price));
    }

    _xfer_(_feeReceiver,  getFee(_price));
    _xfer_(_seller, getReceivableAmount(_price, royaltyAmount));

    nftContract(_contractAddress).safeTransferFrom(_seller, msg.sender, _tokenId);

    emit Sale(msg.sender, _seller, _contractAddress, _tokenId, _price, 1, _salt);
  }

  function _acceptOffer(address _buyer, address _contractAddress, uint256 _tokenId, uint256[] memory _tokenIds, uint256 _price, uint256 _expiration, bytes32 _salt, bytes memory _signature) private {
    require(!_saltUsed[_salt], "Campfire Market: Salt has already been used.");
    require(!_saltCancelled[_salt], "Campfire Market: Offer has been cancelled.");
    require(block.timestamp <= _expiration, "Campfire Market: This offer has expired.");
    require(canAcceptOfferForId(_tokenIds, _tokenId), "Campfire Market: This ID is not included in this offer.");

    address signer = getOfferSigner(_buyer, _contractAddress, _tokenIds, _price, _expiration, _salt, _signature);
    require(signer == _buyer, "Campfire Market: Signature does not match.");

    require(wavax().balanceOf(_buyer) >= _price, "Campfire Market: Buyer doesn't have enough WAVAX.");

    _saltUsed[_salt] = true;

    (address receiver, uint256 royaltyAmount) = getRoyaltyInfo(_contractAddress, _tokenId, _price);

    if (royaltyAmount > 0 && receiver != address(0)) {
      wavax().transferFrom(_buyer, receiver, royaltyAmount);
    }
    
    if (_stakingContractAddress != address(0)) {
      wavax().transferFrom(_buyer, _stakingContractAddress, getStakingReward(_price));
    }

    wavax().transferFrom(_buyer, _feeReceiver, getFee(_price));

    wavax().transferFrom(_buyer, msg.sender, getReceivableAmount(_price, royaltyAmount));

    nftContract(_contractAddress).safeTransferFrom(msg.sender, _buyer, _tokenId);

    emit Sale(_buyer, msg.sender, _contractAddress, _tokenId, _price, 2, _salt);
  }

  function getFee(uint256 _price) private view returns (uint256) {
    return (_price * _fee) / 10000;
  }

  function getStakingReward(uint256 _price) private view returns (uint256) {
    return (_price * _stakingReward) / 10000;
  }

  function getReceivableAmount(uint256 _price, uint256 royaltyAmount) private view returns (uint256) {
    uint256 receivableAmount = 0;

    if (_stakingContractAddress != address(0)) {
      receivableAmount = _price - (royaltyAmount + getFee(_price) + getStakingReward(_price));
    } else {
      receivableAmount = _price - (royaltyAmount + getFee(_price));
    }

    return receivableAmount;
  }

  function getOfferSigner(address _buyer, address _contractAddress, uint256[] memory _tokenIds, uint256 _price, uint256 _expiration, bytes32 _salt, bytes memory _signature) private pure returns (address) {
    bytes32 hash = keccak256(abi.encodePacked(_buyer, _contractAddress, _tokenIds, _price, _expiration, _salt, "V2"));
    address signer = hash.toEthSignedMessageHash().recover(_signature);
    return signer;
  }

  function getListingSigner(address _buyer, address _contractAddress, uint256 _tokenId, uint256 _price, uint256 _expiration, bytes32 _salt, bytes memory _signature) private pure returns (address) {
    bytes32 hash = keccak256(abi.encodePacked(_buyer, _contractAddress, _tokenId, _price, _expiration, _salt, "V2"));
    address signer = hash.toEthSignedMessageHash().recover(_signature);
    return signer;
  }

  function nftContract(address collection) private pure returns (IERC721Royalties) {
    return IERC721Royalties(collection);
  }

  function wavax() private view returns (IERC20) {
    return IERC20(_wavaxAddress);
  }

  function _xfer_(address receiver, uint256 amount) private {
    (bool success,) = payable(receiver).call{value: amount}("");
    require(success, "Payment failed to send.");
  }

  function canAcceptOfferForId(uint256[] memory allowedIds, uint256 targetId) private pure returns (bool) {
    if (allowedIds.length == 0) { // treat empty array as collection offer
      return true;
    } else {
      bool canAccept = false;
      for (uint i = 0; i < allowedIds.length; i++) {
        uint256 allowedId = allowedIds[i];
        if (allowedId == targetId) {
          canAccept = true;
          break;
        }
      }
      return canAccept;
    }
  }

  // ADMIN

  function setCustomRoyalties(address customRoyaltiesAddress_) public onlyOwner {
    _customRoyaltiesAddress = customRoyaltiesAddress_;
  }

  function setStakingContract(address stakingContractAddress_) public onlyOwner {
    _stakingContractAddress = stakingContractAddress_;
  }

  function setWAVAX(address wavaxAddress_) public onlyOwner {
    _wavaxAddress = wavaxAddress_;
  }

  function setActive(bool active_) public onlyOwner {
    _active = active_;
  }

  function setFee(uint256 fee_) public onlyOwner {
    _fee = fee_;
  }

  function setFee(address feeReceiver_) public onlyOwner {
    _feeReceiver = feeReceiver_;
  }

  function setStakingReward(uint256 stakingReward_) public onlyOwner {
    _stakingReward = stakingReward_;
  }

  receive() external payable {}

  function withdraw() public onlyOwner {
    payable(_feeReceiver).transfer(address(this).balance);
  }

}

File 2 of 13 : IERC721Royalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

interface IERC721Royalties is IERC721 {

  function royaltyInfo(
    uint256 _tokenId, 
    uint256 _salePrice
  ) external view returns (address receiver, uint256 royaltyAmount);

}

File 3 of 13 : CustomRoyalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/access/Ownable.sol";

contract CustomRoyalties is Ownable {
  
  mapping (address => uint256) private _royalties;
  mapping (address => address) private _receivers;

  mapping (address => bool) private _managers;

  constructor() {
    _managers[msg.sender] = true;
  }

  function setRoyaltyInfo(address nftContract_, address receiver_, uint256 royalties_) public onlyManager {
    _royalties[nftContract_] = royalties_;
    _receivers[nftContract_] = receiver_;
  }

  function royaltiesSet(address _nftContract) public view returns (bool) {
    return (_royalties[_nftContract] != 0);
  }

  function royaltyInfo(address _nftContract, uint256 _salePrice) public view returns (address receiver, uint256 royaltyAmount) {
    return (_receivers[_nftContract], ((_salePrice * _royalties[_nftContract]) / 10000));
  }

  modifier onlyManager() {
    require(_managers[msg.sender], "Caller is not a manager.");
    _;
  }

  function addManager(address _newManager) public onlyOwner {
    _managers[_newManager] = true;
  }

  function removeManager(address _manager) public onlyOwner {
    _managers[_manager] = false;
  }

}

File 4 of 13 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

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

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 5 of 13 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 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 256, 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 << 3) < value ? 1 : 0);
        }
    }
}

File 6 of 13 : 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 7 of 13 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32")
            mstore(0x1c, hash)
            message := keccak256(0x00, 0x3c)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, "\x19\x01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            data := keccak256(ptr, 0x42)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Data with intended validator, created from a
     * `validator` and `data` according to the version 0 of EIP-191.
     *
     * See {recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x00", validator, data));
    }
}

File 8 of 13 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.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 `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

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

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 9 of 13 : 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 10 of 13 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 11 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 12 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

File 13 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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);
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"feeReceiver_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"address","name":"nftContractAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"nftTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"CancelListing","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"address","name":"nftContractAddress","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"nftTokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"CancelOffer","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":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":true,"internalType":"address","name":"nftContractAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"nftTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"kind","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"Sale","type":"event"},{"inputs":[],"name":"_customRoyaltiesAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_buyer","type":"address"},{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_expiration","type":"uint256"},{"internalType":"bytes32","name":"_salt","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"acceptOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_buyers","type":"address[]"},{"internalType":"address[]","name":"_contractAddresses","type":"address[]"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[][]","name":"_tokenIdSets","type":"uint256[][]"},{"internalType":"uint256[]","name":"_prices","type":"uint256[]"},{"internalType":"uint256[]","name":"_expirations","type":"uint256[]"},{"internalType":"bytes32[]","name":"_salts","type":"bytes32[]"},{"internalType":"bytes[]","name":"_signatures","type":"bytes[]"}],"name":"acceptOffers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_seller","type":"address"},{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_expiration","type":"uint256"},{"internalType":"bytes32","name":"_salt","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"cancelListing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_buyer","type":"address"},{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_expiration","type":"uint256"},{"internalType":"bytes32","name":"_salt","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"cancelOffer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"getRoyaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"getSaleInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"hasBeenCancelled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_seller","type":"address"},{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_expiration","type":"uint256"},{"internalType":"bytes32","name":"_salt","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"purchase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_sellers","type":"address[]"},{"internalType":"address[]","name":"_contractAddresses","type":"address[]"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_prices","type":"uint256[]"},{"internalType":"uint256[]","name":"_expirations","type":"uint256[]"},{"internalType":"bytes32[]","name":"_salts","type":"bytes32[]"},{"internalType":"bytes[]","name":"_signatures","type":"bytes[]"}],"name":"purchaseBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"saltUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"active_","type":"bool"}],"name":"setActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"customRoyaltiesAddress_","type":"address"}],"name":"setCustomRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee_","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"feeReceiver_","type":"address"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stakingContractAddress_","type":"address"}],"name":"setStakingContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stakingReward_","type":"uint256"}],"name":"setStakingReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wavaxAddress_","type":"address"}],"name":"setWAVAX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_seller","type":"address"},{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_expiration","type":"uint256"},{"internalType":"bytes32","name":"_salt","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"validListing","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_buyer","type":"address"},{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_expiration","type":"uint256"},{"internalType":"bytes32","name":"_salt","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"validOffer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b5060405162002cf938038062002cf98339810160408190526200003491620000d8565b6200003f3362000088565b600180556006805460ff60a01b1916600160a01b1790556101f46007556064600955600880546001600160a01b039092166001600160a01b03199092169190911790556200010a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000eb57600080fd5b81516001600160a01b03811681146200010357600080fd5b9392505050565b612bdf806200011a6000396000f3fe60806040526004361061014f5760003560e01c806371f4f5aa116100b6578063acec338a1161006f578063acec338a14610400578063c0dfe4b514610420578063ce5f10a014610440578063d9e4e36d14610460578063f2b2588c14610473578063f2fde38b1461049357600080fd5b806371f4f5aa1461033b5780637917fb9f1461034e57806384d3cf381461036e5780638da5cb5b1461038e5780639dd373b9146103c0578063aa19044f146103e057600080fd5b806338e19c5c1161010857806338e19c5c146102715780633ccfd60b14610291578063422551bb146102a6578063444a3e88146102d657806369fe0e2d14610306578063715018a61461032657600080fd5b8063168ae9b61461015b5780631c0d4dab1461017d5780632113be9f1461019d57806325c6a623146101e257806334dba4bf1461020257806336de97421461023257600080fd5b3661015657005b600080fd5b34801561016757600080fd5b5061017b610176366004612116565b6104b3565b005b34801561018957600080fd5b5061017b610198366004612116565b6104dd565b3480156101a957600080fd5b506101bd6101b8366004612133565b610507565b6040805194855260208501939093529183015260608201526080015b60405180910390f35b3480156101ee57600080fd5b5061017b6101fd3660046122ae565b61056c565b34801561020e57600080fd5b5061022261021d36600461235e565b6105c9565b60405190151581526020016101d9565b34801561023e57600080fd5b5061025261024d366004612133565b6107c3565b604080516001600160a01b0390931683526020830191909152016101d9565b34801561027d57600080fd5b5061017b61028c36600461254b565b6109b8565b34801561029d57600080fd5b5061017b610ae9565b3480156102b257600080fd5b506102226102c136600461267b565b60009081526002602052604090205460ff1690565b3480156102e257600080fd5b506102226102f136600461267b565b60009081526003602052604090205460ff1690565b34801561031257600080fd5b5061017b61032136600461267b565b610b2d565b34801561033257600080fd5b5061017b610b3a565b61017b61034936600461235e565b610b4e565b34801561035a57600080fd5b5061017b610369366004612116565b610bc0565b34801561037a57600080fd5b5061017b61038936600461235e565b610bea565b34801561039a57600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020016101d9565b3480156103cc57600080fd5b5061017b6103db366004612116565b610d09565b3480156103ec57600080fd5b506004546103a8906001600160a01b031681565b34801561040c57600080fd5b5061017b61041b3660046126a2565b610d33565b34801561042c57600080fd5b5061022261043b3660046126bf565b610d59565b34801561044c57600080fd5b5061017b61045b36600461267b565b610eec565b61017b61046e366004612756565b610ef9565b34801561047f57600080fd5b5061017b61048e3660046126bf565b611078565b34801561049f57600080fd5b5061017b6104ae366004612116565b61117c565b6104bb6111f2565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6104e56111f2565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060008061051b8989896107c3565b91509150600061052a8861124c565b6005549091506000906001600160a01b03161561054d5761054a8961126f565b90505b60006105598a85611282565b9c939b5091995097509095505050505050565b6105746112f6565b600654600160a01b900460ff166105a65760405162461bcd60e51b815260040161059d90612862565b60405180910390fd5b6105b6888888888888888861134f565b6105bf60018055565b5050505050505050565b6000806105db8989898989898961191c565b905060008860405163e985e9c560e01b81526001600160a01b038481166004830152306024830152919091169063e985e9c590604401602060405180830381865afa15801561062e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065291906128aa565b806106ce575060405163020604bf60e21b81526004810189905230906001600160a01b038b169063081812fc90602401602060405180830381865afa15801561069f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c391906128c7565b6001600160a01b0316145b60008681526002602052604090205490915060ff161580156106ff575060008581526003602052604090205460ff16155b801561070b5750854211155b80156107ac57506040516331a9108f60e11b8152600481018990526001600160a01b038a1690636352211e90602401602060405180830381865afa158015610757573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077b91906128c7565b6001600160a01b0316826001600160a01b03161480156107ac5750896001600160a01b0316826001600160a01b0316145b80156107b55750805b9a9950505050505050505050565b600480546040516303e116c960e31b81526001600160a01b038681169382019390935260009283921690829081908390631f08b64890602401602060405180830381865afa158015610819573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083d91906128aa565b156108bc57604051632782d6c760e01b81526001600160a01b03898116600483015260248201889052841690632782d6c7906044016040805180830381865afa15801561088e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b291906128e4565b90925090506109ab565b876040516301ffc9a760e01b815263152a902d60e11b60048201526001600160a01b0391909116906301ffc9a790602401602060405180830381865afa15801561090a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092e91906128aa565b156109ab578760405163152a902d60e11b815260048101899052602481018890526001600160a01b039190911690632a55205a906044016040805180830381865afa158015610981573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a591906128e4565b90925090505b9097909650945050505050565b6109c06112f6565b600654600160a01b900460ff166109e95760405162461bcd60e51b815260040161059d90612862565b60005b8651811015610adf57610acd898281518110610a0a57610a0a612912565b6020026020010151898381518110610a2457610a24612912565b6020026020010151898481518110610a3e57610a3e612912565b6020026020010151898581518110610a5857610a58612912565b6020026020010151898681518110610a7257610a72612912565b6020026020010151898781518110610a8c57610a8c612912565b6020026020010151898881518110610aa657610aa6612912565b6020026020010151898981518110610ac057610ac0612912565b602002602001015161134f565b80610ad78161293e565b9150506109ec565b506105bf60018055565b610af16111f2565b6008546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610b2a573d6000803e3d6000fd5b50565b610b356111f2565b600755565b610b426111f2565b610b4c60006119cd565b565b610b566112f6565b600654600160a01b900460ff16610b7f5760405162461bcd60e51b815260040161059d90612862565b83341015610b9f5760405162461bcd60e51b815260040161059d90612957565b610bae87878787878787611a1d565b610bb760018055565b50505050505050565b610bc86111f2565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b610bf26112f6565b6000610c038888888888888861191c565b9050336001600160a01b038216148015610c2e5750876001600160a01b0316816001600160a01b0316145b610c935760405162461bcd60e51b815260206004820152603060248201527f43616d7066697265204d61726b65743a20596f75206469646e2774206372656160448201526f3a32903a3430ba103634b9ba34b7339760811b606482015260840161059d565b600083815260036020908152604091829020805460ff1916600117905581518881529081018790529081018490526001600160a01b0388811691908a16907ff92a5ffbfe49214ebf7b8660c623b0b257e3d3907460ce199ac4d0981660449e906060015b60405180910390a350610bb760018055565b610d116111f2565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610d3b6111f2565b60068054911515600160a01b0260ff60a01b19909216919091179055565b600080610d6b89898989898989611d5a565b9050600086610d826006546001600160a01b031690565b604051636eb1769f60e11b81526001600160a01b038581166004830152306024830152919091169063dd62ed3e90604401602060405180830381865afa158015610dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df4919061299d565b10158015610e7f575086610e106006546001600160a01b031690565b6040516370a0823160e01b81526001600160a01b03858116600483015291909116906370a0823190602401602060405180830381865afa158015610e58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7c919061299d565b10155b60008681526002602052604090205490915060ff16158015610eb0575060008581526003602052604090205460ff16155b8015610ebc5750854211155b80156107ac5750896001600160a01b0316826001600160a01b03161480156107b557509998505050505050505050565b610ef46111f2565b600955565b610f016112f6565b600654600160a01b900460ff16610f2a5760405162461bcd60e51b815260040161059d90612862565b6000805b8551811015610f7057858181518110610f4957610f49612912565b602002602001015182610f5c91906129b6565b915080610f688161293e565b915050610f2e565b5080341015610f915760405162461bcd60e51b815260040161059d90612957565b60005b865181101561106d5761105b898281518110610fb257610fb2612912565b6020026020010151898381518110610fcc57610fcc612912565b6020026020010151898481518110610fe657610fe6612912565b602002602001015189858151811061100057611000612912565b602002602001015189868151811061101a5761101a612912565b602002602001015189878151811061103457611034612912565b602002602001015189888151811061104e5761104e612912565b6020026020010151611a1d565b806110658161293e565b915050610f94565b5050610bb760018055565b6110806112f6565b600061109188888888888888611d5a565b9050336001600160a01b0382161480156110bc5750876001600160a01b0316816001600160a01b0316145b61111f5760405162461bcd60e51b815260206004820152602e60248201527f43616d7066697265204d61726b65743a20596f75206469646e2774206372656160448201526d3a32903a3430ba1037b33332b91760911b606482015260840161059d565b60008381526003602052604090819020805460ff19166001179055516001600160a01b0380891691908a16907f1e32fea06b75178ca7fb5fa68ed48fbda0924c13304e45f477d57e0ff57b03b490610cf7908a908a9089906129c9565b6111846111f2565b6001600160a01b0381166111e95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161059d565b610b2a816119cd565b6000546001600160a01b03163314610b4c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059d565b60006127106007548361125f9190612a16565b6112699190612a2d565b92915050565b60006127106009548361125f9190612a16565b60055460009081906001600160a01b0316156112cf576112a18461126f565b6112aa8561124c565b6112b490856129b6565b6112be91906129b6565b6112c89085612a4f565b90506112ef565b6112d88461124c565b6112e290846129b6565b6112ec9085612a4f565b90505b9392505050565b6002600154036113485760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161059d565b6002600155565b60008281526002602052604090205460ff161561137e5760405162461bcd60e51b815260040161059d90612a62565b60008281526003602052604090205460ff16156113f05760405162461bcd60e51b815260206004820152602a60248201527f43616d7066697265204d61726b65743a204f6666657220686173206265656e2060448201526931b0b731b2b63632b21760b11b606482015260840161059d565b824211156114515760405162461bcd60e51b815260206004820152602860248201527f43616d7066697265204d61726b65743a2054686973206f66666572206861732060448201526732bc3834b932b21760c11b606482015260840161059d565b61145b8587611d78565b6114cd5760405162461bcd60e51b815260206004820152603760248201527f43616d7066697265204d61726b65743a2054686973204944206973206e6f742060448201527f696e636c7564656420696e2074686973206f666665722e000000000000000000606482015260840161059d565b60006114de89898888888888611d5a565b9050886001600160a01b0316816001600160a01b0316146115115760405162461bcd60e51b815260040161059d90612aae565b846115246006546001600160a01b031690565b6040516370a0823160e01b81526001600160a01b038c8116600483015291909116906370a0823190602401602060405180830381865afa15801561156c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611590919061299d565b10156115f85760405162461bcd60e51b815260206004820152603160248201527f43616d7066697265204d61726b65743a20427579657220646f65736e2774206860448201527030bb329032b737bab3b4102ba0ab20ac1760791b606482015260840161059d565b6000838152600260205260408120805460ff191660011790558061161d8a8a896107c3565b9150915060008111801561163957506001600160a01b03821615155b156116b7576006546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90611672908e9086908690600401612af8565b6020604051808303816000875af1158015611691573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b591906128aa565b505b6005546001600160a01b03161561174f576006546005546001600160a01b03918216916323b872dd918e91166116ec8b61126f565b6040518463ffffffff1660e01b815260040161170a93929190612af8565b6020604051808303816000875af1158015611729573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174d91906128aa565b505b6006546008546001600160a01b03918216916323b872dd918e91166117738b61124c565b6040518463ffffffff1660e01b815260040161179193929190612af8565b6020604051808303816000875af11580156117b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d491906128aa565b506006546001600160a01b03166323b872dd8c336117f28b86611282565b6040518463ffffffff1660e01b815260040161181093929190612af8565b6020604051808303816000875af115801561182f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185391906128aa565b50604051632142170760e11b81526001600160a01b038b16906342842e0e906118849033908f908e90600401612af8565b600060405180830381600087803b15801561189e57600080fd5b505af11580156118b2573d6000803e3d6000fd5b5050604080518c8152602081018b90526002818301526060810189905290516001600160a01b038e811694503393508f16917fe6ecf98f5a7ebe851dea0eddf8843ebdef2143373ad1548c6b88feeab636df7a919081900360800190a45050505050505050505050565b6040516bffffffffffffffffffffffff19606089811b8216602084015288901b16603482015260488101869052606881018590526088810184905260a88101839052612b1960f11b60c8820152600090819060ca015b60405160208183030381529060405280519060200120905060006107b5846119c7847f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b90611de2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008281526002602052604090205460ff1615611a4c5760405162461bcd60e51b815260040161059d90612a62565b60008281526003602052604090205460ff1615611ac05760405162461bcd60e51b815260206004820152602c60248201527f43616d7066697265204d61726b65743a204c697374696e67206861732062656560448201526b371031b0b731b2b63632b21760a11b606482015260840161059d565b82421115611b235760405162461bcd60e51b815260206004820152602a60248201527f43616d7066697265204d61726b65743a2054686973206c697374696e67206861604482015269399032bc3834b932b21760b11b606482015260840161059d565b6000611b348888888888888861191c565b6040516331a9108f60e11b8152600481018890529091506001600160a01b03881690636352211e90602401602060405180830381865afa158015611b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba091906128c7565b6001600160a01b0316816001600160a01b0316148015611bd15750876001600160a01b0316816001600160a01b0316145b611bed5760405162461bcd60e51b815260040161059d90612aae565b6000838152600260205260408120805460ff1916600117905580611c128989896107c3565b91509150600081118015611c2e57506001600160a01b03821615155b15611c3d57611c3d8282611e06565b6005546001600160a01b031615611c6c57600554611c6c906001600160a01b0316611c678961126f565b611e06565b600854611c85906001600160a01b0316611c678961124c565b611c938a611c678984611282565b604051632142170760e11b81526001600160a01b038a16906342842e0e90611cc3908d9033908d90600401612af8565b600060405180830381600087803b158015611cdd57600080fd5b505af1158015611cf1573d6000803e3d6000fd5b5050604080518b8152602081018b90526001818301526060810189905290516001600160a01b038d811694508e16925033917fe6ecf98f5a7ebe851dea0eddf8843ebdef2143373ad1548c6b88feeab636df7a919081900360800190a450505050505050505050565b60008088888888888860405160200161197296959493929190612b1c565b60008251600003611d8b57506001611269565b6000805b8451811015611dda576000858281518110611dac57611dac612912565b60200260200101519050848103611dc7576001925050611dda565b5080611dd28161293e565b915050611d8f565b509050611269565b6000806000611df18585611eae565b91509150611dfe81611ef3565b509392505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611e53576040519150601f19603f3d011682016040523d82523d6000602084013e611e58565b606091505b5050905080611ea95760405162461bcd60e51b815260206004820152601760248201527f5061796d656e74206661696c656420746f2073656e642e000000000000000000604482015260640161059d565b505050565b6000808251604103611ee45760208301516040840151606085015160001a611ed88782858561203d565b94509450505050611eec565b506000905060025b9250929050565b6000816004811115611f0757611f07612b93565b03611f0f5750565b6001816004811115611f2357611f23612b93565b03611f705760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161059d565b6002816004811115611f8457611f84612b93565b03611fd15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161059d565b6003816004811115611fe557611fe5612b93565b03610b2a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161059d565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561207457506000905060036120f8565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156120c8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166120f1576000600192509250506120f8565b9150600090505b94509492505050565b6001600160a01b0381168114610b2a57600080fd5b60006020828403121561212857600080fd5b81356112ef81612101565b60008060006060848603121561214857600080fd5b833561215381612101565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156121a7576121a7612168565b604052919050565b600067ffffffffffffffff8211156121c9576121c9612168565b5060051b60200190565b600082601f8301126121e457600080fd5b813560206121f96121f4836121af565b61217e565b82815260059290921b8401810191818101908684111561221857600080fd5b8286015b84811015612233578035835291830191830161221c565b509695505050505050565b600082601f83011261224f57600080fd5b813567ffffffffffffffff81111561226957612269612168565b61227c601f8201601f191660200161217e565b81815284602083860101111561229157600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600080600080610100898b0312156122cb57600080fd5b88356122d681612101565b975060208901356122e681612101565b965060408901359550606089013567ffffffffffffffff8082111561230a57600080fd5b6123168c838d016121d3565b965060808b0135955060a08b0135945060c08b0135935060e08b013591508082111561234157600080fd5b5061234e8b828c0161223e565b9150509295985092959890939650565b600080600080600080600060e0888a03121561237957600080fd5b873561238481612101565b9650602088013561239481612101565b955060408801359450606088013593506080880135925060a0880135915060c088013567ffffffffffffffff8111156123cc57600080fd5b6123d88a828b0161223e565b91505092959891949750929550565b600082601f8301126123f857600080fd5b813560206124086121f4836121af565b82815260059290921b8401810191818101908684111561242757600080fd5b8286015b8481101561223357803561243e81612101565b835291830191830161242b565b600082601f83011261245c57600080fd5b8135602061246c6121f4836121af565b82815260059290921b8401810191818101908684111561248b57600080fd5b8286015b8481101561223357803567ffffffffffffffff8111156124af5760008081fd5b6124bd8986838b01016121d3565b84525091830191830161248f565b600082601f8301126124dc57600080fd5b813560206124ec6121f4836121af565b82815260059290921b8401810191818101908684111561250b57600080fd5b8286015b8481101561223357803567ffffffffffffffff81111561252f5760008081fd5b61253d8986838b010161223e565b84525091830191830161250f565b600080600080600080600080610100898b03121561256857600080fd5b883567ffffffffffffffff8082111561258057600080fd5b61258c8c838d016123e7565b995060208b01359150808211156125a257600080fd5b6125ae8c838d016123e7565b985060408b01359150808211156125c457600080fd5b6125d08c838d016121d3565b975060608b01359150808211156125e657600080fd5b6125f28c838d0161244b565b965060808b013591508082111561260857600080fd5b6126148c838d016121d3565b955060a08b013591508082111561262a57600080fd5b6126368c838d016121d3565b945060c08b013591508082111561264c57600080fd5b6126588c838d016121d3565b935060e08b013591508082111561266e57600080fd5b5061234e8b828c016124cb565b60006020828403121561268d57600080fd5b5035919050565b8015158114610b2a57600080fd5b6000602082840312156126b457600080fd5b81356112ef81612694565b600080600080600080600060e0888a0312156126da57600080fd5b87356126e581612101565b965060208801356126f581612101565b9550604088013567ffffffffffffffff8082111561271257600080fd5b61271e8b838c016121d3565b965060608a0135955060808a0135945060a08a0135935060c08a013591508082111561274957600080fd5b506123d88a828b0161223e565b600080600080600080600060e0888a03121561277157600080fd5b873567ffffffffffffffff8082111561278957600080fd5b6127958b838c016123e7565b985060208a01359150808211156127ab57600080fd5b6127b78b838c016123e7565b975060408a01359150808211156127cd57600080fd5b6127d98b838c016121d3565b965060608a01359150808211156127ef57600080fd5b6127fb8b838c016121d3565b955060808a013591508082111561281157600080fd5b61281d8b838c016121d3565b945060a08a013591508082111561283357600080fd5b61283f8b838c016121d3565b935060c08a013591508082111561285557600080fd5b506123d88a828b016124cb565b60208082526028908201527f43616d7066697265204d61726b65743a20436f6e7472616374206973206e6f746040820152671030b1ba34bb329760c11b606082015260800190565b6000602082840312156128bc57600080fd5b81516112ef81612694565b6000602082840312156128d957600080fd5b81516112ef81612101565b600080604083850312156128f757600080fd5b825161290281612101565b6020939093015192949293505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161295057612950612928565b5060010190565b60208082526026908201527f43616d7066697265204d61726b65743a204e6f7420656e6f75676820415641586040820152651039b2b73a1760d11b606082015260800190565b6000602082840312156129af57600080fd5b5051919050565b8082018082111561126957611269612928565b606080825284519082018190526000906020906080840190828801845b82811015612a02578151845292840192908401906001016129e6565b505050908301949094525060400152919050565b808202811582820484141761126957611269612928565b600082612a4a57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561126957611269612928565b6020808252602c908201527f43616d7066697265204d61726b65743a2053616c742068617320616c7265616460408201526b3c903132b2b7103ab9b2b21760a11b606082015260800190565b6020808252602a908201527f43616d7066697265204d61726b65743a205369676e617475726520646f6573206040820152693737ba1036b0ba31b41760b11b606082015260800190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006bffffffffffffffffffffffff19808960601b168352808860601b16601484015250602882018651602080890160005b83811015612b6a57815185529382019390820190600101612b4e565b5050968252509485019390935250604083015250612b1960f11b60608201526062019392505050565b634e487b7160e01b600052602160045260246000fdfea264697066735822122059dac9f2780efe5547a3e08c983b49595e3c4160da7874714345a5cd5606297764736f6c634300081100330000000000000000000000001c534f408334490c74cbdda545fae24c2a51170b

Deployed Bytecode

0x60806040526004361061014f5760003560e01c806371f4f5aa116100b6578063acec338a1161006f578063acec338a14610400578063c0dfe4b514610420578063ce5f10a014610440578063d9e4e36d14610460578063f2b2588c14610473578063f2fde38b1461049357600080fd5b806371f4f5aa1461033b5780637917fb9f1461034e57806384d3cf381461036e5780638da5cb5b1461038e5780639dd373b9146103c0578063aa19044f146103e057600080fd5b806338e19c5c1161010857806338e19c5c146102715780633ccfd60b14610291578063422551bb146102a6578063444a3e88146102d657806369fe0e2d14610306578063715018a61461032657600080fd5b8063168ae9b61461015b5780631c0d4dab1461017d5780632113be9f1461019d57806325c6a623146101e257806334dba4bf1461020257806336de97421461023257600080fd5b3661015657005b600080fd5b34801561016757600080fd5b5061017b610176366004612116565b6104b3565b005b34801561018957600080fd5b5061017b610198366004612116565b6104dd565b3480156101a957600080fd5b506101bd6101b8366004612133565b610507565b6040805194855260208501939093529183015260608201526080015b60405180910390f35b3480156101ee57600080fd5b5061017b6101fd3660046122ae565b61056c565b34801561020e57600080fd5b5061022261021d36600461235e565b6105c9565b60405190151581526020016101d9565b34801561023e57600080fd5b5061025261024d366004612133565b6107c3565b604080516001600160a01b0390931683526020830191909152016101d9565b34801561027d57600080fd5b5061017b61028c36600461254b565b6109b8565b34801561029d57600080fd5b5061017b610ae9565b3480156102b257600080fd5b506102226102c136600461267b565b60009081526002602052604090205460ff1690565b3480156102e257600080fd5b506102226102f136600461267b565b60009081526003602052604090205460ff1690565b34801561031257600080fd5b5061017b61032136600461267b565b610b2d565b34801561033257600080fd5b5061017b610b3a565b61017b61034936600461235e565b610b4e565b34801561035a57600080fd5b5061017b610369366004612116565b610bc0565b34801561037a57600080fd5b5061017b61038936600461235e565b610bea565b34801561039a57600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020016101d9565b3480156103cc57600080fd5b5061017b6103db366004612116565b610d09565b3480156103ec57600080fd5b506004546103a8906001600160a01b031681565b34801561040c57600080fd5b5061017b61041b3660046126a2565b610d33565b34801561042c57600080fd5b5061022261043b3660046126bf565b610d59565b34801561044c57600080fd5b5061017b61045b36600461267b565b610eec565b61017b61046e366004612756565b610ef9565b34801561047f57600080fd5b5061017b61048e3660046126bf565b611078565b34801561049f57600080fd5b5061017b6104ae366004612116565b61117c565b6104bb6111f2565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6104e56111f2565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060008061051b8989896107c3565b91509150600061052a8861124c565b6005549091506000906001600160a01b03161561054d5761054a8961126f565b90505b60006105598a85611282565b9c939b5091995097509095505050505050565b6105746112f6565b600654600160a01b900460ff166105a65760405162461bcd60e51b815260040161059d90612862565b60405180910390fd5b6105b6888888888888888861134f565b6105bf60018055565b5050505050505050565b6000806105db8989898989898961191c565b905060008860405163e985e9c560e01b81526001600160a01b038481166004830152306024830152919091169063e985e9c590604401602060405180830381865afa15801561062e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065291906128aa565b806106ce575060405163020604bf60e21b81526004810189905230906001600160a01b038b169063081812fc90602401602060405180830381865afa15801561069f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c391906128c7565b6001600160a01b0316145b60008681526002602052604090205490915060ff161580156106ff575060008581526003602052604090205460ff16155b801561070b5750854211155b80156107ac57506040516331a9108f60e11b8152600481018990526001600160a01b038a1690636352211e90602401602060405180830381865afa158015610757573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077b91906128c7565b6001600160a01b0316826001600160a01b03161480156107ac5750896001600160a01b0316826001600160a01b0316145b80156107b55750805b9a9950505050505050505050565b600480546040516303e116c960e31b81526001600160a01b038681169382019390935260009283921690829081908390631f08b64890602401602060405180830381865afa158015610819573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083d91906128aa565b156108bc57604051632782d6c760e01b81526001600160a01b03898116600483015260248201889052841690632782d6c7906044016040805180830381865afa15801561088e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b291906128e4565b90925090506109ab565b876040516301ffc9a760e01b815263152a902d60e11b60048201526001600160a01b0391909116906301ffc9a790602401602060405180830381865afa15801561090a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092e91906128aa565b156109ab578760405163152a902d60e11b815260048101899052602481018890526001600160a01b039190911690632a55205a906044016040805180830381865afa158015610981573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a591906128e4565b90925090505b9097909650945050505050565b6109c06112f6565b600654600160a01b900460ff166109e95760405162461bcd60e51b815260040161059d90612862565b60005b8651811015610adf57610acd898281518110610a0a57610a0a612912565b6020026020010151898381518110610a2457610a24612912565b6020026020010151898481518110610a3e57610a3e612912565b6020026020010151898581518110610a5857610a58612912565b6020026020010151898681518110610a7257610a72612912565b6020026020010151898781518110610a8c57610a8c612912565b6020026020010151898881518110610aa657610aa6612912565b6020026020010151898981518110610ac057610ac0612912565b602002602001015161134f565b80610ad78161293e565b9150506109ec565b506105bf60018055565b610af16111f2565b6008546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610b2a573d6000803e3d6000fd5b50565b610b356111f2565b600755565b610b426111f2565b610b4c60006119cd565b565b610b566112f6565b600654600160a01b900460ff16610b7f5760405162461bcd60e51b815260040161059d90612862565b83341015610b9f5760405162461bcd60e51b815260040161059d90612957565b610bae87878787878787611a1d565b610bb760018055565b50505050505050565b610bc86111f2565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b610bf26112f6565b6000610c038888888888888861191c565b9050336001600160a01b038216148015610c2e5750876001600160a01b0316816001600160a01b0316145b610c935760405162461bcd60e51b815260206004820152603060248201527f43616d7066697265204d61726b65743a20596f75206469646e2774206372656160448201526f3a32903a3430ba103634b9ba34b7339760811b606482015260840161059d565b600083815260036020908152604091829020805460ff1916600117905581518881529081018790529081018490526001600160a01b0388811691908a16907ff92a5ffbfe49214ebf7b8660c623b0b257e3d3907460ce199ac4d0981660449e906060015b60405180910390a350610bb760018055565b610d116111f2565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b610d3b6111f2565b60068054911515600160a01b0260ff60a01b19909216919091179055565b600080610d6b89898989898989611d5a565b9050600086610d826006546001600160a01b031690565b604051636eb1769f60e11b81526001600160a01b038581166004830152306024830152919091169063dd62ed3e90604401602060405180830381865afa158015610dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df4919061299d565b10158015610e7f575086610e106006546001600160a01b031690565b6040516370a0823160e01b81526001600160a01b03858116600483015291909116906370a0823190602401602060405180830381865afa158015610e58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7c919061299d565b10155b60008681526002602052604090205490915060ff16158015610eb0575060008581526003602052604090205460ff16155b8015610ebc5750854211155b80156107ac5750896001600160a01b0316826001600160a01b03161480156107b557509998505050505050505050565b610ef46111f2565b600955565b610f016112f6565b600654600160a01b900460ff16610f2a5760405162461bcd60e51b815260040161059d90612862565b6000805b8551811015610f7057858181518110610f4957610f49612912565b602002602001015182610f5c91906129b6565b915080610f688161293e565b915050610f2e565b5080341015610f915760405162461bcd60e51b815260040161059d90612957565b60005b865181101561106d5761105b898281518110610fb257610fb2612912565b6020026020010151898381518110610fcc57610fcc612912565b6020026020010151898481518110610fe657610fe6612912565b602002602001015189858151811061100057611000612912565b602002602001015189868151811061101a5761101a612912565b602002602001015189878151811061103457611034612912565b602002602001015189888151811061104e5761104e612912565b6020026020010151611a1d565b806110658161293e565b915050610f94565b5050610bb760018055565b6110806112f6565b600061109188888888888888611d5a565b9050336001600160a01b0382161480156110bc5750876001600160a01b0316816001600160a01b0316145b61111f5760405162461bcd60e51b815260206004820152602e60248201527f43616d7066697265204d61726b65743a20596f75206469646e2774206372656160448201526d3a32903a3430ba1037b33332b91760911b606482015260840161059d565b60008381526003602052604090819020805460ff19166001179055516001600160a01b0380891691908a16907f1e32fea06b75178ca7fb5fa68ed48fbda0924c13304e45f477d57e0ff57b03b490610cf7908a908a9089906129c9565b6111846111f2565b6001600160a01b0381166111e95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161059d565b610b2a816119cd565b6000546001600160a01b03163314610b4c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161059d565b60006127106007548361125f9190612a16565b6112699190612a2d565b92915050565b60006127106009548361125f9190612a16565b60055460009081906001600160a01b0316156112cf576112a18461126f565b6112aa8561124c565b6112b490856129b6565b6112be91906129b6565b6112c89085612a4f565b90506112ef565b6112d88461124c565b6112e290846129b6565b6112ec9085612a4f565b90505b9392505050565b6002600154036113485760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161059d565b6002600155565b60008281526002602052604090205460ff161561137e5760405162461bcd60e51b815260040161059d90612a62565b60008281526003602052604090205460ff16156113f05760405162461bcd60e51b815260206004820152602a60248201527f43616d7066697265204d61726b65743a204f6666657220686173206265656e2060448201526931b0b731b2b63632b21760b11b606482015260840161059d565b824211156114515760405162461bcd60e51b815260206004820152602860248201527f43616d7066697265204d61726b65743a2054686973206f66666572206861732060448201526732bc3834b932b21760c11b606482015260840161059d565b61145b8587611d78565b6114cd5760405162461bcd60e51b815260206004820152603760248201527f43616d7066697265204d61726b65743a2054686973204944206973206e6f742060448201527f696e636c7564656420696e2074686973206f666665722e000000000000000000606482015260840161059d565b60006114de89898888888888611d5a565b9050886001600160a01b0316816001600160a01b0316146115115760405162461bcd60e51b815260040161059d90612aae565b846115246006546001600160a01b031690565b6040516370a0823160e01b81526001600160a01b038c8116600483015291909116906370a0823190602401602060405180830381865afa15801561156c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611590919061299d565b10156115f85760405162461bcd60e51b815260206004820152603160248201527f43616d7066697265204d61726b65743a20427579657220646f65736e2774206860448201527030bb329032b737bab3b4102ba0ab20ac1760791b606482015260840161059d565b6000838152600260205260408120805460ff191660011790558061161d8a8a896107c3565b9150915060008111801561163957506001600160a01b03821615155b156116b7576006546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90611672908e9086908690600401612af8565b6020604051808303816000875af1158015611691573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b591906128aa565b505b6005546001600160a01b03161561174f576006546005546001600160a01b03918216916323b872dd918e91166116ec8b61126f565b6040518463ffffffff1660e01b815260040161170a93929190612af8565b6020604051808303816000875af1158015611729573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174d91906128aa565b505b6006546008546001600160a01b03918216916323b872dd918e91166117738b61124c565b6040518463ffffffff1660e01b815260040161179193929190612af8565b6020604051808303816000875af11580156117b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d491906128aa565b506006546001600160a01b03166323b872dd8c336117f28b86611282565b6040518463ffffffff1660e01b815260040161181093929190612af8565b6020604051808303816000875af115801561182f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185391906128aa565b50604051632142170760e11b81526001600160a01b038b16906342842e0e906118849033908f908e90600401612af8565b600060405180830381600087803b15801561189e57600080fd5b505af11580156118b2573d6000803e3d6000fd5b5050604080518c8152602081018b90526002818301526060810189905290516001600160a01b038e811694503393508f16917fe6ecf98f5a7ebe851dea0eddf8843ebdef2143373ad1548c6b88feeab636df7a919081900360800190a45050505050505050505050565b6040516bffffffffffffffffffffffff19606089811b8216602084015288901b16603482015260488101869052606881018590526088810184905260a88101839052612b1960f11b60c8820152600090819060ca015b60405160208183030381529060405280519060200120905060006107b5846119c7847f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b90611de2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008281526002602052604090205460ff1615611a4c5760405162461bcd60e51b815260040161059d90612a62565b60008281526003602052604090205460ff1615611ac05760405162461bcd60e51b815260206004820152602c60248201527f43616d7066697265204d61726b65743a204c697374696e67206861732062656560448201526b371031b0b731b2b63632b21760a11b606482015260840161059d565b82421115611b235760405162461bcd60e51b815260206004820152602a60248201527f43616d7066697265204d61726b65743a2054686973206c697374696e67206861604482015269399032bc3834b932b21760b11b606482015260840161059d565b6000611b348888888888888861191c565b6040516331a9108f60e11b8152600481018890529091506001600160a01b03881690636352211e90602401602060405180830381865afa158015611b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba091906128c7565b6001600160a01b0316816001600160a01b0316148015611bd15750876001600160a01b0316816001600160a01b0316145b611bed5760405162461bcd60e51b815260040161059d90612aae565b6000838152600260205260408120805460ff1916600117905580611c128989896107c3565b91509150600081118015611c2e57506001600160a01b03821615155b15611c3d57611c3d8282611e06565b6005546001600160a01b031615611c6c57600554611c6c906001600160a01b0316611c678961126f565b611e06565b600854611c85906001600160a01b0316611c678961124c565b611c938a611c678984611282565b604051632142170760e11b81526001600160a01b038a16906342842e0e90611cc3908d9033908d90600401612af8565b600060405180830381600087803b158015611cdd57600080fd5b505af1158015611cf1573d6000803e3d6000fd5b5050604080518b8152602081018b90526001818301526060810189905290516001600160a01b038d811694508e16925033917fe6ecf98f5a7ebe851dea0eddf8843ebdef2143373ad1548c6b88feeab636df7a919081900360800190a450505050505050505050565b60008088888888888860405160200161197296959493929190612b1c565b60008251600003611d8b57506001611269565b6000805b8451811015611dda576000858281518110611dac57611dac612912565b60200260200101519050848103611dc7576001925050611dda565b5080611dd28161293e565b915050611d8f565b509050611269565b6000806000611df18585611eae565b91509150611dfe81611ef3565b509392505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611e53576040519150601f19603f3d011682016040523d82523d6000602084013e611e58565b606091505b5050905080611ea95760405162461bcd60e51b815260206004820152601760248201527f5061796d656e74206661696c656420746f2073656e642e000000000000000000604482015260640161059d565b505050565b6000808251604103611ee45760208301516040840151606085015160001a611ed88782858561203d565b94509450505050611eec565b506000905060025b9250929050565b6000816004811115611f0757611f07612b93565b03611f0f5750565b6001816004811115611f2357611f23612b93565b03611f705760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161059d565b6002816004811115611f8457611f84612b93565b03611fd15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161059d565b6003816004811115611fe557611fe5612b93565b03610b2a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161059d565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561207457506000905060036120f8565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156120c8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166120f1576000600192509250506120f8565b9150600090505b94509492505050565b6001600160a01b0381168114610b2a57600080fd5b60006020828403121561212857600080fd5b81356112ef81612101565b60008060006060848603121561214857600080fd5b833561215381612101565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156121a7576121a7612168565b604052919050565b600067ffffffffffffffff8211156121c9576121c9612168565b5060051b60200190565b600082601f8301126121e457600080fd5b813560206121f96121f4836121af565b61217e565b82815260059290921b8401810191818101908684111561221857600080fd5b8286015b84811015612233578035835291830191830161221c565b509695505050505050565b600082601f83011261224f57600080fd5b813567ffffffffffffffff81111561226957612269612168565b61227c601f8201601f191660200161217e565b81815284602083860101111561229157600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600080600080610100898b0312156122cb57600080fd5b88356122d681612101565b975060208901356122e681612101565b965060408901359550606089013567ffffffffffffffff8082111561230a57600080fd5b6123168c838d016121d3565b965060808b0135955060a08b0135945060c08b0135935060e08b013591508082111561234157600080fd5b5061234e8b828c0161223e565b9150509295985092959890939650565b600080600080600080600060e0888a03121561237957600080fd5b873561238481612101565b9650602088013561239481612101565b955060408801359450606088013593506080880135925060a0880135915060c088013567ffffffffffffffff8111156123cc57600080fd5b6123d88a828b0161223e565b91505092959891949750929550565b600082601f8301126123f857600080fd5b813560206124086121f4836121af565b82815260059290921b8401810191818101908684111561242757600080fd5b8286015b8481101561223357803561243e81612101565b835291830191830161242b565b600082601f83011261245c57600080fd5b8135602061246c6121f4836121af565b82815260059290921b8401810191818101908684111561248b57600080fd5b8286015b8481101561223357803567ffffffffffffffff8111156124af5760008081fd5b6124bd8986838b01016121d3565b84525091830191830161248f565b600082601f8301126124dc57600080fd5b813560206124ec6121f4836121af565b82815260059290921b8401810191818101908684111561250b57600080fd5b8286015b8481101561223357803567ffffffffffffffff81111561252f5760008081fd5b61253d8986838b010161223e565b84525091830191830161250f565b600080600080600080600080610100898b03121561256857600080fd5b883567ffffffffffffffff8082111561258057600080fd5b61258c8c838d016123e7565b995060208b01359150808211156125a257600080fd5b6125ae8c838d016123e7565b985060408b01359150808211156125c457600080fd5b6125d08c838d016121d3565b975060608b01359150808211156125e657600080fd5b6125f28c838d0161244b565b965060808b013591508082111561260857600080fd5b6126148c838d016121d3565b955060a08b013591508082111561262a57600080fd5b6126368c838d016121d3565b945060c08b013591508082111561264c57600080fd5b6126588c838d016121d3565b935060e08b013591508082111561266e57600080fd5b5061234e8b828c016124cb565b60006020828403121561268d57600080fd5b5035919050565b8015158114610b2a57600080fd5b6000602082840312156126b457600080fd5b81356112ef81612694565b600080600080600080600060e0888a0312156126da57600080fd5b87356126e581612101565b965060208801356126f581612101565b9550604088013567ffffffffffffffff8082111561271257600080fd5b61271e8b838c016121d3565b965060608a0135955060808a0135945060a08a0135935060c08a013591508082111561274957600080fd5b506123d88a828b0161223e565b600080600080600080600060e0888a03121561277157600080fd5b873567ffffffffffffffff8082111561278957600080fd5b6127958b838c016123e7565b985060208a01359150808211156127ab57600080fd5b6127b78b838c016123e7565b975060408a01359150808211156127cd57600080fd5b6127d98b838c016121d3565b965060608a01359150808211156127ef57600080fd5b6127fb8b838c016121d3565b955060808a013591508082111561281157600080fd5b61281d8b838c016121d3565b945060a08a013591508082111561283357600080fd5b61283f8b838c016121d3565b935060c08a013591508082111561285557600080fd5b506123d88a828b016124cb565b60208082526028908201527f43616d7066697265204d61726b65743a20436f6e7472616374206973206e6f746040820152671030b1ba34bb329760c11b606082015260800190565b6000602082840312156128bc57600080fd5b81516112ef81612694565b6000602082840312156128d957600080fd5b81516112ef81612101565b600080604083850312156128f757600080fd5b825161290281612101565b6020939093015192949293505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161295057612950612928565b5060010190565b60208082526026908201527f43616d7066697265204d61726b65743a204e6f7420656e6f75676820415641586040820152651039b2b73a1760d11b606082015260800190565b6000602082840312156129af57600080fd5b5051919050565b8082018082111561126957611269612928565b606080825284519082018190526000906020906080840190828801845b82811015612a02578151845292840192908401906001016129e6565b505050908301949094525060400152919050565b808202811582820484141761126957611269612928565b600082612a4a57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561126957611269612928565b6020808252602c908201527f43616d7066697265204d61726b65743a2053616c742068617320616c7265616460408201526b3c903132b2b7103ab9b2b21760a11b606082015260800190565b6020808252602a908201527f43616d7066697265204d61726b65743a205369676e617475726520646f6573206040820152693737ba1036b0ba31b41760b11b606082015260800190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006bffffffffffffffffffffffff19808960601b168352808860601b16601484015250602882018651602080890160005b83811015612b6a57815185529382019390820190600101612b4e565b5050968252509485019390935250604083015250612b1960f11b60608201526062019392505050565b634e487b7160e01b600052602160045260246000fdfea264697066735822122059dac9f2780efe5547a3e08c983b49595e3c4160da7874714345a5cd5606297764736f6c63430008110033

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

0000000000000000000000001c534f408334490c74cbdda545fae24c2a51170b

-----Decoded View---------------
Arg [0] : feeReceiver_ (address): 0x1C534F408334490c74cbdDa545FAE24c2A51170B

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001c534f408334490c74cbdda545fae24c2a51170b


Block Transaction Gas Used Reward
view all blocks ##produced##

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

Validator Index Block Amount
View All Withdrawals

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