ETH Price: $3,715.41 (+4.30%)

Contract

0x6E96Fb1f6D8cb1463E018A2Cc6E09C64eD474deA
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...212120212024-11-18 3:50:1112 days ago1731901811IN
Mandelbrot: BROT Token
0 ETH0.0004936710.58907839
Set Approval For...205246322024-08-14 4:58:59108 days ago1723611539IN
Mandelbrot: BROT Token
0 ETH0.000048921.04945475
Set Approval For...205243942024-08-14 4:10:35108 days ago1723608635IN
Mandelbrot: BROT Token
0 ETH0.000101242.17176134
Set Approval For...204294232024-07-31 22:09:35121 days ago1722463775IN
Mandelbrot: BROT Token
0 ETH0.000280276.01182683
Set Approval For...204278362024-07-31 16:50:23121 days ago1722444623IN
Mandelbrot: BROT Token
0 ETH0.0007804916.7413119
Set Approval For...199937402024-06-01 1:39:11182 days ago1717205951IN
Mandelbrot: BROT Token
0 ETH0.000284976.11258353
Transfer From199935692024-06-01 1:04:59182 days ago1717203899IN
Mandelbrot: BROT Token
0 ETH0.000456565.26
Transfer From199935532024-06-01 1:01:47182 days ago1717203707IN
Mandelbrot: BROT Token
0 ETH0.000410454.72876674
Set Approval For...195698052024-04-02 18:11:47241 days ago1712081507IN
Mandelbrot: BROT Token
0 ETH0.0020170143.26402994
Set Approval For...192288412024-02-14 21:21:35289 days ago1707945695IN
Mandelbrot: BROT Token
0 ETH0.0005530922.38432704
Set Approval For...192057252024-02-11 15:31:11292 days ago1707665471IN
Mandelbrot: BROT Token
0 ETH0.0013206828.32807826
Set Approval For...189086392023-12-31 23:08:59334 days ago1704064139IN
Mandelbrot: BROT Token
0 ETH0.0006361413.62403977
Set Approval For...189085462023-12-31 22:50:23334 days ago1704063023IN
Mandelbrot: BROT Token
0 ETH0.0006466913.87143005
Set Approval For...189084022023-12-31 22:21:23334 days ago1704061283IN
Mandelbrot: BROT Token
0 ETH0.0005623412.04036231
Set Approval For...188953622023-12-30 2:24:47336 days ago1703903087IN
Mandelbrot: BROT Token
0 ETH0.0006455413.84670661
Set Approval For...188041152023-12-17 6:57:59348 days ago1702796279IN
Mandelbrot: BROT Token
0 ETH0.0015008632.13498053
Set Approval For...188034452023-12-17 4:42:23349 days ago1702788143IN
Mandelbrot: BROT Token
0 ETH0.0012753927.35666047
Set Approval For...188026282023-12-17 1:57:35349 days ago1702778255IN
Mandelbrot: BROT Token
0 ETH0.0008435234.13844793
Set Approval For...187936232023-12-15 19:33:47350 days ago1702668827IN
Mandelbrot: BROT Token
0 ETH0.0023033749.31743792
Set Approval For...186993482023-12-02 14:34:47363 days ago1701527687IN
Mandelbrot: BROT Token
0 ETH0.0007867631.84131622
Set Approval For...184513812023-10-28 21:29:47398 days ago1698528587IN
Mandelbrot: BROT Token
0 ETH0.0005251311.26391261
Set Approval For...183616252023-10-16 8:04:59410 days ago1697443499IN
Mandelbrot: BROT Token
0 ETH0.000294866.32469467
Set Approval For...183526412023-10-15 1:57:11412 days ago1697335031IN
Mandelbrot: BROT Token
0 ETH0.000255795.4867739
Set Approval For...183354902023-10-12 16:20:23414 days ago1697127623IN
Mandelbrot: BROT Token
0 ETH0.0005898412.65200367
Safe Transfer Fr...182972632023-10-07 7:57:59419 days ago1696665479IN
Mandelbrot: BROT Token
0 ETH0.000514225.91000017
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
131427302021-09-01 23:25:481185 days ago1630538748
Mandelbrot: BROT Token
44.78246 ETH
131261572021-08-30 9:52:421187 days ago1630317162
Mandelbrot: BROT Token
92.775 ETH
131166992021-08-28 22:54:021189 days ago1630191242
Mandelbrot: BROT Token
92.775 ETH
131166892021-08-28 22:51:521189 days ago1630191112
Mandelbrot: BROT Token
1 ETH
131152662021-08-28 17:34:301189 days ago1630172070
Mandelbrot: BROT Token
109 ETH
131152002021-08-28 17:15:021189 days ago1630170902
Mandelbrot: BROT Token
1 ETH
131067302021-08-27 9:33:531190 days ago1630056833
Mandelbrot: BROT Token
1 ETH
131037342021-08-26 22:32:101191 days ago1630017130
Mandelbrot: BROT Token
0.01978 ETH
131037342021-08-26 22:32:101191 days ago1630017130
Mandelbrot: BROT Token
0.01978 ETH
131037342021-08-26 22:32:101191 days ago1630017130
Mandelbrot: BROT Token
0.01978 ETH
131037322021-08-26 22:31:541191 days ago1630017114
Mandelbrot: BROT Token
0.01978 ETH
131037312021-08-26 22:31:521191 days ago1630017112
Mandelbrot: BROT Token
0.01978 ETH
131037312021-08-26 22:31:521191 days ago1630017112
Mandelbrot: BROT Token
0.01978 ETH
131037312021-08-26 22:31:521191 days ago1630017112
Mandelbrot: BROT Token
0.01978 ETH
131037312021-08-26 22:31:521191 days ago1630017112
Mandelbrot: BROT Token
0.01978 ETH
131037312021-08-26 22:31:521191 days ago1630017112
Mandelbrot: BROT Token
0.01978 ETH
131037312021-08-26 22:31:521191 days ago1630017112
Mandelbrot: BROT Token
0.03956 ETH
131037312021-08-26 22:31:521191 days ago1630017112
Mandelbrot: BROT Token
0.01978 ETH
131037312021-08-26 22:31:521191 days ago1630017112
Mandelbrot: BROT Token
0.01978 ETH
131037312021-08-26 22:31:521191 days ago1630017112
Mandelbrot: BROT Token
0.01978 ETH
131037312021-08-26 22:31:521191 days ago1630017112
Mandelbrot: BROT Token
0.01978 ETH
131037312021-08-26 22:31:521191 days ago1630017112
Mandelbrot: BROT Token
0.01978 ETH
131037312021-08-26 22:31:521191 days ago1630017112
Mandelbrot: BROT Token
0.01978 ETH
131037312021-08-26 22:31:521191 days ago1630017112
Mandelbrot: BROT Token
0.07912 ETH
131037312021-08-26 22:31:521191 days ago1630017112
Mandelbrot: BROT Token
0.01978 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Mandelbrot

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 20 runs

