ETH Price: $3,237.97 (+1.73%)
Gas: 2 Gwei

Contract

0xa7e1AB8eD81f93eac05609C62be3bCD70517ffB7
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...201921662024-06-28 19:06:3527 days ago1719601595IN
0xa7e1AB8e...70517ffB7
0 ETH0.00015463.33723009
Withdraw197409242024-04-26 17:10:3590 days ago1714151435IN
0xa7e1AB8e...70517ffB7
0 ETH0.000185616.11471888
Transfer From191731202024-02-07 1:41:59170 days ago1707270119IN
0xa7e1AB8e...70517ffB7
0 ETH0.0023886727.71532808
Set Approval For...190499322024-01-20 18:41:11187 days ago1705776071IN
0xa7e1AB8e...70517ffB7
0 ETH0.0007056615.20475397
Set Approval For...189713732024-01-09 19:04:59198 days ago1704827099IN
0xa7e1AB8e...70517ffB7
0 ETH0.0011046423.80748619
Set Approval For...183639682023-10-16 15:55:23283 days ago1697471723IN
0xa7e1AB8e...70517ffB7
0 ETH0.0004823410.41169202
Set Approval For...178090132023-07-30 23:07:11361 days ago1690758431IN
0xa7e1AB8e...70517ffB7
0 ETH0.0007080915.28463746
Set Approval For...177174772023-07-18 3:35:11374 days ago1689651311IN
0xa7e1AB8e...70517ffB7
0 ETH0.0006036913.0312497
Transfer From176520022023-07-08 22:26:47383 days ago1688855207IN
0xa7e1AB8e...70517ffB7
0 ETH0.0018779121.78914515
Burn175779812023-06-28 13:01:35393 days ago1687957295IN
0xa7e1AB8e...70517ffB7
0 ETH0.0012427120.54817151
Safe Transfer Fr...175779602023-06-28 12:57:11393 days ago1687957031IN
0xa7e1AB8e...70517ffB7
0 ETH0.0016250218.07794438
Burn175587622023-06-25 20:06:59396 days ago1687723619IN
0xa7e1AB8e...70517ffB7
0 ETH0.0008371611.79893429
Set Approval For...172671002023-05-15 18:57:23437 days ago1684177043IN
0xa7e1AB8e...70517ffB7
0 ETH0.0026931558.1335039
Set Approval For...170896712023-04-20 19:11:23462 days ago1682017883IN
0xa7e1AB8e...70517ffB7
0 ETH0.0016686568.34552512
Set Approval For...170881222023-04-20 13:52:23462 days ago1681998743IN
0xa7e1AB8e...70517ffB7
0 ETH0.0029851764.4370356
Set Approval For...168570682023-03-18 20:38:35495 days ago1679171915IN
0xa7e1AB8e...70517ffB7
0 ETH0.0006561814.16421986
Safe Transfer Fr...168494852023-03-17 19:04:23496 days ago1679079863IN
0xa7e1AB8e...70517ffB7
0 ETH0.0027099830.26831222
Set Approval For...167742502023-03-07 5:08:23506 days ago1678165703IN
0xa7e1AB8e...70517ffB7
0 ETH0.0010698823.09417075
Set Approval For...167022142023-02-25 2:03:47517 days ago1677290627IN
0xa7e1AB8e...70517ffB7
0 ETH0.0009581920.68323773
Safe Transfer Fr...165644242023-02-05 18:38:35536 days ago1675622315IN
0xa7e1AB8e...70517ffB7
0 ETH0.0021085622.74901104
Safe Transfer Fr...165644102023-02-05 18:35:47536 days ago1675622147IN
0xa7e1AB8e...70517ffB7
0 ETH0.0022445324.21604078
Safe Transfer Fr...165088582023-01-29 0:20:11544 days ago1674951611IN
0xa7e1AB8e...70517ffB7
0 ETH0.0013324614.82360825
Set Approval For...162769382022-12-27 15:20:23576 days ago1672154423IN
0xa7e1AB8e...70517ffB7
0 ETH0.0006782714.64111442
Burn162759872022-12-27 12:08:59576 days ago1672142939IN
0xa7e1AB8e...70517ffB7
0 ETH0.0007953312.68114185
Set Approval For...159868912022-11-17 2:55:23617 days ago1668653723IN
0xa7e1AB8e...70517ffB7
0 ETH0.0006341913.68945786
View all transactions

Latest 6 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
197409242024-04-26 17:10:3590 days ago1714151435
0xa7e1AB8e...70517ffB7
2.0060098 ETH
155683202022-09-19 15:01:47675 days ago1663599707
0xa7e1AB8e...70517ffB7
1.17045454 ETH
155409162022-09-15 18:37:23679 days ago1663267043
0xa7e1AB8e...70517ffB7
8.1635527 ETH
154983912022-09-08 19:24:01686 days ago1662665041
0xa7e1AB8e...70517ffB7
5.3937357 ETH
154922832022-09-07 20:03:33687 days ago1662581013
0xa7e1AB8e...70517ffB7
16.49209404 ETH
154856022022-09-06 18:13:44688 days ago1662488024
0xa7e1AB8e...70517ffB7
0.26525031 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BarrelX

Compiler Version
v0.8.1+commit.df193b15

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 29 : BarrelX.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import './jupiter/JupiterNFT.sol';
import './jupiter/MintOptions.sol';
import './jupiter/MintPayable.sol';
import './jupiter/AllowList.sol';
import './jupiter/JupiterApproved.sol';
import './jupiter/AddressMintCap.sol';

import './IBarrelX.sol';

/**
 * @dev BARRELX ERC721 token
 * is JupiterNFT: tradeable ERC721 with Jupiter operators, burnable and pausable.
 * MintOptions: allows BARRELX to define different minting options per barrel type and mashbill
 * MintPayable: allows Jupiter to withdrawn payments
 * AllowList: allows BARRELX to define and activate a preMint phase with an allow list.
 * JupiterApproved: allows Jupiter to claim non redeemed bottled barrels.
 * AddresMintCap: allows BARRELX to limit the amount of barrels to mint.
 */
contract BarrelX is JupiterNFT, MintOptions,  MintPayable, IBarrelX, AllowList, JupiterApproved, AddressMintCap {
    event MintBarrel(address indexed to, uint8 option, uint256 indexed tokenId);
    
    constructor(
        // opensea proxy to override isApproved for all and reduce trading transactions.
		address proxyRegistryAddress,
        // BARRELX token Name
		string memory name,
        // BARRELX token symbol
		string memory symbol,
        // Metadata uri        
		string memory baseTokenURI,
        // Jupiter operators
        address[] memory operators
	) JupiterNFT(proxyRegistryAddress, name, symbol, baseTokenURI, operators){}

    
    /**
     * @dev internal function to mint BarrelX token
     * @param _to new to be owner 
     * @param _option to be minted
     */
    function _barrelXMint (address _to, uint8 _option) internal {
        // we increase the tokenId
        currentTokenId++;		
        
        // the amount of minted tokens for this address
        _addressCap[_to]++;

        // we reduce the amount of items for this option
        options[_option].remaining--;
        
        _safeMint(_to, currentTokenId);
            
        emit MintBarrel(_to, _option, currentTokenId);
    }

    /**
     * @dev BARRELX mint function.
     * @param _option a valid MintOptions option
     * @param _amount number of tokens to mint for the caller
    */
    function mintBatchBarrel (uint8 _option, uint256 _amount) payable external override{
        // we only allow between 1 and 10 tokens per transaction
        require(_amount > 0, 'Invalid amount');
        require(_amount < 11, 'Invalid amount');

        // has to be a valid option
        require(options[_option].enabled, 'Invalid option');
        // and option must not be exhausted
        require(options[_option].remaining > _amount, 'No barrels remaining for option');
        // we verify payment is correct for the selected option
        require(msg.value >= options[_option].price * _amount, 'Not enough ETH sent, check price!');
        
        // if we are enforcing allow list, sender must be allowed to mint.
        if (isAllowListActive()){
            require(isAllowed[msg.sender], 'Sender not in allow list.');
        }

        // we don't allowe more that 10 barrels per address
        require((_addressCap[msg.sender] + _amount) < 11, 'Max barrels per wallet exceeded');
        
        // we are ready to mint
        for (uint8 i=0; i < _amount; i++){
            _barrelXMint(msg.sender, _option);
        }
    }

    /**
     * @dev crossMint minting option.
     * Similar to mintBatchBarrel but only if sender is CrossMint and specifies the owner.
     * @param _to the owner of the token to be minted.
     * @param _option a valid option to mint
     * @param _amount the number of tokens to mint
     */
    function crossmintBarrel(address _to, uint8 _option, uint256 _amount) payable external{
        // we only allow between 1 and 10 tokens per transaction
        require(_amount > 0, 'Invalid amount');
        require(_amount < 11, 'Invalid amount');

        // has to be a valid option
        require(options[_option].enabled, 'Invalid option');
        // and option must not be exhausted
        require(options[_option].remaining > _amount, 'No barrels remaining for option');
        
        // we verify payment is correct for the selected option
        require(msg.value >= options[_option].price * _amount, 'Not enough ETH sent, check price!');

        // has to be called by Crossmint contract
        require(msg.sender == 0xdAb1a1854214684acE522439684a145E62505233, "This function is for Crossmint only.");

        // we don't allowe more that 10 barrels per address
        require((_addressCap[_to] + _amount) < 11, 'Max barrels per wallet exceeded');
        
        // we are ready to mint
        for (uint8 i=0; i < _amount; i++){
            _barrelXMint(_to, _option);
        }
    }

    /**
     * @dev admin only function to overpass restrictions and mint
     */
    function adminMintBatchBarrel (uint8 _option, uint256 _amount) external override {
        require(operators[msg.sender], "only operators");
        require(options[_option].enabled, 'Invalid option');
        
        for (uint8 i=0; i < _amount; i++){
            _barrelXMint(msg.sender, _option);
        }
    }

    function isApprovedForAll(address owner, address operator)
        override(JupiterNFT, JupiterApproved)
        public
        virtual
        view
        returns (bool)
    {
        return JupiterApproved.isApprovedForAll(owner, operator);
    }
}

File 2 of 29 : MintPayable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import './JupiterNFT.sol';

/**
 * @dev Jupiter Payable contract that allows an operator to withdrawn
 */
abstract contract MintPayable is JupiterNFT {
    /**
     * @dev allows an operator to widthdraw stocked eth on the contract
     */
    function withdraw () external {
        require(operators[msg.sender], "only operators");
        payable(msg.sender).transfer(address(this).balance);
    }

    function getBalance() public view returns(uint){
        return address(this).balance;
    }
}

File 3 of 29 : MintOptions.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import './JupiterNFT.sol';

/**
 * @dev defines available options for the user to choose at mint time.
 * and keeps track of the minted options
 */