Other Settings:
default evmVersion
File 1 of 23 : Mandelbrot.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @artist: Abramo
/// @author: FractalSoft
//  https://mandelbrot.fractalnft.art
/* ....................................................'''''''',,''''''''''................
   ................................................''''''''''',;c:;,,'''''''''.............
   ..........................................''''''''''''''',,,;col:;:;,'''''''''..........
   .......................................''''''''''''''''',,,,;:cdxol:;,''''''''''........
   .....................................''''''''''''''''',,,,;::coxkxc;;,,,'''''''''''.....
   ...............................'''''''''''''''''''',,,,,,:lxxxd;;xxdo:,,,'''''''''''....
   ...........................'''''''''''''''''''',,,,,,,,;;:oOo.   .cOx:;,,,,,,'''''''''..
   ........................''''''''''''''''''',,,,,,;;;;;;;::lkc     'xo:;;;;,,,,,,,'''''''
   ....................''''''''''''''''''''',,,,,:ldxxl::oddddxd,   .lxdooodl;;;;:lc,,'''''
   ..................''''''''''''''''''''',,,,,;;:oOOlldxdc;,....   ....,::oxlldddkxc,,''''
   ...............'''''''''''''''''''',,,,,,,,;;;:cxd..,,.                 .'cl,.ckx:,,''''
   ............'''''''''''',,,,,,,,,,,,,,,,,;;coddxxo'                          'odc;,,''''
   ..........''''''''''',,;:;;,,,,,,,,;,,;;;;:dOOd:'                            'loc;;;,'''
   .........''''''''''',,,:oo:::;;coc;;;;;;::lxxx:                               .:loxc,,''
   ......''''''''''''',,,;;lodkkdlxOxddoc:::cxxl'                                 .;oo:,,''
   ....''''''''''''',,,,,;;:cxOccol:,:lldxoldx;                                    :dl;,'''
   .''''''''''''',,,,,;;;;coxko.        .,okOl.                                    ,dl;,'''
   '''''''',,,,,,,,,;;loclokk;             ck,                                    .lo;,,'''
   '''',,,;;;,,;;;;;::lOkoox:               '.                                   .:l;,,,'''
   ,,;;;;:llc:cllccoxxOx,  ..                      Mandelbrot Set Collection    ,c:;;,,,'''
   ',,,;;;:::;:::::clodko,,:'                                                   .,c:;,,,'''
   '''''',,,,,,,,,;;;:lxxxxOo.             .l'                                    'lc;,,'''
   ''''''''''',,,,,,,;::::cxko,.          ,x0:                                     :d:,,'''
   ..''''''''''''',,,,,,;;:clkk,.,.. ..':oxdkd.                                    ,do;,,''
   ....''''''''''''',,,,,;;:lkOddxkxodkkdlcclxo,.                                  cdc;,,''
   ......'''''''''''''',,,;odollc:lkdccc:;:::dkkl.                                .:dkc,,''
   .........'''''''''''',,;lc;;;;;;::;;;;;;;:cdOOc.                              ,ddll:,'''
   ............''''''''''',,,,,,,,,,,,,,,,;;;:okkdol,                           ;dd:;,,,'''
   .............'''''''''''''''''',,,,,,,,,,,;;:cclxx,                       .'..:xl;,,''''
   ................''''''''''''''''''''',,,,,,;;;:lkd,;oo;.              ..'lddlcokkc;,''''
   ....................'''''''''''''''''''',,,,,,:dOOkxookxoocc:,   .:cclooxd::cccdo:,'''''
   ......................''''''''''''''''''',,,,,;cccl:;:clccokd.   .ckdc:cc:;;,,;:;,''''''
   .........................'''''''''''''''''''',,,,,,,,;;;;:lkc     'xd:;;,,,,,,,''''''''.
   .............................'''''''''''''''''''',,,,,,,;:okkl;..:dkx:;,,,,''''''''''...
   .................................''''''''''''''''''',,,,,;coodkddkocc;,,,'''''''''''....
   ......................................''''''''''''''''',,,,;;:cxOdc:;,,''''''''''.......
   ..........................................''''''''''''''',,,;:odlll:,,'''''''''.........
   ..............................................'''''''''''',,;ll:;,,,'''''''''...........
   .................................................'''''''''',,;;,,''''''''''.............
   ....................................................'''''''''''''''''''.................

   1978 unique pieces available
*/


import "./ERC721Tradable.sol";
import "./VIP.sol";

/**
 * @title Mandelbrot
 * Mandelbrot - a contract for non-fungible points of the Mandelbrot Set.
 */
contract Mandelbrot is ERC721Tradable {
    using SafeMath for uint256;
    constructor(address _proxyRegistryAddress) ERC721Tradable("Mandelbrot Set Collection", "BROT", _proxyRegistryAddress) {}

    bool    private _active;
    uint256 private _activeTime;
    uint256 private PRICE = 197800000000000000;    // 0.1978 ETH
    uint32  private PRESALE_TIME = 86400;         // 24 hours
    uint8   private MAX_QUANTITY = 5;            // Maximum allowed quantity to purchase
    uint8   public  COMMUNITY_QUOTA = 10;       // 10% of the sale proceeds stays in the community
    address public  COMMUNITY_WALLET = 0x229ddBd9A20e3Df3ab7f540Ec77bEB258476fEe5;
    address public  VIP_PASS_ADDRESS = 0x5645E72bcBCb9f218268e5DB15F62F016f885984;


    function baseTokenURI() override public pure returns (string memory) {
        return "https://mandelbrot.fractalnft.art/item?token_id=";
    }

    function contractURI() public pure returns (string memory) {
        return "https://mandelbrot.fractalnft.art/collection";
    }



    // Views
    function active() external view returns(bool) {
        return _active;
    }

    function timeToSale() external view returns(uint256) {
        require(_active, "Inactive");
        if (block.timestamp >= (_activeTime + PRESALE_TIME)) return 0;
        return (_activeTime + PRESALE_TIME) - block.timestamp;
    }


    // Sale

    function give_to_community(uint256 fractals) internal {
        uint256 amount = (fractals*PRICE*COMMUNITY_QUOTA).div(100);
        payable(COMMUNITY_WALLET).transfer(amount);
    }

    function pre_purchase(uint256 fractals) external payable {
        VIP(VIP_PASS_ADDRESS).transferFrom(msg.sender, address(this), fractals);
        require(_active, "Inactive");
        require(fractals <= remaining() && fractals <= MAX_QUANTITY, "Too many fractals requested");
        require(msg.value == fractals*PRICE, "Invalid purchase fractals sent");
        for (uint i = 0; i < fractals; i++) {
            mintTo(msg.sender);
        }
        give_to_community(fractals);
    }

    function purchase(uint256 fractals) external payable {
        require(_active, "Inactive");
        require(block.timestamp >= _activeTime + PRESALE_TIME, "Purchasing not active");
        require(fractals <= remaining() && fractals <= MAX_QUANTITY, "Too many fractals requested");
        require(msg.value == fractals*PRICE, "Invalid purchase amount sent");
        for (uint i = 0; i < fractals; i++) {
            mintTo(msg.sender);
        }
        give_to_community(fractals);
    }



    // Owner's functions

    function activate() external onlyOwner {
        require(!_active, "Already active");
        _activeTime = block.timestamp;
        _active = true;
    }

    function premine(uint256 fractals) external onlyOwner {
        require(!_active, "Already active");
        for (uint i = 0; i < fractals; i++) {
            mintTo(msg.sender);
        }
    }
    
    function withdraw(address payable recipient, uint256 amount) external onlyOwner {
        recipient.transfer(amount);
    }


}

File 2 of 23 : Ownable.sol
// SPDX-License-Identifier: MIT

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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

File 3 of 23 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The defaut value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        _approve(sender, _msgSender(), currentAllowance - amount);

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        _approve(_msgSender(), spender, currentAllowance - subtractedValue);

        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        _balances[sender] = senderBalance - amount;
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        _balances[account] = accountBalance - amount;
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens 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 amount) internal virtual { }
}