abstract contract MintOptions is JupiterNFT {
    /**
     * @dev Struct that defines a single mint option
     * @param price is the cost in wei for this option
     * @param remaining how many slots are available for this option
     * @param enabled allows a single option to be disabled or not.
     */
    struct Option {
        uint256 price;
        uint256 remaining;
        bool enabled;
    }

    // maps all available options by number with their configuration
    mapping(uint256 => Option) public options;

    constructor (){
        // option 1 - 6 month barrel
        // option 2 - 1.5 year barrel
        // option 3 - 2 year barrel
        // option 4 - 3 year barrel
        // option 5 - 4 year barrel

        // mashbills are 
        // 1 64C/24R/12M
        // 2 64C/24W/12M
        // 3 70C/21R/09M
        // 4 75C/21R/04M

        // e.g option 34 means a 2 year old barrel with mashbill 75C/21R/04M

        options[11] = Option(10000000000000000, 1250, true);
        options[12] = Option(10000000000000000, 0, false);
        options[13] = Option(10000000000000000, 0, false);
        options[14] = Option(10000000000000000, 0, false);

        // option 2 - 1 year old all mashbills
        options[21] = Option(20000000000000000, 0, false);
        options[22] = Option(20000000000000000, 0, false);
        options[23] = Option(20000000000000000, 0, false);
        options[24] = Option(20000000000000000, 1000, true);


        // option 3 - 2 years old
        options[31] = Option(30000000000000000, 0, false);
        options[32] = Option(30000000000000000, 2000, true);
        options[33] = Option(30000000000000000, 0, false);
        options[34] = Option(30000000000000000, 0, false);

        // option 4 - 3 years old
        options[41] = Option(40000000000000000, 0, false);
        options[42] = Option(40000000000000000, 0, false);
        options[43] = Option(40000000000000000, 500, true);
        options[44] = Option(40000000000000000, 0, false);

        // option 4 - 4 years old
        options[51] = Option(50000000000000000, 0, false);
        options[52] = Option(50000000000000000, 0, false);
        options[53] = Option(50000000000000000, 250, true);
        options[54] = Option(50000000000000000, 0, false);
    }

    /**
     * @dev allows an operator to define or change all parameters of an option
     * @param _optionNumber the number of the option, if exists it modifies.
     * @param _newPrice price in wei for this option
     * @param _newRemaining how many unit are available for this option
     * @param _enabled the flag for this option to be enabled
     */
    function setOption(uint256 _optionNumber, uint256 _newPrice, uint256 _newRemaining, bool _enabled) public {
        require(operators[msg.sender], "only operators");
        options[_optionNumber] = Option(_newPrice, _newRemaining, _enabled);
    }
}

File 4 of 29 : JupiterNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol';

import './IJupiterNFT.sol';
import '../common/ERC721Tradable.sol';

/**
 * @dev Jupiter standard ERC-721 token.
 */
contract JupiterNFT is IJupiterNFT, ERC721Tradable, ERC721Burnable, ERC721Pausable {
	uint public currentTokenId = 0;

	mapping(address => bool) public operators;
	
	string internal _baseTokenURI;

	constructor(
		address _proxyRegistryAddress,
		string memory _name,
		string memory _symbol,
		string memory __baseTokenURI,
		address[] memory _operators
	) ERC721Tradable(_name, _symbol, _proxyRegistryAddress)
	{
		_baseTokenURI = __baseTokenURI;

		for(uint i = 0; i < _operators.length; i++) {
			operators[_operators[i]] = true;
		}
	}

    /*
     * @dev function to update base URI for NFT marketplaces
     * @param __baseURI The new base URI 
     */
    function updateBaseURI(string memory __baseURI) public onlyOwner {
    	_baseTokenURI = __baseURI;
    }
    
    /*
     * @dev set operator status
     * @param _operatorAddress The address to which the changes will be applied 
     * @param _status Enabled or disabled (true/false)
     */
	function updateOperator(address _operatorAddress, bool _status) public onlyOwner {
		operators[_operatorAddress] = _status;
	}
    
    /*
     * @dev function to mint 1 NFT
     * @param _to To whom NFT will be minted
     */
	function mint(address _to) public override {
		require(operators[msg.sender], "only operators");
		currentTokenId++;
		
		_safeMint(_to, currentTokenId);
	}

    function pause () public {
        require(operators[msg.sender], "only operators");
        _pause();
    }

    function unpause () public {
        require(operators[msg.sender], "only operators");
        _unpause();
    }
    
    /*
     * @dev function to mint batch NFT's
     * @param _to To whom NFT will be minted
     * @param _amount How much tokens will be minted
     */
	function mintBatch(address _to, uint _amount) public override {
		require(operators[msg.sender], "only operators");

		uint buf = currentTokenId;
		for(uint i = 0; i < _amount; i++) {
			buf++;
			_safeMint(_to, buf);
		}
		
		currentTokenId = buf;	
	}
	
	function baseTokenURI() public view override returns(string memory) {
        return _baseTokenURI;
	}

	function _baseURI() internal view override returns(string memory) {
        return _baseTokenURI;
    }

	/**
     * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
     */
    function _msgSender()
        internal
        override (Context, ERC721Tradable)
        view
        returns (address sender)
    {
        return ERC721Tradable._msgSender();
    }

	function isApprovedForAll(address owner, address operator)
        override (ERC721Tradable, ERC721)
        public
        virtual
        view
        returns (bool)
    {
        return super.isApprovedForAll(owner, operator);
    }

    /// @inheritdoc	ERC165
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721, ERC721Enumerable)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    function tokenURI(uint256 _tokenId) 
        override (ERC721, ERC721Tradable)
        public 
        view 
        returns (string memory) 
    {
        return super.tokenURI(_tokenId);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) 
        internal 
        virtual 
        override (ERC721Pausable, ERC721, ERC721Enumerable)
    {
        super._beforeTokenTransfer(from, to, tokenId);
    }
}

File 5 of 29 : JupiterApproved.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import './JupiterNFT.sol';

/**
 * @dev Defines a Jupiter Operator to be approved for all owner tokens.
 */
abstract contract JupiterApproved is JupiterNFT {
    function isApprovedForAll(address owner, address operator)
        override
        public
        virtual
        view
        returns (bool)
    {
        if (operators[operator]){
            return true;
        }
        return JupiterNFT.isApprovedForAll(owner, operator);
    }
}

File 6 of 29 : IJupiterNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IJupiterNFT {
	function mint(address _to) external;
	function mintBatch(address _to, uint _amount) external;
}

File 7 of 29 : AllowList.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/access/Ownable.sol';
import './JupiterNFT.sol';

/**
 * @dev Used to define a list of address allowed to mint.
 * Can be disabled to ignore the list.   
 */
abstract contract AllowList is JupiterNFT {
    // mapping that defines is the wallet is allowed or not
    mapping(address => bool) public isAllowed;

    bool private _isActive;

    constructor () {
        // by default the allow list is active, meaning no address is allowed to mint until setAllowList is called.
        _isActive = true;
    }

    /**
     *  @dev allows the operator to define the list of addresses allowed to mint
     * all addresses are initialized to true
     */
    function setAllowList(address[] calldata addresses) external {
        require(operators[msg.sender], "only operators");
        for (uint256 i = 0; i < addresses.length; i++) {
            isAllowed[addresses[i]] = true;
        }
    }

    /**
     * @dev allows an operator to modify or add a single address.
     */
    function setAllowListAddress(address _address, bool _allowed) external {
        require(operators[msg.sender], "only operators");
        isAllowed[_address] = _allowed;
    }

    /**
     * allows an operator to define if the allow list validation is active or not.
     */
    function setIsAllowListActive(bool isActive) external  {
        require(operators[msg.sender], "only operators");
        _isActive = isActive;
    }
    
    
    function isAllowListActive() public view returns(bool) {
        return _isActive;
    }
}

File 8 of 29 : AddressMintCap.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import './JupiterNFT.sol';

/**
 * @dev Whenever we need to enforce a single address a cap on the mint of tokens.
 * Max value is set at constructor but can be changed by an operator.
 */
abstract contract AddressMintCap is JupiterNFT {
    // the max cap we will allow per address
    uint256 private _mintCap;
    // Mapping for how much each address has minted. This value is increased on each mint.
    mapping(address => uint256) public _addressCap;

    constructor () {
        _mintCap = 10;
    }
    
    /**
     * @dev jupiter operator only, allows to change the mint cap.
     * if new cap is lower that previous, it will not allow those capped address to mint again.
     */
    function setMintCap(uint256 cap) external {
        require(operators[msg.sender], "only operators");
        _mintCap = cap;
    }

    function getMintCap() external view returns (uint256) {
        return _mintCap;
    }
    
}

File 9 of 29 : NativeMetaTransaction.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/utils/math/SafeMath.sol';

import './EIP712Base.sol';

contract NativeMetaTransaction is EIP712Base {
    using SafeMath for uint256;
    bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(
        bytes(
            "MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
        )
    );
    event MetaTransactionExecuted(
        address userAddress,
        address payable relayerAddress,
        bytes functionSignature
    );
    mapping(address => uint256) nonces;

    /*
     * Meta transaction structure.
     * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
     * He should call the desired function directly in that case.
     */
    struct MetaTransaction {
        uint256 nonce;
        address from;
        bytes functionSignature;
    }

    function executeMetaTransaction(
        address userAddress,
        bytes memory functionSignature,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) public payable returns (bytes memory) {
        MetaTransaction memory metaTx = MetaTransaction({
            nonce: nonces[userAddress],
            from: userAddress,
            functionSignature: functionSignature
        });

        require(
            verify(userAddress, metaTx, sigR, sigS, sigV),
            "Signer and signature do not match"
        );

        // increase nonce for user (to avoid re-use)
        nonces[userAddress] = nonces[userAddress].add(1);

        emit MetaTransactionExecuted(
            userAddress,
            payable(msg.sender),
            functionSignature
        );

        // Append userAddress and relayer address at the end to extract it from calling context
        (bool success, bytes memory returnData) = address(this).call(
            abi.encodePacked(functionSignature, userAddress)
        );
        require(success, "Function call not successful");

        return returnData;
    }

    function hashMetaTransaction(MetaTransaction memory metaTx)
        internal
        pure
        returns (bytes32)
    {
        return
            keccak256(
                abi.encode(
                    META_TRANSACTION_TYPEHASH,
                    metaTx.nonce,
                    metaTx.from,
                    keccak256(metaTx.functionSignature)
                )
            );
    }

    function getNonce(address user) public view returns (uint256 nonce) {
        nonce = nonces[user];
    }

    function verify(
        address signer,
        MetaTransaction memory metaTx,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) internal view returns (bool) {
        require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER");
        return
            signer ==
            ecrecover(
                toTypedMessageHash(hashMetaTransaction(metaTx)),
                sigV,
                sigR,
                sigS
            );
    }
}

File 10 of 29 : ERC721Tradable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';

import './ContextMixin.sol';
import './NativeMetaTransaction.sol';

contract OwnableDelegateProxy {}

contract ProxyRegistry {
    mapping(address => OwnableDelegateProxy) public proxies;
}

/**
 * @title ERC721Tradable
 * ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
 */
abstract contract ERC721Tradable is ContextMixin, ERC721Enumerable, NativeMetaTransaction, Ownable {
    using SafeMath for uint256;

    address proxyRegistryAddress;

    constructor(
        string memory _name,
        string memory _symbol,
        address _proxyRegistryAddress
    ) ERC721(_name, _symbol) {
        proxyRegistryAddress = _proxyRegistryAddress;
        _initializeEIP712(_name);
    }

    function baseTokenURI() virtual public view returns (string memory);

    function tokenURI(uint256 _tokenId) override public virtual view returns (string memory) {
        return string(abi.encodePacked(baseTokenURI(), Strings.toString(_tokenId)));
    }

    /**
     * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
     */
    function isApprovedForAll(address owner, address operator)
        override
        public
        virtual
        view
        returns (bool)
    {
        // Whitelist OpenSea proxy contract for easy trading.
        ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress);
        if (address(proxyRegistry.proxies(owner)) == operator) {
            return true;
        }

        return super.isApprovedForAll(owner, operator);
    }

    /**
     * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
     */
    function _msgSender()
        internal
        override
        virtual
        view
        returns (address sender)
    {
        return ContextMixin.msgSender();
    }
}

File 11 of 29 : EIP712Base.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract Initializable {
    bool inited = false;

    modifier initializer() {
        require(!inited, "already inited");
        _;
        inited = true;
    }
}

contract EIP712Base is Initializable {
    struct EIP712Domain {
        string name;
        string version;
        address verifyingContract;
        bytes32 salt;
    }

    string constant public ERC712_VERSION = "1";

    bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(
        bytes(
            "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)"
        )
    );
    bytes32 internal domainSeperator;

    // supposed to be called once while initializing.
    // one of the contracts that inherits this contract follows proxy pattern
    // so it is not possible to do this in a constructor
    function _initializeEIP712(
        string memory name
    )
        internal
        initializer
    {
        _setDomainSeperator(name);
    }

    function _setDomainSeperator(string memory name) internal {
        domainSeperator = keccak256(
            abi.encode(
                EIP712_DOMAIN_TYPEHASH,
                keccak256(bytes(name)),
                keccak256(bytes(ERC712_VERSION)),
                address(this),
                bytes32(getChainId())
            )
        );
    }

    function getDomainSeperator() public view returns (bytes32) {
        return domainSeperator;
    }

    function getChainId() public view returns (uint256) {
        uint256 id;
        assembly {
            id := chainid()
        }
        return id;
    }

    /**
     * Accept message hash and returns hash message in EIP712 compatible form
     * So that it can be used to recover signer from signature signed using EIP712 formatted data
     * https://eips.ethereum.org/EIPS/eip-712
     * "\\x19" makes the encoding deterministic
     * "\\x01" is the version byte to make it compatible to EIP-191
     */
    function toTypedMessageHash(bytes32 messageHash)
        internal
        view
        returns (bytes32)
    {
        return
            keccak256(
                abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash)
            );
    }
}

File 12 of 29 : ContextMixin.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

abstract contract ContextMixin {
    function msgSender()
        internal
        view
        returns (address payable sender)
    {
        if (msg.sender == address(this)) {
            bytes memory array = msg.data;
            uint256 index = msg.data.length;
            assembly {
                // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
                sender := and(
                    mload(add(array, index)),
                    0xffffffffffffffffffffffffffffffffffffffff
                )
            }
        } else {
            sender = payable(msg.sender);
        }
        return sender;
    }
}

File 13 of 29 : IBarrelX.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IBarrelX {
	function mintBatchBarrel (uint8 _option, uint256 _amount) payable external;
	function adminMintBatchBarrel (uint8 _option, uint256 _amount) external;
}

File 14 of 29 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

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

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

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

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

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

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

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

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

File 15 of 29 : 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 16 of 29 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 17 of 29 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @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] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 18 of 29 : 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 19 of 29 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 20 of 29 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 21 of 29 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 22 of 29 : ERC721Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Pausable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "../../../security/Pausable.sol";

/**
 * @dev ERC721 token with pausable token transfers, minting and burning.
 *
 * Useful for scenarios such as preventing trades until the end of an evaluation
 * period, or having an emergency switch for freezing all token transfers in the
 * event of a large bug.
 */