File 4 of 23 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 5 of 23 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

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}. 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 {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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);
    }

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

    /**
     * @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 of token that is not own");
        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);
    }

    /**
     * @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 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(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    // solhint-disable-next-line no-inline-assembly
                    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` 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 { }
}

File 7 of 23 : IERC721.sol
// SPDX-License-Identifier: MIT

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 8 of 23 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

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 9 of 23 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

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 10 of 23 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

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 tokenId);

    /**
     * @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 11 of 23 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

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 12 of 23 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 14 of 23 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant alphabet = "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] = alphabet[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

}

File 15 of 23 : ERC165.sol
// SPDX-License-Identifier: MIT

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 16 of 23 : IERC165.sol
// SPDX-License-Identifier: MIT

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 17 of 23 : SafeMath.sol
// SPDX-License-Identifier: MIT

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 no longer needed starting with Solidity 0.8. 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. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * 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 18 of 23 : ERC721Tradable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/utils/Strings.sol";

import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/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;
    uint256 private _currentTokenId = 0;
    uint256 public totalUnveiled = 0;
    uint256 public constant maximumPieces = 1978;

    event Unveiled(uint256 tokenId, address receiver);

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

    function remaining() public view returns (uint256 _remaining) {
        if (maximumPieces > totalUnveiled) {
          return maximumPieces - totalUnveiled;
        } else {
          return 0;
        }
    }

    /**
     * @dev Mints a token to an address with a tokenURI.
     * @param _to address of the future owner of the token
     */
    function mintTo(address _to) internal {
        require(remaining()>0, "Supply limit reached");
        uint256 newTokenId = _getNextTokenId();
        _mint(_to, newTokenId);
        _incrementTokenId();
        totalUnveiled += 1;
        emit Unveiled(newTokenId, _to);
    }

    /**
     * @dev calculates the next token ID based on value of _currentTokenId
     * @return uint256 for the next token ID
     */
    function _getNextTokenId() private view returns (uint256) {
        return _currentTokenId.add(1);
    }

    /**
     * @dev increments the value of _currentTokenId
     */
    function _incrementTokenId() private {
        _currentTokenId++;
    }

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

    function tokenURI(uint256 _tokenId) override public pure 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
        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
        view
        returns (address sender)
    {
        return ContextMixin.msgSender();
    }
}

File 19 of 23 : VIP.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// Each VIP Pass token allows to purchase a fractal from the Mandelbrot Set Collection during the pre-sale window.
// The cost of minting each artwork is 0.1978 ETH and there are only 1978 available.
// More info on the project: 
// https://mandelbrot.fractalnft.art

/// @author: FractalSoft
/* ....................................................'''''''',,''''''''''................
   ................................................''''''''''',;c:;,,'''''''''.............
   ..........................................''''''''''''''',,,;col:;:;,'''''''''..........
   .......................................''''''''''''''''',,,,;:cdxol:;,''''''''''........
   .....................................''''''''''''''''',,,,;::coxkxc;;,,,'''''''''''.....
   ...............................'''''''''''''''''''',,,,,,:lxxxd;;xxdo:,,,'''''''''''....
   ...........................'''''''''''''''''''',,,,,,,,;;:oOo.   .cOx:;,,,,,,'''''''''..
   ........................''''''''''''''''''',,,,,,;;;;;;;::lkc     'xo:;;;;,,,,,,,'''''''
   ....................''''''''''''''''''''',,,,,:ldxxl::oddddxd,   .lxdooodl;;;;:lc,,'''''
   ..................''''''''''''''''''''',,,,,;;:oOOlldxdc;,....   ....,::oxlldddkxc,,''''
   ...............'''''''''''''''''''',,,,,,,,;;;:cxd..,,.                 .'cl,.ckx:,,''''
   ............'''''''''''',,,,,,,,,,,,,,,,,;;coddxxo'                          'odc;,,''''
   ..........''''''''''',,;:;;,,,,,,,,;,,;;;;:dOOd:'                            'loc;;;,'''
   .........''''''''''',,,:oo:::;;coc;;;;;;::lxxx:                               .:loxc,,''
   ......''''''''''''',,,;;lodkkdlxOxddoc:::cxxl'                                 .;oo:,,''
   ....''''''''''''',,,,,;;:cxOccol:,:lldxoldx;                                    :dl;,'''
   .''''''''''''',,,,,;;;;coxko.        .,okOl.                                    ,dl;,'''
   '''''''',,,,,,,,,;;loclokk;             ck,                                    .lo;,,'''
   '''',,,;;;,,;;;;;::lOkoox:               '.                                   .:l;,,,'''
   ,,;;;;:llc:cllccoxxOx,  ..     V I P            Mandelbrot Set Collection    ,c:;;,,,'''
   ',,,;;;:::;:::::clodko,,:'                                                   .,c:;,,,'''
   '''''',,,,,,,,,;;;:lxxxxOo.             .l'                                    'lc;,,'''
   ''''''''''',,,,,,,;::::cxko,.          ,x0:                                     :d:,,'''
   ..''''''''''''',,,,,,;;:clkk,.,.. ..':oxdkd.                                    ,do;,,''
   ....''''''''''''',,,,,;;:lkOddxkxodkkdlcclxo,.                                  cdc;,,''
   ......'''''''''''''',,,;odollc:lkdccc:;:::dkkl.                                .:dkc,,''
   .........'''''''''''',,;lc;;;;;;::;;;;;;;:cdOOc.                              ,ddll:,'''
   ............''''''''''',,,,,,,,,,,,,,,,;;;:okkdol,                           ;dd:;,,,'''
   .............'''''''''''''''''',,,,,,,,,,,;;:cclxx,                       .'..:xl;,,''''
   ................''''''''''''''''''''',,,,,,;;;:lkd,;oo;.              ..'lddlcokkc;,''''
   ....................'''''''''''''''''''',,,,,,:dOOkxookxoocc:,   .:cclooxd::cccdo:,'''''
   ......................''''''''''''''''''',,,,,;cccl:;:clccokd.   .ckdc:cc:;;,,;:;,''''''
   .........................'''''''''''''''''''',,,,,,,,;;;;:lkc     'xd:;;,,,,,,,''''''''.
   .............................'''''''''''''''''''',,,,,,,;:okkl;..:dkx:;,,,,''''''''''...
   .................................''''''''''''''''''',,,,,;coodkddkocc;,,,'''''''''''....
   ......................................''''''''''''''''',,,,;;:cxOdc:;,,''''''''''.......
   ..........................................''''''''''''''',,,;:odlll:,,'''''''''.........
   ..............................................'''''''''''',,;ll:;,,,'''''''''...........
   .................................................'''''''''',,;;,,''''''''''.............
   ....................................................'''''''''''''''''''.................
*/



/**
 * @title Mandelbrot VIP
 */
import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";

contract VIP is ERC20 {

    constructor(uint256 initialSupply) ERC20("Mandelbrot VIP Pass", "VIP") {
        _mint(msg.sender, initialSupply);
    }

    function decimals() public view virtual override returns (uint8) {
        return 0;
    }

    function airdrop(address[] memory lucky_guys) public { // TO_DO: implement this!
        require(lucky_guys.length<=balanceOf(msg.sender), "You don't own enough VIPs!");
        for (uint i=0; i < lucky_guys.length; i++) {
            transfer(lucky_guys[i],1);
        }
    }
}

File 20 of 23 : ContentMixin.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 21 of 23 : EIP712Base.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {Initializable} from "./Initializable.sol";

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 22 of 23 : Initializable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

contract Initializable {
    bool inited = false;

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

File 23 of 23 : NativeMetaTransaction.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {SafeMath} from  "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import {EIP712Base} from "./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
            );
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_proxyRegistryAddress","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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"Unveiled","type":"event"},{"inputs":[],"name":"COMMUNITY_QUOTA","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COMMUNITY_WALLET","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VIP_PASS_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"activate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"active","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"pure","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","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":"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":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"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":[],"name":"maximumPieces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[{"internalType":"uint256","name":"fractals","type":"uint256"}],"name":"pre_purchase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fractals","type":"uint256"}],"name":"premine","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fractals","type":"uint256"}],"name":"purchase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"remaining","outputs":[{"internalType":"uint256","name":"_remaining","type":"uint256"}],"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":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","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":[],"name":"timeToSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"pure","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUnveiled","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":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600a805460ff191690556000600f8190556010556702beba0d509280006013556014805479229ddbd9a20e3df3ab7f540ec77beb258476fee50a05000151806001600160d01b0319909116179055601580546001600160a01b031916735645e72bcbcb9f218268e5db15f62f016f8859841790553480156200008557600080fd5b5060405162002f7938038062002f79833981016040819052620000a891620003e6565b6040518060400160405280601981526020017f4d616e64656c62726f742053657420436f6c6c656374696f6e0000000000000081525060405180604001604052806004815260200163109493d560e21b81525082828281600090805190602001906200011692919062000340565b5080516200012c90600190602084019062000340565b505050600062000141620001bf60201b60201c565b600d80546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600e80546001600160a01b0319166001600160a01b038316179055620001b583620001db565b5050505062000455565b6000620001d66200023f60201b6200162a1760201c565b905090565b600a5460ff1615620002245760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b604482015260640160405180910390fd5b6200022f816200029e565b50600a805460ff19166001179055565b6000333014156200029857600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506200029b9050565b50335b90565b6040518060800160405280604f815260200162002f2a604f9139805160209182012082519282019290922060408051808201825260018152603160f81b90840152805180840194909452838101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608401523060808401524660a0808501919091528151808503909101815260c090930190528151910120600b55565b8280546200034e9062000418565b90600052602060002090601f016020900481019282620003725760008555620003bd565b82601f106200038d57805160ff1916838001178555620003bd565b82800160010185558215620003bd579182015b82811115620003bd578251825591602001919060010190620003a0565b50620003cb929150620003cf565b5090565b5b80821115620003cb5760008155600101620003d0565b600060208284031215620003f957600080fd5b81516001600160a01b03811681146200041157600080fd5b9392505050565b600181811c908216806200042d57607f821691505b602082108114156200044f57634e487b7160e01b600052602260045260246000fd5b50919050565b612ac580620004656000396000f3fe6080604052600436106101d05760003560e01c80636352211e116100fe5780636352211e1461042357806370a0823114610443578063715018a6146104635780637652225314610478578063889dd09d146104ab5780638da5cb5b146104c057806394810171146104d557806395d89b41146104f5578063992218451461050a5780639932495e14610520578063a22cb46514610540578063b88d4fde14610560578063c87b56dd14610580578063d547cfb7146105a0578063e0cad9b1146105b5578063e8a3d485146105dc578063e985e9c5146105f1578063efef39a114610611578063f2fde38b14610624578063f3fef3a31461064457600080fd5b806301ffc9a7146101d557806302fb0c5e1461020a57806306fdde0314610222578063081812fc14610244578063095ea7b3146102715780630c53c51c146102935780630f15f4c0146102a65780630f7e5970146102bb578063172e6cc2146102e857806318160ddd146102fb57806320379ee51461031a57806323b872dd1461032f5780632d0335ab1461034f5780632f745c5914610385578063315e9402146103a55780633408e470146103bb57806342842e0e146103ce5780634f6ccce7146103ee57806355234ec01461040e575b600080fd5b3480156101e157600080fd5b506101f56101f0366004612548565b610664565b60405190151581526020015b60405180910390f35b34801561021657600080fd5b5060115460ff166101f5565b34801561022e57600080fd5b5061023761068f565b60405161020191906126e7565b34801561025057600080fd5b5061026461025f36600461259f565b610721565b6040516102019190612661565b34801561027d57600080fd5b5061029161028c36600461236f565b6107ae565b005b6102376102a13660046124ae565b6108d1565b3480156102b257600080fd5b50610291610aba565b3480156102c757600080fd5b50610237604051806040016040528060018152602001603160f81b81525081565b6102916102f636600461259f565b610b2f565b34801561030757600080fd5b506008545b604051908152602001610201565b34801561032657600080fd5b50600b5461030c565b34801561033b57600080fd5b5061029161034a3660046123d4565b610ca9565b34801561035b57600080fd5b5061030c61036a366004612352565b6001600160a01b03166000908152600c602052604090205490565b34801561039157600080fd5b5061030c6103a036600461236f565b610ce1565b3480156103b157600080fd5b5061030c6107ba81565b3480156103c757600080fd5b504661030c565b3480156103da57600080fd5b506102916103e93660046123d4565b610d77565b3480156103fa57600080fd5b5061030c61040936600461259f565b610d92565b34801561041a57600080fd5b5061030c610e25565b34801561042f57600080fd5b5061026461043e36600461259f565b610e50565b34801561044f57600080fd5b5061030c61045e366004612352565b610ec7565b34801561046f57600080fd5b50610291610f4e565b34801561048457600080fd5b5060145461049990600160281b900460ff1681565b60405160ff9091168152602001610201565b3480156104b757600080fd5b5061030c610fd7565b3480156104cc57600080fd5b50610264611042565b3480156104e157600080fd5b50601554610264906001600160a01b031681565b34801561050157600080fd5b50610237611051565b34801561051657600080fd5b5061030c60105481565b34801561052c57600080fd5b5061029161053b36600461259f565b611060565b34801561054c57600080fd5b5061029161055b366004612480565b6110ec565b34801561056c57600080fd5b5061029161057b366004612415565b6111ea565b34801561058c57600080fd5b5061023761059b36600461259f565b611229565b3480156105ac57600080fd5b50610237611263565b3480156105c157600080fd5b5060145461026490600160301b90046001600160a01b031681565b3480156105e857600080fd5b50610237611283565b3480156105fd57600080fd5b506101f561060c36600461239b565b6112a3565b61029161061f36600461259f565b611377565b34801561063057600080fd5b5061029161063f366004612352565b6114b5565b34801561065057600080fd5b5061029161065f36600461236f565b6115b5565b60006001600160e01b0319821663780e9d6360e01b1480610689575061068982611686565b92915050565b60606000805461069e906128df565b80601f01602080910402602001604051908101604052809291908181526020018280546106ca906128df565b80156107175780601f106106ec57610100808354040283529160200191610717565b820191906000526020600020905b8154815290600101906020018083116106fa57829003601f168201915b5050505050905090565b600061072c826116d6565b6107925760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006107b982610e50565b9050806001600160a01b0316836001600160a01b031614156108275760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610789565b806001600160a01b03166108396116f3565b6001600160a01b0316148061085557506108558161060c6116f3565b6108c25760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610789565b6108cc83836116fd565b505050565b60408051606081810183526001600160a01b0388166000818152600c60209081529085902054845283015291810186905261090f878287878761176b565b6109655760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b6064820152608401610789565b6001600160a01b0387166000908152600c602052604090205461098990600161185b565b6001600160a01b0388166000908152600c60205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b906109d990899033908a90612675565b60405180910390a1600080306001600160a01b0316888a604051602001610a01929190612600565b60408051601f1981840301815290829052610a1b916125e4565b6000604051808303816000865af19150503d8060008114610a58576040519150601f19603f3d011682016040523d82523d6000602084013e610a5d565b606091505b509150915081610aae5760405162461bcd60e51b815260206004820152601c60248201527b119d5b98dd1a5bdb8818d85b1b081b9bdd081cdd58d8d95cdcd99d5b60221b6044820152606401610789565b98975050505050505050565b610ac26116f3565b6001600160a01b0316610ad3611042565b6001600160a01b031614610af95760405162461bcd60e51b8152600401610789906127a3565b60115460ff1615610b1c5760405162461bcd60e51b8152600401610789906127d8565b426012556011805460ff19166001179055565b6015546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015610b8157600080fd5b505af1158015610b95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb9919061252b565b5060115460ff16610bdc5760405162461bcd60e51b815260040161078990612781565b610be4610e25565b8111158015610bff5750601454600160201b900460ff168111155b610c1b5760405162461bcd60e51b81526004016107899061274c565b601354610c28908261287d565b3414610c765760405162461bcd60e51b815260206004820152601e60248201527f496e76616c6964207075726368617365206672616374616c732073656e7400006044820152606401610789565b60005b81811015610c9c57610c8a3361186e565b80610c948161291a565b915050610c79565b50610ca681611937565b50565b610cba610cb46116f3565b826119ae565b610cd65760405162461bcd60e51b815260040161078990612800565b6108cc838383611a70565b6000610cec83610ec7565b8210610d4e5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610789565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6108cc838383604051806020016040528060008152506111ea565b6000610d9d60085490565b8210610e005760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610789565b60088281548110610e1357610e1361298b565b90600052602060002001549050919050565b60006010546107ba1115610e4757601054610e42906107ba61289c565b905090565b50600090565b90565b6000818152600260205260408120546001600160a01b0316806106895760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610789565b60006001600160a01b038216610f325760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610789565b506001600160a01b031660009081526003602052604090205490565b610f566116f3565b6001600160a01b0316610f67611042565b6001600160a01b031614610f8d5760405162461bcd60e51b8152600401610789906127a3565b600d546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600d80546001600160a01b0319169055565b60115460009060ff16610ffc5760405162461bcd60e51b815260040161078990612781565b6014546012546110129163ffffffff1690612851565b421061101e5750600090565b60145460125442916110389163ffffffff90911690612851565b610e42919061289c565b600d546001600160a01b031690565b60606001805461069e906128df565b6110686116f3565b6001600160a01b0316611079611042565b6001600160a01b03161461109f5760405162461bcd60e51b8152600401610789906127a3565b60115460ff16156110c25760405162461bcd60e51b8152600401610789906127d8565b60005b818110156110e8576110d63361186e565b806110e08161291a565b9150506110c5565b5050565b6110f46116f3565b6001600160a01b0316826001600160a01b031614156111515760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610789565b806005600061115e6116f3565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556111a26116f3565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516111de911515815260200190565b60405180910390a35050565b6111fb6111f56116f3565b836119ae565b6112175760405162461bcd60e51b815260040161078990612800565b61122384848484611c1b565b50505050565b6060611233611263565b61123c83611c4e565b60405160200161124d929190612632565b6040516020818303038152906040529050919050565b6060604051806060016040528060308152602001612a6060309139905090565b60606040518060600160405280602c81526020016129f1602c9139905090565b600e5460405163c455279160e01b81526000916001600160a01b039081169190841690829063c4552791906112dc908890600401612661565b60206040518083038186803b1580156112f457600080fd5b505afa158015611308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132c9190612582565b6001600160a01b03161415611345576001915050610689565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff165b949350505050565b60115460ff166113995760405162461bcd60e51b815260040161078990612781565b6014546012546113af9163ffffffff1690612851565b4210156113f65760405162461bcd60e51b815260206004820152601560248201527450757263686173696e67206e6f742061637469766560581b6044820152606401610789565b6113fe610e25565b81111580156114195750601454600160201b900460ff168111155b6114355760405162461bcd60e51b81526004016107899061274c565b601354611442908261287d565b341461148f5760405162461bcd60e51b815260206004820152601c60248201527b125b9d985b1a59081c1d5c98da185cd948185b5bdd5b9d081cd95b9d60221b6044820152606401610789565b60005b81811015610c9c576114a33361186e565b806114ad8161291a565b915050611492565b6114bd6116f3565b6001600160a01b03166114ce611042565b6001600160a01b0316146114f45760405162461bcd60e51b8152600401610789906127a3565b6001600160a01b0381166115595760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610789565b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6115bd6116f3565b6001600160a01b03166115ce611042565b6001600160a01b0316146115f45760405162461bcd60e51b8152600401610789906127a3565b6040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156108cc573d6000803e3d6000fd5b60003330141561168157600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150610e4d9050565b503390565b60006001600160e01b031982166380ac58cd60e01b14806116b757506001600160e01b03198216635b5e139f60e01b145b8061068957506301ffc9a760e01b6001600160e01b0319831614610689565b6000908152600260205260409020546001600160a01b0316151590565b6000610e4261162a565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061173282610e50565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166117d15760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201526424a3a722a960d91b6064820152608401610789565b60016117e46117df87611d4b565b611dc8565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015611832573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b60006118678284612851565b9392505050565b6000611878610e25565b116118bc5760405162461bcd60e51b815260206004820152601460248201527314dd5c1c1b1e481b1a5b5a5d081c995858da195960621b6044820152606401610789565b60006118c6611df8565b90506118d28282611e09565b6118da611f47565b6001601060008282546118ed9190612851565b9091555050604080518281526001600160a01b03841660208201527ff0c5df69252d53366232eb47e2356ca22a0b21568ff375c79c68b85c51934d3c910160405180910390a15050565b60145460135460009161196c91606491600160281b900460ff169061195c908661287d565b611966919061287d565b90611f5e565b601454604051919250600160301b90046001600160a01b0316906108fc8315029083906000818181858888f193505050501580156108cc573d6000803e3d6000fd5b60006119b9826116d6565b611a1a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610789565b6000611a2583610e50565b9050806001600160a01b0316846001600160a01b03161480611a605750836001600160a01b0316611a5584610721565b6001600160a01b0316145b8061136f575061136f81856112a3565b826001600160a01b0316611a8382610e50565b6001600160a01b031614611aeb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610789565b6001600160a01b038216611b4d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610789565b611b58838383611f6a565b611b636000826116fd565b6001600160a01b0383166000908152600360205260408120805460019290611b8c90849061289c565b90915550506001600160a01b0382166000908152600360205260408120805460019290611bba908490612851565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611c26848484611a70565b611c3284848484612022565b6112235760405162461bcd60e51b8152600401610789906126fa565b606081611c725750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611c9c5780611c868161291a565b9150611c959050600a83612869565b9150611c76565b6000816001600160401b03811115611cb657611cb66129a1565b6040519080825280601f01601f191660200182016040528015611ce0576020820181803683370190505b5090505b841561136f57611cf560018361289c565b9150611d02600a86612935565b611d0d906030612851565b60f81b818381518110611d2257611d2261298b565b60200101906001600160f81b031916908160001a905350611d44600a86612869565b9450611ce4565b6000604051806080016040528060438152602001612a1d6043913980516020918201208351848301516040808701518051908601209051611dab950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b6000611dd3600b5490565b60405161190160f01b6020820152602281019190915260428101839052606201611dab565b600f54600090610e4290600161185b565b6001600160a01b038216611e5f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610789565b611e68816116d6565b15611eb45760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610789565b611ec060008383611f6a565b6001600160a01b0382166000908152600360205260408120805460019290611ee9908490612851565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600f8054906000611f578361291a565b9190505550565b60006118678284612869565b6001600160a01b038316611fc557611fc081600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611fe8565b816001600160a01b0316836001600160a01b031614611fe857611fe88382612136565b6001600160a01b038216611fff576108cc816121d3565b826001600160a01b0316826001600160a01b0316146108cc576108cc8282612282565b60006001600160a01b0384163b1561212b57836001600160a01b031663150b7a0261204b6116f3565b8786866040518563ffffffff1660e01b815260040161206d94939291906126aa565b602060405180830381600087803b15801561208757600080fd5b505af19250505080156120b7575060408051601f3d908101601f191682019092526120b491810190612565565b60015b612111573d8080156120e5576040519150601f19603f3d011682016040523d82523d6000602084013e6120ea565b606091505b5080516121095760405162461bcd60e51b8152600401610789906126fa565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061136f565b506001949350505050565b6000600161214384610ec7565b61214d919061289c565b6000838152600760205260409020549091508082146121a0576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906121e59060019061289c565b6000838152600960205260408120546008805493945090928490811061220d5761220d61298b565b90600052602060002001549050806008838154811061222e5761222e61298b565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061226657612266612975565b6001900381819060005260206000200160009055905550505050565b600061228d83610ec7565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600082601f8301126122d757600080fd5b81356001600160401b03808211156122f1576122f16129a1565b604051601f8301601f19908116603f01168101908282118183101715612319576123196129a1565b8160405283815286602085880101111561233257600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561236457600080fd5b8135611867816129b7565b6000806040838503121561238257600080fd5b823561238d816129b7565b946020939093013593505050565b600080604083850312156123ae57600080fd5b82356123b9816129b7565b915060208301356123c9816129b7565b809150509250929050565b6000806000606084860312156123e957600080fd5b83356123f4816129b7565b92506020840135612404816129b7565b929592945050506040919091013590565b6000806000806080858703121561242b57600080fd5b8435612436816129b7565b93506020850135612446816129b7565b92506040850135915060608501356001600160401b0381111561246857600080fd5b612474878288016122c6565b91505092959194509250565b6000806040838503121561249357600080fd5b823561249e816129b7565b915060208301356123c9816129cc565b600080600080600060a086880312156124c657600080fd5b85356124d1816129b7565b945060208601356001600160401b038111156124ec57600080fd5b6124f8888289016122c6565b9450506040860135925060608601359150608086013560ff8116811461251d57600080fd5b809150509295509295909350565b60006020828403121561253d57600080fd5b8151611867816129cc565b60006020828403121561255a57600080fd5b8135611867816129da565b60006020828403121561257757600080fd5b8151611867816129da565b60006020828403121561259457600080fd5b8151611867816129b7565b6000602082840312156125b157600080fd5b5035919050565b600081518084526125d08160208601602086016128b3565b601f01601f19169290920160200192915050565b600082516125f68184602087016128b3565b9190910192915050565b600083516126128184602088016128b3565b60609390931b6001600160601b0319169190920190815260140192915050565b600083516126448184602088016128b3565b8351908301906126588183602088016128b3565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b038481168252831660208201526060604082018190526000906126a1908301846125b8565b95945050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906126dd908301846125b8565b9695505050505050565b60208152600061186760208301846125b8565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601b908201527a151bdbc81b585b9e48199c9858dd185b1cc81c995c5d595cdd1959602a1b604082015260600190565b602080825260089082015267496e61637469766560c01b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600e908201526d416c72656164792061637469766560901b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000821982111561286457612864612949565b500190565b6000826128785761287861295f565b500490565b600081600019048311821515161561289757612897612949565b500290565b6000828210156128ae576128ae612949565b500390565b60005b838110156128ce5781810151838201526020016128b6565b838111156112235750506000910152565b600181811c908216806128f357607f821691505b6020821081141561291457634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561292e5761292e612949565b5060010190565b6000826129445761294461295f565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ca657600080fd5b8015158114610ca657600080fd5b6001600160e01b031981168114610ca657600080fdfe68747470733a2f2f6d616e64656c62726f742e6672616374616c6e66742e6172742f636f6c6c656374696f6e4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e61747572652968747470733a2f2f6d616e64656c62726f742e6672616374616c6e66742e6172742f6974656d3f746f6b656e5f69643da2646970667358221220f30ba8e741212c9ec1cbb0ddd9783ce64420ee89a25355ab8ed656224a87072564736f6c63430008070033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c7429000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1