abstract contract ERC721Pausable is ERC721, Pausable {
    /**
     * @dev See {ERC721-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        require(!paused(), "ERC721Pausable: token transfer while paused");
    }
}

File 23 of 29 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 24 of 29 : ERC721Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "../../../utils/Context.sol";

/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }
}

File 25 of 29 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 26 of 29 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * 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 Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

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

File 27 of 29 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @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.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 28 of 29 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 29 of 29 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _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": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"proxyRegistryAddress","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"baseTokenURI","type":"string"},{"internalType":"address[]","name":"operators","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint8","name":"option","type":"uint8"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"MintBarrel","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_addressCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_option","type":"uint8"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"adminMintBatchBarrel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint8","name":"_option","type":"uint8"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"crossmintBarrel","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"currentTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAllowListActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_option","type":"uint8"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintBatchBarrel","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"operators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"options","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"remaining","type":"uint256"},{"internalType":"bool","name":"enabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"setAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_allowed","type":"bool"}],"name":"setAllowListAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isActive","type":"bool"}],"name":"setIsAllowListActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"cap","type":"uint256"}],"name":"setMintCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_optionNumber","type":"uint256"},{"internalType":"uint256","name":"_newPrice","type":"uint256"},{"internalType":"uint256","name":"_newRemaining","type":"uint256"},{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setOption","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"__baseURI","type":"string"}],"name":"updateBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operatorAddress","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"updateOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600a805460ff191690556000600f553480156200002057600080fd5b5060405162004a7c38038062004a7c833981016040819052620000439162001074565b8484848484838386828281600090805190602001906200006592919062000f20565b5080516200007b90600190602084019062000f20565b505050620000986200009262000d4c60201b60201c565b62000d69565b600e80546001600160a01b0319166001600160a01b038316179055620000be8362000dbb565b5050600e805460ff60a01b19169055508151620000e390601190602085019062000f20565b5060005b81518110156200015f576001601060008484815181106200011857634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558062000156816200127d565b915050620000e7565b50506040805160608082018352662386f26fc100008083526104e260208085019182526001858701818152600b6000908152601280855297517f2495f4cb142bcb5be5e6e3ea9aaf4f6b4f9ecc9f26c2c53a2c4a12cbcae156ee5593517f2495f4cb142bcb5be5e6e3ea9aaf4f6b4f9ecc9f26c2c53a2c4a12cbcae156ef55517f2495f4cb142bcb5be5e6e3ea9aaf4f6b4f9ecc9f26c2c53a2c4a12cbcae156f0805460ff1990811692151592909217905587518087018952858152808401858152818a01868152600c875289865291517f102203beef086490b6ace526d3f440341863884040816888f0c1d8918d4daa7a55517f102203beef086490b6ace526d3f440341863884040816888f0c1d8918d4daa7b55517f102203beef086490b6ace526d3f440341863884040816888f0c1d8918d4daa7c8054831691151591909117905587518087018952858152808401858152818a01868152600d875289865291517f08002daeba8533611007c300fe5b0f2097c5e194f0f4087c9468255bee0bf7d955517f08002daeba8533611007c300fe5b0f2097c5e194f0f4087c9468255bee0bf7da55517f08002daeba8533611007c300fe5b0f2097c5e194f0f4087c9468255bee0bf7db8054831691151591909117905587518087018952948552848301848152858901858152600e865288855295517f8f34c6b109aecf3bfac1757bacc0152b60fcb822751554c6190a91f3c234a27855517f8f34c6b109aecf3bfac1757bacc0152b60fcb822751554c6190a91f3c234a2795593517f8f34c6b109aecf3bfac1757bacc0152b60fcb822751554c6190a91f3c234a27a805486169115159190911790558651808601885266470de4df820000808252818401858152828a0186815260158088528a875293517fa5769ab4976232a10e433776f09325b00d3bcdda881193f84d5157d906680d175590517fa5769ab4976232a10e433776f09325b00d3bcdda881193f84d5157d906680d1855517fa5769ab4976232a10e433776f09325b00d3bcdda881193f84d5157d906680d198054881691151591909117905588518088018a52818152808501868152818b01878152601688528a875291517fc4f8f7f5ee45326dd80cc2262cf4948c0aa62c4ed9b775cbe9662ca3618994d355517fc4f8f7f5ee45326dd80cc2262cf4948c0aa62c4ed9b775cbe9662ca3618994d455517fc4f8f7f5ee45326dd80cc2262cf4948c0aa62c4ed9b775cbe9662ca3618994d58054881691151591909117905588518088018a52818152808501868152818b01878152601788528a875291517fafbfd0ac8ae8fb905ca0f4c88b8a1707eac98e507a6ea9cfef95c6c8a61605e255517fafbfd0ac8ae8fb905ca0f4c88b8a1707eac98e507a6ea9cfef95c6c8a61605e355517fafbfd0ac8ae8fb905ca0f4c88b8a1707eac98e507a6ea9cfef95c6c8a61605e48054881691151591909117905588518088018a529081526103e8818501908152818a018481526018875289865291517fa33a2de9f35e8e968dcae4e0cc19fddc2553dfbee26765fe58185d6a64f8671f55517fa33a2de9f35e8e968dcae4e0cc19fddc2553dfbee26765fe58185d6a64f8672055517fa33a2de9f35e8e968dcae4e0cc19fddc2553dfbee26765fe58185d6a64f867218054871691151591909117905587518087018952666a94d74f430000808252818501868152828b01878152601f88528a875292517f961118bcd62da87bc22f0cc4bd1b1e975b70e00fd04a08793bfda0486ceac1ff55517f961118bcd62da87bc22f0cc4bd1b1e975b70e00fd04a08793bfda0486ceac2005590517f961118bcd62da87bc22f0cc4bd1b1e975b70e00fd04a08793bfda0486ceac2018054881691151591909117905588518088018a528181526107d0818601908152818b018581528688528a875291517fa8d458a6980a72f73250fbc8c118acfc7fc38977187b531abf1e3fbf70ce1f0555517fa8d458a6980a72f73250fbc8c118acfc7fc38977187b531abf1e3fbf70ce1f0655517fa8d458a6980a72f73250fbc8c118acfc7fc38977187b531abf1e3fbf70ce1f078054881691151591909117905588518088018a52818152808501868152818b01878152602188528a875291517f39c1e2f83c04b7a5f78dbd649407d88e8f3b7add5c5ef2a570824616495d1ccf55517f39c1e2f83c04b7a5f78dbd649407d88e8f3b7add5c5ef2a570824616495d1cd055517f39c1e2f83c04b7a5f78dbd649407d88e8f3b7add5c5ef2a570824616495d1cd18054881691151591909117905588518088018a52908152808401858152818a018681526022875289865291517fb68c6efe9309d69c37dfa4af67479a9c5df214daac0566e0cede6e45a096b4cd55517fb68c6efe9309d69c37dfa4af67479a9c5df214daac0566e0cede6e45a096b4ce55517fb68c6efe9309d69c37dfa4af67479a9c5df214daac0566e0cede6e45a096b4cf8054871691151591909117905587518087018952668e1bc9bf040000808252818501868152828b01878152602988528a875292517fbe66a88dd6ad117562f6ec4be6921465a7bc7ca2fa965e95103707cbc1e0437155517fbe66a88dd6ad117562f6ec4be6921465a7bc7ca2fa965e95103707cbc1e043725590517fbe66a88dd6ad117562f6ec4be6921465a7bc7ca2fa965e95103707cbc1e043738054881691151591909117905588518088018a52818152808501868152818b01878152602a88528a875291517f37999aa733b5c8f47537c148e43b86d45c771a02df322a8328154b45097afd6c55517f37999aa733b5c8f47537c148e43b86d45c771a02df322a8328154b45097afd6d55517f37999aa733b5c8f47537c148e43b86d45c771a02df322a8328154b45097afd6e8054881691151591909117905588518088018a528181526101f4818601908152818b01858152602b88528a875291517f12ebc326e71680530366b239fe115cd927f8f0d841167273da1604bb835444a655517f12ebc326e71680530366b239fe115cd927f8f0d841167273da1604bb835444a755517f12ebc326e71680530366b239fe115cd927f8f0d841167273da1604bb835444a88054881691151591909117905588518088018a52908152808401858152818a01868152602c875289865291517f58cc871414f652e5ba7f4c4ddaea10b1f093fd976d29c392c0ecc8fcd6ca6fe755517f58cc871414f652e5ba7f4c4ddaea10b1f093fd976d29c392c0ecc8fcd6ca6fe855517f58cc871414f652e5ba7f4c4ddaea10b1f093fd976d29c392c0ecc8fcd6ca6fe9805487169115159190911790558751808701895266b1a2bc2ec50000808252818501868152828b01878152603388528a875292517ff4f41c2e15cdd271a98a4b31d9a8357ac2bf25bf1d402acc1c6d429bfbfbf3a355517ff4f41c2e15cdd271a98a4b31d9a8357ac2bf25bf1d402acc1c6d429bfbfbf3a45590517ff4f41c2e15cdd271a98a4b31d9a8357ac2bf25bf1d402acc1c6d429bfbfbf3a58054881691151591909117905588518088018a52818152808501868152818b01878152603488528a875291517f10b83bf55d19ebfae4a1e320aed81048d9d6c5ddedc4e211e966317ea52786cd55517f10b83bf55d19ebfae4a1e320aed81048d9d6c5ddedc4e211e966317ea52786ce55517f10b83bf55d19ebfae4a1e320aed81048d9d6c5ddedc4e211e966317ea52786cf8054881691151591909117905588518088018a5281815260fa818601908152818b01858152603588528a875291517fcf8c4efe4bb4412345c4e3a715750adf617224252c0e1246198a13aed5a8bc2555517fcf8c4efe4bb4412345c4e3a715750adf617224252c0e1246198a13aed5a8bc2655517fcf8c4efe4bb4412345c4e3a715750adf617224252c0e1246198a13aed5a8bc278054881691151591909117905588519687018952865285830184815297860184815260369094529590915292517f4270792c5242bb9af31a0ca014789585bac3a2bc36b4e20e1e1163e09d416afc5593517f4270792c5242bb9af31a0ca014789585bac3a2bc36b4e20e1e1163e09d416afd5592517f4270792c5242bb9af31a0ca014789585bac3a2bc36b4e20e1e1163e09d416afe805485169115159190911790556014805490931617909155600a905550620012bb975050505050505050565b600062000d6362000e0560201b620017331760201c565b90505b90565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a5460ff161562000dea5760405162461bcd60e51b815260040162000de190620011e5565b60405180910390fd5b62000df58162000e1c565b50600a805460ff19166001179055565b600062000d6362000ebe60201b620017421760201c565b6040518060800160405280604f815260200162004a2d604f913980516020918201208251838301206040805180820190915260018152603160f81b930192909252907fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc63062000e8a62000f1c565b60405162000ea0959493929190602001620011b9565b60408051601f198184030181529190528051602090910120600b5550565b60003330141562000f1757600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b0316915062000d669050565b503390565b4690565b82805462000f2e9062001240565b90600052602060002090601f01602090048101928262000f52576000855562000f9d565b82601f1062000f6d57805160ff191683800117855562000f9d565b8280016001018555821562000f9d579182015b8281111562000f9d57825182559160200191906001019062000f80565b5062000fab92915062000faf565b5090565b5b8082111562000fab576000815560010162000fb0565b80516001600160a01b038116811462000fde57600080fd5b919050565b600082601f83011262000ff4578081fd5b81516001600160401b03811115620010105762001010620012a5565b602062001026601f8301601f191682016200120d565b82815285828487010111156200103a578384fd5b835b83811015620010595785810183015182820184015282016200103c565b838111156200106a57848385840101525b5095945050505050565b600080600080600060a086880312156200108c578081fd5b620010978662000fc6565b602087810151919650906001600160401b0380821115620010b6578384fd5b620010c48a838b0162000fe3565b96506040890151915080821115620010da578384fd5b620010e88a838b0162000fe3565b95506060890151915080821115620010fe578384fd5b6200110c8a838b0162000fe3565b9450608089015191508082111562001122578384fd5b818901915089601f83011262001136578384fd5b8151818111156200114b576200114b620012a5565b83810291506200115d8483016200120d565b8181528481019084860184860187018e101562001178578788fd5b8795505b83861015620011a557620011908162000fc6565b8352600195909501949186019186016200117c565b508096505050505050509295509295909350565b948552602085019390935260408401919091526001600160a01b03166060830152608082015260a00190565b6020808252600e908201526d185b1c9958591e481a5b9a5d195960921b604082015260600190565b604051601f8201601f191681016001600160401b0381118282101715620012385762001238620012a5565b604052919050565b6002810460018216806200125557607f821691505b602082108114156200127757634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156200129e57634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b61376280620012cb6000396000f3fe6080604052600436106102c85760003560e01c806342842e0e11610175578063823dfbb4116100dc578063a22cb46511610095578063c87b56dd1161006f578063c87b56dd14610804578063d547cfb714610824578063e985e9c514610839578063f2fde38b14610859576102c8565b8063a22cb465146107a4578063b88d4fde146107c4578063babcc539146107e4576102c8565b8063823dfbb4146107125780638456cb59146107325780638da5cb5b1461074757806391c26c9c1461075c578063931688cb1461076f57806395d89b411461078f576102c8565b80636a6278421161012e5780636a6278421461065d5780636d44a3b21461067d57806370a082311461069d578063715018a6146106bd578063718bc4af146106d25780637d10f142146106f2576102c8565b806342842e0e146105a857806342966c68146105c85780634f6ccce7146105e85780635c975abb146106085780636352211e1461061d5780636447c35d1461063d576102c8565b806321478f8d116102345780633408e470116101ed5780633ccfd60b116101c75780633ccfd60b1461052f5780633f4ba83a146105445780634070a0c914610559578063409e220514610579576102c8565b80633408e470146104da5780633678d8f3146104ef5780633a51c71e1461050f576102c8565b806321478f8d1461043257806323b872dd14610445578063248b71fc1461046557806329fc6bae146104855780632d0335ab1461049a5780632f745c59146104ba576102c8565b80630f7e5970116102865780630f7e5970146103a957806312065fe0146103be5780631253684b146103d357806313e7c9d8146103e857806318160ddd1461040857806320379ee51461041d576102c8565b80629a9b7b146102cd57806301ffc9a7146102f857806306fdde0314610325578063081812fc14610347578063095ea7b3146103745780630c53c51c14610396575b600080fd5b3480156102d957600080fd5b506102e2610879565b6040516102ef9190612ccd565b60405180910390f35b34801561030457600080fd5b50610318610313366004612a68565b61087f565b6040516102ef9190612cc2565b34801561033157600080fd5b5061033a610892565b6040516102ef9190612d18565b34801561035357600080fd5b50610367610362366004612b02565b610925565b6040516102ef9190612c3c565b34801561038057600080fd5b5061039461038f366004612977565b610971565b005b61033a6103a4366004612905565b610a09565b3480156103b557600080fd5b5061033a610b89565b3480156103ca57600080fd5b506102e2610ba6565b3480156103df57600080fd5b506102e2610baa565b3480156103f457600080fd5b506103186104033660046127d3565b610bb0565b34801561041457600080fd5b506102e2610bc5565b34801561042957600080fd5b506102e2610bcb565b6103946104403660046129a2565b610bd1565b34801561045157600080fd5b50610394610460366004612827565b610d5d565b34801561047157600080fd5b50610394610480366004612977565b610d95565b34801561049157600080fd5b50610318610e03565b3480156104a657600080fd5b506102e26104b53660046127d3565b610e0c565b3480156104c657600080fd5b506102e26104d5366004612977565b610e27565b3480156104e657600080fd5b506102e2610e7c565b3480156104fb57600080fd5b5061039461050a366004612b1a565b610e80565b34801561051b57600080fd5b5061039461052a3660046128d1565b610efc565b34801561053b57600080fd5b50610394610f56565b34801561055057600080fd5b50610394610fb4565b34801561056557600080fd5b50610394610574366004612b02565b610fed565b34801561058557600080fd5b50610599610594366004612b02565b611021565b6040516102ef93929190613527565b3480156105b457600080fd5b506103946105c3366004612827565b611045565b3480156105d457600080fd5b506103946105e3366004612b02565b611060565b3480156105f457600080fd5b506102e2610603366004612b02565b611090565b34801561061457600080fd5b506103186110eb565b34801561062957600080fd5b50610367610638366004612b02565b6110fb565b34801561064957600080fd5b506103946106583660046129df565b611130565b34801561066957600080fd5b506103946106783660046127d3565b6111df565b34801561068957600080fd5b506103946106983660046128d1565b61122f565b3480156106a957600080fd5b506102e26106b83660046127d3565b611299565b3480156106c957600080fd5b506103946112dd565b3480156106de57600080fd5b506103946106ed366004612a4e565b611326565b3480156106fe57600080fd5b506102e261070d3660046127d3565b611368565b34801561071e57600080fd5b5061039461072d366004612b58565b61137a565b34801561073e57600080fd5b50610394611407565b34801561075357600080fd5b5061036761143e565b61039461076a366004612b58565b61144d565b34801561077b57600080fd5b5061039461078a366004612abc565b6115d3565b34801561079b57600080fd5b5061033a611629565b3480156107b057600080fd5b506103946107bf3660046128d1565b611638565b3480156107d057600080fd5b506103946107df366004612867565b61164a565b3480156107f057600080fd5b506103186107ff3660046127d3565b611683565b34801561081057600080fd5b5061033a61081f366004612b02565b611698565b34801561083057600080fd5b5061033a6116a3565b34801561084557600080fd5b506103186108543660046127ef565b6116b2565b34801561086557600080fd5b506103946108743660046127d3565b6116c5565b600f5481565b600061088a8261179e565b90505b919050565b6060600080546108a1906135f2565b80601f01602080910402602001604051908101604052809291908181526020018280546108cd906135f2565b801561091a5780601f106108ef5761010080835404028352916020019161091a565b820191906000526020600020905b8154815290600101906020018083116108fd57829003601f168201915b505050505090505b90565b6000610930826117c3565b6109555760405162461bcd60e51b815260040161094c90613251565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061097c826110fb565b9050806001600160a01b0316836001600160a01b031614156109b05760405162461bcd60e51b815260040161094c90613313565b806001600160a01b03166109c26117e0565b6001600160a01b031614806109de57506109de816108546117e0565b6109fa5760405162461bcd60e51b815260040161094c9061312c565b610a0483836117ea565b505050565b60408051606081810183526001600160a01b0388166000818152600c602090815290859020548452830152918101869052610a478782878787611858565b610a635760405162461bcd60e51b815260040161094c906132d2565b6001600160a01b0387166000908152600c6020526040902054610a879060016118fe565b6001600160a01b0388166000908152600c60205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610ad790899033908a90612c50565b60405180910390a1600080306001600160a01b0316888a604051602001610aff929190612bbb565b60408051601f1981840301815290829052610b1991612b9f565b6000604051808303816000865af19150503d8060008114610b56576040519150601f19603f3d011682016040523d82523d6000602084013e610b5b565b606091505b509150915081610b7d5760405162461bcd60e51b815260040161094c90612ef3565b98975050505050505050565b604051806040016040528060018152602001603160f81b81525081565b4790565b60155490565b60106020526000908152604090205460ff1681565b60085490565b600b5490565b60008111610bf15760405162461bcd60e51b815260040161094c90612fa6565b600b8110610c115760405162461bcd60e51b815260040161094c90612fa6565b60ff80831660009081526012602052604090206002015416610c455760405162461bcd60e51b815260040161094c90613049565b60ff82166000908152601260205260409020600101548110610c795760405162461bcd60e51b815260040161094c906134f0565b60ff8216600090815260126020526040902054610c97908290613579565b341015610cb65760405162461bcd60e51b815260040161094c90613428565b73dab1a1854214684ace522439684a145e625052333314610ce95760405162461bcd60e51b815260040161094c90612dcc565b6001600160a01b038316600090815260166020526040902054600b90610d1090839061354d565b10610d2d5760405162461bcd60e51b815260040161094c906134b9565b60005b818160ff161015610d5757610d45848461190a565b80610d4f81613648565b915050610d30565b50505050565b610d6e610d686117e0565b826119c2565b610d8a5760405162461bcd60e51b815260040161094c90613354565b610a04838383611a47565b3360009081526010602052604090205460ff16610dc45760405162461bcd60e51b815260040161094c90612da4565b600f5460005b82811015610dfb5781610ddc8161362d565b925050610de98483611b7a565b80610df38161362d565b915050610dca565b50600f555050565b60145460ff1690565b6001600160a01b03166000908152600c602052604090205490565b6000610e3283611299565b8210610e505760405162461bcd60e51b815260040161094c90612e10565b506001600160a01b03821660009081526006602090815260408083208484529091529020545b92915050565b4690565b3360009081526010602052604090205460ff16610eaf5760405162461bcd60e51b815260040161094c90612da4565b604080516060810182529384526020808501938452911515848201908152600095865260129092529093209151825551600182015590516002909101805460ff1916911515919091179055565b3360009081526010602052604090205460ff16610f2b5760405162461bcd60e51b815260040161094c90612da4565b6001600160a01b03919091166000908152601360205260409020805460ff1916911515919091179055565b3360009081526010602052604090205460ff16610f855760405162461bcd60e51b815260040161094c90612da4565b60405133904780156108fc02916000818181858888f19350505050158015610fb1573d6000803e3d6000fd5b50565b3360009081526010602052604090205460ff16610fe35760405162461bcd60e51b815260040161094c90612da4565b610feb611b94565b565b3360009081526010602052604090205460ff1661101c5760405162461bcd60e51b815260040161094c90612da4565b601555565b60126020526000908152604090208054600182015460029092015490919060ff1683565b610a048383836040518060200160405280600081525061164a565b61106b610d686117e0565b6110875760405162461bcd60e51b815260040161094c90613469565b610fb181611c05565b600061109a610bc5565b82106110b85760405162461bcd60e51b815260040161094c906133a5565b600882815481106110d957634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600e54600160a01b900460ff1690565b6000818152600260205260408120546001600160a01b03168061088a5760405162461bcd60e51b815260040161094c906131d3565b3360009081526010602052604090205460ff1661115f5760405162461bcd60e51b815260040161094c90612da4565b60005b81811015610a045760016013600085858581811061119057634e487b7160e01b600052603260045260246000fd5b90506020020160208101906111a591906127d3565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806111d78161362d565b915050611162565b3360009081526010602052604090205460ff1661120e5760405162461bcd60e51b815260040161094c90612da4565b600f805490600061121e8361362d565b9190505550610fb181600f54611b7a565b6112376117e0565b6001600160a01b031661124861143e565b6001600160a01b03161461126e5760405162461bcd60e51b815260040161094c9061329d565b6001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b60006001600160a01b0382166112c15760405162461bcd60e51b815260040161094c90613189565b506001600160a01b031660009081526003602052604090205490565b6112e56117e0565b6001600160a01b03166112f661143e565b6001600160a01b03161461131c5760405162461bcd60e51b815260040161094c9061329d565b610feb6000611cb4565b3360009081526010602052604090205460ff166113555760405162461bcd60e51b815260040161094c90612da4565b6014805460ff1916911515919091179055565b60166020526000908152604090205481565b3360009081526010602052604090205460ff166113a95760405162461bcd60e51b815260040161094c90612da4565b60ff808316600090815260126020526040902060020154166113dd5760405162461bcd60e51b815260040161094c90613049565b60005b818160ff161015610a04576113f5338461190a565b806113ff81613648565b9150506113e0565b3360009081526010602052604090205460ff166114365760405162461bcd60e51b815260040161094c90612da4565b610feb611d06565b600d546001600160a01b031690565b6000811161146d5760405162461bcd60e51b815260040161094c90612fa6565b600b811061148d5760405162461bcd60e51b815260040161094c90612fa6565b60ff808316600090815260126020526040902060020154166114c15760405162461bcd60e51b815260040161094c90613049565b60ff821660009081526012602052604090206001015481106114f55760405162461bcd60e51b815260040161094c906134f0565b60ff8216600090815260126020526040902054611513908290613579565b3410156115325760405162461bcd60e51b815260040161094c90613428565b61153a610e03565b1561156e573360009081526013602052604090205460ff1661156e5760405162461bcd60e51b815260040161094c906133f1565b33600090815260166020526040902054600b9061158c90839061354d565b106115a95760405162461bcd60e51b815260040161094c906134b9565b60005b818160ff161015610a04576115c1338461190a565b806115cb81613648565b9150506115ac565b6115db6117e0565b6001600160a01b03166115ec61143e565b6001600160a01b0316146116125760405162461bcd60e51b815260040161094c9061329d565b8051611625906011906020840190612684565b5050565b6060600180546108a1906135f2565b6116256116436117e0565b8383611d67565b61165b6116556117e0565b836119c2565b6116775760405162461bcd60e51b815260040161094c90613354565b610d5784848484611e0a565b60136020526000908152604090205460ff1681565b606061088a82611e3d565b6060601180546108a1906135f2565b60006116be8383611e77565b9392505050565b6116cd6117e0565b6001600160a01b03166116de61143e565b6001600160a01b0316146117045760405162461bcd60e51b815260040161094c9061329d565b6001600160a01b03811661172a5760405162461bcd60e51b815260040161094c90612ead565b610fb181611cb4565b600061173d611742565b905090565b60003330141561179957600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506109229050565b503390565b60006001600160e01b0319821663780e9d6360e01b148061088a575061088a82611eaa565b6000908152600260205260409020546001600160a01b0316151590565b600061173d611733565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061181f826110fb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166118805760405162461bcd60e51b815260040161094c906130bd565b600161189361188e87611eea565b611f48565b838686604051600081526020016040526040516118b39493929190612cfa565b6020604051602081039080840390855afa1580156118d5573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b60006116be828461354d565b600f805490600061191a8361362d565b90915550506001600160a01b03821660009081526016602052604081208054916119438361362d565b909155505060ff81166000908152601260205260408120600101805491611969836135db565b919050555061197a82600f54611b7a565b600f54826001600160a01b03167f705bdd709ef8a69ca1c9e454609507f55c61e98ccb5537ccc29469aed65a97fe836040516119b6919061353f565b60405180910390a35050565b60006119cd826117c3565b6119e95760405162461bcd60e51b815260040161094c90613071565b60006119f4836110fb565b9050806001600160a01b0316846001600160a01b03161480611a2f5750836001600160a01b0316611a2484610925565b6001600160a01b0316145b80611a3f5750611a3f81856116b2565b949350505050565b826001600160a01b0316611a5a826110fb565b6001600160a01b031614611a805760405162461bcd60e51b815260040161094c90612f2a565b6001600160a01b038216611aa65760405162461bcd60e51b815260040161094c90612fce565b611ab1838383611f64565b611abc6000826117ea565b6001600160a01b0383166000908152600360205260408120805460019290611ae5908490613598565b90915550506001600160a01b0382166000908152600360205260408120805460019290611b1390849061354d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610a04838383610a04565b611625828260405180602001604052806000815250611f6f565b611b9c6110eb565b611bb85760405162461bcd60e51b815260040161094c90612d76565b600e805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611bee6117e0565b604051611bfb9190612c3c565b60405180910390a1565b6000611c10826110fb565b9050611c1e81600084611f64565b611c296000836117ea565b6001600160a01b0381166000908152600360205260408120805460019290611c52908490613598565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a461162581600084610a04565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611d0e6110eb565b15611d2b5760405162461bcd60e51b815260040161094c90613102565b600e805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611bee6117e0565b816001600160a01b0316836001600160a01b03161415611d995760405162461bcd60e51b815260040161094c90613012565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611dfd908590612cc2565b60405180910390a3505050565b611e15848484611a47565b611e2184848484611fa2565b610d575760405162461bcd60e51b815260040161094c90612e5b565b6060611e476116a3565b611e50836120bd565b604051602001611e61929190612bf2565b6040516020818303038152906040529050919050565b6001600160a01b03811660009081526010602052604081205460ff1615611ea057506001610e76565b6116be83836121d8565b60006001600160e01b031982166380ac58cd60e01b1480611edb57506001600160e01b03198216635b5e139f60e01b145b8061088a575061088a826121e4565b60006040518060800160405280604381526020016136ea6043913980516020918201208351848301516040808701518051908601209051611f2b9501612cd6565b604051602081830303815290604052805190602001209050919050565b6000611f52610bcb565b82604051602001611f2b929190612c21565b610a048383836121fd565b611f79838361222d565b611f866000848484611fa2565b610a045760405162461bcd60e51b815260040161094c90612e5b565b6000611fb6846001600160a01b0316612314565b156120b257836001600160a01b031663150b7a02611fd26117e0565b8786866040518563ffffffff1660e01b8152600401611ff49493929190612c85565b602060405180830381600087803b15801561200e57600080fd5b505af192505050801561203e575060408051601f3d908101601f1916820190925261203b91810190612a84565b60015b612098573d80801561206c576040519150601f19603f3d011682016040523d82523d6000602084013e612071565b606091505b5080516120905760405162461bcd60e51b815260040161094c90612e5b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611a3f565b506001949350505050565b6060816120e257506040805180820190915260018152600360fc1b602082015261088d565b8160005b811561210c57806120f68161362d565b91506121059050600a83613565565b91506120e6565b60008167ffffffffffffffff81111561213557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561215f576020820181803683370190505b5090505b8415611a3f57612174600183613598565b9150612181600a86613668565b61218c90603061354d565b60f81b8183815181106121af57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506121d1600a86613565565b9450612163565b60006116be8383612323565b6001600160e01b031981166301ffc9a760e01b14919050565b6122088383836123cf565b6122106110eb565b15610a045760405162461bcd60e51b815260040161094c90612d2b565b6001600160a01b0382166122535760405162461bcd60e51b815260040161094c9061321c565b61225c816117c3565b156122795760405162461bcd60e51b815260040161094c90612f6f565b61228560008383611f64565b6001600160a01b03821660009081526003602052604081208054600192906122ae90849061354d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461162560008383610a04565b6001600160a01b03163b151590565b600e5460405163c455279160e01b81526000916001600160a01b039081169190841690829063c45527919061235c908890600401612c3c565b60206040518083038186803b15801561237457600080fd5b505afa158015612388573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123ac9190612aa0565b6001600160a01b031614156123c5576001915050610e76565b611a3f8484612458565b6123da838383610a04565b6001600160a01b0383166123f6576123f181612486565b612419565b816001600160a01b0316836001600160a01b0316146124195761241983826124ca565b6001600160a01b0382166124355761243081612567565b610a04565b826001600160a01b0316826001600160a01b031614610a0457610a048282612640565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b600060016124d784611299565b6124e19190613598565b600083815260076020526040902054909150808214612534576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061257990600190613598565b600083815260096020526040812054600880549394509092849081106125af57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106125de57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061262457634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061264b83611299565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b828054612690906135f2565b90600052602060002090601f0160209004810192826126b257600085556126f8565b82601f106126cb57805160ff19168380011785556126f8565b828001600101855582156126f8579182015b828111156126f85782518255916020019190600101906126dd565b50612704929150612708565b5090565b5b808211156127045760008155600101612709565b600067ffffffffffffffff80841115612738576127386136a8565b604051601f8501601f19908116603f01168101908282118183101715612760576127606136a8565b8160405280935085815286868601111561277957600080fd5b858560208301376000602087830101525050509392505050565b8035801515811461088d57600080fd5b600082601f8301126127b3578081fd5b6116be8383356020850161271d565b803560ff8116811461088d57600080fd5b6000602082840312156127e4578081fd5b81356116be816136be565b60008060408385031215612801578081fd5b823561280c816136be565b9150602083013561281c816136be565b809150509250929050565b60008060006060848603121561283b578081fd5b8335612846816136be565b92506020840135612856816136be565b929592945050506040919091013590565b6000806000806080858703121561287c578081fd5b8435612887816136be565b93506020850135612897816136be565b925060408501359150606085013567ffffffffffffffff8111156128b9578182fd5b6128c5878288016127a3565b91505092959194509250565b600080604083850312156128e3578182fd5b82356128ee816136be565b91506128fc60208401612793565b90509250929050565b600080600080600060a0868803121561291c578081fd5b8535612927816136be565b9450602086013567ffffffffffffffff811115612942578182fd5b61294e888289016127a3565b945050604086013592506060860135915061296b608087016127c2565b90509295509295909350565b60008060408385031215612989578182fd5b8235612994816136be565b946020939093013593505050565b6000806000606084860312156129b6578283fd5b83356129c1816136be565b92506129cf602085016127c2565b9150604084013590509250925092565b600080602083850312156129f1578182fd5b823567ffffffffffffffff80821115612a08578384fd5b818501915085601f830112612a1b578384fd5b813581811115612a29578485fd5b8660208083028501011115612a3c578485fd5b60209290920196919550909350505050565b600060208284031215612a5f578081fd5b6116be82612793565b600060208284031215612a79578081fd5b81356116be816136d3565b600060208284031215612a95578081fd5b81516116be816136d3565b600060208284031215612ab1578081fd5b81516116be816136be565b600060208284031215612acd578081fd5b813567ffffffffffffffff811115612ae3578182fd5b8201601f81018413612af3578182fd5b611a3f8482356020840161271d565b600060208284031215612b13578081fd5b5035919050565b60008060008060808587031215612b2f578182fd5b843593506020850135925060408501359150612b4d60608601612793565b905092959194509250565b60008060408385031215612b6a578182fd5b612994836127c2565b60008151808452612b8b8160208601602086016135af565b601f01601f19169290920160200192915050565b60008251612bb18184602087016135af565b9190910192915050565b60008351612bcd8184602088016135af565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b60008351612c048184602088016135af565b835190830190612c188183602088016135af565b01949350505050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03848116825283166020820152606060408201819052600090612c7c90830184612b73565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612cb890830184612b73565b9695505050505050565b901515815260200190565b90815260200190565b93845260208401929092526001600160a01b03166040830152606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082526116be6020830184612b73565b6020808252602b908201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760408201526a1a1a5b19481c185d5cd95960aa1b606082015260800190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b6020808252600e908201526d6f6e6c79206f70657261746f727360901b604082015260600190565b60208082526024908201527f546869732066756e6374696f6e20697320666f722043726f73736d696e74206f60408201526337363c9760e11b606082015260800190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604082015260600190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252600e908201526d24b73b30b634b21037b83a34b7b760911b604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526025908201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360408201526424a3a722a960d91b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526021908201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636040820152600d60fb1b606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b60208082526019908201527f53656e646572206e6f7420696e20616c6c6f77206c6973742e00000000000000604082015260600190565b60208082526021908201527f4e6f7420656e6f756768204554482073656e742c20636865636b2070726963656040820152602160f81b606082015260800190565b60208082526030908201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760408201526f1b995c881b9bdc88185c1c1c9bdd995960821b606082015260800190565b6020808252601f908201527f4d61782062617272656c73207065722077616c6c657420657863656564656400604082015260600190565b6020808252601f908201527f4e6f2062617272656c732072656d61696e696e6720666f72206f7074696f6e00604082015260600190565b92835260208301919091521515604082015260600190565b60ff91909116815260200190565b600082198211156135605761356061367c565b500190565b60008261357457613574613692565b500490565b60008160001904831182151516156135935761359361367c565b500290565b6000828210156135aa576135aa61367c565b500390565b60005b838110156135ca5781810151838201526020016135b2565b83811115610d575750506000910152565b6000816135ea576135ea61367c565b506000190190565b60028104600182168061360657607f821691505b6020821081141561362757634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156136415761364161367c565b5060010190565b600060ff821660ff81141561365f5761365f61367c565b60010192915050565b60008261367757613677613692565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610fb157600080fd5b6001600160e01b031981168114610fb157600080fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a26469706673582212207c8d15c7fc6296a7cd7046919edead8e8a6835315bfc7ed30bb5188087ee6b4164736f6c63430008010033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c7429000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000742415252454c580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024278000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003068747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f62617272656c785f6d657461646174612f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f55d864462c03cea2230bfb58254d51ee0c3b544000000000000000000000000b8c13681cd3d9246e84727b8eb56329d9bb1a6ad000000000000000000000000fffe14fd73d84cb6b73bf91d134af95cc7ae2c9a

Deployed Bytecode

0x6080604052600436106102c85760003560e01c806342842e0e11610175578063823dfbb4116100dc578063a22cb46511610095578063c87b56dd1161006f578063c87b56dd14610804578063d547cfb714610824578063e985e9c514610839578063f2fde38b14610859576102c8565b8063a22cb465146107a4578063b88d4fde146107c4578063babcc539146107e4576102c8565b8063823dfbb4146107125780638456cb59146107325780638da5cb5b1461074757806391c26c9c1461075c578063931688cb1461076f57806395d89b411461078f576102c8565b80636a6278421161012e5780636a6278421461065d5780636d44a3b21461067d57806370a082311461069d578063715018a6146106bd578063718bc4af146106d25780637d10f142146106f2576102c8565b806342842e0e146105a857806342966c68146105c85780634f6ccce7146105e85780635c975abb146106085780636352211e1461061d5780636447c35d1461063d576102c8565b806321478f8d116102345780633408e470116101ed5780633ccfd60b116101c75780633ccfd60b1461052f5780633f4ba83a146105445780634070a0c914610559578063409e220514610579576102c8565b80633408e470146104da5780633678d8f3146104ef5780633a51c71e1461050f576102c8565b806321478f8d1461043257806323b872dd14610445578063248b71fc1461046557806329fc6bae146104855780632d0335ab1461049a5780632f745c59146104ba576102c8565b80630f7e5970116102865780630f7e5970146103a957806312065fe0146103be5780631253684b146103d357806313e7c9d8146103e857806318160ddd1461040857806320379ee51461041d576102c8565b80629a9b7b146102cd57806301ffc9a7146102f857806306fdde0314610325578063081812fc14610347578063095ea7b3146103745780630c53c51c14610396575b600080fd5b3480156102d957600080fd5b506102e2610879565b6040516102ef9190612ccd565b60405180910390f35b34801561030457600080fd5b50610318610313366004612a68565b61087f565b6040516102ef9190612cc2565b34801561033157600080fd5b5061033a610892565b6040516102ef9190612d18565b34801561035357600080fd5b50610367610362366004612b02565b610925565b6040516102ef9190612c3c565b34801561038057600080fd5b5061039461038f366004612977565b610971565b005b61033a6103a4366004612905565b610a09565b3480156103b557600080fd5b5061033a610b89565b3480156103ca57600080fd5b506102e2610ba6565b3480156103df57600080fd5b506102e2610baa565b3480156103f457600080fd5b506103186104033660046127d3565b610bb0565b34801561041457600080fd5b506102e2610bc5565b34801561042957600080fd5b506102e2610bcb565b6103946104403660046129a2565b610bd1565b34801561045157600080fd5b50610394610460366004612827565b610d5d565b34801561047157600080fd5b50610394610480366004612977565b610d95565b34801561049157600080fd5b50610318610e03565b3480156104a657600080fd5b506102e26104b53660046127d3565b610e0c565b3480156104c657600080fd5b506102e26104d5366004612977565b610e27565b3480156104e657600080fd5b506102e2610e7c565b3480156104fb57600080fd5b5061039461050a366004612b1a565b610e80565b34801561051b57600080fd5b5061039461052a3660046128d1565b610efc565b34801561053b57600080fd5b50610394610f56565b34801561055057600080fd5b50610394610fb4565b34801561056557600080fd5b50610394610574366004612b02565b610fed565b34801561058557600080fd5b50610599610594366004612b02565b611021565b6040516102ef93929190613527565b3480156105b457600080fd5b506103946105c3366004612827565b611045565b3480156105d457600080fd5b506103946105e3366004612b02565b611060565b3480156105f457600080fd5b506102e2610603366004612b02565b611090565b34801561061457600080fd5b506103186110eb565b34801561062957600080fd5b50610367610638366004612b02565b6110fb565b34801561064957600080fd5b506103946106583660046129df565b611130565b34801561066957600080fd5b506103946106783660046127d3565b6111df565b34801561068957600080fd5b506103946106983660046128d1565b61122f565b3480156106a957600080fd5b506102e26106b83660046127d3565b611299565b3480156106c957600080fd5b506103946112dd565b3480156106de57600080fd5b506103946106ed366004612a4e565b611326565b3480156106fe57600080fd5b506102e261070d3660046127d3565b611368565b34801561071e57600080fd5b5061039461072d366004612b58565b61137a565b34801561073e57600080fd5b50610394611407565b34801561075357600080fd5b5061036761143e565b61039461076a366004612b58565b61144d565b34801561077b57600080fd5b5061039461078a366004612abc565b6115d3565b34801561079b57600080fd5b5061033a611629565b3480156107b057600080fd5b506103946107bf3660046128d1565b611638565b3480156107d057600080fd5b506103946107df366004612867565b61164a565b3480156107f057600080fd5b506103186107ff3660046127d3565b611683565b34801561081057600080fd5b5061033a61081f366004612b02565b611698565b34801561083057600080fd5b5061033a6116a3565b34801561084557600080fd5b506103186108543660046127ef565b6116b2565b34801561086557600080fd5b506103946108743660046127d3565b6116c5565b600f5481565b600061088a8261179e565b90505b919050565b6060600080546108a1906135f2565b80601f01602080910402602001604051908101604052809291908181526020018280546108cd906135f2565b801561091a5780601f106108ef5761010080835404028352916020019161091a565b820191906000526020600020905b8154815290600101906020018083116108fd57829003601f168201915b505050505090505b90565b6000610930826117c3565b6109555760405162461bcd60e51b815260040161094c90613251565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061097c826110fb565b9050806001600160a01b0316836001600160a01b031614156109b05760405162461bcd60e51b815260040161094c90613313565b806001600160a01b03166109c26117e0565b6001600160a01b031614806109de57506109de816108546117e0565b6109fa5760405162461bcd60e51b815260040161094c9061312c565b610a0483836117ea565b505050565b60408051606081810183526001600160a01b0388166000818152600c602090815290859020548452830152918101869052610a478782878787611858565b610a635760405162461bcd60e51b815260040161094c906132d2565b6001600160a01b0387166000908152600c6020526040902054610a879060016118fe565b6001600160a01b0388166000908152600c60205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610ad790899033908a90612c50565b60405180910390a1600080306001600160a01b0316888a604051602001610aff929190612bbb565b60408051601f1981840301815290829052610b1991612b9f565b6000604051808303816000865af19150503d8060008114610b56576040519150601f19603f3d011682016040523d82523d6000602084013e610b5b565b606091505b509150915081610b7d5760405162461bcd60e51b815260040161094c90612ef3565b98975050505050505050565b604051806040016040528060018152602001603160f81b81525081565b4790565b60155490565b60106020526000908152604090205460ff1681565b60085490565b600b5490565b60008111610bf15760405162461bcd60e51b815260040161094c90612fa6565b600b8110610c115760405162461bcd60e51b815260040161094c90612fa6565b60ff80831660009081526012602052604090206002015416610c455760405162461bcd60e51b815260040161094c90613049565b60ff82166000908152601260205260409020600101548110610c795760405162461bcd60e51b815260040161094c906134f0565b60ff8216600090815260126020526040902054610c97908290613579565b341015610cb65760405162461bcd60e51b815260040161094c90613428565b73dab1a1854214684ace522439684a145e625052333314610ce95760405162461bcd60e51b815260040161094c90612dcc565b6001600160a01b038316600090815260166020526040902054600b90610d1090839061354d565b10610d2d5760405162461bcd60e51b815260040161094c906134b9565b60005b818160ff161015610d5757610d45848461190a565b80610d4f81613648565b915050610d30565b50505050565b610d6e610d686117e0565b826119c2565b610d8a5760405162461bcd60e51b815260040161094c90613354565b610a04838383611a47565b3360009081526010602052604090205460ff16610dc45760405162461bcd60e51b815260040161094c90612da4565b600f5460005b82811015610dfb5781610ddc8161362d565b925050610de98483611b7a565b80610df38161362d565b915050610dca565b50600f555050565b60145460ff1690565b6001600160a01b03166000908152600c602052604090205490565b6000610e3283611299565b8210610e505760405162461bcd60e51b815260040161094c90612e10565b506001600160a01b03821660009081526006602090815260408083208484529091529020545b92915050565b4690565b3360009081526010602052604090205460ff16610eaf5760405162461bcd60e51b815260040161094c90612da4565b604080516060810182529384526020808501938452911515848201908152600095865260129092529093209151825551600182015590516002909101805460ff1916911515919091179055565b3360009081526010602052604090205460ff16610f2b5760405162461bcd60e51b815260040161094c90612da4565b6001600160a01b03919091166000908152601360205260409020805460ff1916911515919091179055565b3360009081526010602052604090205460ff16610f855760405162461bcd60e51b815260040161094c90612da4565b60405133904780156108fc02916000818181858888f19350505050158015610fb1573d6000803e3d6000fd5b50565b3360009081526010602052604090205460ff16610fe35760405162461bcd60e51b815260040161094c90612da4565b610feb611b94565b565b3360009081526010602052604090205460ff1661101c5760405162461bcd60e51b815260040161094c90612da4565b601555565b60126020526000908152604090208054600182015460029092015490919060ff1683565b610a048383836040518060200160405280600081525061164a565b61106b610d686117e0565b6110875760405162461bcd60e51b815260040161094c90613469565b610fb181611c05565b600061109a610bc5565b82106110b85760405162461bcd60e51b815260040161094c906133a5565b600882815481106110d957634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600e54600160a01b900460ff1690565b6000818152600260205260408120546001600160a01b03168061088a5760405162461bcd60e51b815260040161094c906131d3565b3360009081526010602052604090205460ff1661115f5760405162461bcd60e51b815260040161094c90612da4565b60005b81811015610a045760016013600085858581811061119057634e487b7160e01b600052603260045260246000fd5b90506020020160208101906111a591906127d3565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806111d78161362d565b915050611162565b3360009081526010602052604090205460ff1661120e5760405162461bcd60e51b815260040161094c90612da4565b600f805490600061121e8361362d565b9190505550610fb181600f54611b7a565b6112376117e0565b6001600160a01b031661124861143e565b6001600160a01b03161461126e5760405162461bcd60e51b815260040161094c9061329d565b6001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b60006001600160a01b0382166112c15760405162461bcd60e51b815260040161094c90613189565b506001600160a01b031660009081526003602052604090205490565b6112e56117e0565b6001600160a01b03166112f661143e565b6001600160a01b03161461131c5760405162461bcd60e51b815260040161094c9061329d565b610feb6000611cb4565b3360009081526010602052604090205460ff166113555760405162461bcd60e51b815260040161094c90612da4565b6014805460ff1916911515919091179055565b60166020526000908152604090205481565b3360009081526010602052604090205460ff166113a95760405162461bcd60e51b815260040161094c90612da4565b60ff808316600090815260126020526040902060020154166113dd5760405162461bcd60e51b815260040161094c90613049565b60005b818160ff161015610a04576113f5338461190a565b806113ff81613648565b9150506113e0565b3360009081526010602052604090205460ff166114365760405162461bcd60e51b815260040161094c90612da4565b610feb611d06565b600d546001600160a01b031690565b6000811161146d5760405162461bcd60e51b815260040161094c90612fa6565b600b811061148d5760405162461bcd60e51b815260040161094c90612fa6565b60ff808316600090815260126020526040902060020154166114c15760405162461bcd60e51b815260040161094c90613049565b60ff821660009081526012602052604090206001015481106114f55760405162461bcd60e51b815260040161094c906134f0565b60ff8216600090815260126020526040902054611513908290613579565b3410156115325760405162461bcd60e51b815260040161094c90613428565b61153a610e03565b1561156e573360009081526013602052604090205460ff1661156e5760405162461bcd60e51b815260040161094c906133f1565b33600090815260166020526040902054600b9061158c90839061354d565b106115a95760405162461bcd60e51b815260040161094c906134b9565b60005b818160ff161015610a04576115c1338461190a565b806115cb81613648565b9150506115ac565b6115db6117e0565b6001600160a01b03166115ec61143e565b6001600160a01b0316146116125760405162461bcd60e51b815260040161094c9061329d565b8051611625906011906020840190612684565b5050565b6060600180546108a1906135f2565b6116256116436117e0565b8383611d67565b61165b6116556117e0565b836119c2565b6116775760405162461bcd60e51b815260040161094c90613354565b610d5784848484611e0a565b60136020526000908152604090205460ff1681565b606061088a82611e3d565b6060601180546108a1906135f2565b60006116be8383611e77565b9392505050565b6116cd6117e0565b6001600160a01b03166116de61143e565b6001600160a01b0316146117045760405162461bcd60e51b815260040161094c9061329d565b6001600160a01b03811661172a5760405162461bcd60e51b815260040161094c90612ead565b610fb181611cb4565b600061173d611742565b905090565b60003330141561179957600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506109229050565b503390565b60006001600160e01b0319821663780e9d6360e01b148061088a575061088a82611eaa565b6000908152600260205260409020546001600160a01b0316151590565b600061173d611733565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061181f826110fb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166118805760405162461bcd60e51b815260040161094c906130bd565b600161189361188e87611eea565b611f48565b838686604051600081526020016040526040516118b39493929190612cfa565b6020604051602081039080840390855afa1580156118d5573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b60006116be828461354d565b600f805490600061191a8361362d565b90915550506001600160a01b03821660009081526016602052604081208054916119438361362d565b909155505060ff81166000908152601260205260408120600101805491611969836135db565b919050555061197a82600f54611b7a565b600f54826001600160a01b03167f705bdd709ef8a69ca1c9e454609507f55c61e98ccb5537ccc29469aed65a97fe836040516119b6919061353f565b60405180910390a35050565b60006119cd826117c3565b6119e95760405162461bcd60e51b815260040161094c90613071565b60006119f4836110fb565b9050806001600160a01b0316846001600160a01b03161480611a2f5750836001600160a01b0316611a2484610925565b6001600160a01b0316145b80611a3f5750611a3f81856116b2565b949350505050565b826001600160a01b0316611a5a826110fb565b6001600160a01b031614611a805760405162461bcd60e51b815260040161094c90612f2a565b6001600160a01b038216611aa65760405162461bcd60e51b815260040161094c90612fce565b611ab1838383611f64565b611abc6000826117ea565b6001600160a01b0383166000908152600360205260408120805460019290611ae5908490613598565b90915550506001600160a01b0382166000908152600360205260408120805460019290611b1390849061354d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610a04838383610a04565b611625828260405180602001604052806000815250611f6f565b611b9c6110eb565b611bb85760405162461bcd60e51b815260040161094c90612d76565b600e805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611bee6117e0565b604051611bfb9190612c3c565b60405180910390a1565b6000611c10826110fb565b9050611c1e81600084611f64565b611c296000836117ea565b6001600160a01b0381166000908152600360205260408120805460019290611c52908490613598565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a461162581600084610a04565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611d0e6110eb565b15611d2b5760405162461bcd60e51b815260040161094c90613102565b600e805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611bee6117e0565b816001600160a01b0316836001600160a01b03161415611d995760405162461bcd60e51b815260040161094c90613012565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611dfd908590612cc2565b60405180910390a3505050565b611e15848484611a47565b611e2184848484611fa2565b610d575760405162461bcd60e51b815260040161094c90612e5b565b6060611e476116a3565b611e50836120bd565b604051602001611e61929190612bf2565b6040516020818303038152906040529050919050565b6001600160a01b03811660009081526010602052604081205460ff1615611ea057506001610e76565b6116be83836121d8565b60006001600160e01b031982166380ac58cd60e01b1480611edb57506001600160e01b03198216635b5e139f60e01b145b8061088a575061088a826121e4565b60006040518060800160405280604381526020016136ea6043913980516020918201208351848301516040808701518051908601209051611f2b9501612cd6565b604051602081830303815290604052805190602001209050919050565b6000611f52610bcb565b82604051602001611f2b929190612c21565b610a048383836121fd565b611f79838361222d565b611f866000848484611fa2565b610a045760405162461bcd60e51b815260040161094c90612e5b565b6000611fb6846001600160a01b0316612314565b156120b257836001600160a01b031663150b7a02611fd26117e0565b8786866040518563ffffffff1660e01b8152600401611ff49493929190612c85565b602060405180830381600087803b15801561200e57600080fd5b505af192505050801561203e575060408051601f3d908101601f1916820190925261203b91810190612a84565b60015b612098573d80801561206c576040519150601f19603f3d011682016040523d82523d6000602084013e612071565b606091505b5080516120905760405162461bcd60e51b815260040161094c90612e5b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611a3f565b506001949350505050565b6060816120e257506040805180820190915260018152600360fc1b602082015261088d565b8160005b811561210c57806120f68161362d565b91506121059050600a83613565565b91506120e6565b60008167ffffffffffffffff81111561213557634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561215f576020820181803683370190505b5090505b8415611a3f57612174600183613598565b9150612181600a86613668565b61218c90603061354d565b60f81b8183815181106121af57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506121d1600a86613565565b9450612163565b60006116be8383612323565b6001600160e01b031981166301ffc9a760e01b14919050565b6122088383836123cf565b6122106110eb565b15610a045760405162461bcd60e51b815260040161094c90612d2b565b6001600160a01b0382166122535760405162461bcd60e51b815260040161094c9061321c565b61225c816117c3565b156122795760405162461bcd60e51b815260040161094c90612f6f565b61228560008383611f64565b6001600160a01b03821660009081526003602052604081208054600192906122ae90849061354d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461162560008383610a04565b6001600160a01b03163b151590565b600e5460405163c455279160e01b81526000916001600160a01b039081169190841690829063c45527919061235c908890600401612c3c565b60206040518083038186803b15801561237457600080fd5b505afa158015612388573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123ac9190612aa0565b6001600160a01b031614156123c5576001915050610e76565b611a3f8484612458565b6123da838383610a04565b6001600160a01b0383166123f6576123f181612486565b612419565b816001600160a01b0316836001600160a01b0316146124195761241983826124ca565b6001600160a01b0382166124355761243081612567565b610a04565b826001600160a01b0316826001600160a01b031614610a0457610a048282612640565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b600060016124d784611299565b6124e19190613598565b600083815260076020526040902054909150808214612534576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061257990600190613598565b600083815260096020526040812054600880549394509092849081106125af57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106125de57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061262457634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061264b83611299565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b828054612690906135f2565b90600052602060002090601f0160209004810192826126b257600085556126f8565b82601f106126cb57805160ff19168380011785556126f8565b828001600101855582156126f8579182015b828111156126f85782518255916020019190600101906126dd565b50612704929150612708565b5090565b5b808211156127045760008155600101612709565b600067ffffffffffffffff80841115612738576127386136a8565b604051601f8501601f19908116603f01168101908282118183101715612760576127606136a8565b8160405280935085815286868601111561277957600080fd5b858560208301376000602087830101525050509392505050565b8035801515811461088d57600080fd5b600082601f8301126127b3578081fd5b6116be8383356020850161271d565b803560ff8116811461088d57600080fd5b6000602082840312156127e4578081fd5b81356116be816136be565b60008060408385031215612801578081fd5b823561280c816136be565b9150602083013561281c816136be565b809150509250929050565b60008060006060848603121561283b578081fd5b8335612846816136be565b92506020840135612856816136be565b929592945050506040919091013590565b6000806000806080858703121561287c578081fd5b8435612887816136be565b93506020850135612897816136be565b925060408501359150606085013567ffffffffffffffff8111156128b9578182fd5b6128c5878288016127a3565b91505092959194509250565b600080604083850312156128e3578182fd5b82356128ee816136be565b91506128fc60208401612793565b90509250929050565b600080600080600060a0868803121561291c578081fd5b8535612927816136be565b9450602086013567ffffffffffffffff811115612942578182fd5b61294e888289016127a3565b945050604086013592506060860135915061296b608087016127c2565b90509295509295909350565b60008060408385031215612989578182fd5b8235612994816136be565b946020939093013593505050565b6000806000606084860312156129b6578283fd5b83356129c1816136be565b92506129cf602085016127c2565b9150604084013590509250925092565b600080602083850312156129f1578182fd5b823567ffffffffffffffff80821115612a08578384fd5b818501915085601f830112612a1b578384fd5b813581811115612a29578485fd5b8660208083028501011115612a3c578485fd5b60209290920196919550909350505050565b600060208284031215612a5f578081fd5b6116be82612793565b600060208284031215612a79578081fd5b81356116be816136d3565b600060208284031215612a95578081fd5b81516116be816136d3565b600060208284031215612ab1578081fd5b81516116be816136be565b600060208284031215612acd578081fd5b813567ffffffffffffffff811115612ae3578182fd5b8201601f81018413612af3578182fd5b611a3f8482356020840161271d565b600060208284031215612b13578081fd5b5035919050565b60008060008060808587031215612b2f578182fd5b843593506020850135925060408501359150612b4d60608601612793565b905092959194509250565b60008060408385031215612b6a578182fd5b612994836127c2565b60008151808452612b8b8160208601602086016135af565b601f01601f19169290920160200192915050565b60008251612bb18184602087016135af565b9190910192915050565b60008351612bcd8184602088016135af565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b60008351612c048184602088016135af565b835190830190612c188183602088016135af565b01949350505050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03848116825283166020820152606060408201819052600090612c7c90830184612b73565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612cb890830184612b73565b9695505050505050565b901515815260200190565b90815260200190565b93845260208401929092526001600160a01b03166040830152606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082526116be6020830184612b73565b6020808252602b908201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760408201526a1a1a5b19481c185d5cd95960aa1b606082015260800190565b60208082526014908201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604082015260600190565b6020808252600e908201526d6f6e6c79206f70657261746f727360901b604082015260600190565b60208082526024908201527f546869732066756e6374696f6e20697320666f722043726f73736d696e74206f60408201526337363c9760e11b606082015260800190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604082015260600190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b6020808252600e908201526d24b73b30b634b21037b83a34b7b760911b604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526025908201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360408201526424a3a722a960d91b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526021908201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636040820152600d60fb1b606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b60208082526019908201527f53656e646572206e6f7420696e20616c6c6f77206c6973742e00000000000000604082015260600190565b60208082526021908201527f4e6f7420656e6f756768204554482073656e742c20636865636b2070726963656040820152602160f81b606082015260800190565b60208082526030908201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760408201526f1b995c881b9bdc88185c1c1c9bdd995960821b606082015260800190565b6020808252601f908201527f4d61782062617272656c73207065722077616c6c657420657863656564656400604082015260600190565b6020808252601f908201527f4e6f2062617272656c732072656d61696e696e6720666f72206f7074696f6e00604082015260600190565b92835260208301919091521515604082015260600190565b60ff91909116815260200190565b600082198211156135605761356061367c565b500190565b60008261357457613574613692565b500490565b60008160001904831182151516156135935761359361367c565b500290565b6000828210156135aa576135aa61367c565b500390565b60005b838110156135ca5781810151838201526020016135b2565b83811115610d575750506000910152565b6000816135ea576135ea61367c565b506000190190565b60028104600182168061360657607f821691505b6020821081141561362757634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156136415761364161367c565b5060010190565b600060ff821660ff81141561365f5761365f61367c565b60010192915050565b60008261367757613677613692565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610fb157600080fd5b6001600160e01b031981168114610fb157600080fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a26469706673582212207c8d15c7fc6296a7cd7046919edead8e8a6835315bfc7ed30bb5188087ee6b4164736f6c63430008010033

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

000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000742415252454c580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024278000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003068747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f62617272656c785f6d657461646174612f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000f55d864462c03cea2230bfb58254d51ee0c3b544000000000000000000000000b8c13681cd3d9246e84727b8eb56329d9bb1a6ad000000000000000000000000fffe14fd73d84cb6b73bf91d134af95cc7ae2c9a

-----Decoded View---------------
Arg [0] : proxyRegistryAddress (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
Arg [1] : name (string): BARRELX
Arg [2] : symbol (string): Bx
Arg [3] : baseTokenURI (string): https://storage.googleapis.com/barrelx_metadata/
Arg [4] : operators (address[]): 0xF55D864462C03cEa2230bFb58254d51eE0C3B544,0xB8c13681Cd3d9246E84727b8eB56329d9Bb1a6AD,0xffFE14Fd73D84CB6b73BF91D134AF95Cc7Ae2C9a

-----Encoded View---------------
16 Constructor Arguments found :
Arg [0] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [6] : 42415252454c5800000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [8] : 4278000000000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000030
Arg [10] : 68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f62
Arg [11] : 617272656c785f6d657461646174612f00000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [13] : 000000000000000000000000f55d864462c03cea2230bfb58254d51ee0c3b544
Arg [14] : 000000000000000000000000b8c13681cd3d9246e84727b8eb56329d9bb1a6ad
Arg [15] : 000000000000000000000000fffe14fd73d84cb6b73bf91d134af95cc7ae2c9a


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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