Deployed Bytecode

0x6080604052600436106101d05760003560e01c80636352211e116100fe5780636352211e1461042357806370a0823114610443578063715018a6146104635780637652225314610478578063889dd09d146104ab5780638da5cb5b146104c057806394810171146104d557806395d89b41146104f5578063992218451461050a5780639932495e14610520578063a22cb46514610540578063b88d4fde14610560578063c87b56dd14610580578063d547cfb7146105a0578063e0cad9b1146105b5578063e8a3d485146105dc578063e985e9c5146105f1578063efef39a114610611578063f2fde38b14610624578063f3fef3a31461064457600080fd5b806301ffc9a7146101d557806302fb0c5e1461020a57806306fdde0314610222578063081812fc14610244578063095ea7b3146102715780630c53c51c146102935780630f15f4c0146102a65780630f7e5970146102bb578063172e6cc2146102e857806318160ddd146102fb57806320379ee51461031a57806323b872dd1461032f5780632d0335ab1461034f5780632f745c5914610385578063315e9402146103a55780633408e470146103bb57806342842e0e146103ce5780634f6ccce7146103ee57806355234ec01461040e575b600080fd5b3480156101e157600080fd5b506101f56101f0366004612548565b610664565b60405190151581526020015b60405180910390f35b34801561021657600080fd5b5060115460ff166101f5565b34801561022e57600080fd5b5061023761068f565b60405161020191906126e7565b34801561025057600080fd5b5061026461025f36600461259f565b610721565b6040516102019190612661565b34801561027d57600080fd5b5061029161028c36600461236f565b6107ae565b005b6102376102a13660046124ae565b6108d1565b3480156102b257600080fd5b50610291610aba565b3480156102c757600080fd5b50610237604051806040016040528060018152602001603160f81b81525081565b6102916102f636600461259f565b610b2f565b34801561030757600080fd5b506008545b604051908152602001610201565b34801561032657600080fd5b50600b5461030c565b34801561033b57600080fd5b5061029161034a3660046123d4565b610ca9565b34801561035b57600080fd5b5061030c61036a366004612352565b6001600160a01b03166000908152600c602052604090205490565b34801561039157600080fd5b5061030c6103a036600461236f565b610ce1565b3480156103b157600080fd5b5061030c6107ba81565b3480156103c757600080fd5b504661030c565b3480156103da57600080fd5b506102916103e93660046123d4565b610d77565b3480156103fa57600080fd5b5061030c61040936600461259f565b610d92565b34801561041a57600080fd5b5061030c610e25565b34801561042f57600080fd5b5061026461043e36600461259f565b610e50565b34801561044f57600080fd5b5061030c61045e366004612352565b610ec7565b34801561046f57600080fd5b50610291610f4e565b34801561048457600080fd5b5060145461049990600160281b900460ff1681565b60405160ff9091168152602001610201565b3480156104b757600080fd5b5061030c610fd7565b3480156104cc57600080fd5b50610264611042565b3480156104e157600080fd5b50601554610264906001600160a01b031681565b34801561050157600080fd5b50610237611051565b34801561051657600080fd5b5061030c60105481565b34801561052c57600080fd5b5061029161053b36600461259f565b611060565b34801561054c57600080fd5b5061029161055b366004612480565b6110ec565b34801561056c57600080fd5b5061029161057b366004612415565b6111ea565b34801561058c57600080fd5b5061023761059b36600461259f565b611229565b3480156105ac57600080fd5b50610237611263565b3480156105c157600080fd5b5060145461026490600160301b90046001600160a01b031681565b3480156105e857600080fd5b50610237611283565b3480156105fd57600080fd5b506101f561060c36600461239b565b6112a3565b61029161061f36600461259f565b611377565b34801561063057600080fd5b5061029161063f366004612352565b6114b5565b34801561065057600080fd5b5061029161065f36600461236f565b6115b5565b60006001600160e01b0319821663780e9d6360e01b1480610689575061068982611686565b92915050565b60606000805461069e906128df565b80601f01602080910402602001604051908101604052809291908181526020018280546106ca906128df565b80156107175780601f106106ec57610100808354040283529160200191610717565b820191906000526020600020905b8154815290600101906020018083116106fa57829003601f168201915b5050505050905090565b600061072c826116d6565b6107925760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006107b982610e50565b9050806001600160a01b0316836001600160a01b031614156108275760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610789565b806001600160a01b03166108396116f3565b6001600160a01b0316148061085557506108558161060c6116f3565b6108c25760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610789565b6108cc83836116fd565b505050565b60408051606081810183526001600160a01b0388166000818152600c60209081529085902054845283015291810186905261090f878287878761176b565b6109655760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b6064820152608401610789565b6001600160a01b0387166000908152600c602052604090205461098990600161185b565b6001600160a01b0388166000908152600c60205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b906109d990899033908a90612675565b60405180910390a1600080306001600160a01b0316888a604051602001610a01929190612600565b60408051601f1981840301815290829052610a1b916125e4565b6000604051808303816000865af19150503d8060008114610a58576040519150601f19603f3d011682016040523d82523d6000602084013e610a5d565b606091505b509150915081610aae5760405162461bcd60e51b815260206004820152601c60248201527b119d5b98dd1a5bdb8818d85b1b081b9bdd081cdd58d8d95cdcd99d5b60221b6044820152606401610789565b98975050505050505050565b610ac26116f3565b6001600160a01b0316610ad3611042565b6001600160a01b031614610af95760405162461bcd60e51b8152600401610789906127a3565b60115460ff1615610b1c5760405162461bcd60e51b8152600401610789906127d8565b426012556011805460ff19166001179055565b6015546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015610b8157600080fd5b505af1158015610b95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb9919061252b565b5060115460ff16610bdc5760405162461bcd60e51b815260040161078990612781565b610be4610e25565b8111158015610bff5750601454600160201b900460ff168111155b610c1b5760405162461bcd60e51b81526004016107899061274c565b601354610c28908261287d565b3414610c765760405162461bcd60e51b815260206004820152601e60248201527f496e76616c6964207075726368617365206672616374616c732073656e7400006044820152606401610789565b60005b81811015610c9c57610c8a3361186e565b80610c948161291a565b915050610c79565b50610ca681611937565b50565b610cba610cb46116f3565b826119ae565b610cd65760405162461bcd60e51b815260040161078990612800565b6108cc838383611a70565b6000610cec83610ec7565b8210610d4e5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610789565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6108cc838383604051806020016040528060008152506111ea565b6000610d9d60085490565b8210610e005760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610789565b60088281548110610e1357610e1361298b565b90600052602060002001549050919050565b60006010546107ba1115610e4757601054610e42906107ba61289c565b905090565b50600090565b90565b6000818152600260205260408120546001600160a01b0316806106895760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610789565b60006001600160a01b038216610f325760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610789565b506001600160a01b031660009081526003602052604090205490565b610f566116f3565b6001600160a01b0316610f67611042565b6001600160a01b031614610f8d5760405162461bcd60e51b8152600401610789906127a3565b600d546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600d80546001600160a01b0319169055565b60115460009060ff16610ffc5760405162461bcd60e51b815260040161078990612781565b6014546012546110129163ffffffff1690612851565b421061101e5750600090565b60145460125442916110389163ffffffff90911690612851565b610e42919061289c565b600d546001600160a01b031690565b60606001805461069e906128df565b6110686116f3565b6001600160a01b0316611079611042565b6001600160a01b03161461109f5760405162461bcd60e51b8152600401610789906127a3565b60115460ff16156110c25760405162461bcd60e51b8152600401610789906127d8565b60005b818110156110e8576110d63361186e565b806110e08161291a565b9150506110c5565b5050565b6110f46116f3565b6001600160a01b0316826001600160a01b031614156111515760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610789565b806005600061115e6116f3565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556111a26116f3565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516111de911515815260200190565b60405180910390a35050565b6111fb6111f56116f3565b836119ae565b6112175760405162461bcd60e51b815260040161078990612800565b61122384848484611c1b565b50505050565b6060611233611263565b61123c83611c4e565b60405160200161124d929190612632565b6040516020818303038152906040529050919050565b6060604051806060016040528060308152602001612a6060309139905090565b60606040518060600160405280602c81526020016129f1602c9139905090565b600e5460405163c455279160e01b81526000916001600160a01b039081169190841690829063c4552791906112dc908890600401612661565b60206040518083038186803b1580156112f457600080fd5b505afa158015611308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132c9190612582565b6001600160a01b03161415611345576001915050610689565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff165b949350505050565b60115460ff166113995760405162461bcd60e51b815260040161078990612781565b6014546012546113af9163ffffffff1690612851565b4210156113f65760405162461bcd60e51b815260206004820152601560248201527450757263686173696e67206e6f742061637469766560581b6044820152606401610789565b6113fe610e25565b81111580156114195750601454600160201b900460ff168111155b6114355760405162461bcd60e51b81526004016107899061274c565b601354611442908261287d565b341461148f5760405162461bcd60e51b815260206004820152601c60248201527b125b9d985b1a59081c1d5c98da185cd948185b5bdd5b9d081cd95b9d60221b6044820152606401610789565b60005b81811015610c9c576114a33361186e565b806114ad8161291a565b915050611492565b6114bd6116f3565b6001600160a01b03166114ce611042565b6001600160a01b0316146114f45760405162461bcd60e51b8152600401610789906127a3565b6001600160a01b0381166115595760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610789565b600d546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6115bd6116f3565b6001600160a01b03166115ce611042565b6001600160a01b0316146115f45760405162461bcd60e51b8152600401610789906127a3565b6040516001600160a01b0383169082156108fc029083906000818181858888f193505050501580156108cc573d6000803e3d6000fd5b60003330141561168157600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150610e4d9050565b503390565b60006001600160e01b031982166380ac58cd60e01b14806116b757506001600160e01b03198216635b5e139f60e01b145b8061068957506301ffc9a760e01b6001600160e01b0319831614610689565b6000908152600260205260409020546001600160a01b0316151590565b6000610e4261162a565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061173282610e50565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b0386166117d15760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201526424a3a722a960d91b6064820152608401610789565b60016117e46117df87611d4b565b611dc8565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015611832573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b60006118678284612851565b9392505050565b6000611878610e25565b116118bc5760405162461bcd60e51b815260206004820152601460248201527314dd5c1c1b1e481b1a5b5a5d081c995858da195960621b6044820152606401610789565b60006118c6611df8565b90506118d28282611e09565b6118da611f47565b6001601060008282546118ed9190612851565b9091555050604080518281526001600160a01b03841660208201527ff0c5df69252d53366232eb47e2356ca22a0b21568ff375c79c68b85c51934d3c910160405180910390a15050565b60145460135460009161196c91606491600160281b900460ff169061195c908661287d565b611966919061287d565b90611f5e565b601454604051919250600160301b90046001600160a01b0316906108fc8315029083906000818181858888f193505050501580156108cc573d6000803e3d6000fd5b60006119b9826116d6565b611a1a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610789565b6000611a2583610e50565b9050806001600160a01b0316846001600160a01b03161480611a605750836001600160a01b0316611a5584610721565b6001600160a01b0316145b8061136f575061136f81856112a3565b826001600160a01b0316611a8382610e50565b6001600160a01b031614611aeb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610789565b6001600160a01b038216611b4d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610789565b611b58838383611f6a565b611b636000826116fd565b6001600160a01b0383166000908152600360205260408120805460019290611b8c90849061289c565b90915550506001600160a01b0382166000908152600360205260408120805460019290611bba908490612851565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611c26848484611a70565b611c3284848484612022565b6112235760405162461bcd60e51b8152600401610789906126fa565b606081611c725750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611c9c5780611c868161291a565b9150611c959050600a83612869565b9150611c76565b6000816001600160401b03811115611cb657611cb66129a1565b6040519080825280601f01601f191660200182016040528015611ce0576020820181803683370190505b5090505b841561136f57611cf560018361289c565b9150611d02600a86612935565b611d0d906030612851565b60f81b818381518110611d2257611d2261298b565b60200101906001600160f81b031916908160001a905350611d44600a86612869565b9450611ce4565b6000604051806080016040528060438152602001612a1d6043913980516020918201208351848301516040808701518051908601209051611dab950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b6000611dd3600b5490565b60405161190160f01b6020820152602281019190915260428101839052606201611dab565b600f54600090610e4290600161185b565b6001600160a01b038216611e5f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610789565b611e68816116d6565b15611eb45760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610789565b611ec060008383611f6a565b6001600160a01b0382166000908152600360205260408120805460019290611ee9908490612851565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600f8054906000611f578361291a565b9190505550565b60006118678284612869565b6001600160a01b038316611fc557611fc081600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611fe8565b816001600160a01b0316836001600160a01b031614611fe857611fe88382612136565b6001600160a01b038216611fff576108cc816121d3565b826001600160a01b0316826001600160a01b0316146108cc576108cc8282612282565b60006001600160a01b0384163b1561212b57836001600160a01b031663150b7a0261204b6116f3565b8786866040518563ffffffff1660e01b815260040161206d94939291906126aa565b602060405180830381600087803b15801561208757600080fd5b505af19250505080156120b7575060408051601f3d908101601f191682019092526120b491810190612565565b60015b612111573d8080156120e5576040519150601f19603f3d011682016040523d82523d6000602084013e6120ea565b606091505b5080516121095760405162461bcd60e51b8152600401610789906126fa565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061136f565b506001949350505050565b6000600161214384610ec7565b61214d919061289c565b6000838152600760205260409020549091508082146121a0576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906121e59060019061289c565b6000838152600960205260408120546008805493945090928490811061220d5761220d61298b565b90600052602060002001549050806008838154811061222e5761222e61298b565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061226657612266612975565b6001900381819060005260206000200160009055905550505050565b600061228d83610ec7565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600082601f8301126122d757600080fd5b81356001600160401b03808211156122f1576122f16129a1565b604051601f8301601f19908116603f01168101908282118183101715612319576123196129a1565b8160405283815286602085880101111561233257600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561236457600080fd5b8135611867816129b7565b6000806040838503121561238257600080fd5b823561238d816129b7565b946020939093013593505050565b600080604083850312156123ae57600080fd5b82356123b9816129b7565b915060208301356123c9816129b7565b809150509250929050565b6000806000606084860312156123e957600080fd5b83356123f4816129b7565b92506020840135612404816129b7565b929592945050506040919091013590565b6000806000806080858703121561242b57600080fd5b8435612436816129b7565b93506020850135612446816129b7565b92506040850135915060608501356001600160401b0381111561246857600080fd5b612474878288016122c6565b91505092959194509250565b6000806040838503121561249357600080fd5b823561249e816129b7565b915060208301356123c9816129cc565b600080600080600060a086880312156124c657600080fd5b85356124d1816129b7565b945060208601356001600160401b038111156124ec57600080fd5b6124f8888289016122c6565b9450506040860135925060608601359150608086013560ff8116811461251d57600080fd5b809150509295509295909350565b60006020828403121561253d57600080fd5b8151611867816129cc565b60006020828403121561255a57600080fd5b8135611867816129da565b60006020828403121561257757600080fd5b8151611867816129da565b60006020828403121561259457600080fd5b8151611867816129b7565b6000602082840312156125b157600080fd5b5035919050565b600081518084526125d08160208601602086016128b3565b601f01601f19169290920160200192915050565b600082516125f68184602087016128b3565b9190910192915050565b600083516126128184602088016128b3565b60609390931b6001600160601b0319169190920190815260140192915050565b600083516126448184602088016128b3565b8351908301906126588183602088016128b3565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b038481168252831660208201526060604082018190526000906126a1908301846125b8565b95945050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906126dd908301846125b8565b9695505050505050565b60208152600061186760208301846125b8565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601b908201527a151bdbc81b585b9e48199c9858dd185b1cc81c995c5d595cdd1959602a1b604082015260600190565b602080825260089082015267496e61637469766560c01b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600e908201526d416c72656164792061637469766560901b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000821982111561286457612864612949565b500190565b6000826128785761287861295f565b500490565b600081600019048311821515161561289757612897612949565b500290565b6000828210156128ae576128ae612949565b500390565b60005b838110156128ce5781810151838201526020016128b6565b838111156112235750506000910152565b600181811c908216806128f357607f821691505b6020821081141561291457634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561292e5761292e612949565b5060010190565b6000826129445761294461295f565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610ca657600080fd5b8015158114610ca657600080fd5b6001600160e01b031981168114610ca657600080fdfe68747470733a2f2f6d616e64656c62726f742e6672616374616c6e66742e6172742f636f6c6c656374696f6e4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e61747572652968747470733a2f2f6d616e64656c62726f742e6672616374616c6e66742e6172742f6974656d3f746f6b656e5f69643da2646970667358221220f30ba8e741212c9ec1cbb0ddd9783ce64420ee89a25355ab8ed656224a87072564736f6c63430008070033

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

000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1

-----Decoded View---------------
Arg [0] : _proxyRegistryAddress (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

OVERVIEW

The *Mandelbrot Set Collection* is a curated selection of points of the Mandelbrot, generated with a numerical algorithm and engraved into 1978 unique NFTs. Each work represents the neighborhood of one of our favorite points of the fractal, with a random zoom factor and colored with arbitrary gra...

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.